Skip to contentSkip to conversation

Patch "drm/vmwgfx: Sort primary plane formats by order of preference" has been added to the 6.8-stable tree

PATCH [email protected] 1 participant 1 message Apr 23, 2024

Subsystems (3)
lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/vmwgfx: Sort primary plane formats by order of preference

to the 6.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-vmwgfx-sort-primary-plane-formats-by-order-of-preference.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From d4c972bff3129a9dd4c22a3999fd8eba1a81531a Mon Sep 17 00:00:00 2001
From: Zack Rusin <[email protected]>
Date: Thu, 11 Apr 2024 22:55:11 -0400
Subject: drm/vmwgfx: Sort primary plane formats by order of preference

From: Zack Rusin <[email protected]>

commit d4c972bff3129a9dd4c22a3999fd8eba1a81531a upstream.

The table of primary plane formats wasn't sorted at all, leading to applications picking our least desirable formats by defaults.

Sort the primary plane formats according to our order of preference.

Nice side-effect of this change is that it makes IGT's kms_atomic plane-invalid-params pass because the test picks the first format which for vmwgfx was DRM_FORMAT_XRGB1555 and uses fb's with odd sizes which make Pixman, which IGT depends on assert due to the fact that our 16bpp formats aren't 32 bit aligned like Pixman requires all formats to be.

Fixes 36cc79bc9077 ("drm/vmwgfx: Add universal plane support")
Cc Broadcom internal kernel review list <[email protected]>
Cc <[email protected]> # v4.12+
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +2 -2
@@ -243,10 +243,10 @@ struct vmw_framebuffer_bo {
 
 
 static const uint32_t __maybe_unused vmw_primary_plane_formats[] = {
-	DRM_FORMAT_XRGB1555,
-	DRM_FORMAT_RGB565,
 	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_ARGB8888,
+	DRM_FORMAT_RGB565,
+	DRM_FORMAT_XRGB1555,
 };
 
 static const uint32_t __maybe_unused vmw_cursor_plane_formats[] = {

Patches currently in stable-queue which might be from [email protected] are

queue-6.8/drm-vmwgfx-fix-prime-import-export.patch queue-6.8/drm-vmwgfx-sort-primary-plane-formats-by-order-of-preference.patch queue-6.8/drm-vmwgfx-fix-crtc-s-atomic-check-conditional.patch