diff mbox

[v3,15/21] drm/i915: Introduce GEN2_FEATURES for device info

Message ID 1470768327-14932-16-git-send-email-carlos.santa@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Santa, Carlos Aug. 9, 2016, 6:45 p.m. UTC
Based on the GEN7_FEATURES changes from Ben W.

Use it for 830, 845g, i85x, i865g.

Signed-off-by: Carlos Santa <carlos.santa@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

Comments

Rodrigo Vivi Aug. 15, 2016, 8:44 p.m. UTC | #1
On Tue, Aug 09, 2016 at 11:45:21AM -0700, Carlos Santa wrote:
> Based on the GEN7_FEATURES changes from Ben W.
>

same as others

> Use it for 830, 845g, i85x, i865g.
> 
> Signed-off-by: Carlos Santa <carlos.santa@intel.com>


> ---
>  drivers/gpu/drm/i915/i915_pci.c | 37 ++++++++++++++++---------------------
>  1 file changed, 16 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 2f65898..3cd0d8f 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -54,38 +54,33 @@
>  #define CHV_COLORS \
>  	.color = { .degamma_lut_size = 65, .gamma_lut_size = 257 }
>  
> +#define GEN2_FEATURES \
> +	.gen = 2, \
> +	.has_overlay = 1, .overlay_needs_physical = 1, \
> +	.ring_mask = RENDER_RING, \
> +	GEN_DEFAULT_PIPEOFFSETS, \
> +	CURSOR_OFFSETS
> +
>  static const struct intel_device_info intel_i830_info = {
> -	.gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
> -	.has_overlay = 1, .overlay_needs_physical = 1,
> -	.ring_mask = RENDER_RING,
> -	GEN_DEFAULT_PIPEOFFSETS,
> -	CURSOR_OFFSETS,
> +	GEN2_FEATURES,
> +	.is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,

maybe GEN2_FEATURES should define num_pipes = 1 and this overwrites it, like you have the ring in gen3 or gen4...

anyways:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

>  };
>  
>  static const struct intel_device_info intel_845g_info = {
> -	.gen = 2, .num_pipes = 1,
> -	.has_overlay = 1, .overlay_needs_physical = 1,
> -	.ring_mask = RENDER_RING,
> -	GEN_DEFAULT_PIPEOFFSETS,
> -	CURSOR_OFFSETS,
> +	GEN2_FEATURES,
> +	.num_pipes = 1,
>  };
>  
>  static const struct intel_device_info intel_i85x_info = {
> -	.gen = 2, .is_i85x = 1, .is_mobile = 1, .num_pipes = 2,
> -	.cursor_needs_physical = 1,
> -	.has_overlay = 1, .overlay_needs_physical = 1,
> +	GEN2_FEATURES,
> +	.is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
> +	.is_i85x = 1,
>  	.has_fbc = 1,
> -	.ring_mask = RENDER_RING,
> -	GEN_DEFAULT_PIPEOFFSETS,
> -	CURSOR_OFFSETS,
>  };
>  
>  static const struct intel_device_info intel_i865g_info = {
> -	.gen = 2, .num_pipes = 1,
> -	.has_overlay = 1, .overlay_needs_physical = 1,
> -	.ring_mask = RENDER_RING,
> -	GEN_DEFAULT_PIPEOFFSETS,
> -	CURSOR_OFFSETS,
> +	GEN2_FEATURES,
> +	.num_pipes = 1,
>  };
>  
>  #define GEN3_FEATURES \
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 2f65898..3cd0d8f 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -54,38 +54,33 @@ 
 #define CHV_COLORS \
 	.color = { .degamma_lut_size = 65, .gamma_lut_size = 257 }
 
+#define GEN2_FEATURES \
+	.gen = 2, \
+	.has_overlay = 1, .overlay_needs_physical = 1, \
+	.ring_mask = RENDER_RING, \
+	GEN_DEFAULT_PIPEOFFSETS, \
+	CURSOR_OFFSETS
+
 static const struct intel_device_info intel_i830_info = {
-	.gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
-	.has_overlay = 1, .overlay_needs_physical = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
+	GEN2_FEATURES,
+	.is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
 };
 
 static const struct intel_device_info intel_845g_info = {
-	.gen = 2, .num_pipes = 1,
-	.has_overlay = 1, .overlay_needs_physical = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
+	GEN2_FEATURES,
+	.num_pipes = 1,
 };
 
 static const struct intel_device_info intel_i85x_info = {
-	.gen = 2, .is_i85x = 1, .is_mobile = 1, .num_pipes = 2,
-	.cursor_needs_physical = 1,
-	.has_overlay = 1, .overlay_needs_physical = 1,
+	GEN2_FEATURES,
+	.is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
+	.is_i85x = 1,
 	.has_fbc = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
 };
 
 static const struct intel_device_info intel_i865g_info = {
-	.gen = 2, .num_pipes = 1,
-	.has_overlay = 1, .overlay_needs_physical = 1,
-	.ring_mask = RENDER_RING,
-	GEN_DEFAULT_PIPEOFFSETS,
-	CURSOR_OFFSETS,
+	GEN2_FEATURES,
+	.num_pipes = 1,
 };
 
 #define GEN3_FEATURES \