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: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH v5 14/18] drm/i915: Disable DIPs when LSPCON is used
Date: Sun, 09 Feb 2020 03:53:41 +0000	[thread overview]
Message-ID: <20200209035345.357436-15-gwan-gyeong.mun@intel.com> (raw)
In-Reply-To: <20200209035345.357436-1-gwan-gyeong.mun@intel.com>

When LSPCON is used, DIPs(Data Island Packets of DP or HDMI) will not be
used. Therefore it explicitly disables DIPs on encoder->pre_enable
callback.

It resolves below issue
 - reproduce step of issue
 1) Boot or Pause & Resume system
 2) Do not enable SPD (Source Product Description) DIP
 3) When driver tries to read a DIP Ctl register,
    it is written that SDP DIP is enabled.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 7f29b08ea202..195e66744c1e 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3627,6 +3627,22 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
 				       crtc_state, conn_state);
 }
 
+static void intel_ddi_disable_dips(struct intel_encoder *encoder,
+				   const struct intel_crtc_state *crtc_state)
+{
+	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+	i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder);
+	u32 dip_enable = VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
+			 VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
+			 VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW |
+			 VIDEO_DIP_ENABLE_DRM_GLK;
+	u32 val = intel_de_read(dev_priv, reg);
+
+	val &= ~dip_enable;
+	intel_de_write(dev_priv, reg, val);
+	intel_de_posting_read(dev_priv, reg);
+}
+
 static void intel_ddi_pre_enable(struct intel_encoder *encoder,
 				 const struct intel_crtc_state *crtc_state,
 				 const struct drm_connector_state *conn_state)
@@ -3666,6 +3682,13 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder,
 			struct intel_digital_port *dig_port  					enc_to_dig_port(encoder);
 
+			/*
+			 * When LSPCON is used, DIPs (Data Island Packets of DP
+			 * or HDMI) will not be used.
+			 * Therefore we explicitly disable DIPs here.
+			 */
+			intel_ddi_disable_dips(encoder, crtc_state);
+
 			dig_port->set_infoframes(encoder,
 						 crtc_state->has_infoframe,
 						 crtc_state, conn_state);
-- 
2.24.1

WARNING: multiple messages have this Message-ID (diff)
From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH v5 14/18] drm/i915: Disable DIPs when LSPCON is used
Date: Sun,  9 Feb 2020 05:53:41 +0200	[thread overview]
Message-ID: <20200209035345.357436-15-gwan-gyeong.mun@intel.com> (raw)
In-Reply-To: <20200209035345.357436-1-gwan-gyeong.mun@intel.com>

When LSPCON is used, DIPs(Data Island Packets of DP or HDMI) will not be
used. Therefore it explicitly disables DIPs on encoder->pre_enable
callback.

It resolves below issue
 - reproduce step of issue
 1) Boot or Pause & Resume system
 2) Do not enable SPD (Source Product Description) DIP
 3) When driver tries to read a DIP Ctl register,
    it is written that SDP DIP is enabled.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 7f29b08ea202..195e66744c1e 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3627,6 +3627,22 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
 				       crtc_state, conn_state);
 }
 
+static void intel_ddi_disable_dips(struct intel_encoder *encoder,
+				   const struct intel_crtc_state *crtc_state)
+{
+	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+	i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder);
+	u32 dip_enable = VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
+			 VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
+			 VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW |
+			 VIDEO_DIP_ENABLE_DRM_GLK;
+	u32 val = intel_de_read(dev_priv, reg);
+
+	val &= ~dip_enable;
+	intel_de_write(dev_priv, reg, val);
+	intel_de_posting_read(dev_priv, reg);
+}
+
 static void intel_ddi_pre_enable(struct intel_encoder *encoder,
 				 const struct intel_crtc_state *crtc_state,
 				 const struct drm_connector_state *conn_state)
@@ -3666,6 +3682,13 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder,
 			struct intel_digital_port *dig_port =
 					enc_to_dig_port(encoder);
 
+			/*
+			 * When LSPCON is used, DIPs (Data Island Packets of DP
+			 * or HDMI) will not be used.
+			 * Therefore we explicitly disable DIPs here.
+			 */
+			intel_ddi_disable_dips(encoder, crtc_state);
+
 			dig_port->set_infoframes(encoder,
 						 crtc_state->has_infoframe,
 						 crtc_state, conn_state);
-- 
2.24.1

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

