All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 4/4] drm/i915: only call intel_prepare_ddi if HAS_DDI
Date: Fri, 23 Nov 2012 15:30:40 -0200	[thread overview]
Message-ID: <1353691840-9913-4-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1353691840-9913-1-git-send-email-przanoni@gmail.com>

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

In other words, move the check from inside the function to outside it.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c     | 16 +++++++---------
 drivers/gpu/drm/i915/intel_display.c |  3 ++-
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 197dede..e53e6fb 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -115,16 +115,14 @@ void intel_prepare_ddi(struct drm_device *dev)
 {
 	int port;
 
-	if (HAS_DDI(dev)) {
-		for (port = PORT_A; port < PORT_E; port++)
-			intel_prepare_ddi_buffers(dev, port, false);
+	for (port = PORT_A; port < PORT_E; port++)
+		intel_prepare_ddi_buffers(dev, port, false);
 
-		/* DDI E is the suggested one to work in FDI mode, so program is as such by
-		 * default. It will have to be re-programmed in case a digital DP output
-		 * will be detected on it
-		 */
-		intel_prepare_ddi_buffers(dev, PORT_E, true);
-	}
+	/* DDI E is the suggested one to work in FDI mode, so program is as such
+	 * by default. It will have to be re-programmed in case a digital DP
+	 * output will be detected on it
+	 */
+	intel_prepare_ddi_buffers(dev, PORT_E, true);
 }
 
 static const long hsw_ddi_buf_ctl_values[] = {
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d887cbc..2c3932e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8742,7 +8742,8 @@ void intel_modeset_init_hw(struct drm_device *dev)
 	 */
 	intel_init_power_wells(dev);
 
-	intel_prepare_ddi(dev);
+	if (HAS_DDI(dev))
+		intel_prepare_ddi(dev);
 
 	intel_init_clock_gating(dev);
 
-- 
1.7.11.7

  parent reply	other threads:[~2012-11-23 17:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23 17:30 [PATCH 1/4] drm/i915: intel_prepare_ddi_buffers should be static Paulo Zanoni
2012-11-23 17:30 ` [PATCH 2/4] drm/i915: remove Haswell code from ironlake_fdi_pll_enable Paulo Zanoni
2012-11-23 17:30 ` [PATCH 3/4] drm/i915: add HAS_DDI check Paulo Zanoni
2012-11-23 17:30 ` Paulo Zanoni [this message]
2012-11-23 17:54   ` [PATCH 4/4] drm/i915: only call intel_prepare_ddi if HAS_DDI Chris Wilson
2012-11-23 18:46   ` [PATCH] drm/i915: invert the log inside intel_prepare_ddi Paulo Zanoni
2012-11-29 13:39 ` [PATCH 1/4] drm/i915: intel_prepare_ddi_buffers should be static Imre Deak
2012-11-29 13:59   ` Daniel Vetter

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=1353691840-9913-4-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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 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.