All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs
@ 2019-05-20  9:20 Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 1/6] drm/i915/dp: Add a config function for YCBCR420 outputs Gwan-gyeong Mun
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

On Gen 11 platform, to enable resolutions like 5K@120 (or higher) we need
to use DSC (DP 1.4) or YCbCr4:2:0 (DP 1.3 or 1.4) on DP.
In order to support YCbCr4:2:0 on DP we need to program YCBCR 4:2:0
to MSA and VSC SDP.
And Link M/N values are calculated and applied based on the Full Clock
forYCbCr420.
The Bit per Pixel needs to be adjusted for YUV420 mode as it requires only
half of the RGB case.
 - Link M/N values are calculated and applied based on the Full Clock
 - Data M/N values needs to be calculated considering the data is half
   due to subsampling

These patches add a VSC structure for handling Pixel Encoding/Colorimetry
Formats and program YCBCR 4:2:0 to MSA and VSC SDP. And it changes a link
bandwidth computation for DP.

These patches tested on below test environment.
Test Environment: 
 - Tested System: Gen11 platform
 - Monitor: Wasabi Mango UHD430 REAL4K HDMI 2.0 Slim HDR DUAL DP i20
            (This monitor supports HDMI YCbCr 4:2:0)
 - DP to HDMI Adaptor (Dongle) : Club3D CAC-1080 (This dongle supports
                                 DP YCbCr 4:2:0 pass through feature.)
 - To enable DP YCbCr 4:2:0 forcely, test enviromnent uses work arounds
   patches. You can find these on
   https://gitlab.freedesktop.org/elongbug/drm-tip/tree/dp_ycbcr420_work

The idea of a scaling (RGB -> YCbCr4:4:4 -> YCbCr 4:2:0) is to follow the
same approach used in YCbCr 4:2:0 on HDMI.

v2: Addressed Maarten's review comments, fixed minor coding and block comment
style. And reordered a first patch  ("drm/i915/dp: Support DP ports
YUV 4:2:0 output to GEN11") as a last patch.

v3: Addressed Ville's review comments.
Style fixed with few naming.
If lscon is active, it makes not to call intel_dp_ycbcr420_config() to avoid
to clobber of lspcon_ycbcr420_config() routine.
And it move the 420_only check into the intel_dp_ycbcr420_config().
Remove a changing of pipe_bpp on intel_ddi_set_pipe_settings().
Because the pipe is running at the full bpp, keep pipe_bpp as RGB even though
YCbCr 4:2:0 output format is used.
Add a link bandwidth computation for YCbCr4:2:0 output format.

v4: Fix uninitialized return value which is reported by Dan Carpenter.

v5: Addressed reivew comments from Ville.
In order to make codes simple, it adds and uses intel_dp_output_bpp() function.
In order to avoid the extra indentation, it inverts if-clause on
intel_dp_ycbcr420_config().
Remove the error print where no errors print are allowed.

v6:
Link M/N values are calculated and applied based on the Full Clock for
YCbCr420. The Bit per Pixel needs to be adjusted for YUV420 mode as it
requires only half of the RGB case.
 - Link M/N values are calculated and applied based on the Full Clock
 - Data M/N values needs to be calculated considering the data is half due
   to subsampling
Remove a doubling of pixel clock on a dot clock calculator for DP YCbCr 4:2:0.
Rebase and remove a duplicate setting of vsc_sdp.DB17.
Add a setting of dynamic range bit to  vsc_sdp.DB17.
Change Content Type bit to "Graphics" from "Not defined".
Change a dividing of pipe_bpp to muliplying to constant values on a switch-case
statement.
Fix an wrong setting of MSA MISC1 fields for Pixel Encoding/Colorimetry
Format indication. As per DP 1.4a spec Table 2-96 [MSA MISC1 and MISC0
Fields for Pixel Encoding/Colorimetry Format Indication] When MISC1, bit 6,
is Set to 1, a Source device uses a VSC SDP to indicate the Pixel
Encoding/Colorimetry Format. On the wrong version it set a bit 5 of MISC1,
now it set a bit 6 of MISC1.

v7:
Addressed review comments from Ville.
Move intel_dp_get_colorimetry_status() to intel_dp from intel_psr.
Move a setting of dynamic range bit and a setting of bpc which is based
on pipe_bpp to a "drm/i915/dp: Program VSC Header and DB for Pixel
Encoding/Colorimetry Format" commit.
Change Content Type bit to "Not defined" from "Graphics".
Fix non-standard comment format.
Remove a referring to specific commit.
Remove duplicated checking of connector's ycbcr_420_allowed from
intel_pixel_encoding_setup_vsc().

v8:
A missing of setting bpc to VSC setup is the pretty fatal case, it replaces
DRM_DEBUG_KMS() to MISSING_CASE(). [Maarten]

References: https://patchwork.freedesktop.org/series/56059/

Gwan-gyeong Mun (6):
  drm/i915/dp: Add a config function for YCBCR420 outputs
  drm: Rename struct edp_vsc_psr to struct dp_sdp
  drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry
    Format
  drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA
  drm/i915/dp: Change a link bandwidth computation for DP
  drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11

 .../drm/bridge/analogix/analogix_dp_core.c    |  12 +-
 .../drm/bridge/analogix/analogix_dp_core.h    |   2 +-
 .../gpu/drm/bridge/analogix/analogix_dp_reg.c |  10 +-
 drivers/gpu/drm/i915/i915_reg.h               |   1 +
 drivers/gpu/drm/i915/intel_ddi.c              |  12 +-
 drivers/gpu/drm/i915/intel_dp.c               | 156 +++++++++++++++++-
 drivers/gpu/drm/i915/intel_dp.h               |   1 +
 drivers/gpu/drm/i915/intel_drv.h              |   2 +
 drivers/gpu/drm/i915/intel_psr.c              |  12 +-
 include/drm/drm_dp_helper.h                   |  33 ++--
 10 files changed, 205 insertions(+), 36 deletions(-)

-- 
2.21.0

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v8 1/6] drm/i915/dp: Add a config function for YCBCR420 outputs
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
@ 2019-05-20  9:20 ` Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp Gwan-gyeong Mun
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

This patch checks a support of YCBCR420 outputs on an encoder level.
If the input mode is YCBCR420-only mode then it prepares DP as an YCBCR420
output, else it continues with RGB output mode.
It set output_format to INTEL_OUTPUT_FORMAT_YCBCR420 in order to using
a pipe scaler as RGB to YCbCr 4:4:4.

v2:
  Addressed review comments from Ville.
  Style fixed with few naming.
  %s/config/crtc_state/
  %s/intel_crtc/crtc/
  If lscon is active, it makes not to call intel_dp_ycbcr420_config()
  to avoid to clobber of lspcon_ycbcr420_config() routine.
  And it move the 420_only check into the intel_dp_ycbcr420_config().

v3: Fix uninitialized return value and it is reported by Dan Carpenter.

v4:
  Addressed review comments from Ville.
  In order to avoid the extra indentation, it inverts if-clause on
  intel_dp_ycbcr420_config().
  Remove the error print where no errors print are allowed.

v6: Rebase

v7:
  Move intel_dp_get_colorimetry_status() to intel_dp from intel_psr.
  intel_dp_get_colorimetry_status() checks
  VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED bit in the
  DPRX_FEATURE_ENUMERATION_LIST register.
  And intel_dp_ycbcr420_config() uses intel_dp_get_colorimetry_status().

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c  | 48 +++++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_dp.h  |  1 +
 drivers/gpu/drm/i915/intel_psr.c | 10 -------
 3 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 77ba4da6b981..0b495176382e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2093,6 +2093,36 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
+static int
+intel_dp_ycbcr420_config(struct intel_dp *intel_dp,
+			 struct drm_connector *connector,
+			 struct intel_crtc_state *crtc_state)
+{
+	const struct drm_display_info *info = &connector->display_info;
+	const struct drm_display_mode *adjusted_mode =
+		&crtc_state->base.adjusted_mode;
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
+	int ret;
+
+	if (!drm_mode_is_420_only(info, adjusted_mode) ||
+	    !intel_dp_get_colorimetry_status(intel_dp) ||
+	    !connector->ycbcr_420_allowed)
+		return 0;
+
+	crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
+
+	/* YCBCR 420 output conversion needs a scaler */
+	ret = skl_update_scaler_crtc(crtc_state);
+	if (ret) {
+		DRM_DEBUG_KMS("Scaler allocation for output failed\n");
+		return ret;
+	}
+
+	intel_pch_panel_fitting(crtc, crtc_state, DRM_MODE_SCALE_FULLSCREEN);
+
+	return 0;
+}
+
 bool intel_dp_limited_color_range(const struct intel_crtc_state *crtc_state,
 				  const struct drm_connector_state *conn_state)
 {
@@ -2132,7 +2162,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 		to_intel_digital_connector_state(conn_state);
 	bool constant_n = drm_dp_has_quirk(&intel_dp->desc,
 					   DP_DPCD_QUIRK_CONSTANT_N);
-	int ret, output_bpp;
+	int ret = 0, output_bpp;
 
 	if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && port != PORT_A)
 		pipe_config->has_pch_encoder = true;
@@ -2140,6 +2170,12 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
 	if (lspcon->active)
 		lspcon_ycbcr420_config(&intel_connector->base, pipe_config);
+	else
+		ret = intel_dp_ycbcr420_config(intel_dp, &intel_connector->base,
+					       pipe_config);
+
+	if (ret)
+		return ret;
 
 	pipe_config->has_drrs = false;
 	if (IS_G4X(dev_priv) || port == PORT_A)
@@ -4059,6 +4095,16 @@ intel_dp_read_dpcd(struct intel_dp *intel_dp)
 	return intel_dp->dpcd[DP_DPCD_REV] != 0;
 }
 
+bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)
+{
+	u8 dprx = 0;
+
+	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_DPRX_FEATURE_ENUMERATION_LIST,
+			      &dprx) != 1)
+		return false;
+	return dprx & DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED;
+}
+
 static void intel_dp_get_dsc_sink_cap(struct intel_dp *intel_dp)
 {
 	/*
diff --git a/drivers/gpu/drm/i915/intel_dp.h b/drivers/gpu/drm/i915/intel_dp.h
index 5e9e8d13de6e..da70b1a41c83 100644
--- a/drivers/gpu/drm/i915/intel_dp.h
+++ b/drivers/gpu/drm/i915/intel_dp.h
@@ -108,6 +108,7 @@ u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp, int mode_clock,
 				int mode_hdisplay);
 
 bool intel_dp_read_dpcd(struct intel_dp *intel_dp);
+bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp);
 int intel_dp_link_required(int pixel_clock, int bpp);
 int intel_dp_max_data_rate(int max_link_clock, int max_lanes);
 bool intel_digital_port_connected(struct intel_encoder *encoder);
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 963663ba0edf..2a547a128a37 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -229,16 +229,6 @@ void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir)
 	}
 }
 
-static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)
-{
-	u8 dprx = 0;
-
-	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_DPRX_FEATURE_ENUMERATION_LIST,
-			      &dprx) != 1)
-		return false;
-	return dprx & DP_VSC_SDP_EXT_FOR_COLORIMETRY_SUPPORTED;
-}
-
 static bool intel_dp_get_alpm_status(struct intel_dp *intel_dp)
 {
 	u8 alpm_caps = 0;
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 1/6] drm/i915/dp: Add a config function for YCBCR420 outputs Gwan-gyeong Mun
@ 2019-05-20  9:20 ` Gwan-gyeong Mun
  2019-05-21  6:44   ` [Intel-gfx] " Jani Nikula
  2019-05-20  9:20 ` [PATCH v8 3/6] drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format Gwan-gyeong Mun
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

