@@ -1053,7 +1053,7 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
*/
dram_info->is_16gb_dimm = !IS_GEN9_LP(dev_priv);
- if (INTEL_GEN(dev_priv) < 9)
+ if (!HAS_DRAM_INFO(dev_priv))
return;
if (IS_GEN9_LP(dev_priv))
@@ -1763,6 +1763,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
#define HAS_DP_MST(dev_priv) (INTEL_INFO(dev_priv)->display.has_dp_mst)
+#define HAS_DRAM_INFO(dev_priv) (INTEL_INFO(dev_priv)->has_dram_info)
+
#define HAS_DDI(dev_priv) (INTEL_INFO(dev_priv)->display.has_ddi)
#define HAS_FPGA_DBG_UNCLAIMED(dev_priv) (INTEL_INFO(dev_priv)->has_fpga_dbg)
#define HAS_PSR(dev_priv) (INTEL_INFO(dev_priv)->display.has_psr)
@@ -601,7 +601,8 @@ static const struct intel_device_info intel_cherryview_info = {
.display.has_csr = 1, \
.has_gt_uc = 1, \
.display.has_ipc = 1, \
- .ddb_size = 896
+ .ddb_size = 896, \
+ .has_dram_info = 1
#define SKL_PLATFORM \
GEN9_FEATURES, \
@@ -109,6 +109,7 @@ enum intel_ppgtt_type {
func(require_force_probe); \
/* Keep has_* in alphabetical order */ \
func(has_64bit_reloc); \
+ func(has_dram_info); \
func(gpu_reset_clobbers_display); \
func(has_reset_engine); \
func(has_fpga_dbg); \
Platforms prior to gen9 to not supply this info to software. Instead of checking the platform directly, add a new feature flag, HAS_DRAM_INFO, to allow us to quickly tell if the platform supports this feature. v2: Fix commit message and change feature flag name to HAS_DRAM_INFO Signed-off-by: Stuart Summers <stuart.summers@intel.com> --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 3 ++- drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 6 insertions(+), 2 deletions(-)