drm/edid: Handle EDID 1.4 range descriptor h/vfreq offsets
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 26 Aug 2022 21:34:51 +0000 (00:34 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Sep 2022 13:38:51 +0000 (16:38 +0300)
commitc7943bb324e503baeeba3df2bc5ca8a377111bfa
tree9b3d744a5e74d07fc3b4b4c9b15f169e80235c2e
parenta3f7c10a269d5b77dd5822ade822643ced3057f0
drm/edid: Handle EDID 1.4 range descriptor h/vfreq offsets

EDID 1.4 introduced some extra flags in the range
descriptor to support min/max h/vfreq >= 255. Consult them
to correctly parse the vfreq limits.

Note that some combinations of the flags are documented
as "reserved" (as are some other values in the descriptor)
but explicitly checking for those doesn't seem particularly
worthwile since we end up with bogus results whether we
decode them or not.

v2: Increase the storage to u16 to make it work (Jani)
    Note the "reserved" values situation (Jani)
v3: Document the EDID version number in the defines
    Drop some bogus (u8) casts

Cc: stable@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6519
References: https://gitlab.freedesktop.org/drm/intel/-/issues/6484
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220826213501.31490-2-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
drivers/gpu/drm/drm_debugfs.c
drivers/gpu/drm/drm_edid.c
include/drm/drm_connector.h
include/drm/drm_edid.h