Skip to content

Commit 7e182cb

Browse files
Abhinav Kumarlumag
authored andcommitted
drm: allow encoder mode_set even when connectors change for crtc
In certain use-cases, a CRTC could switch between two encoders and because the mode being programmed on the CRTC remains the same during this switch, the CRTC's mode_changed remains false. In such cases, the encoder's mode_set also gets skipped. Skipping mode_set on the encoder for such cases could cause an issue because even though the same CRTC mode was being used, the encoder type could have changed like the CRTC could have switched from a real time encoder to a writeback encoder OR vice-versa. Allow encoder's mode_set to happen even when connectors changed on a CRTC and not just when the mode changed. Signed-off-by: Abhinav Kumar <[email protected]> Signed-off-by: Jessica Zhang <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 574f5ee commit 7e182cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
13761376
mode = &new_crtc_state->mode;
13771377
adjusted_mode = &new_crtc_state->adjusted_mode;
13781378

1379-
if (!new_crtc_state->mode_changed)
1379+
if (!new_crtc_state->mode_changed && !new_crtc_state->connectors_changed)
13801380
continue;
13811381

13821382
drm_dbg_atomic(dev, "modeset on [ENCODER:%d:%s]\n",

0 commit comments

Comments
 (0)