Skip to content

Commit ecedd99

Browse files
Alex Hungalexdeucher
authored andcommitted
drm/amd/display: Skip on writeback when it's not applicable
[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 <harry.wentland@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Acked-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent f886b49 commit ecedd99

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3047,6 +3047,10 @@ static int dm_resume(void *handle)
30473047
/* Do mst topology probing after resuming cached state*/
30483048
drm_connector_list_iter_begin(ddev, &iter);
30493049
drm_for_each_connector_iter(connector, &iter) {
3050+
3051+
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
3052+
continue;
3053+
30503054
aconnector = to_amdgpu_dm_connector(connector);
30513055
if (aconnector->dc_link->type != dc_connection_mst_branch ||
30523056
aconnector->mst_root)
@@ -5926,6 +5930,9 @@ get_highest_refresh_rate_mode(struct amdgpu_dm_connector *aconnector,
59265930
&aconnector->base.probed_modes :
59275931
&aconnector->base.modes;
59285932

5933+
if (aconnector->base.connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
5934+
return NULL;
5935+
59295936
if (aconnector->freesync_vid_base.clock != 0)
59305937
return &aconnector->freesync_vid_base;
59315938

@@ -8767,10 +8774,10 @@ static void amdgpu_dm_commit_audio(struct drm_device *dev,
87678774
if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
87688775
continue;
87698776

8777+
notify:
87708778
if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
87718779
continue;
87728780

8773-
notify:
87748781
aconnector = to_amdgpu_dm_connector(connector);
87758782

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

0 commit comments

Comments
 (0)