summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThuy Tran <thuy.tran.xh@renesas.com>2019-04-22 13:55:03 +0700
committerThuy Tran <thuy.tran.xh@renesas.com>2019-05-23 16:16:13 +0700
commita434297ace4991bf75cf59c4ab6d42277d42bb5a (patch)
tree156aa1e3d29e1cd6594833a4046b32d61a933f3b
parenta4c0357cb6b9b6d3637dc7fc5bf83e4c7cd93787 (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. It also removes weston W/A patch to enable HW overlay mode. Signed-off-by: Thuy Tran <thuy.tran.xh@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
-rw-r--r--meta-rcar-gen3/recipes-graphics/wayland/weston/0001-Revert-compositor-drm-Enable-planes-for-atomic.patch53
-rw-r--r--meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend5
-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.patch44
4 files changed, 49 insertions, 58 deletions
diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-Revert-compositor-drm-Enable-planes-for-atomic.patch b/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-Revert-compositor-drm-Enable-planes-for-atomic.patch
deleted file mode 100644
index cfbf424..0000000
--- a/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-Revert-compositor-drm-Enable-planes-for-atomic.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 2fe71354686408b0d1c2833442b6b160b5c92809 Mon Sep 17 00:00:00 2001
-From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
-Date: Thu, 14 Feb 2019 14:05:35 +0900
-Subject: [PATCH] Revert "compositor-drm: Enable planes for atomic"
-
-This reverts commit 678aabe829371d48af00e718f4a41185a3d50f1f.
----
- libweston/compositor-drm.c | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index 3891176..07acab7 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -3822,17 +3822,6 @@ init_kms_caps(struct drm_backend *b)
- weston_log("DRM: %s atomic modesetting\n",
- b->atomic_modeset ? "supports" : "does not support");
-
-- /*
-- * KMS support for hardware planes cannot properly synchronize
-- * without nuclear page flip. Without nuclear/atomic, hw plane
-- * and cursor plane updates would either tear or cause extra
-- * waits for vblanks which means dropping the compositor framerate
-- * to a fraction. For cursors, it's not so bad, so they are
-- * enabled.
-- */
-- if (!b->atomic_modeset)
-- b->sprites_are_broken = 1;
--
- ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_ASPECT_RATIO, 1);
- b->aspect_ratio_supported = (ret == 0);
- weston_log("DRM: %s picture aspect ratio\n",
-@@ -6716,6 +6705,17 @@ drm_backend_create(struct weston_compositor *compositor,
- b->drm.fd = -1;
- wl_array_init(&b->unused_crtcs);
-
-+ /*
-+ * KMS support for hardware planes cannot properly synchronize
-+ * without nuclear page flip. Without nuclear/atomic, hw plane
-+ * and cursor plane updates would either tear or cause extra
-+ * waits for vblanks which means dropping the compositor framerate
-+ * to a fraction. For cursors, it's not so bad, so they are
-+ * enabled.
-+ *
-+ * These can be enabled again when nuclear/atomic support lands.
-+ */
-+ b->sprites_are_broken = 1;
- b->compositor = compositor;
- b->use_pixman = config->use_pixman;
- b->pageflip_timeout = config->pageflip_timeout;
---
-2.9.2
-
diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend b/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend
index 15471b7..77b82ed 100644
--- a/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend
+++ b/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend
@@ -1,7 +1,2 @@
require weston.inc
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI_append = " \
- file://0001-Revert-compositor-drm-Enable-planes-for-atomic.patch \
-"
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..6a2fb8d 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 in weston 5.0
+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..2537a7c
--- /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,44 @@
+From be1ce185051b49ae471dbf9d3a5a90df5633aa98 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>
+---
+ .../mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+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 778bb69..7496dbf 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
+@@ -1,7 +1,7 @@
+ /*************************************************************************/ /*
+ MMNGR
+
+- Copyright (C) 2015-2016 Renesas Electronics Corporation
++ Copyright (C) 2015-2019 Renesas Electronics Corporation
+
+ License Dual MIT/GPLv2
+
+@@ -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
+