aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2022-05-16drm/amdgpu: Ensure the DMA engine is deactivated during set upsHaohui Mai1-45/+64
Setting the HALT bit of SDMA_F32_CNTL in all paths before programming the ring buffer of the SDMA engine. Signed-off-by: Haohui Mai <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-16drm/amdgpu/ctx: only reset stable pstate if the user changed it (v2)Alex Deucher1-0/+5
Check if the requested stable pstate matches the current one before changing it. This avoids changing the stable pstate on context destroy if the user never changed it in the first place via the IOCTL. v2: compare the current and requested rather than setting a flag (Lijo) Fixes: 8cda7a4f96e435 ("drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates") Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-13drm/amdgpu: clean up some inconsistent indentingJiapeng Chong1-9/+8
Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c:35 nbio_v7_7_get_rev_id() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c:214 nbio_v7_7_init_registers() warn: inconsistent indenting. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-13mmap locking API: fix missed mmap_sem references in commentsFlorian Rommel2-2/+2
Commit c1e8d7c6a7a6 ("mmap locking API: convert mmap_sem comments") missed replacing some references of mmap_sem by mmap_lock due to misspelling (mm_sem instead of mmap_sem). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Florian Rommel <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2022-05-10drm/amdgpu: Remove duplicated argument in vcn_v4_0Wan Jiabing1-1/+0
Fix following coccicheck warning: ./drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:724:4-36: duplicated argument to & or | Remove duplicated UVD_SUVD_CGC_GATE__SRE_H264_MASK. Signed-off-by: Wan Jiabing <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: vm flush needed after updating PDEsPhilip Yang1-0/+3
If page table PDEs is evicted and restored, after updating PDEs, need increase vm->tlb_seq, then amdgpu_vm_flush will flush TLB before command submission. Signed-off-by: Philip Yang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/vcn: include header for vcn_dec_sw_ring_emit_fenceJames Zhu1-0/+1
Fixed warning: no previous prototype for 'vcn_dec_sw_ring_emit_fence'. v2: regenerate patch after git rebase. v3: update commit message. Signed-off-by: James Zhu <[email protected]> Reported-by: kernel test robot <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/vcn: Add vcn ras poison consumption event handlingMohammad Zafar Ziya3-0/+32
Add vcn ras poison consumption event handling V2: Removed default poison consumption handling function cb Signed-off-by: Mohammad Zafar Ziya <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/jpeg: add jpeg ras poison consumption handlingMohammad Zafar Ziya3-0/+38
Add jpeg ras poison event callback and consumption handling V2: Removed the default poison consumption cb handle Signed-off-by: Mohammad Zafar Ziya <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: refine RAS poison consumption handlerTao Zhou1-17/+26
Qeury ras status before ras poison consumption handling, add more comment and log. Signed-off-by: Tao Zhou <[email protected]> Reviewed-and-tested-by: Mohammad Zafar Ziya <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: enable RAS IH for poison consumptionTao Zhou1-1/+3
Enable RAS IH if poison consumption handler is implemented. Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Mohammad Zafar Ziya <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: support memory power gating for lsdma 6.0.2Likun Gao1-0/+1
Support memory power gating control for lsdma 6.0.2. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: support memory power gating for lsdmaLikun Gao3-2/+27
Support memory power gating control for LSDMA. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: add LSDMA block for LSDMA v6.0.2Likun Gao1-0/+1
Add LSDMA ip block for LSDMA v6.0.2. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: add LSDMA block for LSDMA v6.0.0Likun Gao1-0/+8
Add LSDMA ip block for LSDMA v6.0.0. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: support fill mem for LSDMALikun Gao3-16/+92
Support constant data filling in PIO mode for LSDMA. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: support mem copy for LSDMALikun Gao3-0/+75
Support memory to memory linear copy in PIO mode for LSDMA. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: add lsdma blockLikun Gao7-2/+133
Add Light SDMA (LSDMA) block and related function. LSDMA is a small instance of SDMA mainly for kernel driver use. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/gfx11: unlock on error in gfx_v11_0_kiq_resume()Dan Carpenter1-1/+3
Add a missing amdgpu_bo_unreserve(ring->mqd_obj) to an error path in gfx_v11_0_kiq_resume(). Fixes: 3d879e81f0f9 ("drm/amdgpu: add init support for GFX11 (v2)") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/mes: fix format specifier for size_tAlex Deucher1-1/+1
To avoid a warning on 32 bit. Reported-by: kernel test robot <[email protected]> Reviewed-by: Guchun Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/psp: Return failure when firmware failed to load in SRIOVAlice Wong1-3/+4
In SRIOV, PSP will block incompatible firmware from loading. When this happens, driver should be prevented from continue initialization and start cleanup. Return failure in psp_cmd_submit_buf when firmware load failed in SRIOV. Signed-off-by: Alice Wong <[email protected]> Reviewed-by: Sashank Saye <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: Implement get_vmid_pasid_mapping for gfx11Graham Sider1-12/+4
Implement gmc_v11_0_get_vmid_pasid_mapping_info to fix gmc_v11_0_flush_gpu_tlb_pasid logic. Change from gfx10 to use IH_VMID_*_LUT registers for VMID -> PASID mapping. Signed-off-by: Graham Sider <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: Disable SDMA WPTR_POLL_ENABLE for sdma_v6_0Graham Sider1-1/+1
WPTR_POLL_ENABLE = 1 was kept to support legacy doorbell programming in SimNow environment. Disable for real hardware. Signed-off-by: Graham Sider <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amd/pm: enable gfxoff control on smu_v13_0_7Kenneth Feng1-0/+1
enable gfxoff control interface on smu_v13_0_7 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu: add sysfs to shows psp vbflash statusLikun Gao3-2/+47
Add new sysfs interface to shows the status of psp vbflash status. V2: rename the sysfs interface, and set more return value. (0: not start; 1: in progress; MBX115 value when vbflash finish) V3: warning fixes Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-10drm/amdgpu/psp: Add vbflash sysfs interface supportLikun Gao4-0/+134
Add sysfs interface to copy VBIOS. v2: squash in fix for proper vmalloc API (Alex) Signed-off-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/psp: Add VBIOS flash handlerAndrey Grodzovsky2-1/+78
Add psp vbflash function for psp v13. v2: fix warnings Signed-off-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/gfx11: remove unneeded semicolonYang Li1-1/+1
Eliminate the following coccicheck warning: ./drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:1222:2-3: Unneeded semicolon Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/vcn4: replace ip based software ring decode with common vcn ↵James Zhu1-11/+9
software ring decode Replace ip based software ring decode with common vcn software ring decode. Signed-off-by: James Zhu <[email protected]> Reviewed-by: Christian Koenig <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/vcn3: replace ip based software ring decode with common vcn ↵James Zhu2-83/+9
software ring decode Replace ip based software ring decode with common vcn software ring decode. Signed-off-by: James Zhu <[email protected]> Reviewed-by: Christian Koenig <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/vcn: add common vcn sofware ring decodeJames Zhu3-0/+130
Add common vcn sofware ring decode. v2: fixed compiling error Signed-off-by: James Zhu <[email protected]> Reviewed-by: Christian Koenig <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: vi: disable ASPM on Intel Alder Lake based systemsRichard Gong1-1/+16
Active State Power Management (ASPM) feature is enabled since kernel 5.14. There are some AMD Volcanic Islands (VI) GFX cards, such as the WX3200 and RX640, that do not work with ASPM-enabled Intel Alder Lake based systems. Using these GFX cards as video/display output, Intel Alder Lake based systems will freeze after suspend/resume. The issue was originally reported on one system (Dell Precision 3660 with BIOS version 0.14.81), but was later confirmed to affect at least 4 pre-production Alder Lake based systems. Add an extra check to disable ASPM on Intel Alder Lake based systems with the problematic AMD Volcanic Islands GFX cards. Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885 Signed-off-by: Richard Gong <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: nuke dynamic gfx scratch reg allocationChristian König8-226/+43
It's over a decade ago that this was actually used for more than ring and IB tests. Just use the static register directly where needed and nuke the now useless infrastructure. Signed-off-by: Christian König <[email protected]> Acked-by: Lang Yu <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: simplify nv and soc21 read_register functionsAlex Deucher2-6/+6
Check of the base offset for the IP exists rather than explicitly checking for how many instances of a particular IP there are. This is what soc15.c already does. Expand this to nv.c and soc21.c. Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: flush delete wq after wait fenceYiqing Yao1-4/+5
[why] lru_list not empty warning in sw fini during repeated device bind unbind. There should be a amdgpu_fence_wait_empty() before the flush_delayed_work() call as Christian suggested. [how] Move to do flush_delayed_work for ttm bo delayed delete wq after fence_driver_hw_fini. Tested by: Yiqing Yao <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Yiqing Yao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: enable mes support for GC v11.0.1Huang Rui1-0/+1
GC v11.0.1 is using MES v11, so add IP block. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Xiaojian Du <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: enable gfx v11 for GC 11.0.1Huang Rui1-0/+1
Enable gfx v11 for GC 11.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: enable imu firmware for GC 11.0.1Huang Rui1-0/+1
The GC 11.0.1 needs load IMU to power up the GFX before loads GFX firmware. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Tim Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: add GC v11.0.1 into mes v11Huang Rui1-0/+2
Add GC v11.0.1 support into mes v11. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Xiaojian Du <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: add gfx support for GC 11.0.1Huang Rui1-0/+36
Add GC 11.0.1 gfx support to gfx11 implementation. v2: squash in golden regs Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: set flag for GC 11.0.1Alex Deucher1-0/+1
Set the APU flag appropriately for GC 11.0.1. Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: set GC 11.0.1 familyHuang Rui1-0/+3
Add GC 11.0.1 family support. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: enable sdma v6 for SDMA 6.0.1Huang Rui1-0/+1
Enable sdma (system dma) v6 for SDMA 6.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: add sdma support for sdma 6.0.1Huang Rui1-0/+1
Add sdma 6.0.1 support to sdma6 implementation. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: add PSP v13.0.4 into the IP discovery listXiaojian Du1-0/+1
This patch will add PSP v13.0.4 into the IP discovery list. Signed-off-by: Xiaojian Du <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: enable ih v6 for OSS 6.0.1Huang Rui1-0/+1
Enable ih (interrupt handler) v6 for OSS 6.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: enable gmc v11 for GC 11.0.1Huang Rui1-0/+1
Enable gmc (graphic memory controller) v11 for GC 11.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: add gmc v11 support for GC 11.0.1Huang Rui1-0/+1
Add gmc v11 support for GC 11.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu/discovery: enable soc21 common for GC 11.0.1Huang Rui1-0/+1
Enable soc21 common for GC 11.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-05-06drm/amdgpu: add soc21 common ip block support for GC 11.0.1Huang Rui1-0/+5
Add common soc21 ip block support for GC 11.0.1. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>