Maxime Ripard <[email protected]> writes:

Hello Maxime,

> Hi,
>
> On Mon, May 11, 2026 at 02:48:24PM +0200, Javier Martinez Canillas wrote:

[...]

>> 
>> I wrongly thought that couldn't get that info from it66121_bridge_mode_set()
>> so I thought about making it a property of the bridge atomic state.
>> 
>> But I see now that the connector is already stored in struct it66121_ctx *ctx
>> so the fix indeed becomes even more trivial.
>
> Actually, there's something super fishy there.
>
> ctx->connector is stored only at atomic_enable time, but you'd be using
> ctx->it at modeset time which is kind of decorelated to atomic_enable,
> ctx->can be called multiple times, etc.
>

Your intuition was correct! The driver has a bug and ctx->connector seems
to always be NULL because .mode_set is called before .atomic_enable, which
is where the ctx->connector is being set.

> It seems to be already used, so it probably works, but I don't think the
> framework provides that guarantee.
>

It seems to work just because drm_hdmi_avi_infoframe_from_display_mode()
allows the connector argument to be NULL, is just that the VIC data is not
sent in the AVI infoframes if I understood correctly.

I'll work on a v3 that moves the TX mode and AVI infoframes enable/disable
to the .atomic_enable callback which I see is what other bridge drivers do
(e.g,: sii902x).

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

Reply via email to