From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH] drm/i915: invert the log inside intel_prepare_ddi
Date: Fri, 23 Nov 2012 16:46:41 -0200 [thread overview]
Message-ID: <1353696401-10052-1-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1353691840-9913-4-git-send-email-przanoni@gmail.com>
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
Do an early return in case we don't have DDI instead of having the
whole function inside an "if" statement.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_ddi.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 197dede..ad936c6 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -115,16 +115,17 @@ 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);
+ if (!HAS_DDI(dev))
+ return;
- /* 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);
- }
+ 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);
}
static const long hsw_ddi_buf_ctl_values[] = {
--
1.7.11.7
next prev parent reply other threads:[~2012-11-23 18:46 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 ` [PATCH 4/4] drm/i915: only call intel_prepare_ddi if HAS_DDI Paulo Zanoni
2012-11-23 17:54 ` Chris Wilson
2012-11-23 18:46 ` Paulo Zanoni [this message]
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=1353696401-10052-1-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.