[REGRESSION] [BISECTED] drm/sun4i: hdmi: No HDMI output with BananaPI M1 on 6.9

Michael michael at fossekall.de
Mon May 26 14:13:01 PDT 2025


Hi,

On Mon, May 26, 2025 at 07:30:35PM +0200, Maxime Ripard wrote:
>On Mon, May 12, 2025 at 10:27:06PM +0200, Michael wrote:
>> with v6.9 and later there is no output on the BananaPI HDMI connector.
>>
>> I have bisected the issue to the following commit:
>>
>>   358e76fd613a ("drm/sun4i: hdmi: Consolidate atomic_check and mode_valid")
>>
>> With this patch, sun4i_hdmi_connector_clock_valid() is occasionally called
>> with clock=0, causing the function to return MODE_NOCLOCK.
>> In the old sun4i_hdmi_mode_valid() before the patch, mode->clock is
>> always!=0, maybe that gives someone a hint.
>
>This doesn't make sense to me, if only because the two callers of
>tmds_char_rate_valid (hdmi_compute_clock and
>drm_hdmi_connector_mode_valid) have, right before calling it, checks to
>make sure the clock rate isn't 0, and would return MODE_ERROR or EINVAL
>in such a case.
>
>https://elixir.bootlin.com/linux/v6.15/source/drivers/gpu/drm/display/drm_hdmi_state_helper.c#L234
>https://elixir.bootlin.com/linux/v6.15/source/drivers/gpu/drm/display/drm_hdmi_state_helper.c#L553

Before 6.14, sun4i_hdmi_connector_clock_valid() was also called from 
sun4i_hdmi_connector_atomic_check()...

>Do you have some logs (with dri.devel=0xff)? Does it happen with 6.15 as
>well?

It does not happen with 6.15, as it was fixed in 6.14 with 84e541b1e58e 
("drm/sun4i: use drm_atomic_helper_connector_hdmi_check()").

For completeness:

358e76fd613a:

[    1.091807] sun4i-drm display-engine: [drm:drm_atomic_check_only] checking (ptrval)
[    1.091850] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] [CRTC:47:crtc-0] mode changed
[    1.091876] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] [CRTC:47:crtc-0] enable changed
[    1.091898] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] [CRTC:47:crtc-0] active changed
[    1.091927] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:66:HDMI-A-1]
[    1.091953] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] [CONNECTOR:66:HDMI-A-1] using [ENCODER:65:TMDS-65] on [CRTC:47:crtc-0]
[    1.092019] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] [CONNECTOR:66:HDMI-A-1] driver check failed
[    1.092042] sun4i-drm display-engine: [drm:drm_atomic_check_only] atomic driver check for (ptrval) failed: -22
[    1.092070] sun4i-drm display-engine: [drm:drm_atomic_state_default_clear] Clearing atomic state (ptrval)

358e76fd613a^ :

[   14.402623] sun4i-drm display-engine: [drm] 	crtc=crtc-0
[   14.402630] sun4i-drm display-engine: [drm] 	self_refresh_aware=0
[   14.402638] sun4i-drm display-engine: [drm] 	max_requested_bpc=0
[   14.402647] sun4i-drm display-engine: [drm] 	colorspace=Default
[   14.402657] sun4i-drm display-engine: [drm:drm_atomic_check_only] checking 31bd6e91
[   14.402714] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:66:HDMI-A-1]
[   14.402741] sun4i-drm display-engine: [drm:drm_atomic_helper_check_modeset] [CONNECTOR:66:HDMI-A-1] keeps [ENCODER:65:TMDS-65], now on [CRTC:47:crtc-0]
[   14.402767] sun4i-drm display-engine: [drm:drm_atomic_add_encoder_bridges] Adding all bridges for [encoder:65:TMDS-65] to 31bd6e91
[   14.402792] sun4i-drm display-engine: [drm:drm_atomic_add_encoder_bridges] Adding all bridges for [encoder:65:TMDS-65] to 31bd6e91
[   14.402826] [drm:sun4i_backend_atomic_check] Starting checking our planes
[   14.402846] [drm:sun4i_backend_atomic_check] Input size 1024x600, output size 1024x600
[   14.402862] [drm:sun4i_backend_atomic_check] Input size 1024x600, output size 1024x600
[   14.402877] [drm:sun4i_backend_atomic_check] Plane FB format is XR24 little-endian (0x34325258)
[   14.402894] [drm:sun4i_backend_atomic_check] Plane zpos is 0
[   14.402906] [drm:sun4i_backend_atomic_check] State valid with 1 planes, 0 alpha, 0 video, 0 YUV
[   14.402922] [drm:sun4i_backend_atomic_check] Starting checking our planes

Sorry for the noise :)

>
>Maxime

Michael

#regzbot fix: 84e541b1e58e



More information about the linux-arm-kernel mailing list