summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorYuriy Vasilev <uuvasiliev@yandex.ru>2020-03-05 17:02:26 +0300
committerAdam Jackson <ajax@redhat.com>2020-03-13 16:42:06 -0400
commit8315fc4ea2e04598ce0c7e9771786a9334f0d456 (patch)
tree8e1e586010662f94cb25f2034a26dd8064f43be6 /hw
parent3d6efc4aaff80301c0b10b7b6ba297eb5e54c1a0 (diff)
modesetting: add support for GBM_FORMAT_RGB565
This allow x-server to run with -depth 16. Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Yuriy Vasilev <uuvasiliev@yandex.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 27ad75049..fe1b43d06 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1024,6 +1024,8 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
if (drmmode->scrn->depth == 30)
format = GBM_FORMAT_ARGB2101010;
+ else if (drmmode->scrn->depth == 16)
+ format = GBM_FORMAT_RGB565;
else
format = GBM_FORMAT_ARGB8888;