[PATCH 11/11] drm/fbdevdrm: Detect and validate display modes
Thomas Zimmermann
tzimmermann at suse.de
Wed Mar 27 08:31:43 UTC 2019
Hi
Am 26.03.19 um 17:47 schrieb Ville Syrjälä:
>> +static int connector_helper_get_modes(struct drm_connector *connector)
>> +{
>> + struct fbdevdrm_modeset *modeset;
>> + struct list_head *pos;
>> + int ret, num_modes = 0;
>> +
>> + modeset = fbdevdrm_modeset_of_connector(connector);
>> +
>> + ret = update_display_info(&connector->display_info, modeset->fb_info);
>> + if (ret)
>> + return 0;
>> +
>> + /* update connector properties from video modes */
>> + connector->interlace_allowed = 0;
>> + connector->doublescan_allowed = 0;
>> + connector->stereo_allowed = 0;
>> +
>> + if (!num_modes && modeset->fb_info->mode) {
>> + ret = drm_mode_probed_add_from_fb_videomode(
>> + connector, modeset->fb_info->mode, modeset->fb_info);
>> + if (!ret)
>> + ++num_modes;
>> + }
>> +
>> + if (!num_modes) {
>> +
>> + /* DRM backporting notes: we go through all modes in the
>> + * fb_info's mode list and convert each to a DRM modes. If
>> + * you convert an fbdev driver to DRM, replace this code
>> + * with an actual hardware query. This will usually involve
>> + * reading the monitor EDID via DDC.
>> + */
>> +
>> + list_for_each(pos, &modeset->fb_info->modelist) {
>
> fbdev has a modelist?
Yes, and its content is surprisingly random! Some drivers fill it with
'real' values coming from DDC probing, some drivers fill it with modes
that have worked before, and some drivers fill it with... something.
Best regards
Thomas
I guess it does. But not exposed to
> userspace, which is probably the reason I never realized this.
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190327/d0f217e9/attachment.sig>
More information about the dri-devel
mailing list