Re: [RFC PATCH] drm: allow encoder mode_set even when connectors change for crtc

From: Maxime Ripard
Date: Mon Sep 09 2024 - 09:38:04 EST


Hi,

On Thu, Sep 05, 2024 at 03:11:24PM GMT, Abhinav Kumar wrote:
> 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 <quic_abhinavk@xxxxxxxxxxx>

The patch and rationale looks sane to me, but we should really add kunit
tests for that scenarii.

Maxime

Attachment: signature.asc
Description: PGP signature