History

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

Ville Syrjälä committed 4 years ago

Commit c7943bb1 parent a3f7c104 files · +27 −10Browse files

Showing the changes to include/drm (2 of 4 files). Show all

Unified · Split

2 files
  1. include/drm/drm_connector.h +2 −2
  2. include/drm/drm_edid.h +5 −0
include/drm/drm_connector.h+2−2
@@ -319,8 +319,8 @@ enum drm_panel_orientation { · 318 unmodified lines
319 * EDID's detailed monitor range319 * EDID's detailed monitor range
320 */320 */
321struct drm_monitor_range_info {321struct drm_monitor_range_info {
322 u8 min_vfreq;322 u16 min_vfreq;
323 u8 max_vfreq;323 u16 max_vfreq;
324};324};
325 325
326/**326/**
include/drm/drm_edid.h+5−0
@@ -92,6 +92,11 @@ struct detailed_data_string { · 91 unmodified lines
92 u8 str[13];92 u8 str[13];
93} __attribute__((packed));93} __attribute__((packed));
94 94
95#define DRM_EDID_RANGE_OFFSET_MIN_VFREQ (1 << 0) /* 1.4 */
96#define DRM_EDID_RANGE_OFFSET_MAX_VFREQ (1 << 1) /* 1.4 */
97#define DRM_EDID_RANGE_OFFSET_MIN_HFREQ (1 << 2) /* 1.4 */
98#define DRM_EDID_RANGE_OFFSET_MAX_HFREQ (1 << 3) /* 1.4 */
99
95#define DRM_EDID_DEFAULT_GTF_SUPPORT_FLAG 0x00100#define DRM_EDID_DEFAULT_GTF_SUPPORT_FLAG 0x00
96#define DRM_EDID_RANGE_LIMITS_ONLY_FLAG 0x01101#define DRM_EDID_RANGE_LIMITS_ONLY_FLAG 0x01
97#define DRM_EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02102#define DRM_EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02