aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-05-02drm/amd/display: Add missing NULL pointer check within dpcd_extend_address_rangeHersen Wu1-0/+1
[Why & How] ASSERT if return NULL from kcalloc. Reviewed-by: Alex Hung <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Hersen Wu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Check index for aux_rd_interval before usingAlex Hung1-2/+2
aux_rd_interval has size of 7 and should be checked. This fixes 3 OVERRUN and 1 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Rodrigo Siqueira <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Fix incorrect size calculation for loopAlex Hung1-1/+1
[WHY] fe_clk_en has size of 5 but sizeof(fe_clk_en) has byte size 20 which is lager than the array size. [HOW] Divide byte size 20 by its element size. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Stop amdgpu_dm initialize when link nums greater than max_linksHersen Wu1-7/+7
[Why] Coverity report OVERRUN warning. There are only max_links elements within dc->links. link count could up to AMDGPU_DM_MAX_DISPLAY_INDEX 31. [How] Make sure link count less than max_links. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Hersen Wu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6Hersen Wu1-1/+4
[Why] Coverity reports OVERRUN warning. Should abort amdgpu_dm initialize. [How] Return failure to amdgpu_dm_init. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Hersen Wu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Add NULL pointer and OVERRUN check within amdgpu_dm irq ↵Hersen Wu1-41/+128
register [WHY] Coverity reports OVERRUN issues within amdgpu_dm interrupt registers. Do not check index value before access array. Do not check NULL pointer. [HOW] Add index value check for array. Add check for pointer from amdgpu_dm_irq_register_interrupt. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Hersen Wu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Check gpio_id before used as array indexAlex Hung1-2/+11
[WHY & HOW] GPIO_ID_UNKNOWN (-1) is not a valid value for array index and therefore should be checked in advance. This fixes 5 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Ensure array index tg_inst won't be -1Alex Hung1-1/+1
[WHY & HOW] tg_inst will be a negative if timing_generator_count equals 0, which should be checked before used. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Skip accessing array for unknown eng_idAlex Hung1-1/+8
[WHY] ENGINE_ID_UNKNOWN (-1) is not a valid eng_id and not a valid array index. [HOW] Check whether eng_id is unknown to avoid access array with negative array index. This fixes 4 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Alex Hung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Refactor DCCG into component folderRevalla Hari Krishna32-12/+108
[why] cleaning up the code refactor requires dccg to be in its own component. [how] move all files under newly created dccg folder and fixing the makefiles. Reviewed-by: Martin Leung <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Revalla Hari Krishna <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/display: Fix invalid Copyright noticeLeo Ma7-10/+9
[Why && How] Copyright notice failed in the Palamida scan and make changes to align with our guidelines. Acked-by: Tom Chung <[email protected]> Signed-off-by: Leo Ma <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/pm: add pstate support for SMU_14_0_2Gui Chengming1-1/+53
Populate pstate clock. Signed-off-by: Gui Chengming <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/pm: add tool log support on smu v14.0.2/3Kenneth Feng2-0/+4
add tool log support on smu v14.0.2/3 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Jack Gui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/pm: enable mode1 reset on smu v14.0.2/v14.0.3Kenneth Feng1-1/+7
enable mode1 reset on smu v14.0.2/v14.0.3 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/pm: support mode1 reset on smu_v14_0_3Kenneth Feng2-0/+3
support mode1 reset on smu_v14_0_3 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: Use a separate fence per transactionAlex Deucher1-4/+18
We can't use a shared fence location because each transaction should be considered independently. Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: increase mes submission timeoutAlex Deucher1-1/+1
MES internally has a timeout allowance of 2 seconds. Increase driver timeout to 3 seconds to be safe. Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: print MES opcodes rather than numbersAlex Deucher1-4/+77
Makes it easier to review the logs when there are MES errors. Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable mmhub and athub cg on gc 12.0.1Kenneth Feng1-1/+6
enable mmhub and athub cg on gc 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable gfxoff on gc 12.0.1Kenneth Feng2-1/+14
Enable gfxoff on gc 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Jack Gui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu: support cg state get for gfx v12Likun Gao1-1/+37
Support to get clockgating state for gfx v12. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable sram fgcg on gc 12.0.1Kenneth Feng2-1/+15
enable sram fgcg on gc 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable perfcounter mgcg and repeater fgcgKenneth Feng2-3/+33
enable perfcounter mgcg and repeater fgcg on gc 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable 3D cgcg and 3D cglsKenneth Feng1-1/+3
enable 3D cgcg and 3D cgls on gc 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable mgcg on gfx 12.0.1Kenneth Feng2-5/+31
enable mgcg on gfx 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdgpu: enable cgcg and cglsKenneth Feng1-1/+2
enable cgcg and cgls on gc 12.0.1 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/vcn5: Add VCN5 capabilitiesDavid (Ming Qiang) Wu1-0/+43
Add VCN5 encode and decode capabilities support Signed-off-by: David (Ming Qiang) Wu <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/vcn5: enable DPG mode supportSonny Jiang1-1/+2
Enable DPG mode Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/jpeg5: enable power gatingSonny Jiang1-1/+2
Enable PG on JPEG5 Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02amdgpu/vcn: enable AMD_PG_SUPPORT_VCNDavid (Ming Qiang) Wu1-1/+1
turn on AMD_PG_SUPPORT_VCN flag for power saving Signed-off-by: David (Ming Qiang) Wu <[email protected]> Reviewed-by: Sonny Jiang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu: Fix physical address maskDavid Belanger1-1/+1
Mask should be 44-bit. Signed-off-by: David Belanger <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/discovery: add mes v12_0 ip blockLikun Gao1-0/+9
Add mes v12_0 ip block. v2: squash in update (Alex) v3: rebase on unified mes changes (Alex) Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/discovery: add gfx v12_0 ip blockLikun Gao1-0/+7
Add gfx v12_0 ip block. v2: Squash in update (Alex) v3: add exp flag (Alex) Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: disable logging outputJack Xiao1-1/+1
Random page fault was oberserved, temporarily disable mes log buffer output. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu: add module parameter 'amdgpu_uni_mes'Jack Xiao3-0/+13
Add module parameter 'amdgpu_uni_mes' to enable/disable unified mes fw support. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: add legacy setting hw resource interfaceJack Xiao2-2/+42
For unified mes fw, add the legacy interface to set hardware resources. v2: remove warning (Alex) Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu: Disable unmapped doorbell handling basic mode on mes 12shaoyunl2-17/+2
The new mechanism for unmapped doorbell handling requires both driver side and MES fw side change. The FW side changes are still not released. Signed-off-by: shaoyunl <[email protected]> Reviewed-by: Harish Kasiviswanthan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/gfx: enable mes to map legacy queue supportJack Xiao2-25/+4
Enable mes to map legacy queue support. v2: drop unused gfx_v12_0_kiq_enable_kgq() (Alex) Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: add mes mapping legacy queue supportJack Xiao1-0/+26
Add mes12 map legacy queue packet submission. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: enable uni_mes fw on mes pipe0Jack Xiao1-13/+38
Enable the unified mes firmware on mes pipe0. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes12: add uni_mes fw loading supportJack Xiao1-0/+10
Add the unified mes firmware loading support. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdgpu/mes: add uni_mes fw loading supportJack Xiao2-1/+5
Add the unified mes firmware loading support. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NCSreekant Somasekharan2-0/+18
Due to a HW bug, the system memory mappings and peer GPU mappings on GFX12 need to be marked as MTYPE_NC. Cc: Joe Greathouse <[email protected]> Cc: David Belanger <[email protected]> Signed-off-by: Rajneesh Bhardwaj <[email protected]> Signed-off-by: Sreekant Somasekharan <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amd/amdkfd: Add GFX12 PTE flag to SVM get PTE functionSreekant Somasekharan1-0/+2
Add new GFX12 PTE flag AMDGPU_PTE_IS_PTE to svm_range_get_pte_flags function. This resolves the issues related to SVM enablement in GFX12. Signed-off-by: Sreekant Somasekharan <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: Enable atomic support for GFX12David Belanger2-0/+5
Enable flag in KFD and set the atomic support bit in MQD. Signed-off-by: David Belanger <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: fix NULL ptr for debugfs mqds on GFX v12Eric Huang1-0/+3
mqd_stride function in gfx v12 is not implemented, that causes NULL ptr error. Add the generic func to fix it. Signed-off-by: Eric Huang <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: enable single alu ops for gfx12Jonathan Kim4-11/+28
GFX12 debugging requires setting up precise ALU operation for catching ALU exceptions. Signed-off-by: Jonathan Kim <[email protected]> Tested-by: Lancelot Six <[email protected]> Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: fix support for trap on wave start and end for gfx12Jonathan Kim1-5/+43
Similar to GFX11, GFX12 supports trapping on wave start and end. Signed-off-by: Jonathan Kim <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: always enable ttmp setup for gfx12Jonathan Kim3-2/+4
Similar to GFX11, always enable the setup of trap temporaries on GFX12. Signed-off-by: Jonathan Kim <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2024-05-02drm/amdkfd: Enable GFX12 trap handlerDavid Belanger1-4/+3
Updated switch statement to use GFX12 trap handler. Signed-off-by: David Belanger <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>