Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 3/5] drm/i915/ddi: Check transcoder instead of port when setting HDMI infoframe
Date: Wed, 13 Jun 2018 20:07:08 +0300	[thread overview]
Message-ID: <20180613170710.15080-4-imre.deak@intel.com> (raw)
In-Reply-To: <20180613170710.15080-1-imre.deak@intel.com>

The only requirement by BSpec for setting the HDMI infoframes is on DDI
platforms to do that before enabling the HDMI transcoder function, see
VIDEO_DIP_CTL bit 16. Accordingly check for the transcoder function
disabled state instead of the port's disabled state on DDI platforms.
This is needed by the next patch as it will set the infoframe during
crtc disabling where the port is still enabled.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index b7a95fd0663b..29d586f5cedb 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -59,6 +59,15 @@ assert_hdmi_port_disabled(struct intel_hdmi *intel_hdmi)
 	     "HDMI port enabled, expecting disabled\n");
 }
 
+static void
+assert_hdmi_transcoder_func_disabled(struct drm_i915_private *dev_priv,
+				     enum transcoder cpu_transcoder)
+{
+	WARN(I915_READ(TRANS_DDI_FUNC_CTL(cpu_transcoder)) &
+	     TRANS_DDI_FUNC_ENABLE,
+	     "HDMI transcoder function enabled, expecting disabled\n");
+}
+
 struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
 {
 	struct intel_digital_port *intel_dig_port =
@@ -838,11 +847,11 @@ static void hsw_set_infoframes(struct drm_encoder *encoder,
 			       const struct drm_connector_state *conn_state)
 {
 	struct drm_i915_private *dev_priv = to_i915(encoder->dev);
-	struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
 	i915_reg_t reg = HSW_TVIDEO_DIP_CTL(crtc_state->cpu_transcoder);
 	u32 val = I915_READ(reg);
 
-	assert_hdmi_port_disabled(intel_hdmi);
+	assert_hdmi_transcoder_func_disabled(dev_priv,
+					     crtc_state->cpu_transcoder);
 
 	val &= ~(VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
 		 VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
-- 
2.13.2

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

  parent reply	other threads:[~2018-06-13 17:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 17:07 [PATCH 0/5] drm/i915/icl: Fix HDMI infoframe setting Imre Deak
2018-06-13 17:07 ` [PATCH 1/5] drm/i915/ddi: s/crtc->config/old_crtc_state in haswell_crtc_disable() Imre Deak
2018-06-13 17:43   ` Ville Syrjälä
2018-06-13 17:07 ` [PATCH 2/5] drm/i915/ddi: Push pipe clock enabling to encoders Imre Deak
2018-06-13 17:27   ` [PATCH v2 " Imre Deak
2018-06-13 17:46     ` Ville Syrjälä
2018-06-13 17:07 ` Imre Deak [this message]
2018-06-13 17:47   ` [PATCH 3/5] drm/i915/ddi: Check transcoder instead of port when setting HDMI infoframe Ville Syrjälä
2018-06-13 17:07 ` [PATCH 4/5] drm/i915/ddi: Set HDMI infoframes with pipe clocks enabled Imre Deak
2018-06-13 17:49   ` Ville Syrjälä
2018-06-13 17:07 ` [PATCH 5/5] drm/i915/ddi: Removed unused var from hsw_write_infoframe() Imre Deak
2018-06-13 17:51   ` Ville Syrjälä
2018-06-13 17:13 ` ✗ Fi.CI.BAT: failure for drm/i915/icl: Fix HDMI infoframe setting Patchwork
2018-06-13 18:02 ` ✓ Fi.CI.BAT: success for drm/i915/icl: Fix HDMI infoframe setting (rev2) Patchwork
2018-06-13 22:03 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-14 17:32   ` Imre Deak

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=20180613170710.15080-4-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=vandita.kulkarni@intel.com \
    /path/to/YOUR_REPLY

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

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