diff mbox

[1/4] drm/i915: Remove the COMMON_PRIMARY_FORMATS defines

Message ID 1431713163-23900-2-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien May 15, 2015, 6:06 p.m. UTC
That define makes it hard to figure out what is the actual list of
formats at a glance. Expand it then.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

Comments

Ville Syrjälä May 15, 2015, 6:41 p.m. UTC | #1
On Fri, May 15, 2015 at 07:06:00PM +0100, Damien Lespiau wrote:
> That define makes it hard to figure out what is the actual list of
> formats at a glance. Expand it then.
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 23765d2..b7e9ae3 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -45,24 +45,23 @@
>  #include <drm/drm_rect.h>
>  #include <linux/dma_remapping.h>
>  
> -/* Primary plane formats supported by all gen */
> -#define COMMON_PRIMARY_FORMATS \
> -	DRM_FORMAT_C8, \
> -	DRM_FORMAT_RGB565, \
> -	DRM_FORMAT_XRGB8888, \
> -	DRM_FORMAT_ARGB8888
> -
>  /* Primary plane formats for gen <= 3 */
>  static const uint32_t i8xx_primary_formats[] = {
> -	COMMON_PRIMARY_FORMATS,
> +	DRM_FORMAT_C8,
> +	DRM_FORMAT_RGB565,
>  	DRM_FORMAT_XRGB1555,
>  	DRM_FORMAT_ARGB1555,
> +	DRM_FORMAT_XRGB8888,
> +	DRM_FORMAT_ARGB8888,
>  };
>  
>  /* Primary plane formats for gen >= 4 */
>  static const uint32_t i965_primary_formats[] = {
> -	COMMON_PRIMARY_FORMATS, \
> +	DRM_FORMAT_C8,
> +	DRM_FORMAT_RGB565,
> +	DRM_FORMAT_XRGB8888,
>  	DRM_FORMAT_XBGR8888,
> +	DRM_FORMAT_ARGB8888,
>  	DRM_FORMAT_ABGR8888,
>  	DRM_FORMAT_XRGB2101010,
>  	DRM_FORMAT_ARGB2101010,
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://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 23765d2..b7e9ae3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -45,24 +45,23 @@ 
 #include <drm/drm_rect.h>
 #include <linux/dma_remapping.h>
 
-/* Primary plane formats supported by all gen */
-#define COMMON_PRIMARY_FORMATS \
-	DRM_FORMAT_C8, \
-	DRM_FORMAT_RGB565, \
-	DRM_FORMAT_XRGB8888, \
-	DRM_FORMAT_ARGB8888
-
 /* Primary plane formats for gen <= 3 */
 static const uint32_t i8xx_primary_formats[] = {
-	COMMON_PRIMARY_FORMATS,
+	DRM_FORMAT_C8,
+	DRM_FORMAT_RGB565,
 	DRM_FORMAT_XRGB1555,
 	DRM_FORMAT_ARGB1555,
+	DRM_FORMAT_XRGB8888,
+	DRM_FORMAT_ARGB8888,
 };
 
 /* Primary plane formats for gen >= 4 */
 static const uint32_t i965_primary_formats[] = {
-	COMMON_PRIMARY_FORMATS, \
+	DRM_FORMAT_C8,
+	DRM_FORMAT_RGB565,
+	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_XBGR8888,
+	DRM_FORMAT_ARGB8888,
 	DRM_FORMAT_ABGR8888,
 	DRM_FORMAT_XRGB2101010,
 	DRM_FORMAT_ARGB2101010,