All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/ehl: Check VBT before updating the transcoder for pipe
@ 2020-02-04  0:02 Vivek Kasireddy
  2020-02-04 10:50 ` Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vivek Kasireddy @ 2020-02-04  0:02 UTC (permalink / raw)
  To: intel-gfx

Since the pipe->transcoder mapping is not expected to change unless
there is either eDP or DSI connectors present, check the VBT to confirm
their presence in addition to checking TRANS_DDI_FUNC_CTL(transcoder).
This additional check is needed on platforms like Elkhart Lake because
we cannot just rely on GOP/Firmware programmed values in
TRANS_DDI_FUNC_CTL(transcoder) before updating the transcoder mapping.

This patch is only relevant to EHL -- and a no-op on others --
because some of the PHYs are shared between the different DDIs and
we rely on the VBT to present the most accurate information to the
driver.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index c0e5002ce64c..4b38f293bd88 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -10805,6 +10805,18 @@ static void hsw_get_ddi_pll(struct drm_i915_private *dev_priv, enum port port,
 	pipe_config->shared_dpll = intel_get_shared_dpll_by_id(dev_priv, id);
 }
 
+static bool ehl_vbt_edp_dsi_present(struct drm_i915_private *dev_priv,
+				    enum transcoder transcoder)
+{
+	bool edp_present = intel_bios_is_port_present(dev_priv, PORT_A);
+	bool dsi_present = intel_bios_is_dsi_present(dev_priv, NULL);
+
+	if (IS_ELKHARTLAKE(dev_priv))
+		return transcoder == TRANSCODER_EDP ? edp_present : dsi_present;
+
+	return true;
+}
+
 static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
 				     struct intel_crtc_state *pipe_config,
 				     u64 *power_domain_mask,
@@ -10844,7 +10856,8 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
 
 		tmp = intel_de_read(dev_priv,
 				    TRANS_DDI_FUNC_CTL(panel_transcoder));
-		if (!(tmp & TRANS_DDI_FUNC_ENABLE))
+		if (!(tmp & TRANS_DDI_FUNC_ENABLE) ||
+		    !ehl_vbt_edp_dsi_present(dev_priv, panel_transcoder))
 			continue;
 
 		/*
-- 
2.21.1

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

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

end of thread, other threads:[~2020-02-06 22:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04  0:02 [Intel-gfx] [PATCH] drm/i915/ehl: Check VBT before updating the transcoder for pipe Vivek Kasireddy
2020-02-04 10:50 ` Jani Nikula
2020-02-04 22:44   ` Vivek Kasireddy
2020-02-04 23:49     ` Souza, Jose
2020-02-04 22:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-06 22:50 ` [Intel-gfx] ✓ 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.