Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 14:08:45 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 14:09:12 +0200
commited46958d698b99699de1d2b839fd6f04931fb39f (patch)
tree046f62f6861db0a0c8ee7558e7de82bd4ea3a9ff
parent2cadd91ac62ea185a29feac48f9e9778ed33e1d8 (diff)
media: tw686x: Fix incorrect vb2_mem_ops GFP flags
(bsc#1051510).
-rw-r--r--patches.drivers/media-tw686x-Fix-incorrect-vb2_mem_ops-GFP-flags40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.drivers/media-tw686x-Fix-incorrect-vb2_mem_ops-GFP-flags b/patches.drivers/media-tw686x-Fix-incorrect-vb2_mem_ops-GFP-flags
new file mode 100644
index 0000000000..4d46a70665
--- /dev/null
+++ b/patches.drivers/media-tw686x-Fix-incorrect-vb2_mem_ops-GFP-flags
@@ -0,0 +1,40 @@
+From 636757ab6c93e19e2f58d3b3af1312e34eaffbab Mon Sep 17 00:00:00 2001
+From: Ezequiel Garcia <ezequiel@collabora.com>
+Date: Fri, 18 May 2018 17:07:48 -0400
+Subject: [PATCH] media: tw686x: Fix incorrect vb2_mem_ops GFP flags
+Git-commit: 636757ab6c93e19e2f58d3b3af1312e34eaffbab
+Patch-mainline: v4.18-rc1
+References: bsc#1051510
+
+When the driver is configured in the "memcpy" dma-mode,
+it uses vb2_vmalloc_memops, which is backed by a SLAB
+allocator and so shouldn't be using GFP_DMA32.
+
+Fix it.
+
+Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/media/pci/tw686x/tw686x-video.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
+index c3fafa97b2d0..0ea8dd44026c 100644
+--- a/drivers/media/pci/tw686x/tw686x-video.c
++++ b/drivers/media/pci/tw686x/tw686x-video.c
+@@ -1228,7 +1228,8 @@ int tw686x_video_init(struct tw686x_dev *dev)
+ vc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
+ vc->vidq.min_buffers_needed = 2;
+ vc->vidq.lock = &vc->vb_mutex;
+- vc->vidq.gfp_flags = GFP_DMA32;
++ vc->vidq.gfp_flags = dev->dma_mode != TW686X_DMA_MODE_MEMCPY ?
++ GFP_DMA32 : 0;
+ vc->vidq.dev = &dev->pci_dev->dev;
+
+ err = vb2_queue_init(&vc->vidq);
+--
+2.18.0
+
diff --git a/series.conf b/series.conf
index a58ad8840b..f7e206f831 100644
--- a/series.conf
+++ b/series.conf
@@ -14905,6 +14905,7 @@
patches.drivers/media-rcar_jpu-Add-missing-clk_disable_unprepare-on-
patches.suse/0001-media-smiapp-fix-timeout-checking-in-smiapp_read_nvm.patch
patches.drivers/media-vivid-potential-integer-overflow-in-vidioc_g_e
+ patches.drivers/media-tw686x-Fix-incorrect-vb2_mem_ops-GFP-flags
patches.drivers/media-uvcvideo-Support-realtek-s-UVC-1.5-device
patches.drivers/PCI-ibmphp-Fix-use-before-set-in-get_max_bus_speed
patches.drivers/PCI-pciehp-Clear-Presence-Detect-and-Data-Link-Layer