aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2014-06-05 09:52:10 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-06-09 22:06:49 -0400
commit5d02626d3167cd4214bf611362e08dfd1e98c62e (patch)
tree4cd0e0c6178caed44b2dbf347a7c675b3275c924
parentd71c48f69cc03912578472bced4cc43069fe07e1 (diff)
drm/edid: Store all supported hdmi deep color modes in drm_display_info
HDMI deep color setup must know which modes are supported if it needs to degrade gracefully, as only 12 bpc / dc_36 is guaranteed, but 10 bpc / dc_30 is optional. The maximum bpc is not sufficient for this. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/drm_edid.c3
-rw-r--r--include/drm/drm_crtc.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7be21781d3bd..dfa9769b26b5 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3471,18 +3471,21 @@ static bool drm_assign_hdmi_deep_color_info(struct edid *edid,
3471 3471
3472 if (hdmi[6] & DRM_EDID_HDMI_DC_30) { 3472 if (hdmi[6] & DRM_EDID_HDMI_DC_30) {
3473 dc_bpc = 10; 3473 dc_bpc = 10;
3474 info->edid_hdmi_dc_modes |= DRM_EDID_HDMI_DC_30;
3474 DRM_DEBUG("%s: HDMI sink does deep color 30.\n", 3475 DRM_DEBUG("%s: HDMI sink does deep color 30.\n",
3475 connector->name); 3476 connector->name);
3476 } 3477 }
3477 3478
3478 if (hdmi[6] & DRM_EDID_HDMI_DC_36) { 3479 if (hdmi[6] & DRM_EDID_HDMI_DC_36) {
3479 dc_bpc = 12; 3480 dc_bpc = 12;
3481 info->edid_hdmi_dc_modes |= DRM_EDID_HDMI_DC_36;
3480 DRM_DEBUG("%s: HDMI sink does deep color 36.\n", 3482 DRM_DEBUG("%s: HDMI sink does deep color 36.\n",
3481 connector->name); 3483 connector->name);
3482 } 3484 }
3483 3485
3484 if (hdmi[6] & DRM_EDID_HDMI_DC_48) { 3486 if (hdmi[6] & DRM_EDID_HDMI_DC_48) {
3485 dc_bpc = 16; 3487 dc_bpc = 16;
3488 info->edid_hdmi_dc_modes |= DRM_EDID_HDMI_DC_48;
3486 DRM_DEBUG("%s: HDMI sink does deep color 48.\n", 3489 DRM_DEBUG("%s: HDMI sink does deep color 48.\n",
3487 connector->name); 3490 connector->name);
3488 } 3491 }
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index a7fac5686915..251b75e6bf7a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -121,6 +121,9 @@ struct drm_display_info {
121 enum subpixel_order subpixel_order; 121 enum subpixel_order subpixel_order;
122 u32 color_formats; 122 u32 color_formats;
123 123
124 /* Mask of supported hdmi deep color modes */
125 u8 edid_hdmi_dc_modes;
126
124 u8 cea_rev; 127 u8 cea_rev;
125}; 128};
126 129