summaryrefslogtreecommitdiff
path: root/src/radeon.h
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-06-29 17:57:03 +0200
committerMichel Dänzer <michel@daenzer.net>2018-07-09 18:28:21 +0200
commit3c4c0213c11d623cba7adbc28dde652694f2f758 (patch)
tree278200a4fbf0790fcba3f21c6ca46d790cc75faa /src/radeon.h
parentb85b7b11f5b5e792f21951b881bd8433d3d70858 (diff)
glamor: Use GBM for BO allocation when possible
Inspired by amdgpu. This avoids various issues due to a GEM handle lifetime conflict between us and Mesa with current glamor. Bugzilla: https://bugs.freedesktop.org/105381 Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon.h')
-rw-r--r--src/radeon.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/radeon.h b/src/radeon.h
index 648fd98a..2bcfa41b 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -606,6 +606,8 @@ typedef struct {
unsigned hwcursor_disabled;
#ifdef USE_GLAMOR
+ struct gbm_device *gbm;
+
struct {
CreateGCProcPtr SavedCreateGC;
RegionPtr (*SavedCopyArea)(DrawablePtr, DrawablePtr, GCPtr, int, int,
@@ -744,8 +746,6 @@ static inline Bool radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_buffer *bo
}
if (bo) {
- uint32_t pitch;
-
if (!priv) {
priv = calloc(1, sizeof (struct radeon_pixmap));
if (!priv)
@@ -754,11 +754,10 @@ static inline Bool radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_buffer *bo
radeon_buffer_ref(bo);
priv->bo = bo;
-
- radeon_bo_get_tiling(bo->bo.radeon, &priv->tiling_flags, &pitch);
}
radeon_set_pixmap_private(pPix, priv);
+ radeon_get_pixmap_tiling_flags(pPix);
return TRUE;
} else
#endif /* USE_GLAMOR */