summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr
diff options
context:
space:
mode:
authorKhang Nguyen <khang.nguyen.xw@renesas.com>2019-08-07 09:00:55 +0700
committerKhang Nguyen <khang.nguyen.xw@renesas.com>2019-09-24 08:16:25 +0700
commitcf21fcdd14cc7ac7e5a1da5e6fcb4f01e0178f61 (patch)
tree5637e59a47767f4ccaf17518789fa5ada22dd39c /meta-rcar-gen3/recipes-kernel/kernel-module-mmngr
parentdbfd499257183b664f8d1a1f64c161083320c2e0 (diff)
rcar-gen3: mmngrbuf: Add to support HW overlay mode
This commit adds a patch to confirm omxh264dec(mmngr) dmabuff passing in HW overlay mode. Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com> Change-Id: If463c657a449f5f746a43532034e9d475aaaaec7
Diffstat (limited to 'meta-rcar-gen3/recipes-kernel/kernel-module-mmngr')
-rw-r--r--meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb5
-rw-r--r--meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch35
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb b/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb
index 4e99549..3ae960b 100644
--- a/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb
+++ b/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb
@@ -9,6 +9,11 @@ PR = "r0"
S = "${WORKDIR}/git"
MMNGRBUF_DRV_DIR = "mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf"
+# Support HW overlay mode
+SRC_URI_append = "\
+ file://0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch \
+"
+
includedir = "${RENESAS_DATADIR}/include"
SSTATE_DUPWHITELIST += "${STAGING_INCDIR}"
diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch b/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch
new file mode 100644
index 0000000..7e5ca0a
--- /dev/null
+++ b/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch
@@ -0,0 +1,35 @@
+From 43d2cc7496340eea3f96cb3c3cf66139e0878f3c Mon Sep 17 00:00:00 2001
+From: Hai Nguyen Pham <hai.pham.ud@renesas.com>
+Date: Tue, 26 Mar 2019 15:56:30 +0700
+Subject: [PATCH] mmngr_drv: mmngrbuf: Take care of any migration of
+ scatterlist
+
+MMNGRBUF should take care of any migration of scatterlist for
+all (shared) users of the DMA buffer. Although we only care about
+DMA addresses at the moment, this will benefit the DRM system that
+uses the buffer allocated by MMNGR directly.
+
+Initialize the scatterlist entry so that it can be happily traversed.
+
+Signed-off-by: Hai Nguyen Pham <hai.pham.ud@renesas.com>
+---
+ mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c b/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c
+index fe3db08..d9189e9 100644
+--- a/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c
++++ b/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c
+@@ -256,6 +256,9 @@ static struct sg_table *dmabuf_map_dma_buf(struct dma_buf_attachment *attach,
+ return NULL;
+ }
+
++ sg_set_page(sgt->sgl, pfn_to_page(PFN_DOWN(priv->hard_addr)),
++ priv->size, offset_in_page(priv->hard_addr));
++
+ sg_dma_address(sgt->sgl) = priv->hard_addr;
+ sg_dma_len(sgt->sgl) = priv->size;
+
+--
+2.7.4
+