From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/3] drm/i915: Remove redundant device id from IS_IRONLAKE_M macro
Date: Mon, 18 Mar 2019 09:52:57 +0000 [thread overview]
Message-ID: <20190318095258.23443-2-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20190318095258.23443-1-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Check can use the already defined and separate device info for this
platform in conjunction with the IS_MOBILE check. So remove this instance
of device id from the header file.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_drv.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 80388984c9fc..2f6bc9670bdf 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2283,6 +2283,8 @@ static inline unsigned int i915_sg_segment_size(void)
#define IS_PLATFORM(dev_priv, p) (INTEL_INFO(dev_priv)->platform_mask & BIT(p))
+#define IS_MOBILE(dev_priv) (INTEL_INFO(dev_priv)->is_mobile)
+
#define IS_I830(dev_priv) IS_PLATFORM(dev_priv, INTEL_I830)
#define IS_I845G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I845G)
#define IS_I85X(dev_priv) IS_PLATFORM(dev_priv, INTEL_I85X)
@@ -2298,7 +2300,9 @@ static inline unsigned int i915_sg_segment_size(void)
#define IS_G4X(dev_priv) (IS_G45(dev_priv) || IS_GM45(dev_priv))
#define IS_PINEVIEW(dev_priv) IS_PLATFORM(dev_priv, INTEL_PINEVIEW)
#define IS_G33(dev_priv) IS_PLATFORM(dev_priv, INTEL_G33)
-#define IS_IRONLAKE_M(dev_priv) (INTEL_DEVID(dev_priv) == 0x0046)
+#define IS_IRONLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_IRONLAKE)
+#define IS_IRONLAKE_M(dev_priv) \
+ (IS_PLATFORM(dev_priv, INTEL_IRONLAKE) && IS_MOBILE(dev_priv))
#define IS_IVYBRIDGE(dev_priv) IS_PLATFORM(dev_priv, INTEL_IVYBRIDGE)
#define IS_IVB_GT1(dev_priv) (IS_IVYBRIDGE(dev_priv) && \
INTEL_INFO(dev_priv)->gt == 1)
@@ -2313,7 +2317,6 @@ static inline unsigned int i915_sg_segment_size(void)
#define IS_COFFEELAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_COFFEELAKE)
#define IS_CANNONLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_CANNONLAKE)
#define IS_ICELAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_ICELAKE)
-#define IS_MOBILE(dev_priv) (INTEL_INFO(dev_priv)->is_mobile)
#define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
(INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)
#define IS_BDW_ULT(dev_priv) (IS_BROADWELL(dev_priv) && \
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-18 9:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 9:52 [PATCH 1/3] drm/i915: Split Pineview device info into desktop and mobile Tvrtko Ursulin
2019-03-18 9:52 ` Tvrtko Ursulin [this message]
2019-03-18 11:10 ` [PATCH 2/3] drm/i915: Remove redundant device id from IS_IRONLAKE_M macro Chris Wilson
2019-03-21 10:56 ` [PATCH v2 " Tvrtko Ursulin
2019-03-18 9:52 ` [PATCH 3/3] drm/i915: Introduce concept of a sub-platform Tvrtko Ursulin
2019-03-18 10:07 ` Tvrtko Ursulin
2019-03-18 11:25 ` Chris Wilson
2019-03-18 11:08 ` [PATCH 1/3] drm/i915: Split Pineview device info into desktop and mobile Chris Wilson
2019-03-18 13:56 ` Ville Syrjälä
2019-03-18 15:50 ` Tvrtko Ursulin
2019-03-18 14:47 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] " Patchwork
2019-03-18 14:49 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-18 15:24 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-18 20:54 ` ✓ Fi.CI.IGT: " Patchwork
2019-03-21 13:26 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Split Pineview device info into desktop and mobile (rev2) Patchwork
2019-03-21 13:28 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-21 13:54 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-22 3:52 ` ✗ Fi.CI.IGT: failure " Patchwork
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=20190318095258.23443-2-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.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 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.