diff mbox

[v2,02/21] drm/i915: Introduce GEN6_FEATURES for device info

Message ID 1469733156-14066-3-git-send-email-carlos.santa@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Santa, Carlos July 28, 2016, 7:12 p.m. UTC
Based on the GEN7_FEATURES changes from Ben W.

Use it for snb.

Signed-off-by: Carlos Santa <carlos.santa@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

Comments

Ville Syrjala July 29, 2016, 2:06 p.m. UTC | #1
On Thu, Jul 28, 2016 at 12:12:17PM -0700, Carlos Santa wrote:
> Based on the GEN7_FEATURES changes from Ben W.
> 
> Use it for snb.
> 
> Signed-off-by: Carlos Santa <carlos.santa@intel.com>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_pci.c | 26 ++++++++++++--------------
>  1 file changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 08cdeb3..8b1311d 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -194,24 +194,22 @@ static const struct intel_device_info intel_ironlake_m_info = {
>  	CURSOR_OFFSETS,
>  };
>  
> +#define GEN6_FEATURES \
> +	.gen = 6, .num_pipes = 2, \
> +	.need_gfx_hws = 1, .has_hotplug = 1, \

BTW .need_gfx_hws has been bugging me for a while now. For the other
similar things we make "physical" the exception, so I think we flip this
flag over as well. Especially as the majority of our platforms falls in
the gtt hws, not physical hws camp.

> +	.has_fbc = 1, \
> +	.ring_mask = RENDER_RING | BSD_RING | BLT_RING, \
> +	.has_llc = 1, \
> +	GEN_DEFAULT_PIPEOFFSETS, \
> +	CURSOR_OFFSETS
> +
>  static const struct intel_device_info intel_sandybridge_d_info = {
> -	.gen = 6, .num_pipes = 2,
> -	.need_gfx_hws = 1, .has_hotplug = 1,
> -	.has_fbc = 1,
> -	.ring_mask = RENDER_RING | BSD_RING | BLT_RING,
> -	.has_llc = 1,
> -	GEN_DEFAULT_PIPEOFFSETS,
> -	CURSOR_OFFSETS,
> +	GEN6_FEATURES
>  };
>  
>  static const struct intel_device_info intel_sandybridge_m_info = {
> -	.gen = 6, .is_mobile = 1, .num_pipes = 2,
> -	.need_gfx_hws = 1, .has_hotplug = 1,
> -	.has_fbc = 1,
> -	.ring_mask = RENDER_RING | BSD_RING | BLT_RING,
> -	.has_llc = 1,
> -	GEN_DEFAULT_PIPEOFFSETS,
> -	CURSOR_OFFSETS,
> +	GEN6_FEATURES,
> +	.is_mobile = 1
>  };
>  
>  #define GEN7_FEATURES  \
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson July 29, 2016, 3:39 p.m. UTC | #2
On Fri, Jul 29, 2016 at 05:06:13PM +0300, Ville Syrjälä wrote:
> On Thu, Jul 28, 2016 at 12:12:17PM -0700, Carlos Santa wrote:
> > Based on the GEN7_FEATURES changes from Ben W.
> > 
> > Use it for snb.
> > 
> > Signed-off-by: Carlos Santa <carlos.santa@intel.com>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_pci.c | 26 ++++++++++++--------------
> >  1 file changed, 12 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> > index 08cdeb3..8b1311d 100644
> > --- a/drivers/gpu/drm/i915/i915_pci.c
> > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > @@ -194,24 +194,22 @@ static const struct intel_device_info intel_ironlake_m_info = {
> >  	CURSOR_OFFSETS,
> >  };
> >  
> > +#define GEN6_FEATURES \
> > +	.gen = 6, .num_pipes = 2, \
> > +	.need_gfx_hws = 1, .has_hotplug = 1, \
> 
> BTW .need_gfx_hws has been bugging me for a while now. For the other
> similar things we make "physical" the exception, so I think we flip this
> flag over as well. Especially as the majority of our platforms falls in
> the gtt hws, not physical hws camp.

Yes. Very much please. need_phys_* should be the exception.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 08cdeb3..8b1311d 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -194,24 +194,22 @@  static const struct intel_device_info intel_ironlake_m_info = {
 	CURSOR_OFFSETS,
 };
 
+#define GEN6_FEATURES \
+	.gen = 6, .num_pipes = 2, \
+	.need_gfx_hws = 1, .has_hotplug = 1, \
+	.has_fbc = 1, \
+	.ring_mask = RENDER_RING | BSD_RING | BLT_RING, \
+	.has_llc = 1, \
+	GEN_DEFAULT_PIPEOFFSETS, \
+	CURSOR_OFFSETS
+
 static const struct intel_device_info intel_sandybridge_d_info = {
-	.gen = 6, .num_pipes = 2,
-	.need_gfx_hws = 1, .has_hotplug = 1,
-	.has_fbc = 1,
-	.ring_mask = RENDER_RING | BSD_RING | BLT_RING,
-	.has_llc = 1,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
+	GEN6_FEATURES
 };
 
 static const struct intel_device_info intel_sandybridge_m_info = {
-	.gen = 6, .is_mobile = 1, .num_pipes = 2,
-	.need_gfx_hws = 1, .has_hotplug = 1,
-	.has_fbc = 1,
-	.ring_mask = RENDER_RING | BSD_RING | BLT_RING,
-	.has_llc = 1,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
+	GEN6_FEATURES,
+	.is_mobile = 1
 };
 
 #define GEN7_FEATURES  \