Skip to content

Commit e6a9a2c

Browse files
contactshashanksharmavsyrjala
authored andcommitted
drm/edid: parse ycbcr 420 deep color information
CEA-861-F spec adds ycbcr420 deep color support information in hf-vsdb block. This patch extends the existing hf-vsdb parsing function by adding parsing of ycbcr420 deep color support from the EDID and adding it into display information stored. V2: Rebase V3: Rebase V4: Moved definition of y420_dc_modes into this patch, where its used (Ville) V5: Optimize function, if(conditions) not reqd (Ville) V6: Rebase V7: Rebase Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jose Abreu <joabreu@synopsys.com> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-8-git-send-email-shashank.sharma@intel.com [vsyrjala: Fix sparse indentation warn] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
1 parent 832d4f2 commit e6a9a2c

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

drivers/gpu/drm/drm_edid.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4202,6 +4202,16 @@ drm_default_rgb_quant_range(const struct drm_display_mode *mode)
42024202
}
42034203
EXPORT_SYMBOL(drm_default_rgb_quant_range);
42044204

4205+
static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
4206+
const u8 *db)
4207+
{
4208+
u8 dc_mask;
4209+
struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
4210+
4211+
dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
4212+
hdmi->y420_dc_modes |= dc_mask;
4213+
}
4214+
42054215
static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
42064216
const u8 *hf_vsdb)
42074217
{
@@ -4242,6 +4252,8 @@ static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
42424252
scdc->scrambling.low_rates = true;
42434253
}
42444254
}
4255+
4256+
drm_parse_ycbcr420_deep_color_info(connector, hf_vsdb);
42454257
}
42464258

42474259
static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,

include/drm/drm_connector.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ struct drm_hdmi_info {
154154

155155
/** @y420_cmdb_map: bitmap of SVD index, to extraxt vcb modes */
156156
u64 y420_cmdb_map;
157+
158+
/** @y420_dc_modes: bitmap of deep color support index */
159+
u8 y420_dc_modes;
157160
};
158161

159162
/**

include/drm/drm_edid.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ struct detailed_timing {
213213
#define DRM_EDID_HDMI_DC_30 (1 << 4)
214214
#define DRM_EDID_HDMI_DC_Y444 (1 << 3)
215215

216+
/* YCBCR 420 deep color modes */
217+
#define DRM_EDID_YCBCR420_DC_48 (1 << 6)
218+
#define DRM_EDID_YCBCR420_DC_36 (1 << 5)
219+
#define DRM_EDID_YCBCR420_DC_30 (1 << 4)
220+
#define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
221+
DRM_EDID_YCBCR420_DC_36 | \
222+
DRM_EDID_YCBCR420_DC_30)
223+
216224
/* ELD Header Block */
217225
#define DRM_ELD_HEADER_BLOCK_SIZE 4
218226

0 commit comments

Comments
 (0)