[06/10] drm/i915: Don't use the intel_ prefix for gen-specific data
diff mbox

Message ID 1431443602-22886-7-git-send-email-damien.lespiau@intel.com
State New
Headers show

Commit Message

Lespiau, Damien May 12, 2015, 3:13 p.m. UTC
We now prefix our functions/enums/data with the first platform it has
been introduced. Do that for the primary plane formats.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Daniel Vetter May 12, 2015, 4:04 p.m. UTC | #1
On Tue, May 12, 2015 at 04:13:18PM +0100, Damien Lespiau wrote:
> We now prefix our functions/enums/data with the first platform it has
> been introduced. Do that for the primary plane formats.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index dadb52a..8adf3bf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -53,14 +53,14 @@
>  	DRM_FORMAT_ARGB8888
>  
>  /* Primary plane formats for gen <= 3 */
> -static const uint32_t intel_primary_formats_gen2[] = {
> +static const uint32_t gen2_primary_formats[] = {

i8xx_

>  	COMMON_PRIMARY_FORMATS,
>  	DRM_FORMAT_XRGB1555,
>  	DRM_FORMAT_ARGB1555,
>  };
>  
>  /* Primary plane formats for gen >= 4 */
> -static const uint32_t intel_primary_formats_gen4[] = {
> +static const uint32_t gen4_primary_formats[] = {

i965_

Generally we use genX_ for the GT side of things and these iXXX_ names for
display (before ironlake) and codenames like ilk_/skl_ afterwards.
Exceptions do occur, but I think it'd be nice to be consistent here.

Merged all the preeceding patches to dinq, thanks.
-Daniel

>  	COMMON_PRIMARY_FORMATS, \
>  	DRM_FORMAT_XBGR8888,
>  	DRM_FORMAT_ABGR8888,
> @@ -13288,11 +13288,11 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
>  		primary->plane = !pipe;
>  
>  	if (INTEL_INFO(dev)->gen <= 3) {
> -		intel_primary_formats = intel_primary_formats_gen2;
> -		num_formats = ARRAY_SIZE(intel_primary_formats_gen2);
> +		intel_primary_formats = gen2_primary_formats;
> +		num_formats = ARRAY_SIZE(gen2_primary_formats);
>  	} else {
> -		intel_primary_formats = intel_primary_formats_gen4;
> -		num_formats = ARRAY_SIZE(intel_primary_formats_gen4);
> +		intel_primary_formats = gen4_primary_formats;
> +		num_formats = ARRAY_SIZE(gen4_primary_formats);
>  	}
>  
>  	drm_universal_plane_init(dev, &primary->base, 0,
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter May 12, 2015, 4:09 p.m. UTC | #2
On Tue, May 12, 2015 at 06:04:56PM +0200, Daniel Vetter wrote:
> On Tue, May 12, 2015 at 04:13:18PM +0100, Damien Lespiau wrote:
> > We now prefix our functions/enums/data with the first platform it has
> > been introduced. Do that for the primary plane formats.
> > 
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index dadb52a..8adf3bf 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -53,14 +53,14 @@
> >  	DRM_FORMAT_ARGB8888
> >  
> >  /* Primary plane formats for gen <= 3 */
> > -static const uint32_t intel_primary_formats_gen2[] = {
> > +static const uint32_t gen2_primary_formats[] = {
> 
> i8xx_
> 
> >  	COMMON_PRIMARY_FORMATS,
> >  	DRM_FORMAT_XRGB1555,
> >  	DRM_FORMAT_ARGB1555,
> >  };
> >  
> >  /* Primary plane formats for gen >= 4 */
> > -static const uint32_t intel_primary_formats_gen4[] = {
> > +static const uint32_t gen4_primary_formats[] = {
> 
> i965_
> 
> Generally we use genX_ for the GT side of things and these iXXX_ names for
> display (before ironlake) and codenames like ilk_/skl_ afterwards.
> Exceptions do occur, but I think it'd be nice to be consistent here.
> 
> Merged all the preeceding patches to dinq, thanks.

Well used sed to repaint and applied directly. Please scream if you
dislike ;-)
-Daniel

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dadb52a..8adf3bf 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -53,14 +53,14 @@ 
 	DRM_FORMAT_ARGB8888
 
 /* Primary plane formats for gen <= 3 */
-static const uint32_t intel_primary_formats_gen2[] = {
+static const uint32_t gen2_primary_formats[] = {
 	COMMON_PRIMARY_FORMATS,
 	DRM_FORMAT_XRGB1555,
 	DRM_FORMAT_ARGB1555,
 };
 
 /* Primary plane formats for gen >= 4 */
-static const uint32_t intel_primary_formats_gen4[] = {
+static const uint32_t gen4_primary_formats[] = {
 	COMMON_PRIMARY_FORMATS, \
 	DRM_FORMAT_XBGR8888,
 	DRM_FORMAT_ABGR8888,
@@ -13288,11 +13288,11 @@  static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
 		primary->plane = !pipe;
 
 	if (INTEL_INFO(dev)->gen <= 3) {
-		intel_primary_formats = intel_primary_formats_gen2;
-		num_formats = ARRAY_SIZE(intel_primary_formats_gen2);
+		intel_primary_formats = gen2_primary_formats;
+		num_formats = ARRAY_SIZE(gen2_primary_formats);
 	} else {
-		intel_primary_formats = intel_primary_formats_gen4;
-		num_formats = ARRAY_SIZE(intel_primary_formats_gen4);
+		intel_primary_formats = gen4_primary_formats;
+		num_formats = ARRAY_SIZE(gen4_primary_formats);
 	}
 
 	drm_universal_plane_init(dev, &primary->base, 0,