[Intel-gfx] [PATCH 2/5] drm/i915: replace IS_GEN<N> with IS_GEN(..., N)

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Nov 1 11:35:10 UTC 2018


On 01/11/2018 08:35, Lucas De Marchi wrote:
> Now that IS_GEN can accept 1 or 2 parameters, replace the use
> of IS_GEN<N> by passing N as argument. This was generated with:

[snip]

> diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
> index c628be05fbfe..e1c860f80eb0 100644
> --- a/drivers/gpu/drm/i915/gvt/vgpu.c
> +++ b/drivers/gpu/drm/i915/gvt/vgpu.c
> @@ -148,10 +148,10 @@ int intel_gvt_init_vgpu_types(struct intel_gvt *gvt)
>   		gvt->types[i].avail_instance = min(low_avail / vgpu_types[i].low_mm,
>   						   high_avail / vgpu_types[i].high_mm);
>   
> -		if (IS_GEN8(gvt->dev_priv))
> +		if (IS_GEN(gvt->dev_priv, 8))

No strong feelings either way. Old way seems a bit more readable, but 
perhaps it is only familiarity.

How are the churn/conflict considerations given the huge (more than 
normal I think) number of current unmerged features?

Regards,

Tvrtko


More information about the Intel-gfx mailing list