Skip to content

Commit d4c972b

Browse files
committed
drm/vmwgfx: Sort primary plane formats by order of preference
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 <[email protected]> Fixes: 36cc79b ("drm/vmwgfx: Add universal plane support") Cc: Broadcom internal kernel review list <[email protected]> Cc: [email protected] Cc: <[email protected]> # v4.12+ Acked-by: Pekka Paalanen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a60ccad commit d4c972b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_kms.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ struct vmw_framebuffer_bo {
243243

244244

245245
static const uint32_t __maybe_unused vmw_primary_plane_formats[] = {
246-
DRM_FORMAT_XRGB1555,
247-
DRM_FORMAT_RGB565,
248246
DRM_FORMAT_XRGB8888,
249247
DRM_FORMAT_ARGB8888,
248+
DRM_FORMAT_RGB565,
249+
DRM_FORMAT_XRGB1555,
250250
};
251251

252252
static const uint32_t __maybe_unused vmw_cursor_plane_formats[] = {

0 commit comments

Comments
 (0)