summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMadhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>2020-04-14 21:59:28 -0700
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2020-04-15 10:48:09 -0700
commitabd923dfb2fc3d0e4cdc772112d08802562950c8 (patch)
tree47436f906e80cda8a27797819ce9994b7e6e73a0
parent2a990b3c628e547b42b10d6c67806b52cdd1b3ab (diff)
downloadmeta-xilinx-abd923dfb2fc3d0e4cdc772112d08802562950c8.tar.gz
xf86-video-armsoc: Bypass the exa layer to free the root pixmap
Since the root pixmap was allocated through miCreateScreenResources, the exa layer is not aware of the pixmap resulting in the assertion to fail. This patch fixes this. Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
-rw-r--r--meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch33
-rw-r--r--meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend4
2 files changed, 36 insertions, 1 deletions
diff --git a/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch b/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch
new file mode 100644
index 00000000..2e024794
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch
@@ -0,0 +1,33 @@
1From 497de8b16265468cacad880f4a371756924ae0c1 Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
3Date: Tue, 14 Apr 2020 15:25:13 -0700
4Subject: [xf86-video-armsoc][PATCH v2] armsoc_driver.c: Bypass the exa layer
5 to free the root pixmap
6
7Since the root pixmap was allocated through miCreateScreenResources,
8the exa layer is not aware of the pixmap resulting in the assertion
9to fail. Instead, we can directly invoke fbDestroyPixmap, thereby
10freeing the pixmap and avoiding a memory leak.
11
12Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
13---
14 src/armsoc_driver.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c
18index 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--
322.7.4
33
diff --git a/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend b/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend
index 3ddcf0b8..955398a3 100644
--- a/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend
+++ b/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend
@@ -1,3 +1,5 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/xf86-video-armsoc:" 1FILESEXTRAPATHS_prepend := "${THISDIR}/xf86-video-armsoc:"
2 2
3SRC_URI_append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch" 3SRC_URI_append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \
4 file://0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch \
5 "