Commit ebec9a7b authored by Jesse Barnes's avatar Jesse Barnes Committed by Keith Packard

drm: track CEA version number if present

Drivers need to know the CEA version number in addition to other display
info (like whether the display is an HDMI sink) before enabling certain
features.  So track the CEA version number in the display info
structure.
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 4e20fa65
...@@ -1439,6 +1439,8 @@ EXPORT_SYMBOL(drm_detect_monitor_audio); ...@@ -1439,6 +1439,8 @@ EXPORT_SYMBOL(drm_detect_monitor_audio);
static void drm_add_display_info(struct edid *edid, static void drm_add_display_info(struct edid *edid,
struct drm_display_info *info) struct drm_display_info *info)
{ {
u8 *edid_ext;
info->width_mm = edid->width_cm * 10; info->width_mm = edid->width_cm * 10;
info->height_mm = edid->height_cm * 10; info->height_mm = edid->height_cm * 10;
...@@ -1483,6 +1485,13 @@ static void drm_add_display_info(struct edid *edid, ...@@ -1483,6 +1485,13 @@ static void drm_add_display_info(struct edid *edid,
info->color_formats = DRM_COLOR_FORMAT_YCRCB444; info->color_formats = DRM_COLOR_FORMAT_YCRCB444;
if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB422) if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB422)
info->color_formats = DRM_COLOR_FORMAT_YCRCB422; info->color_formats = DRM_COLOR_FORMAT_YCRCB422;
/* Get data from CEA blocks if present */
edid_ext = drm_find_cea_extension(edid);
if (!edid_ext)
return;
info->cea_rev = edid_ext[1];
} }
/** /**
......
...@@ -205,6 +205,8 @@ struct drm_display_info { ...@@ -205,6 +205,8 @@ struct drm_display_info {
enum subpixel_order subpixel_order; enum subpixel_order subpixel_order;
u32 color_formats; u32 color_formats;
u8 cea_rev;
char *raw_edid; /* if any */ char *raw_edid; /* if any */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment