summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorYuriy Vasilev <uuvasiliev@yandex.ru>2020-03-06 20:22:19 +0300
committerAdam Jackson <ajax@redhat.com>2020-03-13 16:42:30 -0400
commit5b9010fa6b0ab0971dddf5108d5a5046c05180b0 (patch)
tree88ecd29600ba92c710c1c1e78cadcf35b5d06e16 /hw/xfree86
parent8315fc4ea2e04598ce0c7e9771786a9334f0d456 (diff)
modesetting: add support for GBM_FORMAT_ARGB1555
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Yuriy Vasilev <uuvasiliev@yandex.ru>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index fe1b43d06..8e6b697c4 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1022,12 +1022,20 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
#endif
uint32_t format;
- if (drmmode->scrn->depth == 30)
- format = GBM_FORMAT_ARGB2101010;
- else if (drmmode->scrn->depth == 16)
+ switch (drmmode->scrn->depth) {
+ case 15:
+ format = GBM_FORMAT_ARGB1555;
+ break;
+ case 16:
format = GBM_FORMAT_RGB565;
- else
+ break;
+ case 30:
+ format = GBM_FORMAT_ARGB2101010;
+ break;
+ default:
format = GBM_FORMAT_ARGB8888;
+ break;
+ }
#ifdef GBM_BO_WITH_MODIFIERS
num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers,