diff mbox series

[v2,10/17] drm: Shrink mode->private_flags

Message ID 20200403204008.14864-11-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm: Put drm_display_mode on diet | expand

Commit Message

Ville Syrjälä April 3, 2020, 8:40 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

gma500 needs 4 bits (to store a pixel multiplier) in the
mode->private_flags, i915 currently has three bits defined.
No one else uses this. Reduce the size to u8.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 include/drm/drm_modes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sam Ravnborg April 7, 2020, 6:52 p.m. UTC | #1
On Fri, Apr 03, 2020 at 11:40:01PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> gma500 needs 4 bits (to store a pixel multiplier) in the
> mode->private_flags, i915 currently has three bits defined.
> No one else uses this. Reduce the size to u8.
> 
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

I see no point in this patch.
I saw your comemnt about pahole. But you could move that patch
after you nuke private_flags and you end up with the same result.
This just confuse if one dive into the commit history

	Sam

> ---
>  include/drm/drm_modes.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> index 917527eb8067..95c23f86ae0c 100644
> --- a/include/drm/drm_modes.h
> +++ b/include/drm/drm_modes.h
> @@ -378,7 +378,7 @@ struct drm_display_mode {
>  	 * by atomic drivers since they can store any additional data by
>  	 * subclassing state structures.
>  	 */
> -	int private_flags;
> +	u8 private_flags;
>  
>  	/**
>  	 * @picture_aspect_ratio:
> -- 
> 2.24.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Ville Syrjälä April 7, 2020, 7:10 p.m. UTC | #2
On Tue, Apr 07, 2020 at 08:52:05PM +0200, Sam Ravnborg wrote:
> On Fri, Apr 03, 2020 at 11:40:01PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > gma500 needs 4 bits (to store a pixel multiplier) in the
> > mode->private_flags, i915 currently has three bits defined.
> > No one else uses this. Reduce the size to u8.
> > 
> > Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> I see no point in this patch.
> I saw your comemnt about pahole. But you could move that patch
> after you nuke private_flags and you end up with the same result.
> This just confuse if one dive into the commit history

I thought I had actual numbers in the pahole patch, which would have
been invalidated by moving this. But looks like I didn't even have those
numers there (must have been in the previous cover letter). So yeah,
I guess I'll just squash this with the removal patch.

> 
> 	Sam
> 
> > ---
> >  include/drm/drm_modes.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> > index 917527eb8067..95c23f86ae0c 100644
> > --- a/include/drm/drm_modes.h
> > +++ b/include/drm/drm_modes.h
> > @@ -378,7 +378,7 @@ struct drm_display_mode {
> >  	 * by atomic drivers since they can store any additional data by
> >  	 * subclassing state structures.
> >  	 */
> > -	int private_flags;
> > +	u8 private_flags;
> >  
> >  	/**
> >  	 * @picture_aspect_ratio:
> > -- 
> > 2.24.1
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index 917527eb8067..95c23f86ae0c 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -378,7 +378,7 @@  struct drm_display_mode {
 	 * by atomic drivers since they can store any additional data by
 	 * subclassing state structures.
 	 */
-	int private_flags;
+	u8 private_flags;
 
 	/**
 	 * @picture_aspect_ratio: