[PATCH 4/7] drm/tilcdc: Free palette dma memory in tilcdc_crtc_destroy()
Jyri Sarha
jsarha at ti.com
Wed Nov 16 11:43:00 UTC 2016
We should free the palette dma memory too.
Signed-off-by: Jyri Sarha <jsarha at ti.com>
---
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 67b50c0..6d2ce53b 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -355,6 +355,10 @@ static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
of_node_put(crtc->port);
drm_crtc_cleanup(crtc);
drm_flip_work_cleanup(&tilcdc_crtc->unref_work);
+
+ dmam_free_coherent(crtc->dev->dev, TILCDC_REV1_PALETTE_SIZE,
+ tilcdc_crtc->palette_base,
+ tilcdc_crtc->palette_dma_handle);
}
int tilcdc_crtc_update_fb(struct drm_crtc *crtc,
--
1.9.1
More information about the dri-devel
mailing list