All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: uma.shankar@intel.com, dri-devel@lists.freedesktop.org
Subject: [PATCH v4 5/7] drm/i915: Add new GMP register size for GEN11
Date: Tue,  3 Sep 2019 12:12:33 +0300	[thread overview]
Message-ID: <20190903091235.32304-6-gwan-gyeong.mun@intel.com> (raw)
In-Reply-To: <20190903091235.32304-1-gwan-gyeong.mun@intel.com>

According to Bspec, GEN11 and prior GEN11 have different register size for
HDR Metadata Infoframe SDP packet. It adds new VIDEO_DIP_GMP_DATA_SIZE for
GEN11. And it makes handle different register size for
HDMI_PACKET_TYPE_GAMUT_METADATA on hsw_dip_data_size() for each GEN
platforms. It addresses Uma's review comments.

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 10 ++++++++--
 drivers/gpu/drm/i915/i915_reg.h           |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index c500fc9154c8..287999b31217 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -189,13 +189,19 @@ hsw_dip_data_reg(struct drm_i915_private *dev_priv,
 	}
 }
 
-static int hsw_dip_data_size(unsigned int type)
+static int hsw_dip_data_size(struct drm_i915_private *dev_priv,
+			     unsigned int type)
 {
 	switch (type) {
 	case DP_SDP_VSC:
 		return VIDEO_DIP_VSC_DATA_SIZE;
 	case DP_SDP_PPS:
 		return VIDEO_DIP_PPS_DATA_SIZE;
+	case HDMI_PACKET_TYPE_GAMUT_METADATA:
+		if (INTEL_GEN(dev_priv) >= 11)
+			return VIDEO_DIP_GMP_DATA_SIZE;
+		else
+			return VIDEO_DIP_DATA_SIZE;
 	default:
 		return VIDEO_DIP_DATA_SIZE;
 	}
@@ -514,7 +520,7 @@ static void hsw_write_infoframe(struct intel_encoder *encoder,
 	int i;
 	u32 val = I915_READ(ctl_reg);
 
-	data_size = hsw_dip_data_size(type);
+	data_size = hsw_dip_data_size(dev_priv, type);
 
 	val &= ~hsw_infoframe_enable(type);
 	I915_WRITE(ctl_reg, val);
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6c43b8c583bb..8b31ad7426d6 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4667,6 +4667,7 @@ enum {
  * (Haswell and newer) to see which VIDEO_DIP_DATA byte corresponds to each byte
  * of the infoframe structure specified by CEA-861. */
 #define   VIDEO_DIP_DATA_SIZE	32
+#define   VIDEO_DIP_GMP_DATA_SIZE	36
 #define   VIDEO_DIP_VSC_DATA_SIZE	36
 #define   VIDEO_DIP_PPS_DATA_SIZE	132
 #define VIDEO_DIP_CTL		_MMIO(0x61170)
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-09-03  9:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  9:12 [PATCH v4 0/6] drm/i915/dp: Support for DP HDR outputs Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 1/7] drm/i915/dp: Extend program of VSC Header and DB for Colorimetry Format Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 2/7] drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 3/7] drm: Add DisplayPort colorspace property Gwan-gyeong Mun
2019-09-03 12:42   ` Ilia Mirkin
2019-09-06 11:31     ` Shankar, Uma
2019-09-06 11:42       ` Ville Syrjälä
2019-09-06 13:24         ` Ilia Mirkin
2019-09-07 23:19           ` Mun, Gwan-gyeong
2019-09-08  1:43             ` Ilia Mirkin
2019-09-10  7:34               ` Mun, Gwan-gyeong
2019-09-10  7:42                 ` Ville Syrjälä
2019-09-10 13:21                 ` Ilia Mirkin
2019-09-10 16:14                   ` Ilia Mirkin
2019-09-09 10:25             ` Ville Syrjälä
2019-09-10  7:21               ` Mun, Gwan-gyeong
2019-09-03 14:11   ` Shankar, Uma
2019-09-03  9:12 ` [PATCH v4 4/7] drm/i915/dp: Attach " Gwan-gyeong Mun
2019-09-03  9:12 ` Gwan-gyeong Mun [this message]
2019-09-03 14:17   ` [PATCH v4 5/7] drm/i915: Add new GMP register size for GEN11 Shankar, Uma
2019-09-03  9:12 ` [PATCH v4 6/7] drm/i915/dp: Program an Infoframe SDP Header and DB for HDR Static Metadata Gwan-gyeong Mun
2019-09-03 14:30   ` Shankar, Uma
2019-09-03  9:12 ` [PATCH v4 7/7] drm/i915/dp: Attach HDR metadata property to DP connector Gwan-gyeong Mun
2019-09-03 10:27 ` ✓ Fi.CI.BAT: success for drm/i915/dp: Support for DP HDR outputs (rev4) Patchwork
2019-09-03 12:34 ` ✗ Fi.CI.IGT: failure " 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=20190903091235.32304-6-gwan-gyeong.mun@intel.com \
    --to=gwan-gyeong.mun@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=uma.shankar@intel.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.