Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame^] | 1 | From 497de8b16265468cacad880f4a371756924ae0c1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
| 3 | Date: Tue, 14 Apr 2020 15:25:13 -0700 |
| 4 | Subject: [xf86-video-armsoc][PATCH v2] armsoc_driver.c: Bypass the exa layer |
| 5 | to free the root pixmap |
| 6 | |
| 7 | Since the root pixmap was allocated through miCreateScreenResources, |
| 8 | the exa layer is not aware of the pixmap resulting in the assertion |
| 9 | to fail. Instead, we can directly invoke fbDestroyPixmap, thereby |
| 10 | freeing the pixmap and avoiding a memory leak. |
| 11 | |
| 12 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
| 13 | --- |
| 14 | src/armsoc_driver.c | 3 ++- |
| 15 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c |
| 18 | index 3ace3c7..a4a1ba3 100644 |
| 19 | --- a/src/armsoc_driver.c |
| 20 | +++ b/src/armsoc_driver.c |
| 21 | @@ -1259,7 +1259,8 @@ ARMSOCCloseScreen(CLOSE_SCREEN_ARGS_DECL) |
| 22 | * we do it here, before calling the CloseScreen chain which would just free pScreen->devPrivate in fbCloseScreen() |
| 23 | */ |
| 24 | if (pScreen->devPrivate) { |
| 25 | - (void) (*pScreen->DestroyPixmap)(pScreen->devPrivate); |
| 26 | + fbDestroyPixmap (pScreen->devPrivate); |
| 27 | + armsoc_bo_unreference(pARMSOC->scanout); |
| 28 | pScreen->devPrivate = NULL; |
| 29 | } |
| 30 | |
| 31 | -- |
| 32 | 2.7.4 |
| 33 | |