Re: [PATCHv2] drm: fb_helper: prefer to use mode, which is not DRM_MODE_TYPE_USERDEF

From: Chris Wilson
Date: Mon Apr 20 2015 - 05:09:49 EST


On Mon, Apr 20, 2015 at 07:26:33AM +0200, Radek Dostal wrote:
> commit eaf99c749d43 ("drm: Perform cmdline mode parsing during connector
> initialisation") breaks HDMI output on BeagleBone Black with LG TV
> (model 19LS4R-ZA) when "video=HDMI-A-1:1280x720@60" is specified on
> the command line.
>
> The reason is newly added mode
> '"1280x720" 60 74440 1280 1336 1472 1664 720 721 724 746 0x20 0x6'
> , which is added by function drm_helper_probe_add_cmdline_mode (introduced
> in above mentioned commit). This mode causes TV to go black and show "No
> signal" message.
>
> When cmdline_mode is set, it is preferred to use matching mode obtained
> from EDID, than mode calculated by function
> drm_mode_create_from_cmdline_mode

The EDID modes should be earlier in the list, and so higher priority
than the cmdline mode. The only instance I see that breaking down is if
the mode gets created by drm_pick_cmdline_mode, i.e.

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index cac422916c7a..d55c2de6a99f 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1327,7 +1327,7 @@ again:
create_mode:
mode = drm_mode_create_from_cmdline_mode(fb_helper_conn->connector->dev,
cmdline_mode);
- list_add(&mode->head, &fb_helper_conn->connector->modes);
+ list_add_tail(&mode->head, &fb_helper_conn->connector->modes);
return mode;
}
EXPORT_SYMBOL(drm_pick_cmdline_mode);

Can you please print the matching modes and trace where the userdef mode
gets added before the EDID modes?
-Chris

--
Chris Wilson, Intel Open Source Technology Centre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/