summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-kernel
diff options
context:
space:
mode:
authorThuy Tran <thuy.tran.xh@renesas.com>2019-05-17 17:05:42 +0700
committerThuy Tran <thuy.tran.xh@renesas.com>2019-05-23 16:16:13 +0700
commit3ae3d87b5c06367892129dab2a4042dd608702e8 (patch)
treee20d7396ef1641ff8efa78b3b90197f567e6036f /meta-rcar-gen3/recipes-kernel
parenta434297ace4991bf75cf59c4ab6d42277d42bb5a (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. Signed-off-by: Thuy Tran <thuy.tran.xh@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Diffstat (limited to 'meta-rcar-gen3/recipes-kernel')
-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
+