Arunpravin Paneer Selvam [Fri, 12 Jan 2024 07:21:13 +0000 (23:21 -0800)]
drm/amdgpu: Enable seq64 manager and fix bugs
- Enable the seq64 mapping sequence.
- Fix wflinfo va conflict and other bugs.
v1:
- The seq64 area needs to be included in the AMDGPU_VA_RESERVED_SIZE
otherwise the areas will conflict with user space allocations (Alex)
- It needs to be mapped read only in the user VM (Alex)
v2:
- Instead of just one define for TOP/BOTTOM
reserved space separate them into two (Christian)
- Fix the CPU and VA calculations and while at it
also cleanup error handling and kerneldoc (Christian)
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Nikita Zhandarovich [Wed, 17 Jan 2024 14:45:14 +0000 (06:45 -0800)]
drm/radeon/ni_dpm: remove redundant NULL check
'leakage_table' will always be successfully initialized as a pointer
to '&rdev->pm.dpm.dyn_state.cac_leakage_table'.
Remove unnecessary check if only to silence static checkers.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool Svace.
Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Nikita Zhandarovich [Wed, 17 Jan 2024 14:44:36 +0000 (06:44 -0800)]
drm/radeon: remove dead code in ni_mc_load_microcode()
Inside the if block with (running == 0), the checks for 'running'
possibly being non-zero are redundant. Remove them altogether.
This change is similar to the one authored by Heinrich Schuchardt
<xypron.glpk@gmx.de> in commit
ddbbd3be9679 ("drm/radeon: remove dead code, si_mc_load_microcode (v2)")
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool Svace.
Fixes: 0af62b016804 ("drm/radeon/kms: add ucode loader for NI")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Yang Wang [Wed, 26 Apr 2023 08:17:05 +0000 (16:17 +0800)]
drm/amd/pm: enable amdgpu smu send message log
v1:
enable amdgpu smu driver message log.
v2:
add smu/pmfw response value into debug log.
Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tao Zhou [Wed, 17 Jan 2024 08:35:59 +0000 (16:35 +0800)]
drm/amdgpu: update error condition check for umc_v12_0_query_error_address
Deferred error is also taken into account.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stanley.Yang [Wed, 10 Jan 2024 08:13:50 +0000 (16:13 +0800)]
drm/amdgpu: Skip do PCI error slot reset during RAS recovery
Why:
The PCI error slot reset maybe triggered after inject ue to UMC multi times, this
caused system hang.
[ 557.371857] amdgpu 0000:af:00.0: amdgpu: GPU reset succeeded, trying to resume
[ 557.373718] [drm] PCIE GART of 512M enabled.
[ 557.373722] [drm] PTB located at 0x0000031FED700000
[ 557.373788] [drm] VRAM is lost due to GPU reset!
[ 557.373789] [drm] PSP is resuming...
[ 557.547012] mlx5_core 0000:55:00.0: mlx5_pci_err_detected Device state = 1 pci_status: 0. Exit, result = 3, need reset
[ 557.547067] [drm] PCI error: detected callback, state(1)!!
[ 557.547069] [drm] No support for XGMI hive yet...
[ 557.548125] mlx5_core 0000:55:00.0: mlx5_pci_slot_reset Device state = 1 pci_status: 0. Enter
[ 557.607763] mlx5_core 0000:55:00.0: wait vital counter value 0x16b5b after 1 iterations
[ 557.607777] mlx5_core 0000:55:00.0: mlx5_pci_slot_reset Device state = 1 pci_status: 1. Exit, err = 0, result = 5, recovered
[ 557.610492] [drm] PCI error: slot reset callback!!
...
[ 560.689382] amdgpu 0000:3f:00.0: amdgpu: GPU reset(2) succeeded!
[ 560.689546] amdgpu 0000:5a:00.0: amdgpu: GPU reset(2) succeeded!
[ 560.689562] general protection fault, probably for non-canonical address 0x5f080b54534f611f: 0000 [#1] SMP NOPTI
[ 560.701008] CPU: 16 PID: 2361 Comm: kworker/u448:9 Tainted: G OE 5.15.0-91-generic #101-Ubuntu
[ 560.712057] Hardware name: Microsoft C278A/C278A, BIOS C2789.5.BS.1C11.AG.1 11/08/2023
[ 560.720959] Workqueue: amdgpu-reset-hive amdgpu_ras_do_recovery [amdgpu]
[ 560.728887] RIP: 0010:amdgpu_device_gpu_recover.cold+0xbf1/0xcf5 [amdgpu]
[ 560.736891] Code: ff 41 89 c6 e9 1b ff ff ff 44 0f b6 45 b0 e9 4f ff ff ff be 01 00 00 00 4c 89 e7 e8 76 c9 8b ff 44 0f b6 45 b0 e9 3c fd ff ff <48> 83 ba 18 02 00 00 00 0f 84 6a f8 ff ff 48 8d 7a 78 be 01 00 00
[ 560.757967] RSP: 0018:
ffa0000032e53d80 EFLAGS:
00010202
[ 560.763848] RAX:
ffa00000001dfd10 RBX:
ffa0000000197090 RCX:
ffa0000032e53db0
[ 560.771856] RDX:
5f080b54534f5f07 RSI:
0000000000000000 RDI:
ff11000128100010
[ 560.779867] RBP:
ffa0000032e53df0 R08:
0000000000000000 R09:
ffffffffffe77f08
[ 560.787879] R10:
0000000000ffff0a R11:
0000000000000001 R12:
0000000000000000
[ 560.795889] R13:
ffa0000032e53e00 R14:
0000000000000000 R15:
0000000000000000
[ 560.803889] FS:
0000000000000000(0000) GS:
ff11007e7e800000(0000) knlGS:
0000000000000000
[ 560.812973] CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
[ 560.819422] CR2:
000055a04c118e68 CR3:
0000000007410005 CR4:
0000000000771ee0
[ 560.827433] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 560.835433] DR3:
0000000000000000 DR6:
00000000fffe07f0 DR7:
0000000000000400
[ 560.843444] PKRU:
55555554
[ 560.846480] Call Trace:
[ 560.849225] <TASK>
[ 560.851580] ? show_trace_log_lvl+0x1d6/0x2ea
[ 560.856488] ? show_trace_log_lvl+0x1d6/0x2ea
[ 560.861379] ? amdgpu_ras_do_recovery+0x1b2/0x210 [amdgpu]
[ 560.867778] ? show_regs.part.0+0x23/0x29
[ 560.872293] ? __die_body.cold+0x8/0xd
[ 560.876502] ? die_addr+0x3e/0x60
[ 560.880238] ? exc_general_protection+0x1c5/0x410
[ 560.885532] ? asm_exc_general_protection+0x27/0x30
[ 560.891025] ? amdgpu_device_gpu_recover.cold+0xbf1/0xcf5 [amdgpu]
[ 560.898323] amdgpu_ras_do_recovery+0x1b2/0x210 [amdgpu]
[ 560.904520] process_one_work+0x228/0x3d0
How:
In RAS recovery, mode-1 reset is issued from RAS fatal error handling and expected
all the nodes in a hive to be reset. no need to issue another mode-1 during this procedure.
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stanley.Yang [Wed, 17 Jan 2024 03:49:35 +0000 (11:49 +0800)]
drm/amdgpu: Show deferred error count for UMC
Show deferred error count for UMC syfs node
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Ori Messinger [Wed, 22 Nov 2023 05:12:13 +0000 (00:12 -0500)]
drm/amdgpu: Enable GFXOFF for Compute on GFX11
On GFX version 11, GFXOFF was disabled due to a MES KIQ firmware
issue, which has since been fixed after version 64.
This patch only re-enables GFXOFF for GFX version 11 if the GPU's
MES KIQ firmware version is newer than version 64.
V2: Keep GFXOFF disabled on GFX11 if MES KIQ is below version 64.
V3: Add parentheses to avoid GCC warning for parentheses:
"suggest parentheses around comparison in operand of ‘&’"
V4: Remove "V3" from commit title
V5: Change commit description and insert 'Acked-by'
Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Yang Wang [Tue, 16 Jan 2024 10:58:39 +0000 (18:58 +0800)]
drm/amdgpu: fix UBSAN array-index-out-of-bounds for ras_block_string[]
fix array index out of bounds issue for ras_block_string[] array.
Fixes: 30df05fb74f6 ("drm/amdgpu: Align ras block enum with firmware")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
YuanShang [Thu, 11 Jan 2024 14:03:30 +0000 (22:03 +0800)]
drm/amd/amdgpu: Update RLC_SPM_MC_CNT by ring wreg in guest
Submit command of wreg in GFX and COMPUTE ring to update
RLC_SPM_MC_CNT in guest machine during runtime.
Signed-off-by: YuanShang <YuanShang.Mao@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Srinivasan Shanmugam [Sat, 13 Jan 2024 09:02:27 +0000 (14:32 +0530)]
drm/amd/display: Drop 'acrtc' and add 'new_crtc_state' NULL check for writeback requests.
Return value of 'to_amdgpu_crtc' which is container_of(...) can't be
null, so it's null check 'acrtc' is dropped.
Fixing the below:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9302 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'acrtc' could be null (see line 9299)
Added 'new_crtc_state' NULL check for function
'drm_atomic_get_new_crtc_state' that retrieves the new state for a CRTC,
while enabling writeback requests.
Cc: stable@vger.kernel.org
Cc: Alex Hung <alex.hung@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Felix Kuehling [Mon, 15 Jan 2024 21:51:46 +0000 (16:51 -0500)]
drm/amdgpu: Remove unnecessary NULL check
A static checker pointed out, that bo_va->base.bo was already derefenced
earlier in the same scope. Therefore this check is unnecessary here.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 50661eb1a2c8 ("drm/amdgpu: Auto-validate DMABuf imports in compute VMs")
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König [Wed, 10 Jan 2024 14:19:29 +0000 (15:19 +0100)]
drm/amdgpu: revert "Adjust removal control flow for smu v13_0_2"
Calling amdgpu_device_ip_resume_phase1() during shutdown leaves the
HW in an active state and is an unbalanced use of the IP callbacks.
Using the IP callbacks like this can lead to memory leaks, double
free and imbalanced reference counters.
Leaving the HW in an active state can lead to DMA accesses to memory now
freed by the driver.
Both is a complete no-go for driver unload so completely revert the
workaround for now.
This reverts commit
f5c7e7797060255dbc8160734ccc5ad6183c5e04.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christophe JAILLET [Sun, 14 Jan 2024 15:14:27 +0000 (16:14 +0100)]
drm/amdgpu: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().
Note that the upper limit of ida_simple_get() is exclusive, but the one of
ida_alloc_range() is inclusive. So a -1 has been added when needed.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Flora Cui [Wed, 10 Jan 2024 11:23:56 +0000 (19:23 +0800)]
drm/amdkfd: init drm_client with funcs hook
otherwise drm_client_dev_unregister() would try to
kfree(&adev->kfd.client).
Fixes: 1819200166ce ("drm/amdkfd: Export DMABufs from KFD using GEM handles")
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christophe JAILLET [Sat, 13 Jan 2024 14:58:21 +0000 (15:58 +0100)]
drm/amd/display: Fix a switch statement in populate_dml_output_cfg_from_stream_state()
It is likely that the statement related to 'dml_edp' is misplaced. So move
it in the correct "case SIGNAL_TYPE_EDP".
Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:49:53 +0000 (09:49 +0000)]
drm/radeon/ni_dpm: Clean up errors in nislands_smc.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:40:13 +0000 (09:40 +0000)]
drm/radeon/evergreen_cs: Clean up errors in evergreen_cs.c
Fix the following errors reported by checkpatch:
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '>' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:38:01 +0000 (09:38 +0000)]
drm/radeon: Clean up errors in si.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: trailing statements should be on next lineo
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:34:50 +0000 (09:34 +0000)]
drm/radeon: Clean up errors in radeon.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:33:01 +0000 (09:33 +0000)]
drm/radeon: Clean up errors in ci_dpm.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:32:10 +0000 (09:32 +0000)]
drm/radeon/dpm: Clean up errors in evergreen_smc.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:30:39 +0000 (09:30 +0000)]
drm/radeon: Clean up errors in clearstate_cayman.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:21:43 +0000 (09:21 +0000)]
drm/radeon: Clean up errors in clearstate_ci.h
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
XueBing Chen [Thu, 11 Jan 2024 09:11:59 +0000 (09:11 +0000)]
drm/radeon/kms: Clean up errors in radeon_pm.c
Fix the following errors reported by checkpatch:
ERROR: space required before the open parenthesis '('
Signed-off-by: XueBing Chen <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 09:05:36 +0000 (09:05 +0000)]
drm/radeon/kms: Clean up errors in smu7.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 09:04:03 +0000 (09:04 +0000)]
drm/radeon/kms: Clean up errors in smu7_fusion.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 09:00:17 +0000 (09:00 +0000)]
drm/radeon: Clean up errors in r600_dpm.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:59:19 +0000 (08:59 +0000)]
drm/radeon: Clean up errors in rv515.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:58:07 +0000 (08:58 +0000)]
drm/radeon: Clean up errors in radeon_mode.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:56:54 +0000 (08:56 +0000)]
drm/radeon: Clean up errors in evergreen_reg.h
Fix the following errors reported by checkpatch:
ERROR: space prohibited before that close parenthesis ')'
ERROR: need consistent spacing around '<<' (ctx:WxV)
ERROR: need consistent spacing around '-' (ctx:WxV)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:54:45 +0000 (08:54 +0000)]
drm/radeon: Clean up errors in kv_smc.c
Fix the following errors reported by checkpatch:
ERROR: spaces required around that '=' (ctx:VxW)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:53:19 +0000 (08:53 +0000)]
gpu/drm/radeon: Clean up errors in evergreen.c
Fix the following errors reported by checkpatch:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:51:58 +0000 (08:51 +0000)]
drm/radeon: Clean up errors in evergreen.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: spaces required around that '&=' (ctx:WxO)
ERROR: space required before that '~' (ctx:OxV)
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required after that ',' (ctx:WxO)
ERROR: space required before that '&' (ctx:OxV)
ERROR: need consistent spacing around '*' (ctx:VxW)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:46:00 +0000 (08:46 +0000)]
drm/radeon: Clean up errors in rv770_smc.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: open brace '{' following union go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:43:25 +0000 (08:43 +0000)]
drm/radeon/ci_dpm: Clean up errors in ci_dpm.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: need consistent spacing around '-' (ctx:WxV)
ERROR: space required before the open parenthesis '('
ERROR: "foo* bar" should be "foo *bar"
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:36:54 +0000 (08:36 +0000)]
drm/radeon: Clean up errors in r600.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:35:56 +0000 (08:35 +0000)]
drm/radeon: Clean up errors in rs600.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:34:48 +0000 (08:34 +0000)]
drm/radeon: Clean up errors in si_dpm.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: open brace '{' following enum go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:32:35 +0000 (08:32 +0000)]
drm/radeon: Clean up errors in radeon_audio.c
Fix the following errors reported by checkpatch:
ERROR: "foo* bar" should be "foo *bar"
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:29:29 +0000 (08:29 +0000)]
drm/radeon: Clean up errors in rs400.c
Fix the following errors reported by checkpatch:
ERROR: space required before the open parenthesis '('
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:27:59 +0000 (08:27 +0000)]
drm/radeon: Clean up errors in radeon_audio.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:26:41 +0000 (08:26 +0000)]
drm/radeon: Clean up errors in uvd_v1_0.c
Fix the following errors reported by checkpatch:
ERROR: "(foo*)" should be "(foo *)"
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:18:34 +0000 (08:18 +0000)]
drm/radeon: Clean up errors in radeon_asic.c
Fix the following errors reported by checkpatch:
ERROR: spaces required around that '||' (ctx:VxE)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:16:28 +0000 (08:16 +0000)]
drm/radeon/kms: Clean up errors in rv6xx_dpm.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:14:56 +0000 (08:14 +0000)]
drm/radeon/btc_dpm: Clean up errors in btc_dpm.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '+=' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxW)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:09:23 +0000 (08:09 +0000)]
drm/radeon/dpm: Clean up errors in trinity_dpm.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 08:07:35 +0000 (08:07 +0000)]
drm/radeon/rv770: Clean up errors in rv770_dpm.c
Fix the following errors reported by checkpatch:
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:58:54 +0000 (07:58 +0000)]
drm/radeon: Clean up errors in smu7_discrete.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:52:46 +0000 (07:52 +0000)]
drm/radeon: Clean up errors in ni_dpm.c
Fix the following errors reported by checkpatch:
ERROR: space prohibited before that ',' (ctx:WxV)
ERROR: space required after that ',' (ctx:WxV)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:46:13 +0000 (07:46 +0000)]
drm/radeon/ni_dpm: Clean up errors in ni_dpm.c
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:44:30 +0000 (07:44 +0000)]
drm/radeon/dpm: Clean up errors in sumo_dpm.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: space prohibited before that close parenthesis ')'
ERROR: spaces required around that '?' (ctx:VxW)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:41:27 +0000 (07:41 +0000)]
drm/radeon: Clean up errors in ni.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: trailing statements should be on next line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:39:25 +0000 (07:39 +0000)]
drm/radeon: Clean up errors in r600_dpm.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following enum go on the same line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:38:07 +0000 (07:38 +0000)]
drm/radeon/r100: Clean up errors in r100.c
Fix the following errors reported by checkpatch:
ERROR: spaces required around that '+=' (ctx:VxV)o
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:36:44 +0000 (07:36 +0000)]
drm/radeon: Clean up errors in radeon_atpx_handler.c
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following function definitions go on the next line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:34:45 +0000 (07:34 +0000)]
drm/radeon: Clean up errors in trinity_dpm.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
ERROR: space prohibited before that ',' (ctx:WxW)
ERROR: need consistent spacing around '-' (ctx:WxV)
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:28:33 +0000 (07:28 +0000)]
drm/radeon/trinity_dpm: Clean up errors in trinity_dpm.c
Fix the following errors reported by checkpatch:
ERROR: space required before the open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
GuoHua Chen [Thu, 11 Jan 2024 07:23:01 +0000 (07:23 +0000)]
drm/radeon: Clean up errors in si_dpm.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 06:32:56 +0000 (06:32 +0000)]
drm/amd/include/vega20_ip_offset: Clean up errors in vega20_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: spaces required around that '=' (ctx:WxV)
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:39:30 +0000 (03:39 +0000)]
drm/amd/display: Clean up errors in renoir_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:38:18 +0000 (03:38 +0000)]
drm/amd/amdgpu: Clean up errors in beige_goby_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:37:16 +0000 (03:37 +0000)]
drm/amdgpu: Clean up errors in v10_structs.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:35:22 +0000 (03:35 +0000)]
drm/amd/include/navi14_ip_offset: Clean up errors in navi14_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:28:37 +0000 (03:28 +0000)]
drm/amdgpu: Clean up errors in cgs_common.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: space required after that ',' (ctx:VxV)
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:25:57 +0000 (03:25 +0000)]
drm/amd/include/sienna_cichlid_ip_offset: Clean up errors in sienna_cichlid_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:24:47 +0000 (03:24 +0000)]
drm/amd/include/vangogh_ip_offset: Clean up errors in vangogh_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:23:27 +0000 (03:23 +0000)]
drm/amdgpu: Clean up errors in dimgrey_cavefish_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:21:40 +0000 (03:21 +0000)]
drm/amd/pp: Clean up errors in dm_pp_interface.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before that ',' (ctx:WxE)
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:11:39 +0000 (03:11 +0000)]
drm/amd: Clean up errors in vega10_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:09:51 +0000 (03:09 +0000)]
drm/amd/include/vega10_ip_offset:Clean up errors in vega10_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following enum go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:02:59 +0000 (03:02 +0000)]
drm/amdgpu: Clean up errors in kgd_pp_interface.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following enum go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 03:00:53 +0000 (03:00 +0000)]
drm/amdgpu: Clean up errors in navi12_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:58:50 +0000 (02:58 +0000)]
drm/amdgpu: Clean up errors in atom-bits.h
Fix the following errors reported by checkpatch:
ERROR: space prohibited before that ',' (ctx:WxV)
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:55:17 +0000 (02:55 +0000)]
drm/amd/include: Clean up errors in arct_ip_offset.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:52:18 +0000 (02:52 +0000)]
drm/amdgpu: Clean up errors in umc_v6_0.c
Fix the following errors reported by checkpatch:
ERROR: space required after that ',' (ctx:VxV)
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:32:00 +0000 (02:32 +0000)]
drm/amdgpu: Clean up errors in clearstate_si.h
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:27:18 +0000 (02:27 +0000)]
drm/amdgpu: Clean up errors in amdgpu.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:25:56 +0000 (02:25 +0000)]
drm/amdgpu: Clean up errors in amdgpu_gmc.c
Fix the following errors reported by checkpatch:
ERROR: need consistent spacing around '-' (ctx:WxV)
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:24:37 +0000 (02:24 +0000)]
drm/amdgpu: Clean up errors in jpeg_v2_5.c
Fix the following errors reported by checkpatch:
ERROR: space required before the open parenthesis '('
ERROR: that open brace { should be on the previous line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:19:00 +0000 (02:19 +0000)]
drm/amdgpu: Clean up errors in gfx_v9_4.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:16:31 +0000 (02:16 +0000)]
drm/amdgpu: Clean up errors in amdgpu_drv.c
Fix the following errors reported by checkpatch:
ERROR: do not initialise globals to 0
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
chenxuebing [Thu, 11 Jan 2024 02:11:48 +0000 (02:11 +0000)]
drm/amd: Clean up errors in amdgpu_vkms.c
Fix the following errors reported by checkpatch:
ERROR: that open brace { should be on the previous line
Signed-off-by: chenxuebing <chenxb_99091@126.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Ma Jun [Fri, 12 Jan 2024 05:33:24 +0000 (13:33 +0800)]
drm/amdgpu: Fix the null pointer when load rlc firmware
If the RLC firmware is invalid because of wrong header size,
the pointer to the rlc firmware is released in function
amdgpu_ucode_request. There will be a null pointer error
in subsequent use. So skip validation to fix it.
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Fri, 29 Dec 2023 06:37:45 +0000 (14:37 +0800)]
drm/amdgpu: Centralize ras cap query to amdgpu_ras_check_supported
Move ras capablity check to amdgpu_ras_check_supported.
Driver will query ras capablity through psp interace, or
vbios interface, or specific ip callbacks.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Tue, 2 Jan 2024 14:13:20 +0000 (22:13 +0800)]
drm/amdgpu: Query ras capablity from psp v2
Instead of traditional atomfirmware interfaces for RAS
capability, host driver can query ras capability from
psp starting from psp v13_0_6.
v2: drop redundant local variable from get_ras_capability.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Martin Leung [Tue, 2 Jan 2024 13:58:03 +0000 (08:58 -0500)]
drm/amd/display: 3.2.267
- Align the returned error code with legacy DP
- Allow Z8 for multiplane configurations on DCN35
- Set default Z8 minimum residency for DCN35
- Rework DC Z10 restore
- Enable Panel Replay for static screen use case
- Add DP audio BW validation
- Fix dml2 assigned pipe search
- Ensure populate uclk in bb construction
- Update P010 scaling cap
- Reenable windowed mpo odm support
- Fix DML2 watermark calculation
- Clear OPTC mem select on disable
- Floor to mhz when requesting dpp disp clock changes to SMU
- Port DENTIST hang and TDR fixes to OTG disable W/A
- Add logging resource checks
- Add Replay IPS register for DMUB command table
- Init link enc resources in dc_state only if res_pool presents
- Allow IPS2 during Replay
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Martin Leung <martin.leung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Wayne Lin [Tue, 2 Jan 2024 06:20:37 +0000 (14:20 +0800)]
drm/amd/display: Align the returned error code with legacy DP
[Why]
For usb4 connector, AUX transaction is handled by dmub utilizing a differnt
code path comparing to legacy DP connector. If the usb4 DP connector is
disconnected, AUX access will report EBUSY and cause igt@kms_dp_aux_dev
fail.
[How]
Align the error code with the one reported by legacy DP as EIO.
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Nicholas Kazlauskas [Thu, 4 Jan 2024 22:56:15 +0000 (17:56 -0500)]
drm/amd/display: Allow Z8 for multiplane configurations on DCN35
[Why]
Power improvement over DCN314, but also addresses a functional issue
where plane_state remains uncleared on pipes that aren't actually
active.
[How]
Update the check to allow for zero streams to be treated as z8 allow.
Update the check to remove plane count on the active stream case.
Z8 will still be blocked based on stutter duration, which is likely to
be the case for most multi plane configurations.
Reviewed-by: Gabe Teeger <gabe.teeger@amd.com>
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Nicholas Kazlauskas [Thu, 4 Jan 2024 22:55:19 +0000 (17:55 -0500)]
drm/amd/display: Set default Z8 minimum residency for DCN35
[Why & How]
Match DCN314's policy.
Reviewed-by: Gabe Teeger <gabe.teeger@amd.com>
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Nicholas Kazlauskas [Tue, 19 Dec 2023 17:35:44 +0000 (12:35 -0500)]
drm/amd/display: Rework DC Z10 restore
[Why]
The call currently does two things:
1. Exits DMCUB from idle optimization if it was in
2. Checks DMCUB scratch register to determine if we need to call
DMCUB to do deferred HW restore and then sends the command if it's
ready for it.
By doing (1) we prevent driver idle from being renotified in the cases
where driver had previously allowed DC level idle optimizations via
dc_allow_idle_optimizations since it thinks:
allow == dc->idle_optimizations_allowed
...and that the operation is a no-op.
We want driver idle to be resent at the next opprotunity to do so
for video playback cases.
[How]
Migrate all usecases of dc_z10_restore to only perform (2).
Add extra calls to dc_allow_idle_optimizations to handle (1) and also
keep SW state matching with when we requested enter/exit of DMCUB
idle optimizations.
Ensure cursor idle optimizations false always get called when IPS
is supported.
Further rework/redesign is needed to decide whether we need a separate
level of DM allow vs DC allow and when to attempt re-entry.
Reviewed-by: Yihan Zhu <yihan.zhu@amd.com>
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tom Chung [Wed, 6 Dec 2023 14:07:51 +0000 (22:07 +0800)]
drm/amd/display: Enable Panel Replay for static screen use case
[Why]
Enable the Panel Replay if eDP panel and ASIC support.
(prioritize Panel Replay over PSR)
[How]
- Setup the Panel Replay config during the device init
(prioritize Panel Replay over PSR).
- Separate the Replay init function into two functions
amdgpu_dm_link_setup_replay() and amdgpu_dm_set_replay_caps()
to fix the issue in the earlier commit that cause PSR and Replay
enabled at the same time.
Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
George Shen [Tue, 21 Nov 2023 23:32:52 +0000 (18:32 -0500)]
drm/amd/display: Add DP audio BW validation
[Why]
Timings with small HBlank (such as CVT RBv2) can result in insufficient
HBlank bandwidth for audio SDP transmission when DSC is active. This
will cause some higher bandwidth audio modes to fail.
The combination of CVT RBv2 timings + DSC can commonly be encountered
in MST scenarios.
[How]
Add DP audio bandwidth validation for 8b/10b MST and 128b/132b SST/MST
cases and filter out modes that cannot be supported with the current
timing config.
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: George Shen <george.shen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Dmytro Laktyushkin [Thu, 4 Jan 2024 14:14:18 +0000 (09:14 -0500)]
drm/amd/display: Fix dml2 assigned pipe search
[Why & How]
DML2 currently finds assigned pipes in array order rather than the
existing linked list order. This results in rearranging pipe order
on flip and more importantly otg inst and pipe idx mismatch.
This change preserves the order of existing pipes and guarantees
the head pipe will have matching otg inst and pipe idx.
Reviewed-by: Gabe Teeger <gabe.teeger@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alvin Lee [Thu, 4 Jan 2024 18:40:04 +0000 (13:40 -0500)]
drm/amd/display: Ensure populate uclk in bb construction
[Description]
- For some SKUs, the optimal DCFCLK for each UCLK is less than the
smallest DCFCLK STA target due to low memory bandwidth. There is
an assumption that the DCFCLK STA targets will always be less
than one of the optimal DCFCLK values, but this is not true for
SKUs that have low memory bandwidth. In this case we need to
populate the optimal UCLK for each DCFCLK STA targets as the max
UCLK freq.
- Also fix a bug in DML where start_state is not assigned and used
correctly.
Reviewed-by: Samson Tam <samson.tam@amd.com>
Reviewed-by: Chaitanya Dhere <chaitanya.dhere@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Charlene Liu [Wed, 3 Jan 2024 22:09:30 +0000 (17:09 -0500)]
drm/amd/display: Update P010 scaling cap
[Why]
Keep the same as previous APU and also insert clock dump
Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Ovidiu Bunea [Tue, 19 Dec 2023 02:40:45 +0000 (21:40 -0500)]
drm/amd/display: Fix DML2 watermark calculation
[Why]
core_mode_programming in DML2 should output watermark calculations
to locals, but it incorrectly uses mode_lib
[How]
update code to match HW DML2
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Ilya Bakoulin [Wed, 3 Jan 2024 14:42:04 +0000 (09:42 -0500)]
drm/amd/display: Clear OPTC mem select on disable
[Why]
Not clearing the memory select bits prior to OPTC disable can cause DSC
corruption issues when attempting to reuse a memory instance for another
OPTC that enables ODM.
[How]
Clear the memory select bits prior to disabling an OPTC.
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ilya Bakoulin <ilya.bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Wenjing Liu [Tue, 2 Jan 2024 21:06:35 +0000 (16:06 -0500)]
drm/amd/display: Floor to mhz when requesting dpp disp clock changes to SMU
[Why]
SMU uses discrete dpp and disp clock levels. When we submit SMU request
for clock changes in Mhz we need to floor the requested value from Khz so
SMU will choose the next higher clock level in Khz to set. If we ceil to
Mhz, SMU will have to choose the next higher clock level after the ceil,
which could result in unnecessarily jumpping to the next level.
For example, we request 1911,111Khz which is exactly one of the SMU preset
level. If we pass 1912Mhz, SMU will choose 2150,000 khz. If we pass
1911Mhz, SMU will choose 1911,111kHz, which is the expected value.
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Nicholas Kazlauskas [Fri, 15 Dec 2023 16:01:42 +0000 (11:01 -0500)]
drm/amd/display: Port DENTIST hang and TDR fixes to OTG disable W/A
[Why]
We can experience DENTIST hangs during optimize_bandwidth or TDRs if
FIFO is toggled and hangs.
[How]
Port the DCN35 fixes to DCN314.
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>