summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-02-21 16:56:27 +0900
committerMichel Dänzer <michel@daenzer.net>2017-02-22 18:29:11 +0900
commit0c29deb5a97d9a57e994cc0053c49ddf7aca6ecb (patch)
tree97c2c660b25841ba77cd49f31682b2a547717479
parent58cd1600057e41aade0106d4acf78e23eac6e44f (diff)
Use drmmode_crtc_scanout_free in drmmode_fini
We were leaking drmmode_crtc->scanout_damage, which caused trouble on server reset. Fixes server reset with active separate scanout pixmaps. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/drmmode_display.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 5b0236da..fd22a19b 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2618,13 +2618,8 @@ void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
#endif
}
- for (c = 0; c < config->num_crtc; c++) {
- xf86CrtcPtr crtc = config->crtc[c];
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-
- drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[0]);
- drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[1]);
- }
+ for (c = 0; c < config->num_crtc; c++)
+ drmmode_crtc_scanout_free(config->crtc[c]->driver_private);
}