diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-08-03 12:22:54 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-03 20:43:10 -0400 |
commit | ebec9a7bf11f843b0602b06c402f04bf4213b35a (patch) | |
tree | dc99677c052f3a24bf55a87f9b88067f3de70102 | |
parent | 4e20fa65a3ea789510eed1a15deb9e8aab2b8202 (diff) |
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: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 9 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 09292193dafe..e12f8b0cec94 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -1439,6 +1439,8 @@ EXPORT_SYMBOL(drm_detect_monitor_audio); | |||
1439 | static void drm_add_display_info(struct edid *edid, | 1439 | static void drm_add_display_info(struct edid *edid, |
1440 | struct drm_display_info *info) | 1440 | struct drm_display_info *info) |
1441 | { | 1441 | { |
1442 | u8 *edid_ext; | ||
1443 | |||
1442 | info->width_mm = edid->width_cm * 10; | 1444 | info->width_mm = edid->width_cm * 10; |
1443 | info->height_mm = edid->height_cm * 10; | 1445 | info->height_mm = edid->height_cm * 10; |
1444 | 1446 | ||
@@ -1483,6 +1485,13 @@ static void drm_add_display_info(struct edid *edid, | |||
1483 | info->color_formats = DRM_COLOR_FORMAT_YCRCB444; | 1485 | info->color_formats = DRM_COLOR_FORMAT_YCRCB444; |
1484 | if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB422) | 1486 | if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB422) |
1485 | info->color_formats = DRM_COLOR_FORMAT_YCRCB422; | 1487 | info->color_formats = DRM_COLOR_FORMAT_YCRCB422; |
1488 | |||
1489 | /* Get data from CEA blocks if present */ | ||
1490 | edid_ext = drm_find_cea_extension(edid); | ||
1491 | if (!edid_ext) | ||
1492 | return; | ||
1493 | |||
1494 | info->cea_rev = edid_ext[1]; | ||
1486 | } | 1495 | } |
1487 | 1496 | ||
1488 | /** | 1497 | /** |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 33d12f87f0e0..d515bc8f4ba7 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -205,6 +205,8 @@ struct drm_display_info { | |||
205 | enum subpixel_order subpixel_order; | 205 | enum subpixel_order subpixel_order; |
206 | u32 color_formats; | 206 | u32 color_formats; |
207 | 207 | ||
208 | u8 cea_rev; | ||
209 | |||
208 | char *raw_edid; /* if any */ | 210 | char *raw_edid; /* if any */ |
209 | }; | 211 | }; |
210 | 212 | ||