summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-07-19 16:59:22 +0200
committerMichel Dänzer <michel@daenzer.net>2018-07-20 12:38:04 +0200
commit7cc2d4515a63845a027214daf4d391cf56e35bb3 (patch)
tree835ec8b7e603cefa2ccc544b1a5203dbb08a9796 /src
parent46d87187c6a0b8f941cc6f30af1f53a98ff2e635 (diff)
Remove AMDGPUInfoRec::fbcon_pixmap
We always destroy the fbcon pixmap in drmmode_copy_fb anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_drv.h1
-rw-r--r--src/amdgpu_kms.c3
-rw-r--r--src/drmmode_display.c13
3 files changed, 2 insertions, 15 deletions
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index 8a77b05..45bc394 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -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;
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 39e047e..c22b797 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -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;
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b300866..7117b42 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -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;
}