]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Sort format arrays consistently
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 31 Oct 2019 16:56:51 +0000 (18:56 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 4 Nov 2019 15:59:06 +0000 (17:59 +0200)
Let's try to keep the pixel format arrays somewhat sorted:
1. RGB before YUV
2. smaller bpp before larger bpp
3. X before A
4. RGB before BGR

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191031165652.10868-7-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_sprite.c

index 512c797bfc696601096fd4470f449d5e564684f5..5f3b9b423e27770273cc891bd4a3ba10045275b4 100644 (file)
@@ -85,8 +85,8 @@
 /* Primary plane formats for gen <= 3 */
 static const u32 i8xx_primary_formats[] = {
        DRM_FORMAT_C8,
-       DRM_FORMAT_RGB565,
        DRM_FORMAT_XRGB1555,
+       DRM_FORMAT_RGB565,
        DRM_FORMAT_XRGB8888,
 };
 
index b30deef9e39d1a5d91242836422219ae69b3f29a..d7f71fa90659076d64064f3f2ce227a0db9fcbe3 100644 (file)
@@ -2389,10 +2389,10 @@ static const u32 snb_plane_formats[] = {
 static const u32 vlv_plane_formats[] = {
        DRM_FORMAT_C8,
        DRM_FORMAT_RGB565,
-       DRM_FORMAT_ABGR8888,
-       DRM_FORMAT_ARGB8888,
-       DRM_FORMAT_XBGR8888,
        DRM_FORMAT_XRGB8888,
+       DRM_FORMAT_XBGR8888,
+       DRM_FORMAT_ARGB8888,
+       DRM_FORMAT_ABGR8888,
        DRM_FORMAT_XBGR2101010,
        DRM_FORMAT_ABGR2101010,
        DRM_FORMAT_YUYV,