diff mbox

[1/3] drm/i915: Nuke the cursor size defines

Message ID 20180615174406.12258-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä June 15, 2018, 5:44 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

No point in having this extra indireciton for the cursor max size.
So drop the defines and just write out the raw numbers. Makes it
easier to see what's going on.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 8 ++++----
 drivers/gpu/drm/i915/intel_drv.h     | 6 ------
 2 files changed, 4 insertions(+), 10 deletions(-)

Comments

Zanoni, Paulo R June 15, 2018, 7:49 p.m. UTC | #1
Em Sex, 2018-06-15 às 20:44 +0300, Ville Syrjala escreveu:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> No point in having this extra indireciton for the cursor max size.
> So drop the defines and just write out the raw numbers. Makes it
> easier to see what's going on.

And the gen2 definition doesn't even say "max" and the other similar
parts of the code such as buffer max width/height don't use
definitions.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 8 ++++----
>  drivers/gpu/drm/i915/intel_drv.h     | 6 ------
>  2 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 8251e189a8bb..f6655f482b67 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15054,11 +15054,11 @@ int intel_modeset_init(struct drm_device
> *dev)
>  		dev->mode_config.cursor_width = IS_I845G(dev_priv) ?
> 64 : 512;
>  		dev->mode_config.cursor_height = 1023;
>  	} else if (IS_GEN2(dev_priv)) {
> -		dev->mode_config.cursor_width = GEN2_CURSOR_WIDTH;
> -		dev->mode_config.cursor_height = GEN2_CURSOR_HEIGHT;
> +		dev->mode_config.cursor_width = 64;
> +		dev->mode_config.cursor_height = 64;
>  	} else {
> -		dev->mode_config.cursor_width = MAX_CURSOR_WIDTH;
> -		dev->mode_config.cursor_height = MAX_CURSOR_HEIGHT;
> +		dev->mode_config.cursor_width = 256;
> +		dev->mode_config.cursor_height = 256;
>  	}
>  
>  	dev->mode_config.fb_base = ggtt->gmadr.start;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h
> b/drivers/gpu/drm/i915/intel_drv.h
> index 8840108749a5..2d09f08e5e0c 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -158,12 +158,6 @@
>  #define MAX_OUTPUTS 6
>  /* maximum connectors per crtcs in the mode set */
>  
> -/* Maximum cursor sizes */
> -#define GEN2_CURSOR_WIDTH 64
> -#define GEN2_CURSOR_HEIGHT 64
> -#define MAX_CURSOR_WIDTH 256
> -#define MAX_CURSOR_HEIGHT 256
> -
>  #define INTEL_I2C_BUS_DVO 1
>  #define INTEL_I2C_BUS_SDVO 2
>
Rodrigo Vivi June 19, 2018, 10:17 p.m. UTC | #2
On Fri, Jun 15, 2018 at 08:44:04PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> No point in having this extra indireciton for the cursor max size.
> So drop the defines and just write out the raw numbers. Makes it
> easier to see what's going on.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_display.c | 8 ++++----
>  drivers/gpu/drm/i915/intel_drv.h     | 6 ------
>  2 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8251e189a8bb..f6655f482b67 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15054,11 +15054,11 @@ int intel_modeset_init(struct drm_device *dev)
>  		dev->mode_config.cursor_width = IS_I845G(dev_priv) ? 64 : 512;
>  		dev->mode_config.cursor_height = 1023;
>  	} else if (IS_GEN2(dev_priv)) {
> -		dev->mode_config.cursor_width = GEN2_CURSOR_WIDTH;
> -		dev->mode_config.cursor_height = GEN2_CURSOR_HEIGHT;
> +		dev->mode_config.cursor_width = 64;
> +		dev->mode_config.cursor_height = 64;
>  	} else {
> -		dev->mode_config.cursor_width = MAX_CURSOR_WIDTH;
> -		dev->mode_config.cursor_height = MAX_CURSOR_HEIGHT;
> +		dev->mode_config.cursor_width = 256;
> +		dev->mode_config.cursor_height = 256;
>  	}
>  
>  	dev->mode_config.fb_base = ggtt->gmadr.start;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 8840108749a5..2d09f08e5e0c 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -158,12 +158,6 @@
>  #define MAX_OUTPUTS 6
>  /* maximum connectors per crtcs in the mode set */
>  
> -/* Maximum cursor sizes */
> -#define GEN2_CURSOR_WIDTH 64
> -#define GEN2_CURSOR_HEIGHT 64
> -#define MAX_CURSOR_WIDTH 256
> -#define MAX_CURSOR_HEIGHT 256
> -
>  #define INTEL_I2C_BUS_DVO 1
>  #define INTEL_I2C_BUS_SDVO 2
>  
> -- 
> 2.16.4
> 
> _______________________________________________
> 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/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8251e189a8bb..f6655f482b67 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15054,11 +15054,11 @@  int intel_modeset_init(struct drm_device *dev)
 		dev->mode_config.cursor_width = IS_I845G(dev_priv) ? 64 : 512;
 		dev->mode_config.cursor_height = 1023;
 	} else if (IS_GEN2(dev_priv)) {
-		dev->mode_config.cursor_width = GEN2_CURSOR_WIDTH;
-		dev->mode_config.cursor_height = GEN2_CURSOR_HEIGHT;
+		dev->mode_config.cursor_width = 64;
+		dev->mode_config.cursor_height = 64;
 	} else {
-		dev->mode_config.cursor_width = MAX_CURSOR_WIDTH;
-		dev->mode_config.cursor_height = MAX_CURSOR_HEIGHT;
+		dev->mode_config.cursor_width = 256;
+		dev->mode_config.cursor_height = 256;
 	}
 
 	dev->mode_config.fb_base = ggtt->gmadr.start;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8840108749a5..2d09f08e5e0c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -158,12 +158,6 @@ 
 #define MAX_OUTPUTS 6
 /* maximum connectors per crtcs in the mode set */
 
-/* Maximum cursor sizes */
-#define GEN2_CURSOR_WIDTH 64
-#define GEN2_CURSOR_HEIGHT 64
-#define MAX_CURSOR_WIDTH 256
-#define MAX_CURSOR_HEIGHT 256
-
 #define INTEL_I2C_BUS_DVO 1
 #define INTEL_I2C_BUS_SDVO 2