diff mbox

[7/7] drm: Remove some unused stuff from drm_plane

Message ID 1368006922-24957-8-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjala May 8, 2013, 9:55 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

There's a bunch of unused members inside drm_plane, bloating the size of
the structure needlessly. Eliminate them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_crtc.c |  2 +-
 include/drm/drm_crtc.h     | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

Comments

Laurent Pinchart May 8, 2013, 12:41 p.m. UTC | #1
Hi Ville,

Thank you for the patch.

On Wednesday 08 May 2013 12:55:22 ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> There's a bunch of unused members inside drm_plane, bloating the size of
> the structure needlessly. Eliminate them.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_crtc.c |  2 +-
>  include/drm/drm_crtc.h     | 10 ----------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index d7c449f..e591914 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1739,7 +1739,7 @@ int drm_mode_getplane(struct drm_device *dev, void
> *data,
> 
>  	plane_resp->plane_id = plane->base.id;
>  	plane_resp->possible_crtcs = plane->possible_crtcs;
> -	plane_resp->gamma_size = plane->gamma_size;
> +	plane_resp->gamma_size = 0;
> 
>  	/*
>  	 * This ioctl is called twice, once to determine how much space is
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index adb3f9b..99420c4 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -654,9 +654,6 @@ struct drm_plane_funcs {
>   * @format_count: number of formats supported
>   * @crtc: currently bound CRTC
>   * @fb: currently bound fb
> - * @gamma_size: size of gamma table
> - * @gamma_store: gamma correction table
> - * @enabled: enabled flag
>   * @funcs: helper functions
>   * @helper_private: storage for drver layer

Shouldn't the above line be removed as well ?

>   * @properties: property tracking for this plane
> @@ -674,14 +671,7 @@ struct drm_plane {
>  	struct drm_crtc *crtc;
>  	struct drm_framebuffer *fb;
> 
> -	/* CRTC gamma size for reporting to userspace */
> -	uint32_t gamma_size;
> -	uint16_t *gamma_store;
> -
> -	bool enabled;
> -
>  	const struct drm_plane_funcs *funcs;
> -	void *helper_private;
> 
>  	struct drm_object_properties properties;
>  };
Imre Deak May 23, 2013, 1:38 p.m. UTC | #2
On Wed, 2013-05-08 at 12:55 +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> There's a bunch of unused members inside drm_plane, bloating the size of
> the structure needlessly. Eliminate them.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

On the series:
Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/drm_crtc.c |  2 +-
>  include/drm/drm_crtc.h     | 10 ----------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index d7c449f..e591914 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1739,7 +1739,7 @@ int drm_mode_getplane(struct drm_device *dev, void *data,
>  
>  	plane_resp->plane_id = plane->base.id;
>  	plane_resp->possible_crtcs = plane->possible_crtcs;
> -	plane_resp->gamma_size = plane->gamma_size;
> +	plane_resp->gamma_size = 0;
>  
>  	/*
>  	 * This ioctl is called twice, once to determine how much space is
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index adb3f9b..99420c4 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -654,9 +654,6 @@ struct drm_plane_funcs {
>   * @format_count: number of formats supported
>   * @crtc: currently bound CRTC
>   * @fb: currently bound fb
> - * @gamma_size: size of gamma table
> - * @gamma_store: gamma correction table
> - * @enabled: enabled flag
>   * @funcs: helper functions
>   * @helper_private: storage for drver layer
>   * @properties: property tracking for this plane
> @@ -674,14 +671,7 @@ struct drm_plane {
>  	struct drm_crtc *crtc;
>  	struct drm_framebuffer *fb;
>  
> -	/* CRTC gamma size for reporting to userspace */
> -	uint32_t gamma_size;
> -	uint16_t *gamma_store;
> -
> -	bool enabled;
> -
>  	const struct drm_plane_funcs *funcs;
> -	void *helper_private;
>  
>  	struct drm_object_properties properties;
>  };
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index d7c449f..e591914 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1739,7 +1739,7 @@  int drm_mode_getplane(struct drm_device *dev, void *data,
 
 	plane_resp->plane_id = plane->base.id;
 	plane_resp->possible_crtcs = plane->possible_crtcs;
-	plane_resp->gamma_size = plane->gamma_size;
+	plane_resp->gamma_size = 0;
 
 	/*
 	 * This ioctl is called twice, once to determine how much space is
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index adb3f9b..99420c4 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -654,9 +654,6 @@  struct drm_plane_funcs {
  * @format_count: number of formats supported
  * @crtc: currently bound CRTC
  * @fb: currently bound fb
- * @gamma_size: size of gamma table
- * @gamma_store: gamma correction table
- * @enabled: enabled flag
  * @funcs: helper functions
  * @helper_private: storage for drver layer
  * @properties: property tracking for this plane
@@ -674,14 +671,7 @@  struct drm_plane {
 	struct drm_crtc *crtc;
 	struct drm_framebuffer *fb;
 
-	/* CRTC gamma size for reporting to userspace */
-	uint32_t gamma_size;
-	uint16_t *gamma_store;
-
-	bool enabled;
-
 	const struct drm_plane_funcs *funcs;
-	void *helper_private;
 
 	struct drm_object_properties properties;
 };