Remove AMDGPUInfoRec::fbcon_pixmap
PATCH 1/1 Remove AMDGPUInfoRec::fbcon_pixmap
From: Michel Dänzer <[email protected]>
We always destroy the fbcon pixmap in drmmode_copy_fb anyway.
Signed-off-by Michel Dänzer <[email protected]>
--- src/amdgpu_drv.h | 1 - src/amdgpu_kms.c | 3 --- src/drmmode_display.c | 13 ++----------- 3 files changed, 2 insertions(+), 15 deletions(-)
src/amdgpu_drv.h +0 -1
@@ -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;
src/amdgpu_kms.c +0 -3
@@ -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 ;
src/drmmode_display.c +2 -11
@@ -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 ; }
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): 20180719150123.14155-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Reviewed-byQuoted 5 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
We always destroy the fbcon pixmap in
drmmode_copy_fbanyway.Signed-off-by Michel Dänzer <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Quoted 82 lines
--- src/amdgpu_drv.h | 1 - src/amdgpu_kms.c | 3 --- src/drmmode_display.c | 13 ++----------- 3 files changed, 2 insertions(+), 15 deletions(-)src/amdgpu_drv.h +0
-1@@ -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;src/amdgpu_kms.c +0
-3@@ -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 ;src/drmmode_display.c +2
-12@@ -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 ; } --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