Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 1/3] drm/i915/display: move vbt check to intel_ddi_init()
Date: Fri, 19 Mar 2021 10:36:01 -0700	[thread overview]
Message-ID: <20210319173603.521779-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20210319173603.521779-1-lucas.demarchi@intel.com>

Since commit 45c0673aac97 ("drm/i915/bios: start using the
intel_bios_encoder_data directly") we lookup the devdata for each port
in intel_ddi_init() and just return if the port is not present in VBT
(or if we didn't create a fake devdata for it if VBT is not available).

So in intel_display.c we don't have to check
intel_bios_is_port_present(), just rely on the check in
intel_ddi_init().

v2: Rebase 45c0673aac97 re-using that check in intel_ddi_init() instead
of adding a new one.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 7b38b9a38b85..c793cbecfb3b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -11672,13 +11672,13 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		intel_ddi_init(dev_priv, PORT_C);
 		intel_ddi_init(dev_priv, PORT_D);
 		intel_ddi_init(dev_priv, PORT_E);
+
 		/*
-		 * On some ICL SKUs port F is not present. No strap bits for
-		 * this, so rely on VBT.
-		 * Work around broken VBTs on SKUs known to have no port F.
+		 * On some ICL SKUs port F is not present, but broken VBTs mark
+		 * the port as present. Only try to initialize port F for the
+		 * SKUs that may actually have it.
 		 */
-		if (IS_ICL_WITH_PORT_F(dev_priv) &&
-		    intel_bios_is_port_present(dev_priv, PORT_F))
+		if (IS_ICL_WITH_PORT_F(dev_priv))
 			intel_ddi_init(dev_priv, PORT_F);
 
 		icl_dsi_init(dev_priv);
@@ -11732,10 +11732,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		/*
 		 * On SKL we don't have a way to detect DDI-E so we rely on VBT.
 		 */
-		if (IS_GEN9_BC(dev_priv) &&
-		    intel_bios_is_port_present(dev_priv, PORT_E))
+		if (IS_GEN9_BC(dev_priv))
 			intel_ddi_init(dev_priv, PORT_E);
-
 	} else if (HAS_PCH_SPLIT(dev_priv)) {
 		int found;
 
-- 
2.30.1

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

  reply	other threads:[~2021-03-19 17:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 17:36 [Intel-gfx] [PATCH v2 0/3] Simplify intel_setup_outputs() Lucas De Marchi
2021-03-19 17:36 ` Lucas De Marchi [this message]
2021-03-19 17:36 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/display: remove FIXME comment for intended feature Lucas De Marchi
2021-03-23 10:14   ` Jani Nikula
2021-03-19 17:36 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/display: remove strap checks from gen 9 Lucas De Marchi
2021-04-07 16:14   ` Srivatsa, Anusha
2021-03-19 18:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Simplify intel_setup_outputs() (rev2) Patchwork
2021-03-19 18:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-19 21:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-23 22:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Simplify intel_setup_outputs() (rev3) Patchwork
2021-03-23 23:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-24 17:09 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-24 18:00   ` Lucas De Marchi

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=20210319173603.521779-2-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox