Skip to content

Commit 87de0a7

Browse files
Alex Hunggregkh
authored andcommitted
drm/amd/display: Skip on writeback when it's not applicable
commit ecedd99a9369fb5cde601ae9abd58bca2739f1ae upstream. [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. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3199 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]> Signed-off-by: Xiangyu Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5e84eda commit 87de0a7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2990,6 +2990,10 @@ static int dm_resume(void *handle)
29902990
/* Do mst topology probing after resuming cached state*/
29912991
drm_connector_list_iter_begin(ddev, &iter);
29922992
drm_for_each_connector_iter(connector, &iter) {
2993+
2994+
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
2995+
continue;
2996+
29932997
aconnector = to_amdgpu_dm_connector(connector);
29942998
if (aconnector->dc_link->type != dc_connection_mst_branch ||
29952999
aconnector->mst_port)
@@ -5722,6 +5726,9 @@ get_highest_refresh_rate_mode(struct amdgpu_dm_connector *aconnector,
57225726
&aconnector->base.probed_modes :
57235727
&aconnector->base.modes;
57245728

5729+
if (aconnector->base.connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
5730+
return NULL;
5731+
57255732
if (aconnector->freesync_vid_base.clock != 0)
57265733
return &aconnector->freesync_vid_base;
57275734

@@ -8242,6 +8249,9 @@ static void amdgpu_dm_commit_audio(struct drm_device *dev,
82428249
continue;
82438250

82448251
notify:
8252+
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
8253+
continue;
8254+
82458255
aconnector = to_amdgpu_dm_connector(connector);
82468256

82478257
mutex_lock(&adev->dm.audio_lock);

0 commit comments

Comments
 (0)