From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH 2/2] drm/i915: reduce PCI ID duplication in IS_IRONLAKE_M()
Date: Thu, 8 Dec 2016 00:10:27 +0200 [thread overview]
Message-ID: <1481148627-6276-2-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <1481148627-6276-1-git-send-email-jani.nikula@intel.com>
Reduce PCI ID duplication by replacing direct PCI ID check with
INTEL_IRONLAKE && IS_MOBILE() check.
It's slightly less optimal, but clarity and single point of truth win.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index ee1726b28b82..a15161007109 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2618,7 +2618,8 @@ intel_info(const struct drm_i915_private *dev_priv)
#define IS_G4X(dev_priv) (IS_G45(dev_priv) || IS_GM45(dev_priv))
#define IS_PINEVIEW(dev_priv) ((dev_priv)->info.platform == INTEL_PINEVIEW)
#define IS_G33(dev_priv) ((dev_priv)->info.platform == INTEL_G33)
-#define IS_IRONLAKE_M(dev_priv) (INTEL_DEVID(dev_priv) == 0x0046)
+#define IS_IRONLAKE_M(dev_priv) ((dev_priv)->info.platform == INTEL_IRONLAKE && \
+ IS_MOBILE(dev_priv))
#define IS_IVYBRIDGE(dev_priv) ((dev_priv)->info.platform == INTEL_IVYBRIDGE)
#define IS_IVB_GT1(dev_priv) (INTEL_DEVID(dev_priv) == 0x0156 || \
INTEL_DEVID(dev_priv) == 0x0152 || \
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-12-07 22:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 22:10 [PATCH 1/2] drm/i915: split off Pineview desktop and mobile device info Jani Nikula
2016-12-07 22:10 ` Jani Nikula [this message]
2016-12-07 22:19 ` Jani Nikula
2016-12-08 9:11 ` Jani Nikula
2016-12-08 15:58 ` Daniel Vetter
2016-12-08 16:27 ` Ville Syrjälä
2016-12-08 21:03 ` Jani Nikula
2016-12-07 23:45 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
2016-12-08 6:53 ` Saarinen, Jani
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=1481148627-6276-2-git-send-email-jani.nikula@intel.com \
--to=jani.nikula@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