mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
glamor: Handle ihandle == -1 in amdgpu_glamor_set_shared_pixmap_backing
(Ported from radeon commit de88ea2755611bdcb18d91d8234d2ab5be8ff2e9) Acked-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
ae2a450cb9
commit
b804d7f85d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user