From: Andi Kleen <andi@firstfloor.org>
To: jbarnes@virtuousgeek.org
Cc: intel-gfx@lists.freedesktop.org
Subject: intel_pre_enable_dp
Date: Mon, 30 Sep 2013 01:48:13 +0200 [thread overview]
Message-ID: <20130929234813.GU18242@two.firstfloor.org> (raw)
Jesse,
I was playing with a static analyzer and it flagged the following
code of yours.
Is the val = 0 directly after the register read correct and intended?
commit 89b667f86a62a99a7b484a7e1b3f8f7a108a7dee
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Thu Apr 18 14:51:36 2013 -0700
drm/i915: update VLV PLL and DPIO code v11
...
static void intel_pre_enable_dp(struct intel_encoder *encoder)
{
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
struct drm_device *dev = encoder->base.dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
if (is_cpu_edp(intel_dp) && !IS_VALLEYVIEW(dev))
ironlake_edp_pll_on(intel_dp);
+
+ if (IS_VALLEYVIEW(dev)) {
+ struct intel_digital_port *dport = enc_to_dig_port(&encoder->base);
+ struct intel_crtc *intel_crtc =
+ to_intel_crtc(encoder->base.crtc);
+ int port = vlv_dport_to_channel(dport);
+ int pipe = intel_crtc->pipe;
+ u32 val;
+
+ WARN_ON(!mutex_is_locked(&dev_priv->dpio_lock));
+
+ val = intel_dpio_read(dev_priv, DPIO_DATA_LANE_A(port));
+ val = 0; <------------- val is directly overriden, previous value is ignored
+ if (pipe)
+ val |= (1<<21);
+ else
+ val &= ~(1<<21);
--
ak@linux.intel.com -- Speaking for myself only.
next reply other threads:[~2013-09-29 23:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-29 23:48 Andi Kleen [this message]
2013-09-29 23:53 ` intel_pre_enable_dp Andi Kleen
2013-09-30 0:16 ` intel_pre_enable_dp Jesse Barnes
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=20130929234813.GU18242@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.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