xf86-video-amdgpu: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 31 15:54:55 UTC 2018
src/amdgpu_bo_helper.c | 3 +++
src/amdgpu_glamor.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
New commits:
commit b804d7f85d8a07389ba7d3f9b8af8773f852f1c7
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Aug 29 17:34:55 2018 +0200
glamor: Handle ihandle == -1 in amdgpu_glamor_set_shared_pixmap_backing
(Ported from radeon commit de88ea2755611bdcb18d91d8234d2ab5be8ff2e9)
Acked-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 13d68fe..699861f 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -384,6 +384,7 @@ amdgpu_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle)
{
ScreenPtr screen = pixmap->drawable.pScreen;
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ int ihandle = (int)(long)handle;
struct amdgpu_pixmap *priv;
if (!amdgpu_set_shared_pixmap_backing(pixmap, handle))
@@ -391,7 +392,8 @@ amdgpu_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle)
priv = amdgpu_get_pixmap_private(pixmap);
- if (!amdgpu_glamor_create_textured_pixmap(pixmap, priv->bo)) {
+ if (ihandle != -1 &&
+ !amdgpu_glamor_create_textured_pixmap(pixmap, priv->bo)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to get PRIME drawable for glamor pixmap.\n");
return FALSE;
commit ae2a450cb98707c4cab8a8265a284cf708bcd43d
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Aug 29 17:31:49 2018 +0200
Handle ihandle == -1 in amdgpu_set_shared_pixmap_backing
It means to stop using the shared pixmap backing.
(Ported from radeon commit 1799680f7bd84e0618f34f4c7486799521ddaf83)
Acked-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 98eb04a..6fd6884 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -400,6 +400,9 @@ Bool amdgpu_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle)
uint32_t size = ppix->devKind * ppix->drawable.height;
Bool ret;
+ if (ihandle == -1)
+ return amdgpu_set_pixmap_bo(ppix, NULL);
+
if (info->gbm) {
struct amdgpu_buffer *bo;
struct gbm_import_fd_data data;
More information about the xorg-commit
mailing list