Fangzhi Zuo
01d992088d
drm/amd/display: Fix MST Null Ptr for RV
...
[ Upstream commit e6a7df96facdcf5b1f71eb3ec26f2f9f6ad61e57 ]
The change try to fix below error specific to RV platform:
BUG: kernel NULL pointer dereference, address: 0000000000000008
PGD 0 P4D 0
Oops: 0000 [#1 ] PREEMPT SMP NOPTI
CPU: 4 PID: 917 Comm: sway Not tainted 6.3.9-arch1-1 #1 124dc55df4f5272ccb409f39ef4872fc2b3376a2
Hardware name: LENOVO 20NKS01Y00/20NKS01Y00, BIOS R12ET61W(1.31 ) 07/28/2022
RIP: 0010:drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper]
Code: 01 00 00 48 8b 85 60 05 00 00 48 63 80 88 00 00 00 3b 43 28 0f 8d 2e 01 00 00 48 8b 53 30 48 8d 04 80 48 8d 04 c2 48 8b 40 18 <48> 8>
RSP: 0018:ffff960cc2df77d8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8afb87e81280 RCX: 0000000000000224
RDX: ffff8afb9ee37c00 RSI: ffff8afb8da1a578 RDI: ffff8afb87e81280
RBP: ffff8afb83d67000 R08: 0000000000000001 R09: ffff8afb9652f850
R10: ffff960cc2df7908 R11: 0000000000000002 R12: 0000000000000000
R13: ffff8afb8d7688a0 R14: ffff8afb8da1a578 R15: 0000000000000224
FS: 00007f4dac35ce00(0000) GS:ffff8afe30b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000008 CR3: 000000010ddc6000 CR4: 00000000003506e0
Call Trace:
<TASK>
? __die+0x23/0x70
? page_fault_oops+0x171/0x4e0
? plist_add+0xbe/0x100
? exc_page_fault+0x7c/0x180
? asm_exc_page_fault+0x26/0x30
? drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026]
? drm_dp_atomic_find_time_slots+0x28/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026]
compute_mst_dsc_configs_for_link+0x2ff/0xa40 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054]
? fill_plane_buffer_attributes+0x419/0x510 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054]
compute_mst_dsc_configs_for_state+0x1e1/0x250 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054]
amdgpu_dm_atomic_check+0xecd/0x1190 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054]
drm_atomic_check_only+0x5c5/0xa40
drm_mode_atomic_ioctl+0x76e/0xbc0
? _copy_to_user+0x25/0x30
? drm_ioctl+0x296/0x4b0
? __pfx_drm_mode_atomic_ioctl+0x10/0x10
drm_ioctl_kernel+0xcd/0x170
drm_ioctl+0x26d/0x4b0
? __pfx_drm_mode_atomic_ioctl+0x10/0x10
amdgpu_drm_ioctl+0x4e/0x90 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054]
__x64_sys_ioctl+0x94/0xd0
do_syscall_64+0x60/0x90
? do_syscall_64+0x6c/0x90
entry_SYSCALL_64_after_hwframe+0x72/0xdc
RIP: 0033:0x7f4dad17f76f
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c>
RSP: 002b:00007ffd9ae859f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000055e255a55900 RCX: 00007f4dad17f76f
RDX: 00007ffd9ae85a90 RSI: 00000000c03864bc RDI: 000000000000000b
RBP: 00007ffd9ae85a90 R08: 0000000000000003 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c03864bc
R13: 000000000000000b R14: 000055e255a7fc60 R15: 000055e255a01eb0
</TASK>
Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device ccm cmac algif_hash algif_skcipher af_alg joydev mousedev bnep >
typec libphy k10temp ipmi_msghandler roles i2c_scmi acpi_cpufreq mac_hid nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_mas>
CR2: 0000000000000008
---[ end trace 0000000000000000 ]---
RIP: 0010:drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper]
Code: 01 00 00 48 8b 85 60 05 00 00 48 63 80 88 00 00 00 3b 43 28 0f 8d 2e 01 00 00 48 8b 53 30 48 8d 04 80 48 8d 04 c2 48 8b 40 18 <48> 8>
RSP: 0018:ffff960cc2df77d8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8afb87e81280 RCX: 0000000000000224
RDX: ffff8afb9ee37c00 RSI: ffff8afb8da1a578 RDI: ffff8afb87e81280
RBP: ffff8afb83d67000 R08: 0000000000000001 R09: ffff8afb9652f850
R10: ffff960cc2df7908 R11: 0000000000000002 R12: 0000000000000000
R13: ffff8afb8d7688a0 R14: ffff8afb8da1a578 R15: 0000000000000224
FS: 00007f4dac35ce00(0000) GS:ffff8afe30b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000008 CR3: 000000010ddc6000 CR4: 00000000003506e0
With a second DP monitor connected, drm_atomic_state in dm atomic check
sequence does not include the connector state for the old/existing/first
DP monitor. In such case, dsc determination policy would hit a null ptr
when it tries to iterate the old/existing stream that does not have a
valid connector state attached to it. When that happens, dm atomic check
should call drm_atomic_get_connector_state for a new connector state.
Existing dm has already done that, except for RV due to it does not have
official support of dsc where .num_dsc is not defined in dcn10 resource
cap, that prevent from getting drm_atomic_get_connector_state called.
So, skip dsc determination policy for ASICs that don't have DSC support.
Cc: stable@vger.kernel.org # 6.1+
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2314
Reviewed-by: Wayne Lin <wayne.lin@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:21 -04:00
..
2024-03-15 10:48:21 -04:00
2023-11-28 17:06:57 +00:00
2023-09-13 09:42:42 +02:00
2022-08-03 18:32:27 +02:00
2023-09-19 12:27:56 +02:00
2022-08-03 18:32:27 +02:00
2024-02-05 20:12:54 +00:00
2023-11-02 09:35:25 +01:00
2023-09-13 09:42:39 +02:00
2024-02-05 20:12:56 +00:00
2022-12-31 13:33:06 +01:00
2023-11-28 17:06:56 +00:00
2023-03-10 09:34:33 +01:00
2022-10-05 11:24:12 -07:00
2023-09-13 09:42:36 +02:00
2022-08-16 12:46:26 +02:00
2024-02-16 19:06:27 +01:00
2023-08-11 12:08:25 +02:00
2023-01-07 11:11:57 +01:00
2022-08-03 18:31:49 +02:00
2023-05-11 23:03:12 +09:00
2023-11-02 09:35:28 +01:00
2022-08-03 18:31:49 +02:00
2024-01-25 15:27:36 -08:00
2024-03-06 14:45:04 +00:00
2024-01-10 17:10:21 +01:00
2024-02-23 09:12:41 +01:00
2023-09-19 12:28:06 +02:00
2024-03-01 13:26:36 +01:00
2024-01-25 15:27:31 -08:00
2024-02-05 20:12:54 +00:00
2024-01-25 15:27:33 -08:00
2022-08-11 18:13:31 +02:00
2023-11-28 17:07:03 +00:00
2024-01-25 15:27:35 -08:00
2023-08-23 17:52:20 +02:00
2023-12-03 07:32:07 +01:00
2023-10-19 23:08:57 +02:00
2022-09-20 09:37:12 +02:00
2022-07-28 15:35:56 +01:00
2023-02-09 11:28:02 +01:00
2022-08-03 18:32:27 +02:00
2022-12-31 13:33:06 +01:00
2023-08-30 16:10:57 +02:00
2023-08-30 16:10:57 +02:00
2024-03-06 14:45:09 +00:00
2023-10-06 14:57:03 +02:00
2024-01-31 16:17:08 -08:00
2024-01-25 15:27:32 -08:00
2023-09-23 11:11:08 +02:00
2024-03-01 13:26:31 +01:00
2022-08-26 14:22:59 +02:00
2022-09-10 21:45:53 +02:00
2022-08-03 18:31:49 +02:00
2022-09-17 15:01:24 +02:00
2023-08-30 16:10:57 +02:00
2023-05-11 23:03:07 +09:00
2022-09-07 07:01:16 +02:00
2024-02-23 09:12:37 +01:00
2023-07-19 16:21:18 +02:00
2024-01-25 15:27:41 -08:00
2022-07-13 10:54:56 +10:00
2023-09-13 09:42:42 +02:00
2023-08-30 16:10:57 +02:00
2023-10-19 23:08:55 +02:00
2023-07-23 13:49:50 +02:00
2022-07-28 15:35:55 +01:00
2023-07-19 16:21:23 +02:00
2024-03-06 14:45:10 +00:00
2023-07-27 08:50:28 +02:00
2023-07-23 13:49:28 +02:00
2022-08-04 15:24:46 +02:00
2023-01-07 11:11:56 +01:00
2022-10-07 17:04:10 -07:00
2024-01-20 11:50:09 +01:00
2022-09-13 14:38:33 +03:00
2022-09-02 16:38:51 +03:00
2023-05-24 17:32:34 +01:00
2024-01-25 15:27:33 -08:00
2023-09-23 11:11:03 +02:00
2022-07-13 10:46:05 +02:00
2022-08-03 18:32:27 +02:00
2023-07-23 13:49:28 +02:00
2024-02-05 20:12:55 +00:00
2022-10-31 09:50:44 +01:00
2023-03-10 09:33:08 +01:00
2024-02-05 20:12:55 +00:00
2022-08-03 18:32:27 +02:00
2022-07-09 15:08:16 +02:00
2023-08-16 18:27:22 +02:00
2022-07-18 09:18:53 +02:00
2023-07-19 16:21:16 +02:00
2023-03-22 13:33:39 +01:00
2022-11-10 18:49:02 -05:00
2022-07-15 10:25:36 +02:00
2023-11-28 17:06:57 +00:00
2023-05-30 14:03:20 +01:00
2022-09-12 09:14:26 +02:00
2024-02-05 20:12:55 +00:00
2023-03-10 09:33:08 +01:00
2022-09-20 09:42:31 +02:00
2023-10-25 12:03:11 +02:00
2022-09-20 09:42:31 +02:00
2024-01-31 16:17:08 -08:00
2024-02-23 09:12:41 +01:00
2022-09-24 15:02:02 +02:00
2023-05-11 23:03:07 +09:00
2022-07-26 18:42:00 +02:00
2024-03-01 13:26:38 +01:00
2023-02-01 08:34:42 +01:00
2023-02-22 12:59:46 +01:00
2022-10-07 17:04:10 -07:00