Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/edid: Add CEA modes before inferred modes

Currently we're adding CEA modes after the inferred modes, which means
we might get multiple modes that are very close to each other, but
slightly different, which seems a bit silly. That's because duplicate
mode check that occurs when adding inferred modes would not consider
CEA modes as potential duplicates. Reverse the order so that CEA
modes get added before inferred modes, and are thus considered potential
duplicates.

Or as ajax put it on irc:
"< ajax> the point of the "pick a timing formula" heuristic was to
generate something the sink could _likely_ sink. if it tells us
timings it can sink explicitly then second-guessing seems dumb."

Cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Ville Syrjälä and committed by
Daniel Vetter
4d53dc0c 98515035

+2 -2
+2 -2
drivers/gpu/drm/drm_edid.c
··· 3744 3744 num_modes += add_cvt_modes(connector, edid); 3745 3745 num_modes += add_standard_modes(connector, edid); 3746 3746 num_modes += add_established_modes(connector, edid); 3747 - if (edid->features & DRM_EDID_FEATURE_DEFAULT_GTF) 3748 - num_modes += add_inferred_modes(connector, edid); 3749 3747 num_modes += add_cea_modes(connector, edid); 3750 3748 num_modes += add_alternate_cea_modes(connector, edid); 3749 + if (edid->features & DRM_EDID_FEATURE_DEFAULT_GTF) 3750 + num_modes += add_inferred_modes(connector, edid); 3751 3751 3752 3752 if (quirks & (EDID_QUIRK_PREFER_LARGE_60 | EDID_QUIRK_PREFER_LARGE_75)) 3753 3753 edid_fixup_preferred(connector, quirks);