diff mbox

[09/10] drm/i915: Introduce IVB_FEATURES for device definition

Message ID 1363208909-25058-1-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky March 13, 2013, 9:08 p.m. UTC
Recommended by Chris.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

Comments

Ben Widawsky March 15, 2013, 4:05 a.m. UTC | #1
On Wed, 13 Mar 2013 14:08:28 -0700
Ben Widawsky <ben@bwidawsk.net> wrote:

> Recommended by Chris.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Ben Widawsky <ben@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.
diff mbox

Patch

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 = {