aboutsummaryrefslogtreecommitdiff
path: root/ui/qemu-pixman.c
diff options
context:
space:
mode:
authorKen Xue <Ken.Xue@amd.com>2023-09-14 09:31:51 +0800
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-10-03 15:04:56 +0400
commit7db57a73f66463488fbd53fe5f9589de49534fe8 (patch)
tree516e116d70b5886f3b070ef39d5d25d4ae6354b5 /ui/qemu-pixman.c
parent65d7ceb49b434d578cee61467c009cb16a794b16 (diff)
downloadqemu-7db57a73f66463488fbd53fe5f9589de49534fe8.zip
qemu-7db57a73f66463488fbd53fe5f9589de49534fe8.tar.gz
qemu-7db57a73f66463488fbd53fe5f9589de49534fe8.tar.bz2
ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map
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>
Diffstat (limited to 'ui/qemu-pixman.c')
-rw-r--r--ui/qemu-pixman.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c
index be00a96..b43ec38 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)