mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Add 30bit RGB color format support
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> [ Michel Dänzer: * Require Xorg >= 1.19.99.1 for depth 30, otherwise it can't work with glamor * Update manpage, per radeon commit 574bfab4bf1fcd95163a8f33cea2889189429d30 ] Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
ec397f7d3b
commit
6aee5770fb
@@ -18,7 +18,7 @@ following features:
|
||||
.PD 0
|
||||
.TP 2
|
||||
\(bu
|
||||
Support for 24-bit pixel depth;
|
||||
Support for 24- and 30-bit pixel depths;
|
||||
.TP
|
||||
\(bu
|
||||
RandR support up to version 1.4;
|
||||
|
||||
@@ -42,6 +42,8 @@ amdgpu_get_gbm_format(int depth, int bitsPerPixel)
|
||||
return GBM_FORMAT_RGB565;
|
||||
case 32:
|
||||
return GBM_FORMAT_ARGB8888;
|
||||
case 30:
|
||||
return GBM_FORMAT_XRGB2101010;
|
||||
case 24:
|
||||
if (bitsPerPixel == 32)
|
||||
return GBM_FORMAT_XRGB8888;
|
||||
|
||||
@@ -120,6 +120,7 @@ amdgpu_dri2_create_buffer2(ScreenPtr pScreen,
|
||||
cpp = 2;
|
||||
break;
|
||||
case 24:
|
||||
case 30:
|
||||
cpp = 4;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1085,6 +1085,14 @@ static Bool AMDGPUPreInitVisual(ScrnInfoPtr pScrn)
|
||||
case 24:
|
||||
break;
|
||||
|
||||
case 30:
|
||||
if (xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Depth 30 requires Xorg >= 1.19.99.1\n");
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Given depth (%d) is not supported by %s driver\n",
|
||||
|
||||
Reference in New Issue
Block a user