aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2018-11-1974-2132/+2570
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next New features for 4.21: amdgpu: - Support for SDMA paging queue on vega - Put compute EOP buffers into vram for better performance - Share more code with amdkfd - Support for scanout with DCC on gfx9 - Initial kerneldoc for DC - Updated SMU firmware support for gfx8 chips - Rework CSA handling for eventual support for preemption - XGMI PSP support - Clean up RLC handling - Enable GPU reset by default on VI, SOC15 dGPUs - Ring and IB test cleanups amdkfd: - Share more code with amdgpu ttm: - Move global init out of the drivers scheduler: - Track if schedulers are ready for work - Timeout/fault handling changes to facilitate GPU recovery Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/amdgpu/gfx9: rework lbpw enable codeAlex Deucher2018-11-091-17/+12
| | | | | | | | | | | | | | To avoid changing the global lbpw module parameter directly. Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: abstract the function of enter/exit safe mode for RLCLikun Gao2018-11-098-446/+384
| | | | | | | | | | | | | | | | | | | | Abstract the function of amdgpu_gfx_rlc_enter/exit_safe_mode and some part of rlc_init to improve the reusability of RLC. Signed-off-by: Likun Gao <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: separate amdgpu_rlc into a single fileLikun Gao2018-11-099-107/+160
| | | | | | | | | | | | | | | | | | | | Separate the function and struct of RLC from the file of GFX. Abstract the function of amdgpu_gfx_rlc_fini. Signed-off-by: Likun Gao <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: unify rlc function into structureLikun Gao2018-11-095-44/+78
| | | | | | | | | | | | | | | | | | | | | | Put function rlc_init,rlc_fini,rlc_resume,rlc_stop,rlc_start into structure amdgpu_rlc_funcs and change the method to call rlc function for each verssion of GFX. Signed-off-by: Likun Gao <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Each PSP need to get latest topology info on XGMI configurationshaoyunl2018-11-091-7/+12
| | | | | | | | | | | | | | | | Driver need to call each psp instance to get topology info before set topology Signed-off-by: shaoyunl <[email protected]> reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/sdma4: use paging queue for buffer funcsAlex Deucher2018-11-081-1/+11
| | | | | | | | | | | | | | | | | | | | Use the paging queue for buffer functions to avoid contention with the other queues. Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Chen Gong <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: add DC feature mask module parameterAlex Deucher2018-11-072-0/+12
| | | | | | | | | | | | | | | | Similar to ppfeaturemask. Allows you to selectively enable/disable DC features. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: disable page queue on Vega10 SR-IOV VFTrigger Huang2018-11-071-1/+4
| | | | | | | | | | | | | | | | | | Currently, SDMA page queue is not used under SR-IOV VF, and this queue will cause ring test failure in amdgpu module reload case. So just disable it. Signed-off-by: Trigger Huang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: set Vega20 LBPW as disabled at defaultEvan Quan2018-11-071-0/+14
| | | | | | | | | | | | | | | | For Vega20, LBPW feature is disabled at default. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: fix frame size of amdgpu_xgmi_add_devices excceed 1024 bytesHawking Zhang2018-11-071-5/+8
| | | | | | | | | | | | | | | | | | | | Instead of stack-allocated psp_xgmi_topology_info in function amdgpu_xgmi_add_device, dynamically allocated this structure to avoid the frame size of this function excceed 1024 bytes Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Xiaojie Yuan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add set_topology_info functionHawking Zhang2018-11-061-1/+23
| | | | | | | | | | | | | | | | | | set_topology_info is used for driver to set current topology info to xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add get_topology_info functionHawking Zhang2018-11-061-0/+39
| | | | | | | | | | | | | | | | | | get_topology_info function is used for driver to query topology_info for current device from xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: update topology info structuresHawking Zhang2018-11-062-23/+18
| | | | | | | | | | | | | | | | | | topology info structure needs to match with the one defined in xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add get_hive_id functionHawking Zhang2018-11-061-5/+12
| | | | | | | | | | | | | | | | | | | | | | get_hive_id is used for driver to query hive_id for current device from xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add get_node_id functionHawking Zhang2018-11-064-9/+28
| | | | | | | | | | | | | | | | | | | | | | get_node_id function is used for driver to get node_id for current device from xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: initialize xgmi session (v2)Hawking Zhang2018-11-062-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup and tear down xgmi as part of psp. v2: - make psp_xgmi_terminate static - squash in: drm/amdgpu: only issue xgmi cmd when it is enabled drm/amdgpu/psp: terminate xgmi ta in suspend and hw_fini phase Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add helper function to invoke xgmi ta per ta cmd_idHawking Zhang2018-11-062-0/+39
| | | | | | | | | | | | | | | | | | psp_xgmi_invoke is the helper function to issue ta cmd to firmware Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add xgmi ta headerHawking Zhang2018-11-061-0/+130
| | | | | | | | | | | | | | | | | | Add the psp xgmi driver interface. Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add helper function to load/unload xgmi taHawking Zhang2018-11-061-0/+98
| | | | | | | | | | | | | | | | | | Add helper functions for the psp xgmi ta. Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: init/de-init xgmi ta microcodeHawking Zhang2018-11-063-10/+42
| | | | | | | | | | | | | | | | Add ucode handling for psp xgmi ta firmware. Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/psp: add structure for xgmi ta and its shared bufferHawking Zhang2018-11-061-1/+17
| | | | | | | | | | | | | | | | Add data structures for xgmi trusted application. Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/vega20: add CLK base offsetAlex Deucher2018-11-061-0/+1
| | | | | | | | | | | | | | In case we need to access CLK registers. Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Drop amdgpu_planeHarry Wentland2018-11-061-7/+1
| | | | | | | | | | | | | | | | It's unnecessarily duplicating drm_plane_type. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: use GMC v9 KIQ workaround only for the GFXHUBChristian König2018-11-051-3/+3
| | | | | | | | | | | | | | | | The MMHUB is not affected by this. Signed-off-by: Christian König <[email protected]> Reviewed-by: Emily Deng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: drop the busy wait for GMC v9 TLB invalidationsChristian König2018-11-051-22/+4
| | | | | | | | | | | | | | | | This code is not performance critical. Signed-off-by: Christian König <[email protected]> Reviewed-by: Emily Deng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: cleanup GMC v9 TLB invalidationChristian König2018-11-053-47/+49
| | | | | | | | | | | | | | | | Move the kiq handling into amdgpu_virt.c and drop the fallback. Signed-off-by: Christian König <[email protected]> Reviewed-by: Emily Deng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: remove nonsense in_interrupt() checksChristian König2018-11-051-6/+2
| | | | | | | | | | | | | | | | | | might_sleep() is supposed to raise if warning if called in interrupt or atomic context. Signed-off-by: Christian König <[email protected]> Reviewed-by: Emily Deng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Add helper function to get sdma indexRex Zhu2018-11-052-0/+17
| | | | | | | | | | | | | | | | | | | | | | Get the sdma index from ring v2: refine function name Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Flora Cui <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Refine function nameRex Zhu2018-11-056-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is no functional changes.just refine function name to keep consistence with other files. change amdgpu_get_sdma_instance to amdgpu_sdma_get_instance_from_ring. suggested by alex. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Flora Cui <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Modify the argument of emit_ib interfaceRex Zhu2018-11-0521-46/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use the point of struct amdgpu_job as the function argument instand of vmid, so the other members of struct amdgpu_job can be visit in emit_ib function. v2: add a wrapper for getting the VMID add the job before the ib on the parameter list. v3: refine the wrapper name Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Change AMDGPU_CSA_SIZE to 128KRex Zhu2018-11-051-1/+1
| | | | | | | | | | | | | | | | | | In order to support new asics and MCBP feature enablement on baremetal. Acked-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Move csa related code to separate fileRex Zhu2018-11-056-104/+158
| | | | | | | | | | | | | | | | | | In baremetal, also need to reserve csa for preemption. so move the csa related code out of sriov. Reviewed-by: Monk Liu <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Refine CSA related functionsRex Zhu2018-11-054-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | There is no functional changes, Use function arguments for SRIOV special variables which is hardcode in those functions. so we can share those functions in baremetal. Reviewed-by: Monk Liu <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Remove useless csa gpu address in vmid0Rex Zhu2018-11-052-3/+2
| | | | | | | | | | | | | | | | driver didn't use this address so far. Reviewed-by: Monk Liu <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: fix gfx wptr for sdma v4Junwei Zhang2018-11-051-9/+4
| | | | | | | | | | | | | | | | | | The wptr value will be shitfed when function returns. Remove the redundant shift and clean up. Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: disable page queue on SDMA for Vega12Junwei Zhang2018-11-051-1/+2
| | | | | | | | | | | | | | | | | | It blocks most of sanity tests, so disable it for now. Tested-by: Chen Gong <[email protected]> Signed-off-by: Junwei Zhang <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: update smu firmware images for VI variants (v2)Alex Deucher2018-11-051-5/+28
| | | | | | | | | | | | | | | | | | | | Some new variants require updated firmware. V2: add MODULE_FIRMWARE for new firmwares Reviewed-by: Huang Rui <[email protected]> (v1) Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: drop the remaining uses of ring idx in messagesChristian König2018-11-053-8/+7
| | | | | | | | | | | | | | | | Consistently use the ring name instead. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: cleanup si_dma_ring_test_ibChristian König2018-11-051-5/+2
| | | | | | | | | | | | | | | | Accidentially missed during the last cleanup. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: cleanup uvd_v6_0_ring_test_ringChristian König2018-11-051-12/+5
| | | | | | | | | | | | | | | | Accidentially missed during the last cleanup. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: use ring name instead of idx in tracesChristian König2018-11-051-7/+8
| | | | | | | | | | | | | | | | Further remove using the ring index in messages and traces. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: print an error when the parser can't be initializedSamuel Pitoiset2018-11-051-1/+1
| | | | | | | | | | | | | | | | | | Similar to other error messages, might help for tracking down issues. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/scheduler: Add drm_sched_job_cleanupSharat Masetty2018-11-052-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new API to clean up the scheduler job resources. This is primarliy needed in cases the job was created but was not queued to the scheduler queue. Additionally with this change, the layer which creates the scheduler job also gets to free up the job's resources and this entails moving the dma_fence_put(finished_fence) to the drivers ops free handler routines. Signed-off-by: Sharat Masetty <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: remove messages from IB testsChristian König2018-11-0514-212/+80
| | | | | | | | | | | | | | | | | | | | We already print an error message that an IB test failed in the common code. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: cleanup skipping IB test on KIQChristian König2018-11-053-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard coding the ring type in the function just never provide a test_ib callback. Additional to that remove the emit_ib callback to make sure the nobody ever tries to execute an IB on the KIQ. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: cleanup amdgpu_ib_ring_testsChristian König2018-11-051-14/+17
| | | | | | | | | | | | | | | | | | | | Test only initialized rings, use the ring name instead of the index in the error message and note on which device the error occured. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: further ring test cleanupsChristian König2018-11-0516-249/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move all error messages from IP specific code into the common helper. This way we now uses the ring name in the messages instead of the index and note which device is affected as well. Also cleanup error handling in the IP specific code and consequently use ETIMEDOUT when the ring test timed out. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu/amdkfd: clean up mmhub and gfxhub includesAlex Deucher2018-11-054-7/+6
| | | | | | | | | | | | | | | | Use the appropriate mmhub and gfxhub headers rather than adding them to the gmc9 header. Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
| * drm/amdgpu: Enable default GPU reset for dGPU on gfx8/9 v3Andrey Grodzovsky2018-11-051-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | After testing looks like these subset of ASICs has GPU reset working for the most part. Enable reset due to job timeout. v2: Switch from GFX version to ASIC type. v3: Fix identation Signed-off-by: Andrey Grodzovsky <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>