mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Fix linear check in amdgpu_glamor_share_pixmap_backing
We were incorrectly interpreting the tiling information. Reported-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
69e20839bf
commit
348023cea4
@@ -71,7 +71,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.78])
|
||||
PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu >= 2.4.72])
|
||||
PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu >= 2.4.76])
|
||||
PKG_CHECK_MODULES(GBM, [gbm])
|
||||
|
||||
# Obtain compiler/linker options for the driver dependencies
|
||||
|
||||
@@ -323,13 +323,21 @@ amdgpu_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave,
|
||||
void **handle_p)
|
||||
{
|
||||
ScreenPtr screen = pixmap->drawable.pScreen;
|
||||
AMDGPUInfoPtr info = AMDGPUPTR(xf86ScreenToScrn(screen));
|
||||
uint64_t tiling_info;
|
||||
CARD16 stride;
|
||||
CARD32 size;
|
||||
Bool is_linear;
|
||||
int fd;
|
||||
|
||||
tiling_info = amdgpu_pixmap_get_tiling_info(pixmap);
|
||||
if (AMDGPU_TILING_GET(tiling_info, ARRAY_MODE) != 0) {
|
||||
|
||||
if (info->family >= AMDGPU_FAMILY_AI)
|
||||
is_linear = AMDGPU_TILING_GET(tiling_info, SWIZZLE_MODE) == 0;
|
||||
else
|
||||
is_linear = AMDGPU_TILING_GET(tiling_info, ARRAY_MODE) == 1;
|
||||
|
||||
if (!is_linear) {
|
||||
PixmapPtr linear;
|
||||
|
||||
/* We don't want to re-allocate the screen pixmap as
|
||||
|
||||
Reference in New Issue
Block a user