Skip to content

Commit

Permalink
drm: track CEA version number if present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Barnes authored and Keith Packard committed Aug 4, 2011
1 parent 4e20fa6 commit ebec9a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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];
}

/**
Expand Down
2 changes: 2 additions & 0 deletions include/drm/drm_crtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ struct drm_display_info {
enum subpixel_order subpixel_order;
u32 color_formats;

u8 cea_rev;

char *raw_edid; /* if any */
};

Expand Down

0 comments on commit ebec9a7

Please sign in to comment.