[PATCH 3/3] Support exa screen color depth 30 on Linux 3.16 and later.

Michel Dänzer michel at daenzer.net
Tue Dec 19 09:05:27 UTC 2017


On 2017-12-18 11:36 PM, Mario Kleiner wrote:
> 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.
> 
> Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
> ---
>  man/radeon.man   |  3 ++-
>  src/radeon_kms.c | 17 +++++++++++++++++
>  2 files changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/man/radeon.man b/man/radeon.man
> index f4441c4..d888ac0 100644
> --- a/man/radeon.man
> +++ b/man/radeon.man
> @@ -18,7 +18,8 @@ following features:
>  .PD 0
>  .TP 2
>  \(bu
> -Full support for 8-, 15-, 16- and 24-bit pixel depths;
> +Full support for 8-, 15-, 16- and 24-bit pixel depths, and for 30-bit depth on Linux 3.16
> +and later with exa acceleration;

"EXA" (acronyms should be spelled with capital letters)


> @@ -1763,6 +1764,22 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
>  
>      if (!RADEONPreInitAccel_KMS(pScrn))              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;
> +    }
> +
> +    /* Depth 30 not yet supported under glamor. */
> +    if ((pScrn->depth == 30) && info->use_glamor) {

There's no need for the nested parentheses in the tests.


> +	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
> +		   "Given depth (%d) is not supported under glamor accel. Select exa.\n",
> +		   pScrn->depth);
> +	goto fail;
> +    }

I'd check for glamor first, so that users with GCN cards don't upgrade
their kernel just to find out that it doesn't work with glamor anyway.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list