mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Remove AMDGPUInfoRec::fbcon_pixmap
We always destroy the fbcon pixmap in drmmode_copy_fb anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
46d87187c6
commit
7cc2d4515a
@@ -264,7 +264,6 @@ typedef struct {
|
||||
struct amdgpu_dri2 dri2;
|
||||
|
||||
/* accel */
|
||||
PixmapPtr fbcon_pixmap;
|
||||
int callback_event_type;
|
||||
uint_fast32_t gpu_flushed;
|
||||
uint_fast32_t gpu_synced;
|
||||
|
||||
@@ -125,9 +125,6 @@ static void AMDGPUFreeRec(ScrnInfoPtr pScrn)
|
||||
|
||||
info = AMDGPUPTR(pScrn);
|
||||
if (info) {
|
||||
if (info->fbcon_pixmap)
|
||||
pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap);
|
||||
|
||||
pEnt = info->pEnt;
|
||||
free(pScrn->driverPrivate);
|
||||
pScrn->driverPrivate = NULL;
|
||||
|
||||
@@ -357,13 +357,9 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode,
|
||||
{
|
||||
ScreenPtr pScreen = pScrn->pScreen;
|
||||
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
|
||||
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
|
||||
PixmapPtr pixmap = info->fbcon_pixmap;
|
||||
PixmapPtr pixmap = NULL;
|
||||
drmModeFBPtr fbcon;
|
||||
|
||||
if (pixmap)
|
||||
return pixmap;
|
||||
|
||||
fbcon = drmModeGetFB(pAMDGPUEnt->fd, fbcon_id);
|
||||
if (!fbcon)
|
||||
return NULL;
|
||||
@@ -387,7 +383,6 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode,
|
||||
pixmap = NULL;
|
||||
}
|
||||
|
||||
info->fbcon_pixmap = pixmap;
|
||||
out_free_fb:
|
||||
drmModeFreeFB(fbcon);
|
||||
return pixmap;
|
||||
@@ -396,7 +391,6 @@ out_free_fb:
|
||||
void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
|
||||
ScreenPtr pScreen = pScrn->pScreen;
|
||||
PixmapPtr src, dst = pScreen->GetScreenPixmap(pScreen);
|
||||
struct drmmode_fb *fb = amdgpu_pixmap_get_fb(dst);
|
||||
@@ -436,10 +430,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
|
||||
FreeScratchGC(gc);
|
||||
|
||||
pScreen->canDoBGNoneRoot = TRUE;
|
||||
|
||||
if (info->fbcon_pixmap)
|
||||
pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap);
|
||||
info->fbcon_pixmap = NULL;
|
||||
pScreen->DestroyPixmap(src);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user