summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2018-01-22 03:14:37 +0100
committerMichel Dänzer <michel.daenzer@amd.com>2018-01-22 12:11:25 +0100
commit574bfab4bf1fcd95163a8f33cea2889189429d30 (patch)
treef42c7213850b327085790fbe4fae80d6b1e11afc /src/radeon_kms.c
parentee7e6c25989e4faf1adfa4754b7edd5a9a4722ce (diff)
Support exa screen color depth 30 on Linux 3.16 and later. (v2)
Linux 3.16's radeon-kms introduced 10 bpc fb support. Currently, as of X-Server 1.19, this works with exa accel, but not yet when using glamor acceleration. v2: Style fixes, check for glamor first, as suggested by Michel. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index c1f885eb..bac98cb6 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1250,6 +1250,7 @@ static Bool RADEONPreInitVisual(ScrnInfoPtr pScrn)
case 15:
case 16:
case 24:
+ case 30:
break;
default:
@@ -1765,6 +1766,22 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
if (!RADEONPreInitAccel_KMS(pScrn)) goto fail;
+ /* Depth 30 not yet supported under glamor. */
+ if (pScrn->depth == 30 && info->use_glamor) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Given depth (%d) is not supported under GLAMOR accel. Select EXA.\n",
+ pScrn->depth);
+ goto fail;
+ }
+
+ /* Depth 30 only supported since Linux 3.16 / kms driver minor version 39 */
+ if (pScrn->depth == 30 && info->dri2.pKernelDRMVersion->version_minor < 39) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Given depth (%d) is not supported. Kernel too old. Needs Linux 3.16+\n",
+ pScrn->depth);
+ goto fail;
+ }
+
radeon_drm_queue_init();
info->allowColorTiling2D = FALSE;