Message ID | 20210121151645.10628-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Check for all subplatform bits | expand |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index f0222de2d216..7efb501e22d2 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1343,7 +1343,7 @@ intel_subplatform(const struct intel_runtime_info *info, enum intel_platform p) { const unsigned int pi = __platform_mask_index(info, p); - return info->platform_mask[pi] & INTEL_SUBPLATFORM_BITS; + return info->platform_mask[pi] & INTEL_SUBPLATFORM_MASK; } static __always_inline bool diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index 699412c14c1d..7d98a718a051 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -223,7 +223,7 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915) } } - GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_BITS); + GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_MASK); RUNTIME_INFO(i915)->platform_mask[pi] |= mask; } diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h index 79dab5a6f272..2ceafedeb62f 100644 --- a/drivers/gpu/drm/i915/intel_device_info.h +++ b/drivers/gpu/drm/i915/intel_device_info.h @@ -94,6 +94,7 @@ enum intel_platform { */ #define INTEL_SUBPLATFORM_BITS (3) +#define INTEL_SUBPLATFORM_MASK GENMASK(INTEL_SUBPLATFORM_BITS - 1, 0) /* HSW/BDW/SKL/KBL/CFL */ #define INTEL_SUBPLATFORM_ULT (0)