From: Thierry Reding <thierry.reding@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org,
David Herrmann <dh.herrmann@gmail.com>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [PATCH 2/2] drm/i915: Use drm_crtc_mask() helper
Date: Mon, 13 Jan 2014 12:46:50 +0100 [thread overview]
Message-ID: <1389613610-21084-3-git-send-email-treding@nvidia.com> (raw)
In-Reply-To: <1389613610-21084-1-git-send-email-treding@nvidia.com>
Replace an open-coded occurrence by a call to the new drm_crtc_mask()
helper.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpu/drm/i915/intel_display.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e77d4b8856a7..807feab38ea6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8723,21 +8723,7 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
static bool intel_encoder_crtc_ok(struct drm_encoder *encoder,
struct drm_crtc *crtc)
{
- struct drm_device *dev;
- struct drm_crtc *tmp;
- int crtc_mask = 1;
-
- WARN(!crtc, "checking null crtc?\n");
-
- dev = crtc->dev;
-
- list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) {
- if (tmp == crtc)
- break;
- crtc_mask <<= 1;
- }
-
- if (encoder->possible_crtcs & crtc_mask)
+ if (encoder->possible_crtcs & drm_crtc_mask(crtc))
return true;
return false;
}
--
1.8.4.2
prev parent reply other threads:[~2014-01-13 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 11:46 [PATCH 0/2] drm: Introduce drm_crtc_index() and drm_crtc_mask() Thierry Reding
2014-01-13 11:46 ` [PATCH 1/2] drm: provide a helper for the encoder possible_crtcs mask Thierry Reding
2014-01-13 11:58 ` David Herrmann
2014-01-13 12:47 ` Russell King - ARM Linux
2014-01-13 13:50 ` David Herrmann
2014-01-13 13:55 ` Russell King - ARM Linux
2014-01-13 13:57 ` David Herrmann
2014-01-13 13:14 ` Jani Nikula
2014-01-13 11:46 ` Thierry Reding [this message]
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=1389613610-21084-3-git-send-email-treding@nvidia.com \
--to=thierry.reding@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rmk+kernel@arm.linux.org.uk \
/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