xf86-video-amdgpu: Branch 'master'
Michel Dänzer
daenzer at kemper.freedesktop.org
Tue Jan 23 10:26:30 UTC 2018
configure.ac | 2 +-
src/amdgpu_glamor.c | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 348023cea43e0474352df0c2aa6345eb0b25c2f7
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Mon Jan 22 18:23:18 2018 +0100
Fix linear check in amdgpu_glamor_share_pixmap_backing
We were incorrectly interpreting the tiling information.
Reported-by: Marek Olšák <marek.olsak at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
diff --git a/configure.ac b/configure.ac
index 02e19aa..ea41f41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 4d97887..6efc372 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -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
More information about the xorg-commit
mailing list