aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2015-08-17drm/amdgpu: optimize amdgpu_parser_initmonk.liu1-9/+8
use kmalloc_array instead of kcalloc where appropriate and other cleanups. Signed-off-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-17drm/amdgpu: merge amdgpu_family.h into amd_shared.h (v2)Jammy Zhou23-174/+138
Make the definitions common for all driver components v2: fix kfd Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: add some pptable definitionsJammy Zhou1-1/+5
Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: add some common definitions to amd_shared.hJammy Zhou1-0/+11
Add GPU family definitions and timeout value for IP components. Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: allow userspace to read more debug registersMarek Olšák1-0/+20
Feel free to suggest more. Signed-off-by: Marek Olšák <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-17drm/amdgpu: move some atombios definitions to common folder (v2)Alex Deucher6-1/+2
the definitions can be shared by different IP components. v2: fix include path Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: fix UVD/VCE fence handlingChristian König3-6/+9
We need to return the sequence number to userspace even when we don't use user fences. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: add fence suspend/resume functionsAlex Deucher3-17/+67
Added to: - handle draining the ring on suspend - properly enable/disable interrupts on suspend and resume Fix breakages from: commit 467ee3be53d240d08beed2e82a941e820c1ac323 Author: Chunming Zhou <[email protected]> Date: Mon Jun 1 14:14:32 2015 +0800 drm/amdgpu: always enable EOP interrupt v2 Tested-by: Audrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: always enable EOP interrupt v2Chunming Zhou2-37/+6
v2 (chk): always enable EOP interrupt, independent of scheduler, remove now unused delayed_irq handling. Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-17drm/amdgpu: rework vm_grab_id interfaceChristian König3-15/+17
This makes assigning VM IDs independent from the use of VM IDs. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-17drm/amdgpu: no updates shouldn't cause vm flush v2Christian König1-4/+6
v2 (chk): split fix from original patch Signed-off-by: monk.liu <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-17drm/amdgpu: fix signed overrun in amdgpu_ctx_get_fenceChristian König1-1/+1
Otherwise the first 16 fences of a context will always signal immediately. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-17drm/amdgpu: fix context memory leakChristian König1-0/+1
Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-08-17drm/amdgpu: remove amdgpu_fence_recreateChristian König2-34/+0
It's not used any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-17drm/amdgpu: add user fence context map v2Christian König4-30/+110
This is a prerequisite for the GPU scheduler to make the order of submission independent from the order of execution. v2: properly implement the locking Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-17drm/amdgpu: deal with foreign fences in amdgpu_syncChristian König5-29/+45
This also requires some error handling from the callers of that function. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-17drm/amdgpu: cleanup context structure v2Alex Deucher2-49/+29
The comment is misleading and incorrect, remove it. Printing the id is completely meaningless and this practice can cause a race conditions on command submission. The flags and hangs fields are completely unused. Give all fields a common indentation. v2: remove fpriv reference and unused flags as well, fix debug message. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-08-17drm/amdgpu: add cgs_interface for pg and cgrezhu2-1/+61
v3: check whether ip_blocks is enable v2: add break in the for loop. Signed-off-by: Rex zhu <[email protected]>
2015-08-17drm/amdgpu: fix some typo for cgs definitionsJammy Zhou1-2/+2
Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: add cgs_get_firmware_info interface v2Jammy Zhou2-1/+167
This new interface can be used by IP components to retrieve the firmware information from the core driver. v2: fix one typo Signed-off-by: Jammy Zhou <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Young Yang <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: implement cgs gpu memory callbacksChunming Zhou1-12/+226
This implements the cgs interface for allocating GPU memory. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: add atom interfaces for CGSChunming Zhou1-6/+22
This implements the interface for atombios command and data table access. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: Implement irq interfaces for CGSAlex Deucher5-6/+84
This implements the irq src registrar. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: Implement the pciconfig callbacks for CGSChunming Zhou1-12/+28
This implements the pciconfig register accessors. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: Implement mmio callbacks for CGSChunming Zhou1-7/+38
This implements the MMIO register accessors. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amd: Add CGS interfacesChunming Zhou5-0/+1036
CGS (Common Graphics Services) is an AMD cross component abstraction layer to designed to better encapsulate specific IP block drivers so different teams can effectively work on differnet IP block drivers independently. It provides a common interface for things like accessing registers, allocating GPU memory, and registering interrupt sources. The plan is to eventually move more and more IP drivers to this interface. The first user is the ACP IP driver. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Acked-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-17drm/amdgpu: fix one warning messageJammy Zhou1-1/+2
In function 'amdgpu_uvd_cs_pass2': warning: 'min_ctx_size' may be used uninitialized in this function buf_sizes[0x4] = min_ctx_size; ^ note: 'min_ctx_size' was declared here unsigned image_size, tmp, min_dpb_size, num_dpb_buffer, min_ctx_size; ^ Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2015-08-17Merge tag 'v4.2-rc7' into drm-nextDave Airlie15-97/+296
Linux 4.2-rc7 Backmerge master for i915 fixes
2015-08-14Merge tag 'drm-amdkfd-next-fixes-2015-08-05' of ↵Dave Airlie3-3/+3
git://people.freedesktop.org/~gabbayo/linux into drm-next Two small bug fixes for the code you pulled for 4.3: - Used a SHIFT define instead of a MASK define to check if a bit is turned on when destroying hqd. Luckily, this is in gfx7 interface file with amdgpu, which was used only for bring-up purposes of amdgpu, so no real effect on a running system - Used a logical AND instead of a bitwise AND operator, when initializing sdma virtual memory when using SDMA queues * tag 'drm-amdkfd-next-fixes-2015-08-05' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: fix bug when initializing sdma vm drm/amdgpu: fix bug when amdkfd destroys hqd
2015-08-12Revert "drm/amdgpu: Configure doorbell to maximum slots"Alex Deucher1-1/+1
This reverts commit 78ad5cdd21f0d614983fc397338944e797ec70b9. This commit breaks dpm and suspend/resume on CZ.
2015-08-12drm/amdgpu: add context buffer size check for HEVCBoyuan Zhang1-3/+14
Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-06drm/amdgpu: Use new drm_fb_helper functionsArchit Taneja1-31/+14
Use the newly created wrapper drm_fb_helper functions instead of calling core fbdev functions directly. They also simplify the fb_info creation. v3: - Don't touch remove_conflicting_framebuffers v2: - Fixed PTR_ERR issue mentioned by kbuild bot Cc: Fengguang Wu <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Oded Gabbay <[email protected]> Cc: "Christian König" <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2015-08-05drm/amdgpu: set fw_version and feature_version for smu fw loadingJammy Zhou3-21/+30
The fw_version and feature_verion should be set correctly when the firmwares are loaded by SMU on Tonga/Carrzio/Iceland Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-05drm/amdgpu: add feature version for SDMA ucodeJammy Zhou5-1/+5
Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-05drm/amdgpu: add feature version for RLC and MEC v2Jammy Zhou4-5/+21
Expose feature version to user space for RLC/MEC/MEC2 ucode as well v2: fix coding style Signed-off-by: Jammy Zhou <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-08-05drm/amdgpu: increment queue when iterating on this variable.Nicolas Iooss1-1/+1
gfx_v7_0_print_status contains a for loop on variable queue which does not update this variable between each iteration. This is bug is reported by clang while building allmodconfig LLVMLinux on x86_64: drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:5126:19: error: variable 'queue' used in loop condition not modified in loop body [-Werror,-Wloop-analysis] for (queue = 0; queue < 8; i++) { ^~~~~ Fix this by incrementing variable queue instead of i in this loop. Signed-off-by: Nicolas Iooss <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-08-05drm/amdgpu: fix rb setting for CZAlex Deucher1-4/+1
Always set num_rbs to 2 for CZ. The 1 RB parts are often harvest configs. The will get sorted out in mesa when we program PA_SC_RASTER_CONFIG[_1]. Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-30drm/amdkfd: fix bug when initializing sdma vmOded Gabbay2-2/+2
A logical AND operation was used during mask and shift, instead of a bitwise AND operation. This patch fixes this bug by changing the operation to bitwise AND. Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-07-30drm/amdgpu: fix bug when amdkfd destroys hqdOded Gabbay1-1/+1
The wrong define was used to check if the hqd is still active v2: Don't use SHIFT as the MASK is already shifted Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-07-29drm/amdgpu: add new parameter to seperate map and unmapmonk.liu1-3/+5
Signed-off-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-07-29drm/amdgpu: hdp_flush is not needed for inside IBmonk.liu1-8/+8
hdp flush is not needed for IBs that dispatched from kernel inside because there is no video memory host access Signed-off-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-07-29drm/amdgpu: different emit_ib for gfx and computemonk.liu2-22/+71
compute ring didn't use const engine byfar, so ignore CE things in compute routine Signed-off-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-07-29drm/amdgpu: information leak in amdgpu_info_ioctl()Dan Carpenter1-1/+1
We recently changed the drm_amdgpu_info_device struct so now there is a 4 byte hole at the end. We need to initialize it so we don't disclose secret information from the stack. Fixes: fa92754e9c47 ('drm/amdgpu: add VCE harvesting instance query') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-29drm/amdgpu: clean up init sequence for failuresAlex Deucher3-19/+31
If we fail during device init, record what state each block is in so that we can tear down clearly. Fixes various problems on device init failure. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-23drm/amdgpu/cz/dpm: properly report UVD and VCE clock levelsAlex Deucher1-16/+45
VCE, UVD DPM work similarly to SCLK DPM. Report the current clock levels for UVD and VCE via debugfs. Signed-off-by: Alex Deucher <[email protected]>
2015-07-23drm/amdgpu/cz: implement voltage validation properlyAlex Deucher1-7/+16
CZ uses a different set of registers compared to previous asics and supports separate NB and GFX planes. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-23drm/amdgpu: add VCE harvesting instance queryLeo Liu1-0/+1
Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-07-23drm/amdgpu: implement VCE 3.0 harvesting support (v4)Alex Deucher2-0/+52
For boards with bad VCE blocks, only configure the working block. v2: use the harvest info for pipe setup v3: fix mask check as noted by Leo v4: add dGPU support Reviewed-by: Christian König <[email protected]> (v2) Signed-off-by: Alex Deucher <[email protected]>
2015-07-23drm/amdgpu/dce10: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer1-0/+4
This doesn't seem strictly necessary with Tonga right now, but that might change with future power management enhancements. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
2015-07-23drm/amdgpu/dce11: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer1-0/+4
Something (ATOM BIOS?) seems to be clobbering the LB_INTERRUPT_MASK register while the CRTC is off, which caused e.g. glxgears or gnome-shell to hang after a modeset. Reviewed-and-Tested-by: Alex Deucher <[email protected]> Tested-by: Sonny Jiang <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>