[Intel-gfx] [PATCH] drm/i915: Decrease number of subplatform bits

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 21 13:59:08 UTC 2021


Quoting Tvrtko Ursulin (2021-01-21 13:54:30)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Commit 6ce1c33d6c36 ("drm/i915: Kill INTEL_SUBPLATFORM_AML") removed the
> only platform which used bit 2 so could also decrease the
> INTEL_SUBPLATFORM_BITS definition.
> 
> This is not a fixes material but still lets make it precise.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> References: 6ce1c33d6c36 ("drm/i915: Kill INTEL_SUBPLATFORM_AML")
> ---
>  drivers/gpu/drm/i915/intel_device_info.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
> index 79dab5a6f272..1d39a0f706d1 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.h
> +++ b/drivers/gpu/drm/i915/intel_device_info.h
> @@ -93,7 +93,7 @@ enum intel_platform {
>   * it is fine for the same bit to be used on multiple parent platforms.
>   */
>  
> -#define INTEL_SUBPLATFORM_BITS (3)
> +#define INTEL_SUBPLATFORM_BITS (2)

No define SUBPLATFORM use that bit indeed. Our check that we don't
accidentally use that bit is however:

        GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_BITS);

accidentally treating 3 as the right mask. 

I don't think you can avoid the SUBPLATFORM_MASK bikeshedding :)
-Chris


More information about the Intel-gfx mailing list