VSC SDP Payload for PSR is one of data block type of SDP (Secondaray Data
Packet). In order to generalize SDP packet structure name, it renames
struct edp_vsc_psr to struct dp_sdp. And each SDP data blocks have
different usages, each SDP type has different reserved data blocks and
Video_Stream_Configuration Extension VESA SDP might use all of Data Blocks
as Extended INFORFRAME Data Byte. so it makes Data Block variables as
array type. And it adds comments of details of DB of VSC SDP Payload
for Pixel Encoding/Colorimetry Format. This comments follows DP 1.4a spec,
section 2.2.5.7.5, chapter "VSC SDP Payload for Pixel Encoding/Colorimetry
Format".

v7: Addressed review comments from Ville.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 .../drm/bridge/analogix/analogix_dp_core.c    | 12 +++----
 .../drm/bridge/analogix/analogix_dp_core.h    |  2 +-
 .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 10 +++---
 drivers/gpu/drm/i915/intel_psr.c              |  2 +-
 include/drm/drm_dp_helper.h                   | 33 +++++++++++++------
 5 files changed, 36 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 225f5e5dd69b..d1c2659d0cce 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -115,7 +115,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_psr_enabled);
 
 int analogix_dp_enable_psr(struct analogix_dp_device *dp)
 {
-	struct edp_vsc_psr psr_vsc;
+	struct dp_sdp psr_vsc;
 
 	if (!dp->psr_enable)
 		return 0;
@@ -127,8 +127,8 @@ int analogix_dp_enable_psr(struct analogix_dp_device *dp)
 	psr_vsc.sdp_header.HB2 = 0x2;
 	psr_vsc.sdp_header.HB3 = 0x8;
 
-	psr_vsc.DB0 = 0;
-	psr_vsc.DB1 = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
+	psr_vsc.DB[0] = 0;
+	psr_vsc.DB[1] = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
 
 	return analogix_dp_send_psr_spd(dp, &psr_vsc, true);
 }
@@ -136,7 +136,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_enable_psr);
 
 int analogix_dp_disable_psr(struct analogix_dp_device *dp)
 {
-	struct edp_vsc_psr psr_vsc;
+	struct dp_sdp psr_vsc;
 	int ret;
 
 	if (!dp->psr_enable)
@@ -149,8 +149,8 @@ int analogix_dp_disable_psr(struct analogix_dp_device *dp)
 	psr_vsc.sdp_header.HB2 = 0x2;
 	psr_vsc.sdp_header.HB3 = 0x8;
 
-	psr_vsc.DB0 = 0;
-	psr_vsc.DB1 = 0;
+	psr_vsc.DB[0] = 0;
+	psr_vsc.DB[1] = 0;
 
 	ret = drm_dp_dpcd_writeb(&dp->aux, DP_SET_POWER, DP_SET_POWER_D0);
 	if (ret != 1) {
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
index 769255dc6e99..3e5fe90edf71 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
@@ -254,7 +254,7 @@ void analogix_dp_enable_scrambling(struct analogix_dp_device *dp);
 void analogix_dp_disable_scrambling(struct analogix_dp_device *dp);
 void analogix_dp_enable_psr_crc(struct analogix_dp_device *dp);
 int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
-			     struct edp_vsc_psr *vsc, bool blocking);
+			     struct dp_sdp *vsc, bool blocking);
 ssize_t analogix_dp_transfer(struct analogix_dp_device *dp,
 			     struct drm_dp_aux_msg *msg);
 
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
index a5f2763d72e4..f591810ef1be 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
@@ -1041,7 +1041,7 @@ static ssize_t analogix_dp_get_psr_status(struct analogix_dp_device *dp)
 }
 
 int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
-			     struct edp_vsc_psr *vsc, bool blocking)
+			     struct dp_sdp *vsc, bool blocking)
 {
 	unsigned int val;
 	int ret;
@@ -1069,8 +1069,8 @@ int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
 	writel(0x5D, dp->reg_base + ANALOGIX_DP_SPD_PB3);
 
 	/* configure DB0 / DB1 values */
-	writel(vsc->DB0, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
-	writel(vsc->DB1, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
+	writel(vsc->DB[0], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
+	writel(vsc->DB[1], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
 
 	/* set reuse spd inforframe */
 	val = readl(dp->reg_base + ANALOGIX_DP_VIDEO_CTL_3);
@@ -1092,8 +1092,8 @@ int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
 
 	ret = readx_poll_timeout(analogix_dp_get_psr_status, dp, psr_status,
 		psr_status >= 0 &&
-		((vsc->DB1 && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
-		(!vsc->DB1 && psr_status == DP_PSR_SINK_INACTIVE)), 1500,
+		((vsc->DB[1] && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
+		(!vsc->DB[1] && psr_status == DP_PSR_SINK_INACTIVE)), 1500,
 		DP_TIMEOUT_PSR_LOOP_MS * 1000);
 	if (ret) {
 		dev_warn(dp->dev, "Failed to apply PSR %d\n", ret);
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 2a547a128a37..01ca502099df 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -342,7 +342,7 @@ static void intel_psr_setup_vsc(struct intel_dp *intel_dp,
 {
 	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
-	struct edp_vsc_psr psr_vsc;
+	struct dp_sdp psr_vsc;
 
 	if (dev_priv->psr.psr2_enabled) {
 		/* Prepare VSC Header for SU as per EDP 1.4 spec, Table 6.11 */
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 97ce790a5b5a..8d7c47e46f2d 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1083,17 +1083,30 @@ struct dp_sdp_header {
 #define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES	0x1F
 #define DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 0x7F
 
-struct edp_vsc_psr {
+/**
+ * struct dp_sdp - DP secondary data packet
+ * @sdp_header: DP secondary data packet header
+ * @DB: DP secondaray data packet data blocks
+ * VSC SDP Payload for PSR
+ * DB[0]: Stereo Interface
+ * DB[1]: 0 - PSR State; 1 - Update RFB; 2 - CRC Valid
+ * DB[2]: CRC value bits 7:0 of the R or Cr component
+ * DB[3]: CRC value bits 15:8 of the R or Cr component
+ * DB[4]: CRC value bits 7:0 of the G or Y component
+ * DB[5]: CRC value bits 15:8 of the G or Y component
+ * DB[6]: CRC value bits 7:0 of the B or Cb component
+ * DB[7]: CRC value bits 15:8 of the B or Cb component
+ * DB[8] - DB[31]: Reserved
+ * VSC SDP Payload for Pixel Encoding/Colorimetry Format
+ * DB[0] - DB[15]: Reserved
+ * DB[16]: Pixel Encoding and Colorimetry Formats
+ * DB[17]: Dynamic Range and Component Bit Depth
+ * DB[18]: Content Type
+ * DB[19] - DB[31]: Reserved
+ */
+struct dp_sdp {
 	struct dp_sdp_header sdp_header;
-	u8 DB0; /* Stereo Interface */
-	u8 DB1; /* 0 - PSR State; 1 - Update RFB; 2 - CRC Valid */
-	u8 DB2; /* CRC value bits 7:0 of the R or Cr component */
-	u8 DB3; /* CRC value bits 15:8 of the R or Cr component */
-	u8 DB4; /* CRC value bits 7:0 of the G or Y component */
-	u8 DB5; /* CRC value bits 15:8 of the G or Y component */
-	u8 DB6; /* CRC value bits 7:0 of the B or Cb component */
-	u8 DB7; /* CRC value bits 15:8 of the B or Cb component */
-	u8 DB8_31[24]; /* Reserved */
+	u8 DB[32];
 } __packed;
 
 #define EDP_VSC_PSR_STATE_ACTIVE	(1<<0)
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v8 3/6] drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 1/6] drm/i915/dp: Add a config function for YCBCR420 outputs Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp Gwan-gyeong Mun
@ 2019-05-20  9:20 ` Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 4/6] drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA Gwan-gyeong Mun
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

Function intel_pixel_encoding_setup_vsc handles vsc header and data block
setup for pixel encoding / colorimetry format.

Setup VSC header and data block in function intel_pixel_encoding_setup_vsc
for pixel encoding / colorimetry format as per dp 1.4a spec,
section 2.2.5.7.1, table 2-119: VSC SDP Header Bytes, section 2.2.5.7.5,
table 2-120:VSC SDP Payload for DB16 through DB18.

v2:
  Minor style fix. [Maarten]
  Refer to commit ids instead of patchwork. [Maarten]

v6: Rebase

v7:
  Rebase and addressed review comments from Ville.
  Use a structure initializer instead of memset().
  Fix non-standard comment format.
  Remove a referring to specific commit.
  Add a setting of dynamic range bit to  vsc_sdp.DB17.
  Add a setting of bpc which is based on pipe_bpp.
  Remove duplicated checking of connector's ycbcr_420_allowed from
  intel_pixel_encoding_setup_vsc(). It is already checked from
  intel_dp_ycbcr420_config().
  Remove comments for VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED. It is
  already implemented on intel_dp_get_colorimetry_status().

v8:
  A missing of setting bpc to VSC setup is the pretty fatal case, it
  replaces DRM_DEBUG_KMS() to MISSING_CASE(). [Maarten]

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c |  1 +
 drivers/gpu/drm/i915/intel_dp.c  | 90 ++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h |  2 +
 3 files changed, 93 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 0af47f343faa..b29e61b74961 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -3389,6 +3389,7 @@ static void intel_enable_ddi_dp(struct intel_encoder *encoder,
 
 	intel_edp_backlight_on(crtc_state, conn_state);
 	intel_psr_enable(intel_dp, crtc_state);
+	intel_dp_ycbcr_420_enable(intel_dp, crtc_state);
 	intel_edp_drrs_enable(intel_dp, crtc_state);
 
 	if (crtc_state->has_audio)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 0b495176382e..6f3c024b9d33 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4415,6 +4415,96 @@ u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
 	return 0;
 }
 
+static void
+intel_pixel_encoding_setup_vsc(struct intel_dp *intel_dp,
+			       const struct intel_crtc_state *crtc_state)
+{
+	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	struct dp_sdp vsc_sdp = {};
+
+	/* Prepare VSC Header for SU as per DP 1.4a spec, Table 2-119 */
+	vsc_sdp.sdp_header.HB0 = 0;
+	vsc_sdp.sdp_header.HB1 = 0x7;
+
+	/*
+	 * VSC SDP supporting 3D stereo, PSR2, and Pixel Encoding/
+	 * Colorimetry Format indication.
+	 */
+	vsc_sdp.sdp_header.HB2 = 0x5;
+
+	/*
+	 * VSC SDP supporting 3D stereo, + PSR2, + Pixel Encoding/
+	 * Colorimetry Format indication (HB2 = 05h).
+	 */
+	vsc_sdp.sdp_header.HB3 = 0x13;
+
+	/*
+	 * YCbCr 420 = 3h DB16[7:4] ITU-R BT.601 = 0h, ITU-R BT.709 = 1h
+	 * DB16[3:0] DP 1.4a spec, Table 2-120
+	 */
+	vsc_sdp.DB[16] = 0x3 << 4; /* 0x3 << 4 , YCbCr 420*/
+	/* RGB->YCBCR color conversion uses the BT.709 color space. */
+	vsc_sdp.DB[16] |= 0x1; /* 0x1, ITU-R BT.709 */
+
+	/*
+	 * For pixel encoding formats YCbCr444, YCbCr422, YCbCr420, and Y Only,
+	 * the following Component Bit Depth values are defined:
+	 * 001b = 8bpc.
+	 * 010b = 10bpc.
+	 * 011b = 12bpc.
+	 * 100b = 16bpc.
+	 */
+	switch (crtc_state->pipe_bpp) {
+	case 24: /* 8bpc */
+		vsc_sdp.DB[17] = 0x1;
+		break;
+	case 30: /* 10bpc */
+		vsc_sdp.DB[17] = 0x2;
+		break;
+	case 36: /* 12bpc */
+		vsc_sdp.DB[17] = 0x3;
+		break;
+	case 48: /* 16bpc */
+		vsc_sdp.DB[17] = 0x4;
+		break;
+	default:
+		MISSING_CASE(crtc_state->pipe_bpp);
+		break;
+	}
+
+	/*
+	 * Dynamic Range (Bit 7)
+	 * 0 = VESA range, 1 = CTA range.
+	 * all YCbCr are always limited range
+	 */
+	vsc_sdp.DB[17] |= 0x80;
+
+	/*
+	 * Content Type (Bits 2:0)
+	 * 000b = Not defined.
+	 * 001b = Graphics.
+	 * 010b = Photo.
+	 * 011b = Video.
+	 * 100b = Game
+	 * All other values are RESERVED.
+	 * Note: See CTA-861-G for the definition and expected
+	 * processing by a stream sink for the above contect types.
+	 */
+	vsc_sdp.DB[18] = 0;
+
+	intel_dig_port->write_infoframe(&intel_dig_port->base,
+			crtc_state, DP_SDP_VSC, &vsc_sdp, sizeof(vsc_sdp));
+}
+
+void intel_dp_ycbcr_420_enable(struct intel_dp *intel_dp,
+			       const struct intel_crtc_state *crtc_state)
+{
+	if (crtc_state->output_format != INTEL_OUTPUT_FORMAT_YCBCR420)
+		return;
+
+	intel_pixel_encoding_setup_vsc(intel_dp, crtc_state);
+}
+
 static u8 intel_dp_autotest_link_training(struct intel_dp *intel_dp)
 {
 	int status = 0;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 30b2d6ed2d53..254c3ecaf0b5 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1576,6 +1576,8 @@ void intel_dp_get_m_n(struct intel_crtc *crtc,
 		      struct intel_crtc_state *pipe_config);
 void intel_dp_set_m_n(const struct intel_crtc_state *crtc_state,
 		      enum link_m_n_set m_n);
+void intel_dp_ycbcr_420_enable(struct intel_dp *intel_dp,
+			       const struct intel_crtc_state *crtc_state);
 int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n);
 bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state,
 			struct dpll *best_clock);
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v8 4/6] drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
                   ` (2 preceding siblings ...)
  2019-05-20  9:20 ` [PATCH v8 3/6] drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format Gwan-gyeong Mun
@ 2019-05-20  9:20 ` Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 5/6] drm/i915/dp: Change a link bandwidth computation for DP Gwan-gyeong Mun
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

When YCBCR 4:2:0 outputs is used for DP, we should program YCBCR 4:2:0 to
MSA and VSC SDP.

As per DP 1.4a spec section 2.2.4.3 [MSA Field for Indication of Color
Encoding Format and Content Color Gamut] while sending YCBCR 420 signals
we should program MSA MISC1 fields which indicate VSC SDP for the Pixel
Encoding/Colorimetry Format.

v2: Block comment style fix.

v6:
  Fix an wrong setting of MSA MISC1 fields for Pixel Encoding/Colorimetry
  Format indication. As per DP 1.4a spec Table 2-96 [MSA MISC1 and MISC0
  Fields for Pixel Encoding/Colorimetry Format Indication]
  When MISC1, bit 6, is Set to 1, a Source device uses a VSC SDP to
  indicate the Pixel Encoding/Colorimetry Format. On the wrong version
  it set a bit 5 of MISC1, now it set a bit 6 of MISC1.

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h  | 1 +
 drivers/gpu/drm/i915/intel_ddi.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index e97c47fca645..2ad98e62034f 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -9524,6 +9524,7 @@ enum skl_power_gate {
 #define  TRANS_MSA_12_BPC		(3 << 5)
 #define  TRANS_MSA_16_BPC		(4 << 5)
 #define  TRANS_MSA_CEA_RANGE		(1 << 3)
+#define  TRANS_MSA_USE_VSC_SDP		(1 << 14)
 
 /* LCPLL Control */
 #define LCPLL_CTL			_MMIO(0x130040)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index b29e61b74961..3f247f091d4c 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1717,6 +1717,14 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
 	 */
 	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444)
 		temp |= TRANS_MSA_SAMPLING_444 | TRANS_MSA_CLRSP_YCBCR;
+	/*
+	 * As per DP 1.4a spec section 2.2.4.3 [MSA Field for Indication
+	 * of Color Encoding Format and Content Color Gamut] while sending
+	 * YCBCR 420 signals we should program MSA MISC1 fields which
+	 * indicate VSC SDP for the Pixel Encoding/Colorimetry Format.
+	 */
+	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
+		temp |= TRANS_MSA_USE_VSC_SDP;
 	I915_WRITE(TRANS_MSA_MISC(cpu_transcoder), temp);
 }
 
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v8 5/6] drm/i915/dp: Change a link bandwidth computation for DP
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
                   ` (3 preceding siblings ...)
  2019-05-20  9:20 ` [PATCH v8 4/6] drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA Gwan-gyeong Mun
@ 2019-05-20  9:20 ` Gwan-gyeong Mun
  2019-05-20  9:20 ` [PATCH v8 6/6] drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11 Gwan-gyeong Mun
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

Data M/N calculations were assumed a bpp as RGB format. But when we are
using YCbCr 4:2:0 output format on DP, we should change bpp calculations
as YCbCr 4:2:0 format. The pipe_bpp value was assumed RGB format,
therefore, it was multiplied with 3. But YCbCr 4:2:0 requires a multiplier
value to 1.5.
Therefore we need to divide pipe_bpp to 2 while DP output uses YCbCr4:2:0
format.
 - RGB format bpp = bpc x 3
 - YCbCr 4:2:0 format bpp = bpc x 1.5

But Link M/N values are calculated and applied based on the Full Clock for
YCbCr 4:2:0. And DP YCbCr 4:2:0 does not need to pixel clock double for
a dotclock caluation. Only for HDMI YCbCr 4:2:0 needs to pixel clock double
for a dot clock calculation.

It only affects dp and edp port which use YCbCr 4:2:0 output format.
And for now, it does not consider a use case of DSC + YCbCr 4:2:0.

v2:
  Addressed review comments from Ville.
  Remove a changing of pipe_bpp on intel_ddi_set_pipe_settings().
  Because the pipe is running at the full bpp, keep pipe_bpp as RGB
  even though YCbCr 4:2:0 output format is used.
  Add a link bandwidth computation for YCbCr4:2:0 output format.

v3:
  Addressed reivew comments from Ville.
  In order to make codes simple, it adds and uses intel_dp_output_bpp()
  function.

v6:
  Link M/N values are calculated and applied based on the Full Clock for
  YCbCr420. The Bit per Pixel needs to be adjusted for YUV420 mode as it
  requires only half of the RGB case.
    - Link M/N values are calculated and applied based on the Full Clock
    - Data M/N values needs to be calculated considering the data is half
      due to subsampling
  Remove a doubling of pixel clock on a dot clock calculator for
  DP YCbCr 4:2:0.
  Rebase and remove a duplicate setting of vsc_sdp.DB17.
  Add a setting of dynamic range bit to  vsc_sdp.DB17.
  Change Content Type bit to "Graphics" from "Not defined".
  Change a dividing of pipe_bpp to muliplying to constant values on a
  switch-case statement.

v7:
  Addressed review comments from Ville.
  Move a setting of dynamic range bit and a setting of bpc which is based
  on pipe_bpp to a "drm/i915/dp: Program VSC Header and DB for Pixel
  Encoding/Colorimetry Format" commit.
  Change Content Type bit to "Not defined" from "Graphics".

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c |  3 ++-
 drivers/gpu/drm/i915/intel_dp.c  | 15 ++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 3f247f091d4c..df06e5bb4764 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1457,7 +1457,8 @@ static void ddi_dotclock_get(struct intel_crtc_state *pipe_config)
 	else
 		dotclock = pipe_config->port_clock;
 
-	if (pipe_config->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
+	if (pipe_config->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
+	    !intel_crtc_has_dp_encoder(pipe_config))
 		dotclock *= 2;
 
 	if (pipe_config->pixel_multiplier)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6f3c024b9d33..5a614c345fac 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1850,6 +1850,19 @@ intel_dp_adjust_compliance_config(struct intel_dp *intel_dp,
 	}
 }
 
+static int intel_dp_output_bpp(const struct intel_crtc_state *crtc_state, int bpp)
+{
+	/*
+	 * bpp value was assumed to RGB format. And YCbCr 4:2:0 output
+	 * format of the number of bytes per pixel will be half the number
+	 * of bytes of RGB pixel.
+	 */
+	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
+		bpp /= 2;
+
+	return bpp;
+}
+
 /* Optimize link config in order: max bpp, min clock, min lanes */
 static int
 intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,
@@ -2223,7 +2236,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	if (pipe_config->dsc_params.compression_enable)
 		output_bpp = pipe_config->dsc_params.compressed_bpp;
 	else
-		output_bpp = pipe_config->pipe_bpp;
+		output_bpp = intel_dp_output_bpp(pipe_config, pipe_config->pipe_bpp);
 
 	intel_link_compute_m_n(output_bpp,
 			       pipe_config->lane_count,
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v8 6/6] drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
                   ` (4 preceding siblings ...)
  2019-05-20  9:20 ` [PATCH v8 5/6] drm/i915/dp: Change a link bandwidth computation for DP Gwan-gyeong Mun
@ 2019-05-20  9:20 ` Gwan-gyeong Mun
  2019-05-20  9:50 ` ✓ Fi.CI.BAT: success for drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3) Patchwork
  2019-05-20 11:50 ` ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 12+ messages in thread
From: Gwan-gyeong Mun @ 2019-05-20  9:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

Bspec describes that GEN10 only supports capability of YUV 4:2:0 output to
HDMI port and GEN11 supports capability of YUV 4:2:0 output to both DP and
HDMI ports.

v2: Minor style fix.

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 5a614c345fac..93676f572866 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -7395,6 +7395,9 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 		connector->interlace_allowed = true;
 	connector->doublescan_allowed = 0;
 
+	if (INTEL_GEN(dev_priv) >= 11)
+		connector->ycbcr_420_allowed = true;
+
 	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
 
 	intel_dp_aux_init(intel_dp);
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3)
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
                   ` (5 preceding siblings ...)
  2019-05-20  9:20 ` [PATCH v8 6/6] drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11 Gwan-gyeong Mun
@ 2019-05-20  9:50 ` Patchwork
  2019-05-20 11:50 ` ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2019-05-20  9:50 UTC (permalink / raw)
  To: Gwan-gyeong Mun; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3)
URL   : https://patchwork.freedesktop.org/series/60404/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6097 -> Patchwork_13043
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/

Known issues
------------

  Here are the changes found in Patchwork_13043 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_evict:
    - fi-bsw-kefka:       [PASS][1] -> [DMESG-WARN][2] ([fdo#107709])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/fi-bsw-kefka/igt@i915_selftest@live_evict.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/fi-bsw-kefka/igt@i915_selftest@live_evict.html

  
#### Possible fixes ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       [DMESG-WARN][3] ([fdo#108965]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/fi-kbl-8809g/igt@amdgpu/amd_basic@userptr.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/fi-kbl-8809g/igt@amdgpu/amd_basic@userptr.html

  * igt@i915_selftest@live_hangcheck:
    - fi-skl-iommu:       [INCOMPLETE][5] ([fdo#108602] / [fdo#108744]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html

  
  [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
  [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
  [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965


Participating hosts (52 -> 43)
------------------------------

  Missing    (9): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-gdg-551 fi-icl-u3 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_6097 -> Patchwork_13043

  CI_DRM_6097: 3f2d6a47d9eec66594887b1e9718bc1a29aa6a77 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4996: 6fe5d254ec1b9b47d61408e1b49a7339876bf1e7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13043: ca72ed97fa79b9f574de1648f4af67fdeeae527e @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

ca72ed97fa79 drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11
449160fa821a drm/i915/dp: Change a link bandwidth computation for DP
9ff908a8307c drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA
8bf66293c89e drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format
625bd28077ee drm: Rename struct edp_vsc_psr to struct dp_sdp
97a47b0e52bf drm/i915/dp: Add a config function for YCBCR420 outputs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3)
  2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
                   ` (6 preceding siblings ...)
  2019-05-20  9:50 ` ✓ Fi.CI.BAT: success for drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3) Patchwork
@ 2019-05-20 11:50 ` Patchwork
  7 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2019-05-20 11:50 UTC (permalink / raw)
  To: Gwan-gyeong Mun; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3)
URL   : https://patchwork.freedesktop.org/series/60404/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6097_full -> Patchwork_13043_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_13043_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-kbl:          [PASS][1] -> [FAIL][2] ([fdo#108686])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-kbl6/igt@gem_tiled_swapping@non-threaded.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-kbl4/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-kbl:          [PASS][3] -> [SKIP][4] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-kbl4/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-kbl7/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_pm_rpm@legacy-planes:
    - shard-skl:          [PASS][5] -> [INCOMPLETE][6] ([fdo#107807])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-skl1/igt@i915_pm_rpm@legacy-planes.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-skl8/igt@i915_pm_rpm@legacy-planes.html

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +6 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-apl3/igt@i915_suspend@sysfs-reader.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-apl8/igt@i915_suspend@sysfs-reader.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [PASS][9] -> [FAIL][10] ([fdo#105363])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-skl4/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
    - shard-iclb:         [PASS][11] -> [FAIL][12] ([fdo#103167])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([fdo#109441]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_setmode@basic:
    - shard-apl:          [PASS][15] -> [FAIL][16] ([fdo#99912])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-apl6/igt@kms_setmode@basic.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-apl4/igt@kms_setmode@basic.html

  
#### Possible fixes ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-glk:          [DMESG-WARN][17] ([fdo#108686]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-glk7/igt@gem_tiled_swapping@non-threaded.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-glk1/igt@gem_tiled_swapping@non-threaded.html
    - shard-hsw:          [FAIL][19] ([fdo#108686]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-hsw6/igt@gem_tiled_swapping@non-threaded.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-hsw8/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_pm_rpm@debugfs-read:
    - shard-skl:          [INCOMPLETE][21] ([fdo#107807]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-skl3/igt@i915_pm_rpm@debugfs-read.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-skl5/igt@i915_pm_rpm@debugfs-read.html

  * igt@i915_pm_rpm@gem-execbuf:
    - shard-skl:          [INCOMPLETE][23] ([fdo#107803] / [fdo#107807]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-skl4/igt@i915_pm_rpm@gem-execbuf.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-skl8/igt@i915_pm_rpm@gem-execbuf.html

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
    - shard-hsw:          [FAIL][25] ([fdo#105767]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-hsw1/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-hsw8/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic.html

  * igt@kms_flip@2x-flip-vs-expired-vblank:
    - shard-glk:          [FAIL][27] ([fdo#102887]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt:
    - shard-iclb:         [FAIL][29] ([fdo#103167]) -> [PASS][30] +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - shard-apl:          [DMESG-WARN][31] ([fdo#108566]) -> [PASS][32] +3 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-apl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-apl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [FAIL][33] ([fdo#108145]) -> [PASS][34] +2 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-skl10/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-skl7/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_basic:
    - shard-iclb:         [SKIP][35] ([fdo#109441]) -> [PASS][36] +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-iclb8/igt@kms_psr@psr2_basic.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-iclb2/igt@kms_psr@psr2_basic.html

  * igt@syncobj_wait@invalid-signal-illegal-handle:
    - shard-iclb:         [INCOMPLETE][37] ([fdo#107713]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-iclb7/igt@syncobj_wait@invalid-signal-illegal-handle.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-iclb5/igt@syncobj_wait@invalid-signal-illegal-handle.html

  
#### Warnings ####

  * igt@i915_pm_rpm@pc8-residency:
    - shard-skl:          [INCOMPLETE][39] ([fdo#107807]) -> [SKIP][40] ([fdo#109271])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6097/shard-skl4/igt@i915_pm_rpm@pc8-residency.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/shard-skl7/igt@i915_pm_rpm@pc8-residency.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
  [fdo#107803]: https://bugs.freedesktop.org/show_bug.cgi?id=107803
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_6097 -> Patchwork_13043

  CI_DRM_6097: 3f2d6a47d9eec66594887b1e9718bc1a29aa6a77 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4996: 6fe5d254ec1b9b47d61408e1b49a7339876bf1e7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13043: ca72ed97fa79b9f574de1648f4af67fdeeae527e @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13043/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp
  2019-05-20  9:20 ` [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp Gwan-gyeong Mun
@ 2019-05-21  6:44   ` Jani Nikula
  2019-05-21 10:14     ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Jani Nikula @ 2019-05-21  6:44 UTC (permalink / raw)
  To: Andrzej Hajda, Laurent Pinchart; +Cc: intel-gfx, dri-devel, Gwan-gyeong Mun

On Mon, 20 May 2019, Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> wrote:
> VSC SDP Payload for PSR is one of data block type of SDP (Secondaray Data
> Packet). In order to generalize SDP packet structure name, it renames
> struct edp_vsc_psr to struct dp_sdp. And each SDP data blocks have
> different usages, each SDP type has different reserved data blocks and
> Video_Stream_Configuration Extension VESA SDP might use all of Data Blocks
> as Extended INFORFRAME Data Byte. so it makes Data Block variables as
> array type. And it adds comments of details of DB of VSC SDP Payload
> for Pixel Encoding/Colorimetry Format. This comments follows DP 1.4a spec,
> section 2.2.5.7.5, chapter "VSC SDP Payload for Pixel Encoding/Colorimetry
> Format".
>
> v7: Addressed review comments from Ville.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Andrzej, Laurent -

Seven versions of the patch and looks like we've failed to loop you in
on this. Sorry. May I have your ack on the patch please?

Is it too much to ask to have this merged via drm-intel along with the
rest of the series?

BR,
Jani.


> ---
>  .../drm/bridge/analogix/analogix_dp_core.c    | 12 +++----
>  .../drm/bridge/analogix/analogix_dp_core.h    |  2 +-
>  .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 10 +++---
>  drivers/gpu/drm/i915/intel_psr.c              |  2 +-
>  include/drm/drm_dp_helper.h                   | 33 +++++++++++++------
>  5 files changed, 36 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 225f5e5dd69b..d1c2659d0cce 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -115,7 +115,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_psr_enabled);
>  
>  int analogix_dp_enable_psr(struct analogix_dp_device *dp)
>  {
> -	struct edp_vsc_psr psr_vsc;
> +	struct dp_sdp psr_vsc;
>  
>  	if (!dp->psr_enable)
>  		return 0;
> @@ -127,8 +127,8 @@ int analogix_dp_enable_psr(struct analogix_dp_device *dp)
>  	psr_vsc.sdp_header.HB2 = 0x2;
>  	psr_vsc.sdp_header.HB3 = 0x8;
>  
> -	psr_vsc.DB0 = 0;
> -	psr_vsc.DB1 = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
> +	psr_vsc.DB[0] = 0;
> +	psr_vsc.DB[1] = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
>  
>  	return analogix_dp_send_psr_spd(dp, &psr_vsc, true);
>  }
> @@ -136,7 +136,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_enable_psr);
>  
>  int analogix_dp_disable_psr(struct analogix_dp_device *dp)
>  {
> -	struct edp_vsc_psr psr_vsc;
> +	struct dp_sdp psr_vsc;
>  	int ret;
>  
>  	if (!dp->psr_enable)
> @@ -149,8 +149,8 @@ int analogix_dp_disable_psr(struct analogix_dp_device *dp)
>  	psr_vsc.sdp_header.HB2 = 0x2;
>  	psr_vsc.sdp_header.HB3 = 0x8;
>  
> -	psr_vsc.DB0 = 0;
> -	psr_vsc.DB1 = 0;
> +	psr_vsc.DB[0] = 0;
> +	psr_vsc.DB[1] = 0;
>  
>  	ret = drm_dp_dpcd_writeb(&dp->aux, DP_SET_POWER, DP_SET_POWER_D0);
>  	if (ret != 1) {
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> index 769255dc6e99..3e5fe90edf71 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> @@ -254,7 +254,7 @@ void analogix_dp_enable_scrambling(struct analogix_dp_device *dp);
>  void analogix_dp_disable_scrambling(struct analogix_dp_device *dp);
>  void analogix_dp_enable_psr_crc(struct analogix_dp_device *dp);
>  int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> -			     struct edp_vsc_psr *vsc, bool blocking);
> +			     struct dp_sdp *vsc, bool blocking);
>  ssize_t analogix_dp_transfer(struct analogix_dp_device *dp,
>  			     struct drm_dp_aux_msg *msg);
>  
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> index a5f2763d72e4..f591810ef1be 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> @@ -1041,7 +1041,7 @@ static ssize_t analogix_dp_get_psr_status(struct analogix_dp_device *dp)
>  }
>  
>  int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> -			     struct edp_vsc_psr *vsc, bool blocking)
> +			     struct dp_sdp *vsc, bool blocking)
>  {
>  	unsigned int val;
>  	int ret;
> @@ -1069,8 +1069,8 @@ int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
>  	writel(0x5D, dp->reg_base + ANALOGIX_DP_SPD_PB3);
>  
>  	/* configure DB0 / DB1 values */
> -	writel(vsc->DB0, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
> -	writel(vsc->DB1, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
> +	writel(vsc->DB[0], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
> +	writel(vsc->DB[1], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
>  
>  	/* set reuse spd inforframe */
>  	val = readl(dp->reg_base + ANALOGIX_DP_VIDEO_CTL_3);
> @@ -1092,8 +1092,8 @@ int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
>  
>  	ret = readx_poll_timeout(analogix_dp_get_psr_status, dp, psr_status,
>  		psr_status >= 0 &&
> -		((vsc->DB1 && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
> -		(!vsc->DB1 && psr_status == DP_PSR_SINK_INACTIVE)), 1500,
> +		((vsc->DB[1] && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
> +		(!vsc->DB[1] && psr_status == DP_PSR_SINK_INACTIVE)), 1500,
>  		DP_TIMEOUT_PSR_LOOP_MS * 1000);
>  	if (ret) {
>  		dev_warn(dp->dev, "Failed to apply PSR %d\n", ret);
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 2a547a128a37..01ca502099df 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -342,7 +342,7 @@ static void intel_psr_setup_vsc(struct intel_dp *intel_dp,
>  {
>  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> -	struct edp_vsc_psr psr_vsc;
> +	struct dp_sdp psr_vsc;
>  
>  	if (dev_priv->psr.psr2_enabled) {
>  		/* Prepare VSC Header for SU as per EDP 1.4 spec, Table 6.11 */
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 97ce790a5b5a..8d7c47e46f2d 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1083,17 +1083,30 @@ struct dp_sdp_header {
>  #define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES	0x1F
>  #define DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 0x7F
>  
> -struct edp_vsc_psr {
> +/**
> + * struct dp_sdp - DP secondary data packet
> + * @sdp_header: DP secondary data packet header
> + * @DB: DP secondaray data packet data blocks
> + * VSC SDP Payload for PSR
> + * DB[0]: Stereo Interface
> + * DB[1]: 0 - PSR State; 1 - Update RFB; 2 - CRC Valid
> + * DB[2]: CRC value bits 7:0 of the R or Cr component
> + * DB[3]: CRC value bits 15:8 of the R or Cr component
> + * DB[4]: CRC value bits 7:0 of the G or Y component
> + * DB[5]: CRC value bits 15:8 of the G or Y component
> + * DB[6]: CRC value bits 7:0 of the B or Cb component
> + * DB[7]: CRC value bits 15:8 of the B or Cb component
> + * DB[8] - DB[31]: Reserved
> + * VSC SDP Payload for Pixel Encoding/Colorimetry Format
> + * DB[0] - DB[15]: Reserved
> + * DB[16]: Pixel Encoding and Colorimetry Formats
> + * DB[17]: Dynamic Range and Component Bit Depth
> + * DB[18]: Content Type
> + * DB[19] - DB[31]: Reserved
> + */
> +struct dp_sdp {
>  	struct dp_sdp_header sdp_header;
> -	u8 DB0; /* Stereo Interface */
> -	u8 DB1; /* 0 - PSR State; 1 - Update RFB; 2 - CRC Valid */
> -	u8 DB2; /* CRC value bits 7:0 of the R or Cr component */
> -	u8 DB3; /* CRC value bits 15:8 of the R or Cr component */
> -	u8 DB4; /* CRC value bits 7:0 of the G or Y component */
> -	u8 DB5; /* CRC value bits 15:8 of the G or Y component */
> -	u8 DB6; /* CRC value bits 7:0 of the B or Cb component */
> -	u8 DB7; /* CRC value bits 15:8 of the B or Cb component */
> -	u8 DB8_31[24]; /* Reserved */
> +	u8 DB[32];
>  } __packed;
>  
>  #define EDP_VSC_PSR_STATE_ACTIVE	(1<<0)

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp
  2019-05-21  6:44   ` [Intel-gfx] " Jani Nikula
@ 2019-05-21 10:14     ` Laurent Pinchart
  2019-05-21 12:07       ` Mun, Gwan-gyeong
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2019-05-21 10:14 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Andrzej Hajda, intel-gfx, dri-devel

Hello Jani,

On Tue, May 21, 2019 at 09:44:04AM +0300, Jani Nikula wrote:
> On Mon, 20 May 2019, Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> wrote:
> > VSC SDP Payload for PSR is one of data block type of SDP (Secondaray Data
> > Packet). In order to generalize SDP packet structure name, it renames
> > struct edp_vsc_psr to struct dp_sdp. And each SDP data blocks have
> > different usages, each SDP type has different reserved data blocks and
> > Video_Stream_Configuration Extension VESA SDP might use all of Data Blocks
> > as Extended INFORFRAME Data Byte. so it makes Data Block variables as
> > array type. And it adds comments of details of DB of VSC SDP Payload
> > for Pixel Encoding/Colorimetry Format. This comments follows DP 1.4a spec,
> > section 2.2.5.7.5, chapter "VSC SDP Payload for Pixel Encoding/Colorimetry
> > Format".
> >
> > v7: Addressed review comments from Ville.
> >
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> 
> Andrzej, Laurent -
> 
> Seven versions of the patch and looks like we've failed to loop you in
> on this. Sorry. May I have your ack on the patch please?

Please see below for one comment.

> Is it too much to ask to have this merged via drm-intel along with the
> rest of the series?

Provided the potential conflicts are handled I have no issue with that.

> > ---
> >  .../drm/bridge/analogix/analogix_dp_core.c    | 12 +++----
> >  .../drm/bridge/analogix/analogix_dp_core.h    |  2 +-
> >  .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 10 +++---
> >  drivers/gpu/drm/i915/intel_psr.c              |  2 +-
> >  include/drm/drm_dp_helper.h                   | 33 +++++++++++++------
> >  5 files changed, 36 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > index 225f5e5dd69b..d1c2659d0cce 100644
> > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > @@ -115,7 +115,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_psr_enabled);
> >  
> >  int analogix_dp_enable_psr(struct analogix_dp_device *dp)
> >  {
> > -	struct edp_vsc_psr psr_vsc;
> > +	struct dp_sdp psr_vsc;
> >  
> >  	if (!dp->psr_enable)
> >  		return 0;
> > @@ -127,8 +127,8 @@ int analogix_dp_enable_psr(struct analogix_dp_device *dp)
> >  	psr_vsc.sdp_header.HB2 = 0x2;
> >  	psr_vsc.sdp_header.HB3 = 0x8;
> >  
> > -	psr_vsc.DB0 = 0;
> > -	psr_vsc.DB1 = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
> > +	psr_vsc.DB[0] = 0;
> > +	psr_vsc.DB[1] = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
> >  
> >  	return analogix_dp_send_psr_spd(dp, &psr_vsc, true);
> >  }
> > @@ -136,7 +136,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_enable_psr);
> >  
> >  int analogix_dp_disable_psr(struct analogix_dp_device *dp)
> >  {
> > -	struct edp_vsc_psr psr_vsc;
> > +	struct dp_sdp psr_vsc;
> >  	int ret;
> >  
> >  	if (!dp->psr_enable)
> > @@ -149,8 +149,8 @@ int analogix_dp_disable_psr(struct analogix_dp_device *dp)
> >  	psr_vsc.sdp_header.HB2 = 0x2;
> >  	psr_vsc.sdp_header.HB3 = 0x8;
> >  
> > -	psr_vsc.DB0 = 0;
> > -	psr_vsc.DB1 = 0;
> > +	psr_vsc.DB[0] = 0;
> > +	psr_vsc.DB[1] = 0;
> >  
> >  	ret = drm_dp_dpcd_writeb(&dp->aux, DP_SET_POWER, DP_SET_POWER_D0);
> >  	if (ret != 1) {
> > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > index 769255dc6e99..3e5fe90edf71 100644
> > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > @@ -254,7 +254,7 @@ void analogix_dp_enable_scrambling(struct analogix_dp_device *dp);
> >  void analogix_dp_disable_scrambling(struct analogix_dp_device *dp);
> >  void analogix_dp_enable_psr_crc(struct analogix_dp_device *dp);
> >  int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> > -			     struct edp_vsc_psr *vsc, bool blocking);
> > +			     struct dp_sdp *vsc, bool blocking);
> >  ssize_t analogix_dp_transfer(struct analogix_dp_device *dp,
> >  			     struct drm_dp_aux_msg *msg);
> >  
> > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > index a5f2763d72e4..f591810ef1be 100644
> > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > @@ -1041,7 +1041,7 @@ static ssize_t analogix_dp_get_psr_status(struct analogix_dp_device *dp)
> >  }
> >  
> >  int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> > -			     struct edp_vsc_psr *vsc, bool blocking)
> > +			     struct dp_sdp *vsc, bool blocking)
> >  {
> >  	unsigned int val;
> >  	int ret;
> > @@ -1069,8 +1069,8 @@ int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> >  	writel(0x5D, dp->reg_base + ANALOGIX_DP_SPD_PB3);
> >  
> >  	/* configure DB0 / DB1 values */
> > -	writel(vsc->DB0, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
> > -	writel(vsc->DB1, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
> > +	writel(vsc->DB[0], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
> > +	writel(vsc->DB[1], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
> >  
> >  	/* set reuse spd inforframe */
> >  	val = readl(dp->reg_base + ANALOGIX_DP_VIDEO_CTL_3);
> > @@ -1092,8 +1092,8 @@ int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> >  
> >  	ret = readx_poll_timeout(analogix_dp_get_psr_status, dp, psr_status,
> >  		psr_status >= 0 &&
> > -		((vsc->DB1 && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
> > -		(!vsc->DB1 && psr_status == DP_PSR_SINK_INACTIVE)), 1500,
> > +		((vsc->DB[1] && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
> > +		(!vsc->DB[1] && psr_status == DP_PSR_SINK_INACTIVE)), 1500,
> >  		DP_TIMEOUT_PSR_LOOP_MS * 1000);
> >  	if (ret) {
> >  		dev_warn(dp->dev, "Failed to apply PSR %d\n", ret);
> > diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> > index 2a547a128a37..01ca502099df 100644
> > --- a/drivers/gpu/drm/i915/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > @@ -342,7 +342,7 @@ static void intel_psr_setup_vsc(struct intel_dp *intel_dp,
> >  {
> >  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> >  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > -	struct edp_vsc_psr psr_vsc;
> > +	struct dp_sdp psr_vsc;
> >  
> >  	if (dev_priv->psr.psr2_enabled) {
> >  		/* Prepare VSC Header for SU as per EDP 1.4 spec, Table 6.11 */
> > diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> > index 97ce790a5b5a..8d7c47e46f2d 100644
> > --- a/include/drm/drm_dp_helper.h
> > +++ b/include/drm/drm_dp_helper.h
> > @@ -1083,17 +1083,30 @@ struct dp_sdp_header {
> >  #define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES	0x1F
> >  #define DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 0x7F
> >  
> > -struct edp_vsc_psr {
> > +/**
> > + * struct dp_sdp - DP secondary data packet
> > + * @sdp_header: DP secondary data packet header
> > + * @DB: DP secondaray data packet data blocks
> > + * VSC SDP Payload for PSR
> > + * DB[0]: Stereo Interface
> > + * DB[1]: 0 - PSR State; 1 - Update RFB; 2 - CRC Valid
> > + * DB[2]: CRC value bits 7:0 of the R or Cr component
> > + * DB[3]: CRC value bits 15:8 of the R or Cr component
> > + * DB[4]: CRC value bits 7:0 of the G or Y component
> > + * DB[5]: CRC value bits 15:8 of the G or Y component
> > + * DB[6]: CRC value bits 7:0 of the B or Cb component
> > + * DB[7]: CRC value bits 15:8 of the B or Cb component
> > + * DB[8] - DB[31]: Reserved
> > + * VSC SDP Payload for Pixel Encoding/Colorimetry Format
> > + * DB[0] - DB[15]: Reserved
> > + * DB[16]: Pixel Encoding and Colorimetry Formats
> > + * DB[17]: Dynamic Range and Component Bit Depth
> > + * DB[18]: Content Type
> > + * DB[19] - DB[31]: Reserved
> > + */
> > +struct dp_sdp {
> >  	struct dp_sdp_header sdp_header;
> > -	u8 DB0; /* Stereo Interface */
> > -	u8 DB1; /* 0 - PSR State; 1 - Update RFB; 2 - CRC Valid */
> > -	u8 DB2; /* CRC value bits 7:0 of the R or Cr component */
> > -	u8 DB3; /* CRC value bits 15:8 of the R or Cr component */
> > -	u8 DB4; /* CRC value bits 7:0 of the G or Y component */
> > -	u8 DB5; /* CRC value bits 15:8 of the G or Y component */
> > -	u8 DB6; /* CRC value bits 7:0 of the B or Cb component */
> > -	u8 DB7; /* CRC value bits 15:8 of the B or Cb component */
> > -	u8 DB8_31[24]; /* Reserved */
> > +	u8 DB[32];

While at it, would it make sense to rename DB to db ?

Apart from that,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> >  } __packed;
> >  
> >  #define EDP_VSC_PSR_STATE_ACTIVE	(1<<0)
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Regards,

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp
  2019-05-21 10:14     ` Laurent Pinchart
@ 2019-05-21 12:07       ` Mun, Gwan-gyeong
  0 siblings, 0 replies; 12+ messages in thread
From: Mun, Gwan-gyeong @ 2019-05-21 12:07 UTC (permalink / raw)
  To: laurent.pinchart, jani.nikula; +Cc: a.hajda, intel-gfx, dri-devel

On Tue, 2019-05-21 at 13:14 +0300, Laurent Pinchart wrote:
> Hello Jani,
> 
> On Tue, May 21, 2019 at 09:44:04AM +0300, Jani Nikula wrote:
> > On Mon, 20 May 2019, Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > wrote:
> > > VSC SDP Payload for PSR is one of data block type of SDP
> > > (Secondaray Data
> > > Packet). In order to generalize SDP packet structure name, it
> > > renames
> > > struct edp_vsc_psr to struct dp_sdp. And each SDP data blocks
> > > have
> > > different usages, each SDP type has different reserved data
> > > blocks and
> > > Video_Stream_Configuration Extension VESA SDP might use all of
> > > Data Blocks
> > > as Extended INFORFRAME Data Byte. so it makes Data Block
> > > variables as
> > > array type. And it adds comments of details of DB of VSC SDP
> > > Payload
> > > for Pixel Encoding/Colorimetry Format. This comments follows DP
> > > 1.4a spec,
> > > section 2.2.5.7.5, chapter "VSC SDP Payload for Pixel
> > > Encoding/Colorimetry
> > > Format".
> > > 
> > > v7: Addressed review comments from Ville.
> > > 
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com
> > > >
> > 
> > Andrzej, Laurent -
> > 
> > Seven versions of the patch and looks like we've failed to loop you
> > in
> > on this. Sorry. May I have your ack on the patch please?
> 
> Please see below for one comment.
> 
> > Is it too much to ask to have this merged via drm-intel along with
> > the
> > rest of the series?
> 
> Provided the potential conflicts are handled I have no issue with
> that.
> 
Andrzej, Laurent -

I am Sorry that I missed you on previous loops.
And thank you for reviewing the series.

Jani,
Thank you for asking the series to Andrzej and Laurent.
> > > ---
> > >  .../drm/bridge/analogix/analogix_dp_core.c    | 12 +++----
> > >  .../drm/bridge/analogix/analogix_dp_core.h    |  2 +-
> > >  .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 10 +++---
> > >  drivers/gpu/drm/i915/intel_psr.c              |  2 +-
> > >  include/drm/drm_dp_helper.h                   | 33
> > > +++++++++++++------
> > >  5 files changed, 36 insertions(+), 23 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > > index 225f5e5dd69b..d1c2659d0cce 100644
> > > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> > > @@ -115,7 +115,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_psr_enabled);
> > >  
> > >  int analogix_dp_enable_psr(struct analogix_dp_device *dp)
> > >  {
> > > -	struct edp_vsc_psr psr_vsc;
> > > +	struct dp_sdp psr_vsc;
> > >  
> > >  	if (!dp->psr_enable)
> > >  		return 0;
> > > @@ -127,8 +127,8 @@ int analogix_dp_enable_psr(struct
> > > analogix_dp_device *dp)
> > >  	psr_vsc.sdp_header.HB2 = 0x2;
> > >  	psr_vsc.sdp_header.HB3 = 0x8;
> > >  
> > > -	psr_vsc.DB0 = 0;
> > > -	psr_vsc.DB1 = EDP_VSC_PSR_STATE_ACTIVE |
> > > EDP_VSC_PSR_CRC_VALUES_VALID;
> > > +	psr_vsc.DB[0] = 0;
> > > +	psr_vsc.DB[1] = EDP_VSC_PSR_STATE_ACTIVE |
> > > EDP_VSC_PSR_CRC_VALUES_VALID;
> > >  
> > >  	return analogix_dp_send_psr_spd(dp, &psr_vsc, true);
> > >  }
> > > @@ -136,7 +136,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_enable_psr);
> > >  
> > >  int analogix_dp_disable_psr(struct analogix_dp_device *dp)
> > >  {
> > > -	struct edp_vsc_psr psr_vsc;
> > > +	struct dp_sdp psr_vsc;
> > >  	int ret;
> > >  
> > >  	if (!dp->psr_enable)
> > > @@ -149,8 +149,8 @@ int analogix_dp_disable_psr(struct
> > > analogix_dp_device *dp)
> > >  	psr_vsc.sdp_header.HB2 = 0x2;
> > >  	psr_vsc.sdp_header.HB3 = 0x8;
> > >  
> > > -	psr_vsc.DB0 = 0;
> > > -	psr_vsc.DB1 = 0;
> > > +	psr_vsc.DB[0] = 0;
> > > +	psr_vsc.DB[1] = 0;
> > >  
> > >  	ret = drm_dp_dpcd_writeb(&dp->aux, DP_SET_POWER,
> > > DP_SET_POWER_D0);
> > >  	if (ret != 1) {
> > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > > index 769255dc6e99..3e5fe90edf71 100644
> > > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> > > @@ -254,7 +254,7 @@ void analogix_dp_enable_scrambling(struct
> > > analogix_dp_device *dp);
> > >  void analogix_dp_disable_scrambling(struct analogix_dp_device
> > > *dp);
> > >  void analogix_dp_enable_psr_crc(struct analogix_dp_device *dp);
> > >  int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> > > -			     struct edp_vsc_psr *vsc, bool blocking);
> > > +			     struct dp_sdp *vsc, bool blocking);
> > >  ssize_t analogix_dp_transfer(struct analogix_dp_device *dp,
> > >  			     struct drm_dp_aux_msg *msg);
> > >  
> > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > > b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > > index a5f2763d72e4..f591810ef1be 100644
> > > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> > > @@ -1041,7 +1041,7 @@ static ssize_t
> > > analogix_dp_get_psr_status(struct analogix_dp_device *dp)
> > >  }
> > >  
> > >  int analogix_dp_send_psr_spd(struct analogix_dp_device *dp,
> > > -			     struct edp_vsc_psr *vsc, bool blocking)
> > > +			     struct dp_sdp *vsc, bool blocking)
> > >  {
> > >  	unsigned int val;
> > >  	int ret;
> > > @@ -1069,8 +1069,8 @@ int analogix_dp_send_psr_spd(struct
> > > analogix_dp_device *dp,
> > >  	writel(0x5D, dp->reg_base + ANALOGIX_DP_SPD_PB3);
> > >  
> > >  	/* configure DB0 / DB1 values */
> > > -	writel(vsc->DB0, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
> > > -	writel(vsc->DB1, dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
> > > +	writel(vsc->DB[0], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB0);
> > > +	writel(vsc->DB[1], dp->reg_base + ANALOGIX_DP_VSC_SHADOW_DB1);
> > >  
> > >  	/* set reuse spd inforframe */
> > >  	val = readl(dp->reg_base + ANALOGIX_DP_VIDEO_CTL_3);
> > > @@ -1092,8 +1092,8 @@ int analogix_dp_send_psr_spd(struct
> > > analogix_dp_device *dp,
> > >  
> > >  	ret = readx_poll_timeout(analogix_dp_get_psr_status, dp,
> > > psr_status,
> > >  		psr_status >= 0 &&
> > > -		((vsc->DB1 && psr_status == DP_PSR_SINK_ACTIVE_RFB) ||
> > > -		(!vsc->DB1 && psr_status == DP_PSR_SINK_INACTIVE)),
> > > 1500,
> > > +		((vsc->DB[1] && psr_status == DP_PSR_SINK_ACTIVE_RFB)
> > > ||
> > > +		(!vsc->DB[1] && psr_status == DP_PSR_SINK_INACTIVE)),
> > > 1500,
> > >  		DP_TIMEOUT_PSR_LOOP_MS * 1000);
> > >  	if (ret) {
> > >  		dev_warn(dp->dev, "Failed to apply PSR %d\n", ret);
> > > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > > b/drivers/gpu/drm/i915/intel_psr.c
> > > index 2a547a128a37..01ca502099df 100644
> > > --- a/drivers/gpu/drm/i915/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > > @@ -342,7 +342,7 @@ static void intel_psr_setup_vsc(struct
> > > intel_dp *intel_dp,
> > >  {
> > >  	struct intel_digital_port *intel_dig_port =
> > > dp_to_dig_port(intel_dp);
> > >  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > > -	struct edp_vsc_psr psr_vsc;
> > > +	struct dp_sdp psr_vsc;
> > >  
> > >  	if (dev_priv->psr.psr2_enabled) {
> > >  		/* Prepare VSC Header for SU as per EDP 1.4 spec, Table
> > > 6.11 */
> > > diff --git a/include/drm/drm_dp_helper.h
> > > b/include/drm/drm_dp_helper.h
> > > index 97ce790a5b5a..8d7c47e46f2d 100644
> > > --- a/include/drm/drm_dp_helper.h
> > > +++ b/include/drm/drm_dp_helper.h
> > > @@ -1083,17 +1083,30 @@ struct dp_sdp_header {
> > >  #define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES	0x1F
> > >  #define DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 0x7F
> > >  
> > > -struct edp_vsc_psr {
> > > +/**
> > > + * struct dp_sdp - DP secondary data packet
> > > + * @sdp_header: DP secondary data packet header
> > > + * @DB: DP secondaray data packet data blocks
> > > + * VSC SDP Payload for PSR
> > > + * DB[0]: Stereo Interface
> > > + * DB[1]: 0 - PSR State; 1 - Update RFB; 2 - CRC Valid
> > > + * DB[2]: CRC value bits 7:0 of the R or Cr component
> > > + * DB[3]: CRC value bits 15:8 of the R or Cr component
> > > + * DB[4]: CRC value bits 7:0 of the G or Y component
> > > + * DB[5]: CRC value bits 15:8 of the G or Y component
> > > + * DB[6]: CRC value bits 7:0 of the B or Cb component
> > > + * DB[7]: CRC value bits 15:8 of the B or Cb component
> > > + * DB[8] - DB[31]: Reserved
> > > + * VSC SDP Payload for Pixel Encoding/Colorimetry Format
> > > + * DB[0] - DB[15]: Reserved
> > > + * DB[16]: Pixel Encoding and Colorimetry Formats
> > > + * DB[17]: Dynamic Range and Component Bit Depth
> > > + * DB[18]: Content Type
> > > + * DB[19] - DB[31]: Reserved
> > > + */
> > > +struct dp_sdp {
> > >  	struct dp_sdp_header sdp_header;
> > > -	u8 DB0; /* Stereo Interface */
> > > -	u8 DB1; /* 0 - PSR State; 1 - Update RFB; 2 - CRC Valid */
> > > -	u8 DB2; /* CRC value bits 7:0 of the R or Cr component */
> > > -	u8 DB3; /* CRC value bits 15:8 of the R or Cr component */
> > > -	u8 DB4; /* CRC value bits 7:0 of the G or Y component */
> > > -	u8 DB5; /* CRC value bits 15:8 of the G or Y component */
> > > -	u8 DB6; /* CRC value bits 7:0 of the B or Cb component */
> > > -	u8 DB7; /* CRC value bits 15:8 of the B or Cb component */
> > > -	u8 DB8_31[24]; /* Reserved */
> > > +	u8 DB[32];
> 
> While at it, would it make sense to rename DB to db ?
> 
Okay, I'll update DB to db.

> Apart from that,
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> > >  } __packed;
> > >  
> > >  #define EDP_VSC_PSR_STATE_ACTIVE	(1<<0)
> > 
> > -- 
> > Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-05-21 12:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20  9:20 [PATCH v8 0/6] drm/i915/dp: Support for DP YCbCr4:2:0 outputs Gwan-gyeong Mun
2019-05-20  9:20 ` [PATCH v8 1/6] drm/i915/dp: Add a config function for YCBCR420 outputs Gwan-gyeong Mun
2019-05-20  9:20 ` [PATCH v8 2/6] drm: Rename struct edp_vsc_psr to struct dp_sdp Gwan-gyeong Mun
2019-05-21  6:44   ` [Intel-gfx] " Jani Nikula
2019-05-21 10:14     ` Laurent Pinchart
2019-05-21 12:07       ` Mun, Gwan-gyeong
2019-05-20  9:20 ` [PATCH v8 3/6] drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format Gwan-gyeong Mun
2019-05-20  9:20 ` [PATCH v8 4/6] drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA Gwan-gyeong Mun
2019-05-20  9:20 ` [PATCH v8 5/6] drm/i915/dp: Change a link bandwidth computation for DP Gwan-gyeong Mun
2019-05-20  9:20 ` [PATCH v8 6/6] drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11 Gwan-gyeong Mun
2019-05-20  9:50 ` ✓ Fi.CI.BAT: success for drm/i915/dp: Support for DP YCbCr4:2:0 outputs (rev3) Patchwork
2019-05-20 11:50 ` ✓ Fi.CI.IGT: " Patchwork

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.