summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3
diff options
context:
space:
mode:
authorThuy Tran <thuy.tran.xh@renesas.com>2019-05-17 17:05:42 +0700
committerKhang Nguyen <khang.nguyen.xw@renesas.com>2019-09-24 08:16:25 +0700
commit59b4e2c5329fb37b304cffab37e2ebb882c210de (patch)
tree364202e026ab38045133d01d692409dac5a8bba3 /meta-rcar-gen3
parentcf21fcdd14cc7ac7e5a1da5e6fcb4f01e0178f61 (diff)
rcar-gen3: vsp2driver: Add a patch to handle data_offset setting
Vsp2 driver doesn't need to set offset of dmabuf for UV plane. However, in case of overlay plane by weston5.0, v4l2src (VIN) takes care of plane offset of dmabuf via mmngr, then vspfilter and vsp2drv also need to care it. Cherry-pick from 9e04640780d516dc65b489f1f039d98b13460ac8 Signed-off-by: Thuy Tran <thuy.tran.xh@renesas.com> Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com> Change-Id: Ida863471114e2e4b1f0b3544e69895396305af09
Diffstat (limited to 'meta-rcar-gen3')
-rw-r--r--meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb2
-rw-r--r--meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch29
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb b/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb
index c3c3233..be8f8e0 100644
--- a/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb
+++ b/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb
@@ -21,6 +21,8 @@ SRCREV = "0ecf35aa05c103ba4d3ab83e3320a22fccd912c3"
SRC_URI = "${VSP2DRIVER_URL};branch=${BRANCH}"
+SRC_URI_append = " file://0001-Handle-data_offset-setting-from-V4L2-API.patch"
+
S = "${WORKDIR}/git"
# Build VSP2 driver kernel module without suffix
diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch b/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch
new file mode 100644
index 0000000..3aab174
--- /dev/null
+++ b/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch
@@ -0,0 +1,29 @@
+From 50dd867589931beef05dbcdb17a37a8a678e4b13 Mon Sep 17 00:00:00 2001
+From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
+Date: Fri, 10 May 2019 13:34:42 +0900
+Subject: [PATCH] Handle data_offset setting from V4L2 API
+
+The data in each buffer does not necessarily start at the
+beginning of the buffer. Adjust as necessary according to
+the data_offset field specified from user space.
+---
+ vsp2driver/vsp2_video.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vsp2driver/vsp2_video.c b/vsp2driver/vsp2_video.c
+index 8875578..0abf81c 100644
+--- a/vsp2driver/vsp2_video.c
++++ b/vsp2driver/vsp2_video.c
+@@ -764,7 +764,8 @@ static int vsp2_video_buffer_prepare(struct vb2_buffer *vb)
+ }
+
+ for (i = 0; i < vb->num_planes; ++i) {
+- buf->mem.addr[i] = vb2_dma_contig_plane_dma_addr(vb, i);
++ buf->mem.addr[i] = vb2_dma_contig_plane_dma_addr(vb, i) +
++ vb->planes[i].data_offset;
+
+ if (vb2_plane_size(vb, i) < format->plane_fmt[i].sizeimage)
+ return -EINVAL;
+--
+2.17.1
+