summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZack Rusin <zack.rusin@broadcom.com>2024-04-11 22:55:11 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-27 17:13:03 +0200
commita2c3c4abced33bc1ba648549284d07bff5355dbf (patch)
tree8e0805cee527341f5be91b1f7671c81180a5dc95
parent2cdb71c975a10b8774fcd199f16f9ea88948de50 (diff)
downloadlinux-stable-a2c3c4abced33bc1ba648549284d07bff5355dbf.tar.gz
linux-stable-a2c3c4abced33bc1ba648549284d07bff5355dbf.tar.bz2
linux-stable-a2c3c4abced33bc1ba648549284d07bff5355dbf.zip
drm/vmwgfx: Sort primary plane formats by order of preference
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. Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Fixes: 36cc79bc9077 ("drm/vmwgfx: Add universal plane support") Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> Cc: dri-devel@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v4.12+ Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240412025511.78553-6-zack.rusin@broadcom.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index db81e635dc06..9fda4f4ec7a9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -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[] = {