]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: track CEA version number if present
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 3 Aug 2011 16:22:54 +0000 (09:22 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 4 Aug 2011 00:43:10 +0000 (17:43 -0700)
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: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/drm_edid.c
include/drm/drm_crtc.h

index 09292193dafe0b28466e37061acc7bee25e348f5..e12f8b0cec944167c356227d68a7b774d9033638 100644 (file)
@@ -1439,6 +1439,8 @@ EXPORT_SYMBOL(drm_detect_monitor_audio);
 static void drm_add_display_info(struct edid *edid,
                                 struct drm_display_info *info)
 {
+       u8 *edid_ext;
+
        info->width_mm = edid->width_cm * 10;
        info->height_mm = edid->height_cm * 10;
 
@@ -1483,6 +1485,13 @@ static void drm_add_display_info(struct edid *edid,
                info->color_formats = DRM_COLOR_FORMAT_YCRCB444;
        if (info->color_formats & DRM_EDID_FEATURE_RGB_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];
 }
 
 /**
index 33d12f87f0e01735d41a800a73b7ea5ddc9b31a6..d515bc8f4ba7c32604fbdf2290b7dea06e6b31b1 100644 (file)
@@ -205,6 +205,8 @@ struct drm_display_info {
        enum subpixel_order subpixel_order;
        u32 color_formats;
 
+       u8 cea_rev;
+
        char *raw_edid; /* if any */
 };