[1/4] drm/i915: Add memory region information to device_info
diff mbox series

Message ID 20191017174544.22446-1-matthew.auld@intel.com
State New
Headers show
Series
  • [1/4] drm/i915: Add memory region information to device_info
Related show

Commit Message

Matthew Auld Oct. 17, 2019, 5:45 p.m. UTC
From: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>

Exposes available regions for the platform. Needed in later patches.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h          | 2 ++
 drivers/gpu/drm/i915/intel_device_info.h | 2 ++
 2 files changed, 4 insertions(+)

Comments

Chris Wilson Oct. 17, 2019, 8:32 p.m. UTC | #1
Quoting Matthew Auld (2019-10-17 18:45:41)
> From: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> 
> Exposes available regions for the platform. Needed in later patches.
> 
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>

Squash this into patch 2. I do not see any value in this patch alone.
-Chris

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 88956f37d96c..2dab731c1e80 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1783,6 +1783,8 @@  IS_SUBPLATFORM(const struct drm_i915_private *i915,
 
 #define HAS_IPC(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_ipc)
 
+#define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
+
 #define HAS_GT_UC(dev_priv)	(INTEL_INFO(dev_priv)->has_gt_uc)
 
 /* Having GuC is not the same as using GuC */
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
index 0cdc2465534b..e9940f932d26 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -160,6 +160,8 @@  struct intel_device_info {
 
 	unsigned int page_sizes; /* page sizes supported by the HW */
 
+	u32 memory_regions; /* regions supported by the HW */
+
 	u32 display_mmio_offset;
 
 	u8 pipe_mask;