drm/amd/display: Skip on writeback when it's not applicable
PATCH 1/1 drm/amd/display: Skip on writeback when it's not applicable
From: Alex Hung <[email protected]>
[ Upstream commit ecedd99a9369fb5cde601ae9abd58bca2739f1ae ]
[WHY]
dynamic memory safety error detector (KASAN) catches and generates error messages "BUG: KASAN: slab-out-of-bounds" as writeback connector does not support certain features which are not initialized.
[HOW]
Skip them when connector type is DRM_MODE_CONNECTOR_WRITEBACK.
Reviewed-by Harry Wentland <[email protected]>
Reviewed-by Rodrigo Siqueira <[email protected]>
Acked-by Roman Li <[email protected]>
Signed-off-by Alex Hung <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
CVE: CVE-2024-36914
Signed-off-by Xiangyu Chen <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +10 -0
@@ -2990,6 +2990,10 @@ static int dm_resume(void *handle)/* Do mst topology probing after resuming cached state*/ drm_connector_list_iter_begin (ddev, &iter);drm_for_each_connector_iter (connector, &iter) { + +if (connector->connector_type ==DRM_MODE_CONNECTOR_WRITEBACK ) +continue ; + aconnector =to_amdgpu_dm_connector (connector);if (aconnector->dc_link->type != dc_connection_mst_branch || aconnector->mst_port)
@@ -5722,6 +5726,9 @@ get_highest_refresh_rate_mode(struct amdgpu_dm_connector *aconnector, &aconnector->base.probed_modes : &aconnector->base.modes; +if (aconnector->base.connector_type ==DRM_MODE_CONNECTOR_WRITEBACK ) +return NULL ; +if (aconnector->freesync_vid_base.clock !=0 )return &aconnector->freesync_vid_base;
@@ -8242,6 +8249,9 @@ static void amdgpu_dm_commit_audio(struct drm_device *dev,continue ; notify: +if (connector->connector_type ==DRM_MODE_CONNECTOR_WRITEBACK ) +continue ; + aconnector =to_amdgpu_dm_connector (connector);mutex_lock (&adev->dm.audio_lock);
Signature · 1 line
2.43.0