[PATCH xserver 7/7] modesetting: Enable screen color depth 30 support.
Mario Kleiner
mario.kleiner.de at gmail.com
Tue Feb 27 02:05:32 UTC 2018
glamor now supports depth 30, so allow use of it.
Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Antoine Martin <antoine at nagafix.co.uk>
---
hw/xfree86/drivers/modesetting/driver.c | 1 +
hw/xfree86/drivers/modesetting/drmmode_display.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 4c6726c..7dce56e 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -934,6 +934,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
case 15:
case 16:
case 24:
+ case 30:
break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 53a2452..7fe16c4 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -156,7 +156,8 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
#ifdef GLAMOR_HAS_GBM
if (drmmode->glamor) {
bo->gbm = gbm_bo_create(drmmode->gbm, width, height,
- GBM_FORMAT_ARGB8888,
+ drmmode->scrn->depth == 30 ?
+ GBM_FORMAT_ARGB2101010 : GBM_FORMAT_ARGB8888,
GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT);
return bo->gbm != NULL;
}
--
2.7.4
More information about the xorg-devel
mailing list