mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Bail from amdgpu_pixmap_get_handle with ShadowFB
There's no pixmap private in that case. The callers handle this gracefully. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
42a3148ae1
commit
e2cd67abb4
@@ -185,13 +185,15 @@ uint64_t amdgpu_pixmap_get_tiling_info(PixmapPtr pixmap)
|
||||
|
||||
Bool amdgpu_pixmap_get_handle(PixmapPtr pixmap, uint32_t *handle)
|
||||
{
|
||||
#ifdef USE_GLAMOR
|
||||
ScreenPtr screen = pixmap->drawable.pScreen;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
|
||||
#endif
|
||||
struct amdgpu_pixmap *priv = amdgpu_get_pixmap_private(pixmap);
|
||||
struct amdgpu_pixmap *priv;
|
||||
|
||||
if (info->shadow_fb)
|
||||
return FALSE;
|
||||
|
||||
priv = amdgpu_get_pixmap_private(pixmap);
|
||||
if (!priv) {
|
||||
priv = calloc(1, sizeof(*priv));
|
||||
amdgpu_set_pixmap_private(pixmap, priv);
|
||||
|
||||
Reference in New Issue
Block a user