aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2017-04-06drm/amdgpu/vega10:timeout set to equal with VIMonk Liu1-1/+1
Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu:implement the reset MB func for vega10Monk Liu2-0/+138
they are lack in the bringup stage, we need them for GPU reset feature. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu:fix typo for mxgpu_aiMonk Liu1-2/+2
Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu:no need to involv HDP in KIQMonk Liu3-8/+0
1,KIQ won't touch VRAM so no need to involv HDP flush/invalidate at all. 2,According to CP hw designer KIQ better not use any PM4 package lead to wait behave. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu:add PSP block only load_type=PSP (v2)Monk Liu1-1/+2
SRIOV currently only can load ucode directly, and PSP block is not supported by VF temporarily. will remove this restrict and use PSP load all ucode even for SRIOV later v2: squash in check against module parameter Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu/smu9: update to latest driver interfaceEvan Quan1-4/+53
Signed-off-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_gpu_init()Tom St Denis1-3/+1
Use new WREG32_FIELD15 macro Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_rlc_reset()Tom St Denis1-6/+2
Use new WREG32_FIELD15 macro Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_rlc_start()Tom St Denis1-3/+1
Use new WREG32_FIELD15 macro Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: simplify gfx_v9_0_cp_gfx_enable()Tom St Denis1-8/+4
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_kiq_init_register()Tom St Denis1-9/+3
Use new WREG32_FIELD macro Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Drop gfx_v9_0_print_status()Tom St Denis1-174/+1
It's not used in gfx 6/7/8 so drop it from gfx 9 as well. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_set_gfx_eop_interrupt_state()Tom St Denis1-12/+3
Use new WREG32_FIELD15 macro. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_reg_fault_state()Tom St Denis1-11/+3
Use new WREG32_FIELD15 macro. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_inst_fault_state()Tom St Denis1-12/+3
Use new WREG32_FIELD15 macro. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: cleanup gfx_v9_0_init_queue()Tom St Denis2-8/+6
Introduce WREG32_FIELD15 macro for SOC15 architectures. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu: Move function amdgpu_has_atpx near other similar functionsAlex Xie2-6/+2
Signed-off-by: Alex Xie <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu: fix over allocating of IRQ sourcesChristian König1-3/+4
We need an array of pointers to IRQ sources, not an array of sources. Signed-off-by: Christian König <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Clean up psp reload_quirk()Tom St Denis1-8/+4
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Fix psp_v3_1 compare sramTom St Denis1-1/+1
Had the wrong sense in the loop Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu: cleanup get_invalidate_req v2Christian König8-49/+27
The two hubs are just instances of the same hardware, so the register bits are identical. v2: keep the function pointer Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu: fix vm size and block size for VMPT (v5)Zhang, Jerry9-35/+52
Set reasonable defaults per family. v2: set both of them in gmc v3: move vm size and block size in vm manager v4: squash in warning fix from Alex Xie v5: squash in min() warning fix Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Fix srbm_indexing in init/inactive hqd codeTom St Denis1-0/+5
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Clean up gfx_v8_0_mqd_init()Tom St Denis1-8/+4
Clean up a toggle with ?:. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: de-numberify HQD_ACTIVE check.Tom St Denis1-2/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: clean up gfx_v8_0_kiq_init_register()Tom St Denis1-9/+3
Swap read/write pattern for WREG32_FIELD() Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Clean up gfx_v8_0_inactive_hqd()Tom St Denis1-5/+1
Swap read/write pattern for WREG32_FIELD() Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amd/amdgpu: Clean up gfx_v8_0_kiq_set_interrupt_state()Tom St Denis2-28/+15
Use new WREG32_FIELD_OFFSET() to clean up code. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu/gfx8: KIQ is also disabled when MEC is disabledAlex Deucher1-0/+1
Set the ready flag to reflect this. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu: cleanup VMHUB bit definitions v2Christian König4-29/+8
The two hubs are just instances of the same hardware, so the register bits are identical. v2: only remove get_vm_protection_bits for now Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm/amdgpu: handle CPU access for split VRAM buffers (v2)Christian König2-7/+13
This avoids merging them together on page fault. v2: squash in 64-bit division fix Signed-off-by: Christian König <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-06drm: Add acquire ctx to ->gamma_set hookDaniel Vetter5-5/+10
Atomic helpers really want this instead of the hacked-up legacy backoff trick, which unfortunately prevents drivers from using their own private drm_modeset_locks. Aside: There's a few atomic drivers (nv50, vc4, soon vmwgfx) which don't yet use the new atomic color mgmt/gamma table stuff. Would be nice if they could switch over and just hook up drm_atomic_helper_legacy_gamma_set() instead. Cc: Dave Airlie <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Sinclair Yeh <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Eric Anholt <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-04drm/amdgpu: use TTM_PL_FLAG_CONTIGUOUS v2Christian König2-10/+18
Implement AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS using TTM_PL_FLAG_CONTIGUOUS instead of a placement limit. That allows us to better handle CPU accessible placements. v2: prevent virtual BO start address from overflowing Signed-off-by: Christian König <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: move adjust_mc_addr into amdgpu_gart_funcsChristian König3-23/+9
We should probably rename amdgpu_gart_funcs sooner or later. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: cleanup logic in amdgpu_vm_flushChristian König1-10/+10
Remove some of the extra checks where they don't hurt us. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: cleanup coding style in amdgpu_vm_flushChristian König1-43/+45
Abort early if there is nothing todo and correctly indent the "if"s. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: coding style of amdgpu_vm_is_gpu_resetChristian König1-7/+14
The name is a bit confusing and the extra "? true : false" is superflous. Additional to that remove setting the reset counter directly after checking it. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: remove VMID first trackingChristian König2-5/+0
Not used any more. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: move VM related defines into amdgpu_vm.hChristian König2-8/+8
Try to clean up amdgpu.h. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: fix VMHUB order to match the hardwareChristian König2-11/+5
Match our defines with what the hw uses. Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: drop alpha supportChristian König1-25/+0
We will probably never see this combination. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/ttm: add io_mem_pfn callbackChristian König1-0/+1
This allows the driver to handle io_mem mappings on their own. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu/vi: add defines for KIQ packetsAlex Deucher1-0/+82
Make it clearer how these packets work. Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu/soc15: Fix static checker warningsAlex Deucher1-0/+4
vega10 is the only soc15 asic at the moment so these warnings are invalid, but add a default case to silence the warnings. Fixes: 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)" Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: Read vram width from integrated system info tableHarry Wentland4-82/+123
On KB, KV, CZ we should read the vram width from integrated system table, if we can. The NOOFCHAN in MC_SHARED_CHMAP is not accurate. With this change we can enable two 4k displays on CZ again. This use case was broken sometime in January when we started looking at vram_width for bandwidth calculations instead of hardcoding this value. v2: Return 0 if integrated system info table is not available. Tested-by: Roman Li <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: create a func to check vm sizeZhang, Jerry1-20/+31
break it out from the check parameters function. Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: Fix a NULL deref in amdgpu_vm_add_prt_cb()Dan Carpenter1-1/+1
We accidentally dereference "cb" if the kmalloc() fails. Fixes: 451bc8eb8fe6 ("drm/amdgpu: fix PRT teardown on VM fini v3") Reviewed-by: Christian König <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amd/powerplay: fix a couple locking issuesDan Carpenter1-2/+4
We should return unlock on the error path in pp_dpm_dispatch_tasks() and there is a double lock bug in pp_dpm_set_sclk_od(). Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amd/powerplay: fix pp_dpm_get_current_power_state() (v2)Dan Carpenter1-0/+4
This switch statement is missing breaks. v2: agd: break in default case as well Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-04-04drm/amdgpu: various cleanups for uvd/vce.Rex Zhu7-103/+22
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>