WARNING: multiple messages have this Message-ID (diff)
From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v5 14/18] drm/i915: Disable DIPs when LSPCON is used
Date: Sun,  9 Feb 2020 05:53:41 +0200	[thread overview]
Message-ID: <20200209035345.357436-15-gwan-gyeong.mun@intel.com> (raw)
In-Reply-To: <20200209035345.357436-1-gwan-gyeong.mun@intel.com>

When LSPCON is used, DIPs(Data Island Packets of DP or HDMI) will not be
used. Therefore it explicitly disables DIPs on encoder->pre_enable
callback.

It resolves below issue
 - reproduce step of issue
 1) Boot or Pause & Resume system
 2) Do not enable SPD (Source Product Description) DIP
 3) When driver tries to read a DIP Ctl register,
    it is written that SDP DIP is enabled.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 7f29b08ea202..195e66744c1e 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3627,6 +3627,22 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
 				       crtc_state, conn_state);
 }
 
+static void intel_ddi_disable_dips(struct intel_encoder *encoder,
+				   const struct intel_crtc_state *crtc_state)
+{
+	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+	i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder);
+	u32 dip_enable = VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
+			 VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
+			 VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW |
+			 VIDEO_DIP_ENABLE_DRM_GLK;
+	u32 val = intel_de_read(dev_priv, reg);
+
+	val &= ~dip_enable;
+	intel_de_write(dev_priv, reg, val);
+	intel_de_posting_read(dev_priv, reg);
+}
+
 static void intel_ddi_pre_enable(struct intel_encoder *encoder,
 				 const struct intel_crtc_state *crtc_state,
 				 const struct drm_connector_state *conn_state)
@@ -3666,6 +3682,13 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder,
 			struct intel_digital_port *dig_port =
 					enc_to_dig_port(encoder);
 
+			/*
+			 * When LSPCON is used, DIPs (Data Island Packets of DP
+			 * or HDMI) will not be used.
+			 * Therefore we explicitly disable DIPs here.
+			 */
+			intel_ddi_disable_dips(encoder, crtc_state);
+
 			dig_port->set_infoframes(encoder,
 						 crtc_state->has_infoframe,
 						 crtc_state, conn_state);
-- 
2.24.1

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

  parent reply	other threads:[~2020-02-09  3:53 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09  3:53 [PATCH v5 00/18] In order to readout DP SDPs, refactors the handling of DP SDPs Gwan-gyeong Mun
2020-02-09  3:53 ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53 ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 01/18] drm: Add DP1.4 VSC SDP Payload related Data Structures Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 02/18] drm/i915/dp: Add compute routine for DP VSC SDP Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 03/18] drm/i915/dp: Add compute routine for DP HDR Metadata Infoframe SDP Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 04/18] drm/i915/dp: Add writing of DP SDPs Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 05/18] video/hdmi: Add Unpack only function for DRM infoframe Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 06/18] drm/i915/dp: Read out DP SDPs Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 07/18] drm: Add logging function for DP VSC SDP Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 08/18] drm/i915: Include HDMI DRM infoframe in the crtc state dump Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 09/18] drm/i915: Include DP HDR Metadata Infoframe SDP " Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 10/18] drm/i915: Include DP VSC " Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 11/18] drm/i915: Program DP SDPs with computed configs Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 12/18] drm/i915: Add state readout for DP HDR Metadata Infoframe SDP Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 13/18] drm/i915: Add state readout for DP VSC SDP Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` Gwan-gyeong Mun [this message]
2020-02-09  3:53   ` [Intel-gfx] [PATCH v5 14/18] drm/i915: Disable DIPs when LSPCON is used Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 15/18] drm/i915: Program DP SDPs on pipe updates Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 16/18] drm/i915: Stop sending DP SDPs on ddi disable Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 17/18] drm/i915/dp: Add compute routine for DP PSR VSC SDP Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  3:53 ` [PATCH v5 18/18] drm/i915/psr: Use new DP VSC SDP compute routine on PSR Gwan-gyeong Mun
2020-02-09  3:53   ` [Intel-gfx] " Gwan-gyeong Mun
2020-02-09  3:53   ` Gwan-gyeong Mun
2020-02-09  4:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for In order to readout DP SDPs, refactors the handling of DP SDPs (rev5) Patchwork
2020-02-09  4:41 ` [Intel-gfx] ✗ Fi.CI.BAT: 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=20200209035345.357436-15-gwan-gyeong.mun@intel.com \
    --to=gwan-gyeong.mun@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    /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.