[Intel-gfx] [PATCH 3/5] drm/i915: Create a USES_PPGTT macro

Ben Widawsky benjamin.widawsky at intel.com
Sat Jan 25 03:17:43 CET 2014


There are cases where we want to know if there is a full, or aliased
ppgtt. Having to always to the || is annoying. This shorthand will keep
the code a bit cleaner/easier to read.

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e851a82..6f68515 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1844,6 +1844,7 @@ struct drm_i915_file_private {
 #define HAS_PPGTT(dev)		(INTEL_INFO(dev)->gen >= 7 && !IS_VALLEYVIEW(dev) && !IS_BROADWELL(dev))
 #define USES_ALIASING_PPGTT(dev) intel_enable_ppgtt(dev, false)
 #define USES_FULL_PPGTT(dev)	intel_enable_ppgtt(dev, true)
+#define USES_PPGTT(dev)		(USES_ALIASING_PPGTT(dev) || USES_FULL_PPGTT(dev))
 
 #define HAS_OVERLAY(dev)		(INTEL_INFO(dev)->has_overlay)
 #define OVERLAY_NEEDS_PHYSICAL(dev)	(INTEL_INFO(dev)->overlay_needs_physical)
-- 
1.8.5.3




More information about the Intel-gfx mailing list