[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/13] ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map
From: |
marcandre . lureau |
Subject: |
[PULL 06/13] ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map |
Date: |
Tue, 3 Oct 2023 16:35:35 +0400 |
From: Ken Xue <Ken.Xue@amd.com>
Android uses XBGR8888 and ABGR8888 as default scanout buffer, But qemu
does not support them for qemu_pixman_to_drm_format conversion within
virtio_gpu_create_dmabuf for virtio gpu.
so, add those 2 formats into drm_format_pixman_map.
Signed-off-by: Ken Xue <Ken.Xue@amd.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20230914013151.805363-1-Ken.Xue@amd.com>
---
include/ui/qemu-pixman.h | 4 ++++
ui/qemu-pixman.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index 51f8709327..e587c48b1f 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -32,6 +32,8 @@
# define PIXMAN_LE_r8g8b8 PIXMAN_b8g8r8
# define PIXMAN_LE_a8r8g8b8 PIXMAN_b8g8r8a8
# define PIXMAN_LE_x8r8g8b8 PIXMAN_b8g8r8x8
+# define PIXMAN_LE_a8b8g8r8 PIXMAN_r8g8b8a8
+# define PIXMAN_LE_x8b8g8r8 PIXMAN_r8g8b8x8
#else
# define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8
# define PIXMAN_BE_x8r8g8b8 PIXMAN_b8g8r8x8
@@ -45,6 +47,8 @@
# define PIXMAN_LE_r8g8b8 PIXMAN_r8g8b8
# define PIXMAN_LE_a8r8g8b8 PIXMAN_a8r8g8b8
# define PIXMAN_LE_x8r8g8b8 PIXMAN_x8r8g8b8
+# define PIXMAN_LE_a8b8g8r8 PIXMAN_a8b8g8r8
+# define PIXMAN_LE_x8b8g8r8 PIXMAN_x8b8g8r8
#endif
#define QEMU_PIXMAN_COLOR(r, g, b)
\
diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c
index be00a96340..b43ec38bf0 100644
--- a/ui/qemu-pixman.c
+++ b/ui/qemu-pixman.c
@@ -96,7 +96,9 @@ static const struct {
} drm_format_pixman_map[] = {
{ DRM_FORMAT_RGB888, PIXMAN_LE_r8g8b8 },
{ DRM_FORMAT_ARGB8888, PIXMAN_LE_a8r8g8b8 },
- { DRM_FORMAT_XRGB8888, PIXMAN_LE_x8r8g8b8 }
+ { DRM_FORMAT_XRGB8888, PIXMAN_LE_x8r8g8b8 },
+ { DRM_FORMAT_XBGR8888, PIXMAN_LE_x8b8g8r8 },
+ { DRM_FORMAT_ABGR8888, PIXMAN_LE_a8b8g8r8 },
};
pixman_format_code_t qemu_drm_format_to_pixman(uint32_t drm_format)
--
2.41.0
- [PULL 00/13] Misc patches, marcandre . lureau, 2023/10/03
- [PULL 01/13] input: Allow to choose console with qemu_input_is_absolute, marcandre . lureau, 2023/10/03
- [PULL 02/13] ui/console: make qemu_console_is_multihead() static, marcandre . lureau, 2023/10/03
- [PULL 04/13] ui/console: eliminate QOM properties from qemu_console_is_multihead(), marcandre . lureau, 2023/10/03
- [PULL 03/13] ui/console: only walk QemuGraphicConsoles in qemu_console_is_multihead(), marcandre . lureau, 2023/10/03
- [PULL 05/13] ui/console: sanitize search in qemu_graphic_console_is_multihead(), marcandre . lureau, 2023/10/03
- [PULL 07/13] win32: avoid discarding the exception handler, marcandre . lureau, 2023/10/03
- [PULL 06/13] ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map,
marcandre . lureau <=
- [PULL 08/13] ui/gtk: fix UI info precondition, marcandre . lureau, 2023/10/03
- [PULL 09/13] analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH, marcandre . lureau, 2023/10/03
- [PULL 10/13] hw/core: remove needless includes, marcandre . lureau, 2023/10/03
- [PULL 13/13] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected, marcandre . lureau, 2023/10/03
- [PULL 11/13] hw/pc: remove needless includes, marcandre . lureau, 2023/10/03
- [PULL 12/13] hw/display/ramfb: plug slight guest-triggerable leak on mode setting, marcandre . lureau, 2023/10/03
- Re: [PULL 00/13] Misc patches, Stefan Hajnoczi, 2023/10/05