All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shashank Sharma <shashank.sharma@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: Jose Abreu <joabreu@synopsys.com>
Subject: [PATCH 07/15] drm/edid: parse ycbcr 420 deep color information
Date: Fri,  7 Jul 2017 08:49:13 +0530	[thread overview]
Message-ID: <1499397561-31797-8-git-send-email-shashank.sharma@intel.com> (raw)
In-Reply-To: <1499397561-31797-1-git-send-email-shashank.sharma@intel.com>

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

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
---
 drivers/gpu/drm/drm_edid.c  | 12 ++++++++++++
 include/drm/drm_connector.h |  3 +++
 include/drm/drm_edid.h      |  8 ++++++++
 3 files changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 44be128..944a28f 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -4199,6 +4199,16 @@ drm_default_rgb_quant_range(const struct drm_display_mode *mode)
 }
 EXPORT_SYMBOL(drm_default_rgb_quant_range);
 
+static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
+					     const u8 *db)
+{
+	u8 dc_mask;
+	struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
+
+	dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
+	hdmi->y420_dc_modes |= dc_mask;
+}
+
 static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
 				 const u8 *hf_vsdb)
 {
@@ -4239,6 +4249,8 @@ static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
 				scdc->scrambling.low_rates = true;
 		}
 	}
+
+	drm_parse_ycbcr420_deep_color_info(connector, hf_vsdb);
 }
 
 static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 225e092..4bc0882 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -154,6 +154,9 @@ struct drm_hdmi_info {
 
 	/** @y420_cmdb_map: bitmap of SVD index, to extraxt vcb modes */
 	u64 y420_cmdb_map;
+
+	/** @y420_dc_modes: bitmap of deep color support index */
+	u8 y420_dc_modes;
 };
 
 /**
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index b55b2a7..aa58146 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -213,6 +213,14 @@ struct detailed_timing {
 #define DRM_EDID_HDMI_DC_30               (1 << 4)
 #define DRM_EDID_HDMI_DC_Y444             (1 << 3)
 
+/* YCBCR 420 deep color modes */
+#define DRM_EDID_YCBCR420_DC_48		  (1 << 6)
+#define DRM_EDID_YCBCR420_DC_36		  (1 << 5)
+#define DRM_EDID_YCBCR420_DC_30		  (1 << 4)
+#define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
+				    DRM_EDID_YCBCR420_DC_36 | \
+				    DRM_EDID_YCBCR420_DC_30)
+
 /* ELD Header Block */
 #define DRM_ELD_HEADER_BLOCK_SIZE	4
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-07-07  3:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  3:19 [PATCH 00/15] YCBCR 4:2:0 handling in DRM layer Shashank Sharma
2017-07-07  3:19 ` [PATCH 01/15] drm: handle HDMI 2.0 VICs in AVI info-frames Shashank Sharma
2017-07-07  3:19 ` [PATCH 02/15] drm/edid: complete CEA modedb(VIC 1-107) Shashank Sharma
2017-07-07  3:19 ` [PATCH 03/15] drm/edid: parse sink information before CEA blocks Shashank Sharma
2017-07-07  3:19 ` [PATCH 04/15] drm/edid: cleanup patch for CEA extended-tag macro Shashank Sharma
2017-07-07  3:19 ` [PATCH 05/15] drm/edid: parse YCBCR420 videomodes from EDID Shashank Sharma
2017-07-07  3:19 ` [PATCH 06/15] drm: add helper to validate YCBCR420 modes Shashank Sharma
2017-07-07  3:19 ` Shashank Sharma [this message]
2017-07-07  3:19 ` [PATCH 08/15] drm: set output colorspace in AVI infoframe Shashank Sharma
2017-07-09 21:02   ` kbuild test robot
2017-07-07  3:19 ` [PATCH 09/15] drm: add helper functions for YCBCR420 handling Shashank Sharma
2017-07-07  3:19 ` [PATCH 10/15] drm/i915: add config function for YCBCR420 outputs Shashank Sharma
2017-07-07  3:19 ` [PATCH 11/15] drm/i915: prepare scaler for YCBCR420 modeset Shashank Sharma
2017-07-07  3:19 ` [PATCH 12/15] drm/i915: prepare pipe for YCBCR420 output Shashank Sharma
2017-07-07  3:19 ` [PATCH 13/15] drm/i915: prepare csc unit " Shashank Sharma
2017-07-07  3:19 ` [PATCH 14/15] drm/i915: set colorspace for YCBCR420 outputs Shashank Sharma
2017-07-07  3:19 ` [PATCH 15/15] drm/i915/glk: set HDMI 2.0 identifier Shashank Sharma
2017-07-07  7:43 ` ✓ Fi.CI.BAT: success for YCBCR 4:2:0 handling in DRM layer Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499397561-31797-8-git-send-email-shashank.sharma@intel.com \
    --to=shashank.sharma@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joabreu@synopsys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.