Handle ihandle == -1 in amdgpu_set_shared_pixmap_backing
PATCH 1/2 Handle ihandle == -1 in amdgpu_set_shared_pixmap_backing
From: Michel Dänzer <[email protected]>
It means to stop using the shared pixmap backing.
(Ported from radeon commit 1799680f7bd84e0618f34f4c7486799521ddaf83)
--- src/amdgpu_bo_helper.c | 3 +++ 1 file changed, 3 insertions(+)
src/amdgpu_bo_helper.c +3 -0
@@ -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;
Signature · 6 lines
2.18.0 _______________________________________________ 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): 20180829153837.31421-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH 2/2 glamor: Handle ihandle == -1 in amdgpu_glamor_set_shared_pixmap_backing
From: Michel Dänzer <[email protected]>
(Ported from radeon commit de88ea2755611bdcb18d91d8234d2ab5be8ff2e9)
--- src/amdgpu_glamor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/amdgpu_glamor.c +3 -1
@@ -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;
Signature · 6 lines
2.18.0 _______________________________________________ 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): 20180829153837.31421-2-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Acked-byRe: [PATCH xf86-video-amdgpu 2/2] glamor: Handle ihandle == -1 in amdgpu_glamor_set_shared_pixmap_backing
Quoted 6 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
(Ported from radeon commit
de88ea2755611bdcb18d91d8234d2ab5be8ff2e9)Signed-off-by Michel Dänzer <[email protected]>
Series is:
Quoted 29 lines
--- src/amdgpu_glamor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)src/amdgpu_glamor.c +3
-2@@ -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; --2.18.0
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