[Intel-gfx] [PATCH 09/10] drm/i915: Introduce IVB_FEATURES for device definition

Ben Widawsky ben at bwidawsk.net
Fri Mar 15 05:05:56 CET 2013


On Wed, 13 Mar 2013 14:08:28 -0700
Ben Widawsky <ben at bwidawsk.net> wrote:

> Recommended by Chris.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 24 +++++++++++-------------
>  1 file changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c
> b/drivers/gpu/drm/i915/i915_drv.c index a63abd7..2ee89c2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -248,23 +248,21 @@ static const struct intel_device_info
> intel_sandybridge_m_info = { .has_force_wake = 1,
>  };
>  
> +#define IVB_FEATURES  \
> +	.is_ivybridge = 1, .gen = 7, .num_pipes = 3, \
> +	.need_gfx_hws = 1, .has_hotplug = 1, \
> +	.has_bsd_ring = 1, \
> +	.has_blt_ring = 1, \
> +	.has_llc = 1, \
> +	.has_force_wake = 1
> +
>  static const struct intel_device_info intel_ivybridge_d_info = {
> -	.is_ivybridge = 1, .gen = 7, .num_pipes = 3,
> -	.need_gfx_hws = 1, .has_hotplug = 1,
> -	.has_bsd_ring = 1,
> -	.has_blt_ring = 1,
> -	.has_llc = 1,
> -	.has_force_wake = 1,
> +	IVB_FEATURES,
>  };
>  
>  static const struct intel_device_info intel_ivybridge_m_info = {
> -	.is_ivybridge = 1, .gen = 7, .is_mobile = 1, .num_pipes = 3,
> -	.need_gfx_hws = 1, .has_hotplug = 1,
> -	.has_fbc = 0,	/* FBC is not enabled on Ivybridge
> mobile yet */
> -	.has_bsd_ring = 1,
> -	.has_blt_ring = 1,
> -	.has_llc = 1,
> -	.has_force_wake = 1,
> +	IVB_FEATURES,
> +	.is_mobile = 1,
>  };
>  
>  static const struct intel_device_info intel_valleyview_m_info = {

I noticed I can use this for VLV, and HSW as well. I've modified it
locally.



More information about the Intel-gfx mailing list