drm/amd/display: Fix USB4 hot plug crash issue
authorJude Shih <shenshih@amd.com>
Mon, 18 Oct 2021 04:04:23 +0000 (12:04 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Oct 2021 18:26:51 +0000 (14:26 -0400)
commit094b21c1a3578234f06a28b80f4d2f6446b5f533
tree50e808e0959fa3f110f31a836f92a53eb566e1f2
parentf638d7505f99bca9436aac37b2a1ecb3f84803a5
drm/amd/display: Fix USB4 hot plug crash issue

[Why]
Notify data from outbox corrupt, the notify type should be 2 (HPD) instead of 0
(No data). We copied the address instead of the value. The memory might be
freed in the end of outbox IRQ

[How]
We should allocate the memory of notify and copy the whole content from outbox to
hpd handle function

Fixes: 88f52b1fff891e ("drm/amd/display: Support for SET_CONFIG processing with DMUB")
Signed-off-by: Jude Shih <shenshih@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c