Fix linear check in amdgpu_glamor_share_pixmap_backing
PATCH 1/1 Fix linear check in amdgpu_glamor_share_pixmap_backing
From: Michel Dänzer <[email protected]>
We were incorrectly interpreting the tiling information.
--- configure.ac | 2 +- src/amdgpu_glamor.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-)
configure.ac +1 -1
@@ -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
src/amdgpu_glamor.c +10 -1
@@ -323,13 +323,22 @@ 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
Signature · 6 lines
2.15.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180122173613.18988-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Acked-byQuoted 6 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
We were incorrectly interpreting the tiling information.
Reported-by Marek Olšák <[email protected]>Signed-off-by Michel Dänzer <[email protected]>
Quoted 49 lines
--- configure.ac | 2 +- src/amdgpu_glamor.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-)configure.ac +1
-1@@ -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 dependenciessrc/amdgpu_glamor.c +10
-2@@ -323,13 +323,22 @@ 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 -- 2.15.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Marek Olšák
Reviewed-byMarek
Quoted 55 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
We were incorrectly interpreting the tiling information.
Reported-by Marek Olšák <[email protected]>Signed-off-by Michel Dänzer <[email protected]>--- configure.ac | 2 +- src/amdgpu_glamor.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-)configure.ac +1
-1@@ -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 dependenciessrc/amdgpu_glamor.c +10
-2@@ -323,13 +323,22 @@ 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 -- 2.15.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx