Merge branch 'master' of git://linuxtv.org/media_build

This commit is contained in:
CrazyCat
2020-10-10 21:06:52 +03:00
15 changed files with 1218 additions and 205 deletions

View File

@@ -26,6 +26,9 @@ add pr_fmt.patch
add debug.patch
add drx39xxj.patch
[5.9.255]
add v5.9_tasklet.patch
[5.7.255]
add v5.7_mmap_read_lock.patch
add v5.7_vm_map_ram.patch
@@ -39,9 +42,11 @@ add v5.6_pm_runtime_get_if_active.patch
[5.5.255]
add v5.5_alsa_pcm_api_updates.patch
add v5.5_memtype_h.patch
add v5.5_dev_printk_h.patch
[5.4.255]
add v5.4_revert_spi_transfer.patch
add v5.4_dma_buf.patch
[5.1.255]
add v5.1_vm_map_pages.patch
@@ -159,6 +164,7 @@ add v3.12_kfifo_in.patch
[3.11.255]
add v3.11_dev_groups.patch
add v3.11_vidtv.patch
[3.10.255]
add v3.10_fw_driver_probe.patch

View File

@@ -11,7 +11,7 @@ index 6b06ea590074..f72786720746 100644
#include <media/drv-intf/saa7146.h>
diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c
index aabb830e7468..827d3e9eb38a 100644
index d6531874faa6..823c8a391832 100644
--- a/drivers/media/common/saa7146/saa7146_fops.c
+++ b/drivers/media/common/saa7146/saa7146_fops.c
@@ -1,3 +1,4 @@
@@ -39,7 +39,7 @@ index df9ebe2a168c..b69690aaf89e 100644
#include <media/drv-intf/saa7146_vv.h>
diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c
index d16122039b0c..e51d55323178 100644
index ccd15b4d4920..39b8e53c45d3 100644
--- a/drivers/media/common/saa7146/saa7146_video.c
+++ b/drivers/media/common/saa7146/saa7146_video.c
@@ -1,3 +1,4 @@
@@ -48,7 +48,7 @@ index d16122039b0c..e51d55323178 100644
#include <media/drv-intf/saa7146_vv.h>
diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h
index a2f95f4899c2..d80e4d091cda 100644
index b3b793b5caf3..3905d6a4b3ab 100644
--- a/drivers/media/common/siano/smscoreapi.h
+++ b/drivers/media/common/siano/smscoreapi.h
@@ -11,6 +11,7 @@ Copyright (C) 2006-2008, Uri Shkolnik, Anatoly Greenblat
@@ -72,7 +72,7 @@ index b5b9d6de6d9e..19bb646140bf 100644
#include <linux/module.h>
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index 4489744fbbd9..7f6a41f35e1d 100644
index f544d3393e9d..616af9255072 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -14,6 +14,7 @@
@@ -108,7 +108,7 @@ index cfc27629444f..558a35119908 100644
#include <linux/errno.h>
diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/dvb_demux.c
index 39a2c6ccf31d..6c7b5689b191 100644
index 5fde1d38b3e3..b7792796a5c5 100644
--- a/drivers/media/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb-core/dvb_demux.c
@@ -17,6 +17,7 @@
@@ -120,7 +120,7 @@ index 39a2c6ccf31d..6c7b5689b191 100644
#include <linux/sched/signal.h>
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 209186c5cd9b..76c0ab049c76 100644
index 06ea30a689d7..bfbeb45035cd 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -13,6 +13,7 @@
@@ -132,7 +132,7 @@ index 209186c5cd9b..76c0ab049c76 100644
#include <linux/string.h>
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 630509ecee20..d6d21a8c2016 100644
index 89620da983ba..08021c2161b0 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -40,6 +40,7 @@
@@ -144,7 +144,7 @@ index 630509ecee20..d6d21a8c2016 100644
#include <linux/module.h>
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index a3393cd4e584..2fbf42a2ba27 100644
index 959fa2820259..2b0af338942e 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -17,6 +17,7 @@
@@ -156,7 +156,7 @@ index a3393cd4e584..2fbf42a2ba27 100644
#include <linux/types.h>
diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
index f87e27481ea7..4d979dc7c5a9 100644
index d5b1b3788e39..28117395e03d 100644
--- a/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
+++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
@@ -6,6 +6,7 @@
@@ -168,7 +168,7 @@ index f87e27481ea7..4d979dc7c5a9 100644
#include <linux/spi/spi.h>
diff --git a/drivers/media/dvb-frontends/dib0070.c b/drivers/media/dvb-frontends/dib0070.c
index 3b26f61785d8..6bceb053ba19 100644
index cafb41dba861..f0118188ac3b 100644
--- a/drivers/media/dvb-frontends/dib0070.c
+++ b/drivers/media/dvb-frontends/dib0070.c
@@ -8,6 +8,7 @@
@@ -180,7 +180,7 @@ index 3b26f61785d8..6bceb053ba19 100644
#include <linux/kernel.h>
diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c
index d13d2e81f8c9..85f2879b463a 100644
index 08a85831e917..6c45d91b1423 100644
--- a/drivers/media/dvb-frontends/dib0090.c
+++ b/drivers/media/dvb-frontends/dib0090.c
@@ -8,6 +8,7 @@
@@ -192,11 +192,11 @@ index d13d2e81f8c9..85f2879b463a 100644
#include <linux/kernel.h>
diff --git a/drivers/media/dvb-frontends/dib3000mb.c b/drivers/media/dvb-frontends/dib3000mb.c
index 46ed0e20c8fa..73f0763c706e 100644
index a6c2fc4586eb..6fcdf7c2e562 100644
--- a/drivers/media/dvb-frontends/dib3000mb.c
+++ b/drivers/media/dvb-frontends/dib3000mb.c
@@ -17,6 +17,7 @@
* see Documentation/media/dvb-drivers/dvb-usb.rst for more information
* see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
*/
+#undef pr_fmt
@@ -216,7 +216,7 @@ index 692600ce5f23..ce72e2a5ab11 100644
#include <linux/kernel.h>
diff --git a/drivers/media/dvb-frontends/dib7000m.c b/drivers/media/dvb-frontends/dib7000m.c
index e211830c9c99..27ddcce44ecd 100644
index 97ce97789c9e..a79dfa89bdbb 100644
--- a/drivers/media/dvb-frontends/dib7000m.c
+++ b/drivers/media/dvb-frontends/dib7000m.c
@@ -6,6 +6,7 @@
@@ -228,7 +228,7 @@ index e211830c9c99..27ddcce44ecd 100644
#include <linux/kernel.h>
diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c
index 52f5e697c5dc..2d2bffaf0c13 100644
index 55bee50aa871..ac07ad1cfbb7 100644
--- a/drivers/media/dvb-frontends/dib7000p.c
+++ b/drivers/media/dvb-frontends/dib7000p.c
@@ -5,6 +5,7 @@
@@ -273,7 +273,7 @@ index 63a4c6a4afb5..1fbdac917dc2 100644
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index a6876fa48753..8df883fa1a38 100644
index 237b9d04c076..263314c91e14 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -53,6 +53,7 @@
@@ -285,7 +285,7 @@ index a6876fa48753..8df883fa1a38 100644
#include <linux/module.h>
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c
index 0a4875b391d9..eb993742a3a5 100644
index 32f9346deb3e..aab46b2313c9 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -5,6 +5,7 @@
@@ -297,7 +297,7 @@ index 0a4875b391d9..eb993742a3a5 100644
#include <linux/kernel.h>
diff --git a/drivers/media/dvb-frontends/dvb-pll.c b/drivers/media/dvb-frontends/dvb-pll.c
index ba0c49107bd2..f8c526355712 100644
index d45b4ddc8f91..52de4f867ab0 100644
--- a/drivers/media/dvb-frontends/dvb-pll.c
+++ b/drivers/media/dvb-frontends/dvb-pll.c
@@ -5,6 +5,7 @@
@@ -321,7 +321,7 @@ index ed671e951a17..97b9b3f690f8 100644
#include "gp8psk-fe.h"
diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
index 6c4adec58174..f6ab72efb2c4 100644
index 722576f1732a..9464b5a72040 100644
--- a/drivers/media/dvb-frontends/lgdt3306a.c
+++ b/drivers/media/dvb-frontends/lgdt3306a.c
@@ -7,6 +7,7 @@
@@ -381,7 +381,7 @@ index f11382afe23b..e1a3095736fa 100644
#include <linux/errno.h>
diff --git a/drivers/media/pci/bt8xx/btcx-risc.c b/drivers/media/pci/bt8xx/btcx-risc.c
index 1139a5ad2418..8a7dfddeafa4 100644
index 51257980f539..54f5241ad115 100644
--- a/drivers/media/pci/bt8xx/btcx-risc.c
+++ b/drivers/media/pci/bt8xx/btcx-risc.c
@@ -10,6 +10,7 @@
@@ -405,7 +405,7 @@ index 16148802dabb..4c394a0d37e0 100644
#include <linux/delay.h>
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index a359da7773a9..74c3099238ee 100644
index 8c61d292dec1..28128c4364b2 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -22,6 +22,7 @@
@@ -441,7 +441,7 @@ index 4a8a3f80c6db..6eefddf103aa 100644
#include <linux/module.h>
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c
index 9adfac4d5187..79bc9f0e616b 100644
index 41226f1d0e5b..1bf8fe4194b5 100644
--- a/drivers/media/pci/bt8xx/bttv-input.c
+++ b/drivers/media/pci/bt8xx/bttv-input.c
@@ -5,6 +5,7 @@
@@ -453,7 +453,7 @@ index 9adfac4d5187..79bc9f0e616b 100644
#include <linux/module.h>
diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c
index fc8708047be8..84df256254a7 100644
index 4af72826b006..102fa9cb18d0 100644
--- a/drivers/media/pci/bt8xx/bttv-risc.c
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
@@ -12,6 +12,7 @@
@@ -489,7 +489,7 @@ index 3e52a51982d7..7e29e7f3f0b3 100644
#include <linux/kernel.h>
diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index 64df9d491941..5c556be1ff74 100644
index 4cb890b949c3..4d161cca9952 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -5,6 +5,7 @@
@@ -513,7 +513,7 @@ index 0dc348215b72..e6f27b6d0046 100644
#include <media/dvb_demux.h>
diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
index a95a2e4c6a0d..2bf7752928ef 100644
index 349462ee2c48..c4c30446d9b1 100644
--- a/drivers/media/pci/cx23885/cx23885.h
+++ b/drivers/media/pci/cx23885/cx23885.h
@@ -5,6 +5,7 @@
@@ -525,7 +525,7 @@ index a95a2e4c6a0d..2bf7752928ef 100644
#include <linux/pci.h>
diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c
index c2f2d7c782c7..001fe05c3e4a 100644
index 49892a88f528..0e9e435f5aaf 100644
--- a/drivers/media/pci/cx25821/cx25821-alsa.c
+++ b/drivers/media/pci/cx25821/cx25821-alsa.c
@@ -7,6 +7,7 @@
@@ -549,7 +549,7 @@ index 5aa67fa51ca5..e40cb52c208c 100644
#include <linux/init.h>
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
index 41be22ce66f3..7eda2475f50b 100644
index 55018d9e439f..8931bd306928 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -7,6 +7,7 @@
@@ -585,7 +585,7 @@ index f0a1ac77f048..20481e01625b 100644
#include "cx25821.h"
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
index a10261da0db6..174af98f1b34 100644
index 1b80c990cb94..4f9d7f9d2b28 100644
--- a/drivers/media/pci/cx25821/cx25821-video.c
+++ b/drivers/media/pci/cx25821/cx25821-video.c
@@ -9,6 +9,7 @@
@@ -597,7 +597,7 @@ index a10261da0db6..174af98f1b34 100644
#include "cx25821-video.h"
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h
index 744a22328ebc..c2f37e597ecc 100644
index ce4acf6de6aa..d38ac5d6b02b 100644
--- a/drivers/media/pci/cx88/cx88.h
+++ b/drivers/media/pci/cx88/cx88.h
@@ -8,6 +8,7 @@
@@ -621,7 +621,7 @@ index 03dc9924fa2c..5e8e23c1ad02 100644
#include <linux/module.h>
diff --git a/drivers/media/pci/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h
index cafba6b1055d..6b099da5a1f6 100644
index e5efe525ad7b..a70175ec4fec 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.h
+++ b/drivers/media/pci/ivtv/ivtv-driver.h
@@ -22,6 +22,7 @@
@@ -633,7 +633,7 @@ index cafba6b1055d..6b099da5a1f6 100644
/* Internal header for ivtv project:
diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c
index 6185806a00e0..8881f0beb9c7 100644
index 8bfb3d8ea610..317aa1328d94 100644
--- a/drivers/media/pci/ngene/ngene-cards.c
+++ b/drivers/media/pci/ngene/ngene-cards.c
@@ -10,6 +10,7 @@
@@ -645,7 +645,7 @@ index 6185806a00e0..8881f0beb9c7 100644
#include <linux/module.h>
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h
index 77c325e64a97..0f9ac21062ec 100644
index d29499cd7370..6afac9c21b10 100644
--- a/drivers/media/pci/saa7134/saa7134.h
+++ b/drivers/media/pci/saa7134/saa7134.h
@@ -8,6 +8,7 @@
@@ -657,7 +657,7 @@ index 77c325e64a97..0f9ac21062ec 100644
#include <linux/pci.h>
diff --git a/drivers/media/pci/saa7146/hexium_gemini.c b/drivers/media/pci/saa7146/hexium_gemini.c
index dca20a3d98e2..ab40603bd73f 100644
index 2214c74bbbf1..355555320b5a 100644
--- a/drivers/media/pci/saa7146/hexium_gemini.c
+++ b/drivers/media/pci/saa7146/hexium_gemini.c
@@ -9,6 +9,7 @@
@@ -669,7 +669,7 @@ index dca20a3d98e2..ab40603bd73f 100644
#define DEBUG_VARIABLE debug
diff --git a/drivers/media/pci/saa7146/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c
index bf5e55348f15..3879cc2bd3ef 100644
index 39d14c179d22..010e89d2df82 100644
--- a/drivers/media/pci/saa7146/hexium_orion.c
+++ b/drivers/media/pci/saa7146/hexium_orion.c
@@ -9,6 +9,7 @@
@@ -681,7 +681,7 @@ index bf5e55348f15..3879cc2bd3ef 100644
#define DEBUG_VARIABLE debug
diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c
index e6a71c17566d..bb612f147ce6 100644
index 129a1f8ebe1a..3bf4b7ab7655 100644
--- a/drivers/media/pci/saa7146/mxb.c
+++ b/drivers/media/pci/saa7146/mxb.c
@@ -9,6 +9,7 @@
@@ -693,7 +693,7 @@ index e6a71c17566d..bb612f147ce6 100644
#define DEBUG_VARIABLE debug
diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c
index f3d6c3cdb872..c10fdfd67aac 100644
index c89f536f699c..ea769ca04cec 100644
--- a/drivers/media/pci/ttpci/av7110_v4l.c
+++ b/drivers/media/pci/ttpci/av7110_v4l.c
@@ -11,6 +11,7 @@
@@ -705,7 +705,7 @@ index f3d6c3cdb872..c10fdfd67aac 100644
#include <linux/kernel.h>
diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c
index e2d482af2367..6f86f53f4739 100644
index 3cb83005cf09..64e61883a79d 100644
--- a/drivers/media/pci/ttpci/budget-av.c
+++ b/drivers/media/pci/ttpci/budget-av.c
@@ -16,6 +16,7 @@
@@ -729,7 +729,7 @@ index 9c816ae3b3e5..c318a6bd5f55 100644
#include <linux/bitops.h>
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index b7cc8e651e32..b1f2d5f54021 100644
index 019bb47df915..5491022bab1b 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -7,6 +7,7 @@
@@ -753,7 +753,7 @@ index cde0d254ec1c..afee9240b1bf 100644
#include <linux/device.h>
diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
index 2fb45db8e4ba..c905c4b7c894 100644
index 9ca49af29542..c8cac8f078f7 100644
--- a/drivers/media/platform/s3c-camif/camif-capture.c
+++ b/drivers/media/platform/s3c-camif/camif-capture.c
@@ -8,6 +8,7 @@
@@ -765,7 +765,7 @@ index 2fb45db8e4ba..c905c4b7c894 100644
#include <linux/bug.h>
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index f0acd6edcbba..161dbfa70ef2 100644
index 92f43c0cbc0c..2ed56fb3c402 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -5,6 +5,7 @@
@@ -777,7 +777,7 @@ index f0acd6edcbba..161dbfa70ef2 100644
#include <linux/bug.h>
diff --git a/drivers/media/platform/s3c-camif/camif-regs.c b/drivers/media/platform/s3c-camif/camif-regs.c
index 1a65532dc36d..47e5ef37e2f8 100644
index e80204f5720c..235a40337893 100644
--- a/drivers/media/platform/s3c-camif/camif-regs.c
+++ b/drivers/media/platform/s3c-camif/camif-regs.c
@@ -5,6 +5,7 @@
@@ -789,7 +789,7 @@ index 1a65532dc36d..47e5ef37e2f8 100644
#include <linux/delay.h>
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index 82867a2a60b0..75632e799bde 100644
index 6049e5c95394..cda9c6fac1b5 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -15,6 +15,7 @@
@@ -801,7 +801,7 @@ index 82867a2a60b0..75632e799bde 100644
#include <linux/kernel.h>
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index b74bb13161fd..ecf90f7a79a7 100644
index b0d580566e4e..c7055bc4c4e3 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -9,6 +9,7 @@
@@ -813,7 +813,7 @@ index b74bb13161fd..ecf90f7a79a7 100644
#include <linux/kernel.h>
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 7bee72108b0e..0c2313ebe1b7 100644
index a7962ca2ac8e..892f2043095d 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -13,6 +13,7 @@
@@ -825,7 +825,7 @@ index 7bee72108b0e..0c2313ebe1b7 100644
#include <linux/errno.h>
diff --git a/drivers/media/rc/ir-imon-decoder.c b/drivers/media/rc/ir-imon-decoder.c
index a0efe2605393..cff6b300899f 100644
index 41dbbef27fa6..c42a078072ac 100644
--- a/drivers/media/rc/ir-imon-decoder.c
+++ b/drivers/media/rc/ir-imon-decoder.c
@@ -3,6 +3,7 @@
@@ -837,7 +837,7 @@ index a0efe2605393..cff6b300899f 100644
#include <linux/module.h>
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index f078f8a3aec8..b7a05880fece 100644
index 220363b9a868..1cab15f11b2e 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -5,6 +5,7 @@
@@ -849,7 +849,7 @@ index f078f8a3aec8..b7a05880fece 100644
#include <linux/module.h>
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 5c2cd8d2d155..7fba86843c22 100644
index 8a37f083fe3d..400b9f10e641 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -20,6 +20,7 @@
@@ -861,7 +861,7 @@ index 5c2cd8d2d155..7fba86843c22 100644
#include <linux/kernel.h>
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 13da4c5c7d17..a8fb461d789e 100644
index 1d811e5ffb55..70bd38178a0d 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -3,6 +3,7 @@
@@ -873,7 +873,7 @@ index 13da4c5c7d17..a8fb461d789e 100644
#include <media/rc-core.h>
diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c
index 7652e982173f..d71bcf7dbe4f 100644
index 8cc28c92d05d..66fab3c4fcc7 100644
--- a/drivers/media/rc/serial_ir.c
+++ b/drivers/media/rc/serial_ir.c
@@ -13,6 +13,7 @@
@@ -885,7 +885,7 @@ index 7652e982173f..d71bcf7dbe4f 100644
#include <linux/module.h>
diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c
index 80b3a6736dbd..5bcd1575607b 100644
index 6ec96dc34586..a13d560e8ece 100644
--- a/drivers/media/rc/sir_ir.c
+++ b/drivers/media/rc/sir_ir.c
@@ -6,6 +6,7 @@
@@ -897,7 +897,7 @@ index 80b3a6736dbd..5bcd1575607b 100644
#include <linux/module.h>
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 630e376d3688..ddd4c3c83beb 100644
index aed23ca0fa6c..22b3a1422863 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -27,6 +27,7 @@
@@ -920,6 +920,66 @@ index 4077217777f9..1c5157e2423f 100644
#define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__
#include <linux/spi/spi.h>
diff --git a/drivers/media/test-drivers/vidtv/vidtv_common.c b/drivers/media/test-drivers/vidtv/vidtv_common.c
index 9093df32e0ab..dfd88b11a521 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_common.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_common.c
@@ -6,6 +6,7 @@
*
* Copyright (C) 2020 Daniel W. S. Almeida
*/
+#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ":%s, %d: " fmt, __func__, __LINE__
#include <linux/printk.h>
diff --git a/drivers/media/test-drivers/vidtv/vidtv_pes.c b/drivers/media/test-drivers/vidtv/vidtv_pes.c
index 8237434f3fc2..1ebea195dade 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_pes.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_pes.c
@@ -11,6 +11,7 @@
* Copyright (C) 2020 Daniel W. S. Almeida
*/
+#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ":%s, %d: " fmt, __func__, __LINE__
#include <linux/types.h>
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
index 761034d10d9d..2e6370c51178 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
@@ -13,6 +13,7 @@
* Copyright (C) 2020 Daniel W. S. Almeida
*/
+#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ":%s, %d: " fmt, __func__, __LINE__
#include <linux/kernel.h>
diff --git a/drivers/media/test-drivers/vidtv/vidtv_s302m.c b/drivers/media/test-drivers/vidtv/vidtv_s302m.c
index 3b20a26d8721..58e342c04c93 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_s302m.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_s302m.c
@@ -15,6 +15,7 @@
* Copyright (C) 2020 Daniel W. S. Almeida
*/
+#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ":%s, %d: " fmt, __func__, __LINE__
#include <linux/types.h>
diff --git a/drivers/media/test-drivers/vidtv/vidtv_ts.c b/drivers/media/test-drivers/vidtv/vidtv_ts.c
index 190b9e4438dc..3e76f229d3a6 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_ts.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_ts.c
@@ -7,6 +7,7 @@
* Copyright (C) 2020 Daniel W. S. Almeida
*/
+#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ":%s, %d: " fmt, __func__, __LINE__
#include <linux/printk.h>
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c
index aed2f130ec74..2b556606d815 100644
--- a/drivers/media/tuners/r820t.c
@@ -969,7 +1029,7 @@ index 01a668b1b00c..bb73afa7ee6c 100644
#include <linux/bitops.h>
diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c
index ff2aa057c1fb..2d582609c5a5 100644
index dbf0455d5d50..11ee85062119 100644
--- a/drivers/media/usb/go7007/go7007-usb.c
+++ b/drivers/media/usb/go7007/go7007-usb.c
@@ -3,6 +3,7 @@
@@ -1065,7 +1125,7 @@ index 2c05ea2598e7..745fcc3af105 100644
#include "gspca.h"
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
index 4add2b12d330..31a4585a83b6 100644
index c295f642d352..904d86b668c8 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -8,6 +8,7 @@
@@ -1101,7 +1161,7 @@ index 57ea65863591..7c16f29af6fc 100644
#define MODULE_NAME "kinect"
diff --git a/drivers/media/usb/gspca/konica.c b/drivers/media/usb/gspca/konica.c
index d8e40137a204..9876d356d234 100644
index 53db9a2895ea..e919d15a92fb 100644
--- a/drivers/media/usb/gspca/konica.c
+++ b/drivers/media/usb/gspca/konica.c
@@ -15,6 +15,7 @@
@@ -1209,7 +1269,7 @@ index eb9342ee32af..3e1d9763aab1 100644
#define MODULE_NAME "mars"
diff --git a/drivers/media/usb/gspca/mr97310a.c b/drivers/media/usb/gspca/mr97310a.c
index 502fc2eaffe0..51424180dd68 100644
index 3553788e8542..a508d4f66f1a 100644
--- a/drivers/media/usb/gspca/mr97310a.c
+++ b/drivers/media/usb/gspca/mr97310a.c
@@ -27,6 +27,7 @@
@@ -1221,7 +1281,7 @@ index 502fc2eaffe0..51424180dd68 100644
#define MODULE_NAME "mr97310a"
diff --git a/drivers/media/usb/gspca/nw80x.c b/drivers/media/usb/gspca/nw80x.c
index 59649704beba..a8c6c86c269d 100644
index 0f5f2464ac7a..d97b6735bc83 100644
--- a/drivers/media/usb/gspca/nw80x.c
+++ b/drivers/media/usb/gspca/nw80x.c
@@ -7,6 +7,7 @@
@@ -1233,7 +1293,7 @@ index 59649704beba..a8c6c86c269d 100644
#define MODULE_NAME "nw80x"
diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c
index cfb1f53bc17e..914080d2035f 100644
index cd6776c3163b..a55b4e88a107 100644
--- a/drivers/media/usb/gspca/ov519.c
+++ b/drivers/media/usb/gspca/ov519.c
@@ -23,6 +23,7 @@
@@ -1245,11 +1305,11 @@ index cfb1f53bc17e..914080d2035f 100644
#define MODULE_NAME "ov519"
diff --git a/drivers/media/usb/gspca/ov534.c b/drivers/media/usb/gspca/ov534.c
index 56521c991db4..36c2af032aa7 100644
index 9a11158f38da..ec25a5541d45 100644
--- a/drivers/media/usb/gspca/ov534.c
+++ b/drivers/media/usb/gspca/ov534.c
@@ -17,6 +17,7 @@
* <josephhowse@nummist.com> http://nummist.com
* <josephhowse@nummist.com> https://nummist.com
*/
+#undef pr_fmt
@@ -1257,7 +1317,7 @@ index 56521c991db4..36c2af032aa7 100644
#define MODULE_NAME "ov534"
diff --git a/drivers/media/usb/gspca/ov534_9.c b/drivers/media/usb/gspca/ov534_9.c
index 867f860a9650..7444bd122ae1 100644
index 91efc650cf76..b39c577506d5 100644
--- a/drivers/media/usb/gspca/ov534_9.c
+++ b/drivers/media/usb/gspca/ov534_9.c
@@ -11,6 +11,7 @@
@@ -1305,7 +1365,7 @@ index f6addb29f8f0..3e36fc7cc89f 100644
#define MODULE_NAME "pac7311"
diff --git a/drivers/media/usb/gspca/se401.c b/drivers/media/usb/gspca/se401.c
index 061deee138c3..b6216fcd5aa4 100644
index e087cfb5980b..6ecbcd457a20 100644
--- a/drivers/media/usb/gspca/se401.c
+++ b/drivers/media/usb/gspca/se401.c
@@ -9,6 +9,7 @@
@@ -1317,7 +1377,7 @@ index 061deee138c3..b6216fcd5aa4 100644
#define MODULE_NAME "se401"
diff --git a/drivers/media/usb/gspca/sn9c2028.c b/drivers/media/usb/gspca/sn9c2028.c
index aff01b753853..9e367bc7a442 100644
index dbd1d6da37f1..c41ae79ee1ad 100644
--- a/drivers/media/usb/gspca/sn9c2028.c
+++ b/drivers/media/usb/gspca/sn9c2028.c
@@ -5,6 +5,7 @@
@@ -1329,7 +1389,7 @@ index aff01b753853..9e367bc7a442 100644
#define MODULE_NAME "sn9c2028"
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
index b43f89fee6c1..44403c925ff3 100644
index bfd194c61819..2152e9674969 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -7,6 +7,7 @@
@@ -1341,7 +1401,7 @@ index b43f89fee6c1..44403c925ff3 100644
#include <linux/input.h>
diff --git a/drivers/media/usb/gspca/sonixj.c b/drivers/media/usb/gspca/sonixj.c
index 50a6c8425827..424feaf82678 100644
index 2e1bd2df8304..508b3560b53d 100644
--- a/drivers/media/usb/gspca/sonixj.c
+++ b/drivers/media/usb/gspca/sonixj.c
@@ -6,6 +6,7 @@
@@ -1353,7 +1413,7 @@ index 50a6c8425827..424feaf82678 100644
#define MODULE_NAME "sonixj"
diff --git a/drivers/media/usb/gspca/spca1528.c b/drivers/media/usb/gspca/spca1528.c
index 2ae03b60163f..2fabbb7ca058 100644
index ccc477944ef8..7343dc344fc1 100644
--- a/drivers/media/usb/gspca/spca1528.c
+++ b/drivers/media/usb/gspca/spca1528.c
@@ -5,6 +5,7 @@
@@ -1425,7 +1485,7 @@ index d608a518c141..5a0660fe7df1 100644
#define MODULE_NAME "spca561"
diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c
index 863c485f4275..12a7660641d3 100644
index 97799cfb832e..26742012be2d 100644
--- a/drivers/media/usb/gspca/sq905.c
+++ b/drivers/media/usb/gspca/sq905.c
@@ -20,6 +20,7 @@
@@ -1437,7 +1497,7 @@ index 863c485f4275..12a7660641d3 100644
#define MODULE_NAME "sq905"
diff --git a/drivers/media/usb/gspca/sq905c.c b/drivers/media/usb/gspca/sq905c.c
index 3d7f6dcdd7a8..1ce2645f4c9c 100644
index 6ca947aef298..7da92ff5c365 100644
--- a/drivers/media/usb/gspca/sq905c.c
+++ b/drivers/media/usb/gspca/sq905c.c
@@ -14,6 +14,7 @@
@@ -1449,7 +1509,7 @@ index 3d7f6dcdd7a8..1ce2645f4c9c 100644
#define MODULE_NAME "sq905c"
diff --git a/drivers/media/usb/gspca/sq930x.c b/drivers/media/usb/gspca/sq930x.c
index d1ba0888d798..3b2508fd504e 100644
index c3610247a90e..3e2a37a5d8d8 100644
--- a/drivers/media/usb/gspca/sq930x.c
+++ b/drivers/media/usb/gspca/sq930x.c
@@ -7,6 +7,7 @@
@@ -1485,7 +1545,7 @@ index 1a602af7310f..0716beaf0c07 100644
#define MODULE_NAME "stk1135"
diff --git a/drivers/media/usb/gspca/stv0680.c b/drivers/media/usb/gspca/stv0680.c
index f869eb6065ce..3a35ddedb31a 100644
index b23988d8c7bc..0cdbd6cbcaa1 100644
--- a/drivers/media/usb/gspca/stv0680.c
+++ b/drivers/media/usb/gspca/stv0680.c
@@ -13,6 +13,7 @@
@@ -1497,7 +1557,7 @@ index f869eb6065ce..3a35ddedb31a 100644
#define MODULE_NAME "stv0680"
diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx.c b/drivers/media/usb/gspca/stv06xx/stv06xx.c
index 79653d409951..59842d53cfa8 100644
index 95673fc0a99c..8285d47debbc 100644
--- a/drivers/media/usb/gspca/stv06xx/stv06xx.c
+++ b/drivers/media/usb/gspca/stv06xx/stv06xx.c
@@ -14,6 +14,7 @@
@@ -1521,7 +1581,7 @@ index 5a47dcbf1c8e..200fe74fc967 100644
#include "stv06xx_hdcs.h"
diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
index 6d1007715ff7..66c16f54f406 100644
index ae382b3b5f7f..2e06261f1278 100644
--- a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
+++ b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
@@ -31,6 +31,7 @@
@@ -1533,7 +1593,7 @@ index 6d1007715ff7..66c16f54f406 100644
#include "stv06xx_pb0100.h"
diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
index 7104a88b1e43..b390eb5835d8 100644
index aac19d449be2..546898f9b2bc 100644
--- a/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
+++ b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c
@@ -12,6 +12,7 @@
@@ -1557,7 +1617,7 @@ index dde1950bdc68..9161cb9fb49c 100644
#include "stv06xx_vv6410.h"
diff --git a/drivers/media/usb/gspca/sunplus.c b/drivers/media/usb/gspca/sunplus.c
index d0ddfa957ca9..b35e20821b9c 100644
index ace3da40006e..5814c322de88 100644
--- a/drivers/media/usb/gspca/sunplus.c
+++ b/drivers/media/usb/gspca/sunplus.c
@@ -6,6 +6,7 @@
@@ -1593,7 +1653,7 @@ index aee444042f60..05b0293fd0f0 100644
#include "gspca.h"
diff --git a/drivers/media/usb/gspca/vc032x.c b/drivers/media/usb/gspca/vc032x.c
index 588a847ea483..30c1d5a5e434 100644
index 4cb7c92ea132..e6bde265bd63 100644
--- a/drivers/media/usb/gspca/vc032x.c
+++ b/drivers/media/usb/gspca/vc032x.c
@@ -7,6 +7,7 @@
@@ -1605,7 +1665,7 @@ index 588a847ea483..30c1d5a5e434 100644
#define MODULE_NAME "vc032x"
diff --git a/drivers/media/usb/gspca/vicam.c b/drivers/media/usb/gspca/vicam.c
index 179b2ec3df57..56c478522ab4 100644
index d98343fd33fe..e5b39f8ebbd5 100644
--- a/drivers/media/usb/gspca/vicam.c
+++ b/drivers/media/usb/gspca/vicam.c
@@ -13,6 +13,7 @@
@@ -1617,7 +1677,7 @@ index 179b2ec3df57..56c478522ab4 100644
#define MODULE_NAME "vicam"
diff --git a/drivers/media/usb/gspca/w996Xcf.c b/drivers/media/usb/gspca/w996Xcf.c
index 16b679c2de21..751d72395046 100644
index a8350ee9712f..8c37a52b79e1 100644
--- a/drivers/media/usb/gspca/w996Xcf.c
+++ b/drivers/media/usb/gspca/w996Xcf.c
@@ -17,6 +17,7 @@
@@ -1629,7 +1689,7 @@ index 16b679c2de21..751d72395046 100644
#define W9968CF_I2C_BUS_DELAY 4 /* delay in us for I2C bit r/w operations */
diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c
index 934a90bd78c2..98c6440c4da7 100644
index cc87c24dd24c..62ae941dcaf5 100644
--- a/drivers/media/usb/gspca/xirlink_cit.c
+++ b/drivers/media/usb/gspca/xirlink_cit.c
@@ -13,6 +13,7 @@
@@ -1641,7 +1701,7 @@ index 934a90bd78c2..98c6440c4da7 100644
#define MODULE_NAME "xirlink-cit"
diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c
index 15a2449d536f..0305eb0c83b2 100644
index aa285d5d6c0d..5ecc127b9309 100644
--- a/drivers/media/usb/gspca/zc3xx.c
+++ b/drivers/media/usb/gspca/zc3xx.c
@@ -6,6 +6,7 @@
@@ -1665,7 +1725,7 @@ index 94aa6a27f934..33f08a47a41d 100644
#include "stk-webcam.h"
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index cfca3c70599b..9c6cb4b9658c 100644
index a45d464427c4..1583630da076 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -9,6 +9,7 @@
@@ -1676,8 +1736,20 @@ index cfca3c70599b..9c6cb4b9658c 100644
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index 9e016b71aa91..3f0c291b9a67 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -6,6 +6,7 @@
* Copyright (c) 2003 Felix Domke <tmbinc@elitedvb.net>
*/
+#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h>
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 76fa2db0e8fb..3cd6b6a0cbb5 100644
index 73f3d65957ff..1b432a2a75b0 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -6,6 +6,7 @@
@@ -1689,7 +1761,7 @@ index 76fa2db0e8fb..3cd6b6a0cbb5 100644
#include <linux/ctype.h>
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index a1c61d6f3b9b..ef2488f65cbf 100644
index a593ea0598b5..73ed9632e942 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -12,6 +12,7 @@

View File

@@ -0,0 +1,13 @@
diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
index 74b054947bbe..8b67d883c651 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
@@ -196,7 +196,7 @@ static int vidtv_stop_streaming(struct vidtv_dvb *dvb)
vidtv_mux_destroy(dvb->mux);
dvb->mux = NULL;
- dev_dbg_ratelimited(dev, "Stopped streaming\n");
+ dev_dbg(dev, "Stopped streaming\n");
return 0;
}

View File

@@ -1,8 +1,8 @@
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
index b2bc855..1cf5c6f3 100644
index cfc27629444f..039e3ac2e297 100644
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
@@ -32,7 +32,6 @@
@@ -20,7 +20,6 @@
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/module.h>
@@ -10,3 +10,15 @@ index b2bc855..1cf5c6f3 100644
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index 6142484d5cb4..492f34d728d5 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -22,7 +22,6 @@
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/module.h>
-#include <linux/nospec.h>
#include "fmdrv.h"
#include "fmdrv_v4l2.h"

View File

@@ -55,7 +55,7 @@ index 2019ed26472d..f554184395bc 100644
if (y_pages != y_dma.page_count || uv_pages != uv_dma.page_count) {
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
index 7ec8095d2270..9d003d03cb2d 100644
index 408dc4145815..8abe973c6fa8 100644
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
@@ -153,6 +153,7 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
@@ -73,7 +73,7 @@ index 7ec8095d2270..9d003d03cb2d 100644
+ if (rw == READ)
+ flags |= FOLL_WRITE;
+
dprintk(1, "init user [0x%lx+0x%lx => %d pages]\n",
dprintk(1, "init user [0x%lx+0x%lx => %lu pages]\n",
data, size, dma->nr_pages);
err = get_user_pages(current, current->mm,

View File

@@ -1,30 +1,5 @@
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index 37d0186ba330..05aa0ad74f15 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -704,17 +704,17 @@ EXPORT_SYMBOL(vb2_verify_memory_type);
static void set_queue_consistency(struct vb2_queue *q, bool consistent_mem)
{
- q->dma_attrs &= ~DMA_ATTR_NON_CONSISTENT;
+ __clear_bit(DMA_ATTR_NON_CONSISTENT, q->dma_attrs->flags);
if (!vb2_queue_allows_cache_hints(q))
return;
if (!consistent_mem)
- q->dma_attrs |= DMA_ATTR_NON_CONSISTENT;
+ dma_set_attr(DMA_ATTR_NON_CONSISTENT, q->dma_attrs);
}
static bool verify_consistency_attr(struct vb2_queue *q, bool consistent_mem)
{
- bool queue_is_consistent = !(q->dma_attrs & DMA_ATTR_NON_CONSISTENT);
+ bool queue_is_consistent = !dma_get_attr(DMA_ATTR_NON_CONSISTENT, q->dma_attrs);
if (consistent_mem != queue_is_consistent) {
dprintk(1, "memory consistency model mismatch\n");
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
index 59a016181109..ac947ff3abd2 100644
index d91fc5a3bc30..2fee9d495501 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
@@ -27,7 +27,7 @@ struct vb2_dc_buf {
@@ -36,19 +11,39 @@ index 59a016181109..ac947ff3abd2 100644
enum dma_data_direction dma_dir;
struct sg_table *dma_sgt;
struct frame_vector *vec;
@@ -41,9 +41,9 @@ struct vb2_dc_buf {
struct dma_buf_attachment *db_attach;
};
@@ -52,10 +52,10 @@ static unsigned long vb2_dc_get_contiguous_size(struct sg_table *sgt)
unsigned int i;
unsigned long size = 0;
-static inline bool vb2_dc_buffer_consistent(unsigned long attr)
+static inline bool vb2_dc_buffer_consistent(struct dma_attrs *attrs)
{
- return !(attr & DMA_ATTR_NON_CONSISTENT);
+ return !attrs || !dma_get_attr(DMA_ATTR_NON_CONSISTENT, attrs);
- for_each_sgtable_dma_sg(sgt, s, i) {
+ for_each_sg(sgt->sgl, s, sgt->nents, i) {
if (sg_dma_address(s) != expected)
break;
- expected += sg_dma_len(s);
+ expected = sg_dma_address(s) + sg_dma_len(s);
size += sg_dma_len(s);
}
return size;
@@ -97,7 +97,8 @@ static void vb2_dc_prepare(void *buf_priv)
if (!sgt)
return;
- dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
+ dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir);
}
static void vb2_dc_finish(void *buf_priv)
@@ -108,7 +109,7 @@ static void vb2_dc_finish(void *buf_priv)
if (!sgt)
return;
- dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
+ dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir);
}
/*********************************************/
@@ -133,12 +133,12 @@ static void vb2_dc_put(void *buf_priv)
@@ -127,12 +128,12 @@ static void vb2_dc_put(void *buf_priv)
kfree(buf->sgt_base);
}
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
@@ -63,7 +58,7 @@ index 59a016181109..ac947ff3abd2 100644
unsigned long size, enum dma_data_direction dma_dir,
gfp_t gfp_flags)
{
@@ -151,16 +151,16 @@ static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
@@ -145,16 +146,16 @@ static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
if (!buf)
return ERR_PTR(-ENOMEM);
@@ -83,8 +78,8 @@ index 59a016181109..ac947ff3abd2 100644
buf->vaddr = buf->cookie;
/* Prevent the device from being released while the buffer is used */
@@ -188,7 +188,7 @@ static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
}
@@ -188,7 +189,7 @@ static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
vma->vm_pgoff = 0;
ret = dma_mmap_attrs(buf->dev, vma, buf->cookie,
- buf->dma_addr, buf->size, buf->attrs);
@@ -92,7 +87,7 @@ index 59a016181109..ac947ff3abd2 100644
if (ret) {
pr_err("Remapping memory failed, error: %d\n", ret);
@@ -267,7 +267,10 @@ static void vb2_dc_dmabuf_ops_detach(struct dma_buf *dbuf,
@@ -267,15 +268,19 @@ static void vb2_dc_dmabuf_ops_detach(struct dma_buf *dbuf,
sgt = &attach->sgt;
/* release the scatterlist cache */
@@ -104,17 +99,18 @@ index 59a016181109..ac947ff3abd2 100644
/*
* Cache sync can be skipped here, as the vb2_dc memory is
* allocated from device coherent memory, which means the
@@ -275,7 +278,8 @@ static void vb2_dc_dmabuf_ops_detach(struct dma_buf *dbuf,
* memory locations do not require any explicit cache
* maintenance prior or after being used by the device.
*/
dma_unmap_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
- attach->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC);
+ dma_unmap_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ attach->dma_dir, &attrs);
+ }
sg_free_table(sgt);
kfree(attach);
db_attach->priv = NULL;
@@ -288,6 +292,9 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
@@ -288,6 +293,9 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
/* stealing dmabuf mutex to serialize map/unmap operations */
struct mutex *lock = &db_attach->dmabuf->lock;
struct sg_table *sgt;
@@ -124,43 +120,30 @@ index 59a016181109..ac947ff3abd2 100644
mutex_lock(lock);
@@ -301,7 +308,7 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
@@ -300,8 +308,8 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
/* release any previous cache */
if (attach->dma_dir != DMA_NONE) {
dma_unmap_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
- attach->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC);
+ dma_unmap_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ attach->dma_dir, &attrs);
attach->dma_dir = DMA_NONE;
}
@@ -310,7 +317,7 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
@@ -309,8 +317,9 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
* mapping to the client with new direction, no cache sync
* required see comment in vb2_dc_dmabuf_ops_detach()
*/
sgt->nents = dma_map_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
- dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- if (dma_map_sgtable(db_attach->dev, sgt, dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC)) {
+ sgt->nents = dma_map_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ dma_dir, &attrs);
if (!sgt->nents) {
+ if (!sgt->nents) {
pr_err("failed to map scatterlist\n");
mutex_unlock(lock);
@@ -343,7 +350,7 @@ vb2_dc_dmabuf_ops_begin_cpu_access(struct dma_buf *dbuf,
struct vb2_dc_buf *buf = dbuf->priv;
struct sg_table *sgt = buf->dma_sgt;
- if (vb2_dc_buffer_consistent(buf->attrs))
+ if (vb2_dc_buffer_consistent(&buf->attrs))
return 0;
dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir);
@@ -357,7 +364,7 @@ vb2_dc_dmabuf_ops_end_cpu_access(struct dma_buf *dbuf,
struct vb2_dc_buf *buf = dbuf->priv;
struct sg_table *sgt = buf->dma_sgt;
- if (vb2_dc_buffer_consistent(buf->attrs))
+ if (vb2_dc_buffer_consistent(&buf->attrs))
return 0;
dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir);
@@ -401,7 +408,7 @@ static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf)
return ERR_PTR(-EIO);
@@ -386,7 +395,7 @@ static struct sg_table *vb2_dc_get_base_sgt(struct vb2_dc_buf *buf)
}
ret = dma_get_sgtable_attrs(buf->dev, sgt, buf->cookie, buf->dma_addr,
@@ -169,7 +152,7 @@ index 59a016181109..ac947ff3abd2 100644
if (ret < 0) {
dev_err(buf->dev, "failed to get scatterlist from DMA API\n");
kfree(sgt);
@@ -450,12 +457,15 @@ static void vb2_dc_put_userptr(void *buf_priv)
@@ -435,12 +444,15 @@ static void vb2_dc_put_userptr(void *buf_priv)
struct page **pages;
if (sgt) {
@@ -180,13 +163,14 @@ index 59a016181109..ac947ff3abd2 100644
* No need to sync to CPU, it's already synced to the CPU
* since the finish() memop will have been called before this.
*/
dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
- buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC);
+ dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir, &attrs);
pages = frame_vector_pages(buf->vec);
/* sgt should exist only if vector contains pages... */
BUG_ON(IS_ERR(pages));
@@ -484,6 +494,9 @@ static void *vb2_dc_get_userptr(struct device *dev, unsigned long vaddr,
@@ -497,6 +509,9 @@ static void *vb2_dc_get_userptr(struct device *dev, unsigned long vaddr,
struct sg_table *sgt;
unsigned long contig_size;
unsigned long dma_align = dma_get_cache_alignment();
@@ -196,26 +180,30 @@ index 59a016181109..ac947ff3abd2 100644
/* Only cache aligned DMA transfers are reliable */
if (!IS_ALIGNED(vaddr | size, dma_align)) {
@@ -553,7 +566,7 @@ static void *vb2_dc_get_userptr(struct device *dev, unsigned long vaddr,
@@ -560,8 +575,9 @@ static void *vb2_dc_get_userptr(struct device *dev, unsigned long vaddr,
* No need to sync to the device, this will happen later when the
* prepare() memop is called.
*/
sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
- buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC)) {
+ sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir, &attrs);
if (sgt->nents <= 0) {
+ if (sgt->nents <= 0) {
pr_err("failed to map scatterlist\n");
ret = -EIO;
@@ -577,7 +590,7 @@ static void *vb2_dc_get_userptr(struct device *dev, unsigned long vaddr,
goto fail_sgt_init;
@@ -583,7 +599,8 @@ static void *vb2_dc_get_userptr(struct device *dev, unsigned long vaddr,
return buf;
fail_map_sg:
dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
- buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
+ dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir, &attrs);
fail_sgt_init:
sg_free_table(sgt);
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
index 13f74b1296eb..131bc64f7cf2 100644
index 6f43288fe1ef..86a5dc32bb24 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
@@ -95,7 +95,7 @@ static int vb2_dma_sg_alloc_compacted(struct vb2_dma_sg_buf *buf,
@@ -237,16 +225,19 @@ index 13f74b1296eb..131bc64f7cf2 100644
if (WARN_ON(!dev))
return ERR_PTR(-EINVAL);
@@ -148,7 +151,7 @@ static void *vb2_dma_sg_alloc(struct device *dev, unsigned long dma_attrs,
@@ -146,8 +149,9 @@ static void *vb2_dma_sg_alloc(struct device *dev, unsigned long dma_attrs,
* No need to sync to the device, this will happen later when the
* prepare() memop is called.
*/
sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
- buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC))
+ sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir, &attrs);
if (!sgt->nents)
+ if (!sgt->nents)
goto fail_map;
@@ -183,10 +186,13 @@ static void vb2_dma_sg_put(void *buf_priv)
buf->handler.refcount = &buf->refcount;
@@ -181,10 +185,13 @@ static void vb2_dma_sg_put(void *buf_priv)
int i = buf->num_pages;
if (atomic_dec_and_test(&buf->refcount)) {
@@ -255,13 +246,33 @@ index 13f74b1296eb..131bc64f7cf2 100644
+ dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs);
dprintk(1, "%s: Freeing buffer of %d pages\n", __func__,
buf->num_pages);
dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
- buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
+ buf->dma_dir, &attrs);
- dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC);
+ dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir,
+ &attrs);
if (buf->vaddr)
vm_unmap_ram(buf->vaddr, buf->num_pages);
sg_free_table(buf->dma_sgt);
@@ -221,11 +227,13 @@ static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
@@ -201,7 +208,8 @@ static void vb2_dma_sg_prepare(void *buf_priv)
struct vb2_dma_sg_buf *buf = buf_priv;
struct sg_table *sgt = buf->dma_sgt;
- dma_sync_sgtable_for_device(buf->dev, sgt, buf->dma_dir);
+ dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir);
}
static void vb2_dma_sg_finish(void *buf_priv)
@@ -209,7 +217,7 @@ static void vb2_dma_sg_finish(void *buf_priv)
struct vb2_dma_sg_buf *buf = buf_priv;
struct sg_table *sgt = buf->dma_sgt;
- dma_sync_sgtable_for_cpu(buf->dev, sgt, buf->dma_dir);
+ dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir);
}
static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
@@ -218,11 +226,13 @@ static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
{
struct vb2_dma_sg_buf *buf;
struct sg_table *sgt;
@@ -275,16 +286,19 @@ index 13f74b1296eb..131bc64f7cf2 100644
buf = kzalloc(sizeof *buf, GFP_KERNEL);
if (!buf)
return ERR_PTR(-ENOMEM);
@@ -256,7 +264,7 @@ static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
@@ -252,8 +262,9 @@ static void *vb2_dma_sg_get_userptr(struct device *dev, unsigned long vaddr,
* No need to sync to the device, this will happen later when the
* prepare() memop is called.
*/
sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
- buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
- if (dma_map_sgtable(buf->dev, sgt, buf->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC))
+ sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
+ buf->dma_dir, &attrs);
if (!sgt->nents)
+ if (!sgt->nents)
goto userptr_fail_map;
@@ -280,11 +288,14 @@ static void vb2_dma_sg_put_userptr(void *buf_priv)
return buf;
@@ -276,10 +287,14 @@ static void vb2_dma_sg_put_userptr(void *buf_priv)
struct vb2_dma_sg_buf *buf = buf_priv;
struct sg_table *sgt = &buf->sg_table;
int i = buf->num_pages;
@@ -294,14 +308,42 @@ index 13f74b1296eb..131bc64f7cf2 100644
dprintk(1, "%s: Releasing userspace buffer of %d pages\n",
__func__, buf->num_pages);
dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir,
- DMA_ATTR_SKIP_CPU_SYNC);
- dma_unmap_sgtable(buf->dev, sgt, buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
+ dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, buf->dma_dir,
+ &attrs);
if (buf->vaddr)
vm_unmap_ram(buf->vaddr, buf->num_pages);
sg_free_table(buf->dma_sgt);
@@ -413,7 +428,8 @@ static void vb2_dma_sg_dmabuf_ops_detach(struct dma_buf *dbuf,
/* release the scatterlist cache */
if (attach->dma_dir != DMA_NONE)
- dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0);
+ dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ attach->dma_dir);
sg_free_table(sgt);
kfree(attach);
db_attach->priv = NULL;
@@ -438,12 +454,15 @@ static struct sg_table *vb2_dma_sg_dmabuf_ops_map(
/* release any previous cache */
if (attach->dma_dir != DMA_NONE) {
- dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0);
+ dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ attach->dma_dir);
attach->dma_dir = DMA_NONE;
}
/* mapping to the client with new direction */
- if (dma_map_sgtable(db_attach->dev, sgt, dma_dir, 0)) {
+ sgt->nents = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ dma_dir);
+ if (!sgt->nents) {
pr_err("failed to map scatterlist\n");
mutex_unlock(lock);
return ERR_PTR(-EIO);
diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
index 163a5da6168d..bd3315a9cf2b 100644
index 180c3685d73a..9f2a3d7b514d 100644
--- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c
+++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
@@ -33,7 +33,7 @@ struct vb2_vmalloc_buf {
@@ -313,6 +355,43 @@ index 163a5da6168d..bd3315a9cf2b 100644
unsigned long size, enum dma_data_direction dma_dir,
gfp_t gfp_flags)
{
@@ -229,7 +229,7 @@ static int vb2_vmalloc_dmabuf_ops_attach(struct dma_buf *dbuf,
kfree(attach);
return ret;
}
- for_each_sgtable_sg(sgt, sg, i) {
+ for_each_sg(sgt->sgl, sg, sgt->nents, i) {
struct page *page = vmalloc_to_page(vaddr);
if (!page) {
@@ -259,7 +259,8 @@ static void vb2_vmalloc_dmabuf_ops_detach(struct dma_buf *dbuf,
/* release the scatterlist cache */
if (attach->dma_dir != DMA_NONE)
- dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0);
+ dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ attach->dma_dir);
sg_free_table(sgt);
kfree(attach);
db_attach->priv = NULL;
@@ -284,12 +285,15 @@ static struct sg_table *vb2_vmalloc_dmabuf_ops_map(
/* release any previous cache */
if (attach->dma_dir != DMA_NONE) {
- dma_unmap_sgtable(db_attach->dev, sgt, attach->dma_dir, 0);
+ dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ attach->dma_dir);
attach->dma_dir = DMA_NONE;
}
/* mapping to the client with new direction */
- if (dma_map_sgtable(db_attach->dev, sgt, dma_dir, 0)) {
+ sgt->nents = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
+ dma_dir);
+ if (!sgt->nents) {
pr_err("failed to map scatterlist\n");
mutex_unlock(lock);
return ERR_PTR(-EIO);
diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c b/drivers/media/platform/sti/bdisp/bdisp-hw.c
index a74e9fd65238..eafc63307ef7 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-hw.c
@@ -381,7 +460,7 @@ index a74e9fd65238..eafc63307ef7 100644
return -ENOMEM;
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 9e68fe043a6c..0034cf84ed79 100644
index bbb3f26fbde9..c301dc0777e7 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -116,7 +116,7 @@ struct vb2_threadio_data;
@@ -402,7 +481,7 @@ index 9e68fe043a6c..0034cf84ed79 100644
* @bidirectional: when this flag is set the DMA direction for the buffers of
* this queue will be overridden with %DMA_BIDIRECTIONAL direction.
* This is useful in cases where the hardware (firmware) writes to
@@ -566,7 +566,7 @@ struct vb2_queue {
@@ -568,7 +568,7 @@ struct vb2_queue {
unsigned int type;
unsigned int io_modes;
struct device *dev;

View File

@@ -20,10 +20,10 @@ index 6e9e05153f4e..6c029616977f 100644
goto out_destroy;
/* We accept only complete set of PFNs */
diff --git a/drivers/media/pci/ivtv/ivtv-udma.c b/drivers/media/pci/ivtv/ivtv-udma.c
index 3b33e87ed73b..f98f7a0bd69f 100644
index 5f8883031c9c..8cd24ffe9484 100644
--- a/drivers/media/pci/ivtv/ivtv-udma.c
+++ b/drivers/media/pci/ivtv/ivtv-udma.c
@@ -124,8 +124,8 @@ int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
@@ -112,8 +112,8 @@ int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
}
/* Get user pages for DMA Xfer */
@@ -35,10 +35,10 @@ index 3b33e87ed73b..f98f7a0bd69f 100644
if (user_dma.page_count != err) {
IVTV_DEBUG_WARN("failed to map user pages, returned %d instead of %d\n",
diff --git a/drivers/media/pci/ivtv/ivtv-yuv.c b/drivers/media/pci/ivtv/ivtv-yuv.c
index c3c2c79585f5..d45eeeb3dd93 100644
index cd2fe2d444c0..d219f1f84032 100644
--- a/drivers/media/pci/ivtv/ivtv-yuv.c
+++ b/drivers/media/pci/ivtv/ivtv-yuv.c
@@ -76,12 +76,11 @@ static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma,
@@ -64,12 +64,11 @@ static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma,
/* Get user pages for DMA Xfer */
y_pages = get_user_pages_unlocked(y_dma.uaddr,
@@ -54,10 +54,10 @@ index c3c2c79585f5..d45eeeb3dd93 100644
if (y_pages != y_dma.page_count || uv_pages != uv_dma.page_count) {
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
index 870a2a526e0b..8e1915074673 100644
index 111b311fea4d..54badf2416af 100644
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
@@ -156,7 +156,6 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
@@ -153,7 +153,6 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
{
unsigned long first, last;
int err, rw = 0;
@@ -65,14 +65,14 @@ index 870a2a526e0b..8e1915074673 100644
dma->direction = direction;
switch (dma->direction) {
@@ -180,14 +179,12 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
@@ -177,14 +176,12 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
if (NULL == dma->pages)
return -ENOMEM;
- if (rw == READ)
- flags |= FOLL_WRITE;
-
dprintk(1, "init user [0x%lx+0x%lx => %d pages]\n",
dprintk(1, "init user [0x%lx+0x%lx => %lu pages]\n",
data, size, dma->nr_pages);
err = get_user_pages(data & PAGE_MASK, dma->nr_pages,

View File

@@ -1,22 +1,22 @@
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index f8020ebe9f05..617fb2e944dc 100644
index 4e598e937dfe..035cd2449d24 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -846,7 +846,7 @@ static int cio2_vb2_buf_init(struct vb2_buffer *vb)
unsigned int pages = DIV_ROUND_UP(vb->planes[0].length, CIO2_PAGE_SIZE);
unsigned int lops = DIV_ROUND_UP(pages + 1, entries_per_page);
@@ -836,7 +836,7 @@ static int cio2_vb2_buf_init(struct vb2_buffer *vb)
unsigned int pages = PFN_UP(vb->planes[0].length);
unsigned int lops = DIV_ROUND_UP(pages + 1, CIO2_LOP_ENTRIES);
struct sg_table *sg;
- struct sg_dma_page_iter sg_iter;
+ struct sg_page_iter sg_iter;
int i, j;
unsigned int i, j;
if (lops <= 0 || lops > CIO2_MAX_LOPS) {
@@ -873,7 +873,7 @@ static int cio2_vb2_buf_init(struct vb2_buffer *vb)
@@ -863,7 +863,7 @@ static int cio2_vb2_buf_init(struct vb2_buffer *vb)
b->offset = sg->sgl->offset;
i = j = 0;
- for_each_sg_dma_page (sg->sgl, &sg_iter, sg->nents, 0) {
- for_each_sg_dma_page(sg->sgl, &sg_iter, sg->nents, 0) {
+ for_each_sg_page(sg->sgl, &sg_iter, sg->nents, 0) {
if (!pages--)
break;
b->lop[i][j] = sg_page_iter_dma_address(&sg_iter) >> PAGE_SHIFT;
b->lop[i][j] = PFN_DOWN(sg_page_iter_dma_address(&sg_iter));

View File

@@ -0,0 +1,258 @@
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index a2ca294eaebe..ec212cb27fdc 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -81,43 +81,14 @@ struct dma_buf_ops {
*/
void (*detach)(struct dma_buf *, struct dma_buf_attachment *);
- /**
- * @pin:
- *
- * This is called by dma_buf_pin and lets the exporter know that the
- * DMA-buf can't be moved any more.
- *
- * This is called with the dmabuf->resv object locked and is mutual
- * exclusive with @cache_sgt_mapping.
- *
- * This callback is optional and should only be used in limited use
- * cases like scanout and not for temporary pin operations.
- *
- * Returns:
- *
- * 0 on success, negative error code on failure.
- */
- int (*pin)(struct dma_buf_attachment *attach);
-
- /**
- * @unpin:
- *
- * This is called by dma_buf_unpin and lets the exporter know that the
- * DMA-buf can be moved again.
- *
- * This is called with the dmabuf->resv object locked and is mutual
- * exclusive with @cache_sgt_mapping.
- *
- * This callback is optional.
- */
- void (*unpin)(struct dma_buf_attachment *attach);
-
/**
* @map_dma_buf:
*
* This is called by dma_buf_map_attachment() and is used to map a
* shared &dma_buf into device address space, and it is mandatory. It
- * can only be called if @attach has been called successfully.
+ * can only be called if @attach has been called successfully. This
+ * essentially pins the DMA buffer into place, and it cannot be moved
+ * any more
*
* This call may sleep, e.g. when the backing storage first needs to be
* allocated, or moved to a location suitable for all currently attached
@@ -138,9 +109,6 @@ struct dma_buf_ops {
* any other kind of sharing that the exporter might wish to make
* available to buffer-users.
*
- * This is always called with the dmabuf->resv object locked when
- * the dynamic_mapping flag is true.
- *
* Returns:
*
* A &sg_table scatter list of or the backing storage of the DMA buffer,
@@ -158,8 +126,9 @@ struct dma_buf_ops {
*
* This is called by dma_buf_unmap_attachment() and should unmap and
* release the &sg_table allocated in @map_dma_buf, and it is mandatory.
- * For static dma_buf handling this might also unpins the backing
- * storage if this is the last mapping of the DMA buffer.
+ * It should also unpin the backing storage if this is the last mapping
+ * of the DMA buffer, it the exporter supports backing storage
+ * migration.
*/
void (*unmap_dma_buf)(struct dma_buf_attachment *,
struct sg_table *,
@@ -265,6 +234,31 @@ struct dma_buf_ops {
*/
int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
+ /**
+ * @map:
+ *
+ * Maps a page from the buffer into kernel address space. The page is
+ * specified by offset into the buffer in PAGE_SIZE units.
+ *
+ * This callback is optional.
+ *
+ * Returns:
+ *
+ * Virtual address pointer where requested page can be accessed. NULL
+ * on error or when this function is unimplemented by the exporter.
+ */
+ void *(*map)(struct dma_buf *, unsigned long);
+
+ /**
+ * @unmap:
+ *
+ * Unmaps a page from the buffer. Page offset and address pointer should
+ * be the same as the one passed to and returned by matching call to map.
+ *
+ * This callback is optional.
+ */
+ void (*unmap)(struct dma_buf *, unsigned long, void *);
+
void *(*vmap)(struct dma_buf *);
void (*vunmap)(struct dma_buf *, void *vaddr);
};
@@ -273,16 +267,14 @@ struct dma_buf_ops {
* struct dma_buf - shared buffer object
* @size: size of the buffer
* @file: file pointer used for sharing buffers across, and for refcounting.
- * @attachments: list of dma_buf_attachment that denotes all devices attached,
- * protected by dma_resv lock.
+ * @attachments: list of dma_buf_attachment that denotes all devices attached.
* @ops: dma_buf_ops associated with this buffer object.
* @lock: used internally to serialize list manipulation, attach/detach and
- * vmap/unmap
+ * vmap/unmap, and accesses to name
* @vmapping_counter: used internally to refcnt the vmaps
* @vmap_ptr: the current vmap ptr if vmapping_counter > 0
* @exp_name: name of the exporter; useful for debugging.
- * @name: userspace-provided name; useful for accounting and debugging,
- * protected by @resv.
+ * @name: userspace-provided name; useful for accounting and debugging.
* @owner: pointer to exporter module; used for refcounting when exporter is a
* kernel module.
* @list_node: node for dma_buf accounting and debugging.
@@ -311,7 +303,6 @@ struct dma_buf {
void *vmap_ptr;
const char *exp_name;
const char *name;
- spinlock_t name_lock; /* spinlock to protect name access */
struct module *owner;
struct list_head list_node;
void *priv;
@@ -328,53 +319,14 @@ struct dma_buf {
} cb_excl, cb_shared;
};
-/**
- * struct dma_buf_attach_ops - importer operations for an attachment
- *
- * Attachment operations implemented by the importer.
- */
-struct dma_buf_attach_ops {
- /**
- * @allow_peer2peer:
- *
- * If this is set to true the importer must be able to handle peer
- * resources without struct pages.
- */
- bool allow_peer2peer;
-
- /**
- * @move_notify: [optional] notification that the DMA-buf is moving
- *
- * If this callback is provided the framework can avoid pinning the
- * backing store while mappings exists.
- *
- * This callback is called with the lock of the reservation object
- * associated with the dma_buf held and the mapping function must be
- * called with this lock held as well. This makes sure that no mapping
- * is created concurrently with an ongoing move operation.
- *
- * Mappings stay valid and are not directly affected by this callback.
- * But the DMA-buf can now be in a different physical location, so all
- * mappings should be destroyed and re-created as soon as possible.
- *
- * New mappings can be created after this callback returns, and will
- * point to the new location of the DMA-buf.
- */
- void (*move_notify)(struct dma_buf_attachment *attach);
-};
-
/**
* struct dma_buf_attachment - holds device-buffer attachment data
* @dmabuf: buffer for this attachment.
* @dev: device attached to the buffer.
- * @node: list of dma_buf_attachment, protected by dma_resv lock of the dmabuf.
+ * @node: list of dma_buf_attachment.
* @sgt: cached mapping.
* @dir: direction of cached mapping.
- * @peer2peer: true if the importer can handle peer resources without pages.
* @priv: exporter specific attachment data.
- * @importer_ops: importer operations for this attachment, if provided
- * dma_buf_map/unmap_attachment() must be called with the dma_resv lock held.
- * @importer_priv: importer specific attachment data.
*
* This structure holds the attachment information between the dma_buf buffer
* and its user device(s). The list contains one attachment struct per device
@@ -391,9 +343,6 @@ struct dma_buf_attachment {
struct list_head node;
struct sg_table *sgt;
enum dma_data_direction dir;
- bool peer2peer;
- const struct dma_buf_attach_ops *importer_ops;
- void *importer_priv;
void *priv;
};
@@ -445,43 +394,10 @@ static inline void get_dma_buf(struct dma_buf *dmabuf)
get_file(dmabuf->file);
}
-/**
- * dma_buf_is_dynamic - check if a DMA-buf uses dynamic mappings.
- * @dmabuf: the DMA-buf to check
- *
- * Returns true if a DMA-buf exporter wants to be called with the dma_resv
- * locked for the map/unmap callbacks, false if it doesn't wants to be called
- * with the lock held.
- */
-static inline bool dma_buf_is_dynamic(struct dma_buf *dmabuf)
-{
- return !!dmabuf->ops->pin;
-}
-
-/**
- * dma_buf_attachment_is_dynamic - check if a DMA-buf attachment uses dynamic
- * mappinsg
- * @attach: the DMA-buf attachment to check
- *
- * Returns true if a DMA-buf importer wants to call the map/unmap functions with
- * the dma_resv lock held.
- */
-static inline bool
-dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach)
-{
- return !!attach->importer_ops;
-}
-
struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
- struct device *dev);
-struct dma_buf_attachment *
-dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
- const struct dma_buf_attach_ops *importer_ops,
- void *importer_priv);
+ struct device *dev);
void dma_buf_detach(struct dma_buf *dmabuf,
- struct dma_buf_attachment *attach);
-int dma_buf_pin(struct dma_buf_attachment *attach);
-void dma_buf_unpin(struct dma_buf_attachment *attach);
+ struct dma_buf_attachment *dmabuf_attach);
struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info);
@@ -493,11 +409,12 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *,
enum dma_data_direction);
void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *,
enum dma_data_direction);
-void dma_buf_move_notify(struct dma_buf *dma_buf);
int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
enum dma_data_direction dir);
int dma_buf_end_cpu_access(struct dma_buf *dma_buf,
enum dma_data_direction dir);
+void *dma_buf_kmap(struct dma_buf *, unsigned long);
+void dma_buf_kunmap(struct dma_buf *, unsigned long, void *);
int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
unsigned long);

View File

@@ -0,0 +1,39 @@
diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
index 108e7937e9c1..b5d950389aa2 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
@@ -12,7 +12,7 @@
#include <linux/moduleparam.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
-#include <linux/dev_printk.h>
+#include <linux/printk.h>
#include <linux/time.h>
#include <linux/types.h>
#include <linux/workqueue.h>
diff --git a/drivers/media/test-drivers/vidtv/vidtv_channel.c b/drivers/media/test-drivers/vidtv/vidtv_channel.c
index 0a62b97e6a27..a88aa8b8ee60 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_channel.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_channel.c
@@ -20,7 +20,7 @@
#include <linux/types.h>
#include <linux/slab.h>
-#include <linux/dev_printk.h>
+#include <linux/printk.h>
#include <linux/ratelimit.h>
#include "vidtv_channel.h"
diff --git a/drivers/media/test-drivers/vidtv/vidtv_mux.c b/drivers/media/test-drivers/vidtv/vidtv_mux.c
index 5d1a275d504b..f2864b70e940 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_mux.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_mux.c
@@ -16,7 +16,7 @@
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
-#include <linux/dev_printk.h>
+#include <linux/printk.h>
#include <linux/ratelimit.h>
#include <linux/delay.h>
#include <linux/vmalloc.h>

View File

@@ -1,9 +1,9 @@
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
index 13b65ed9e74c..28262190c3ab 100644
index 8dd0562de287..111b311fea4d 100644
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
@@ -183,12 +183,12 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
dprintk(1, "init user [0x%lx+0x%lx => %d pages]\n",
dprintk(1, "init user [0x%lx+0x%lx => %lu pages]\n",
data, size, dma->nr_pages);
- err = pin_user_pages(data & PAGE_MASK, dma->nr_pages,
@@ -12,8 +12,8 @@ index 13b65ed9e74c..28262190c3ab 100644
if (err != dma->nr_pages) {
dma->nr_pages = (err >= 0) ? err : 0;
- dprintk(1, "pin_user_pages: err=%d [%d]\n", err,
+ dprintk(1, "get_user_pages: err=%d [%d]\n", err,
- dprintk(1, "pin_user_pages: err=%d [%lu]\n", err,
+ dprintk(1, "get_user_pages: err=%d [%lu]\n", err,
dma->nr_pages);
return err < 0 ? err : -EINVAL;
}

View File

@@ -0,0 +1,481 @@
diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index 4cb890b949c3..02ebd43e672e 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -39,10 +39,9 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */
-static void dvb_bt8xx_task(struct tasklet_struct *t)
+static void dvb_bt8xx_task(unsigned long data)
{
- struct bt878 *bt = from_tasklet(bt, t, tasklet);
- struct dvb_bt8xx_card *card = dev_get_drvdata(&bt->adapter->dev);
+ struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *)data;
dprintk("%d\n", card->bt->finished_block);
@@ -778,7 +777,7 @@ static int dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
goto err_disconnect_frontend;
}
- tasklet_setup(&card->bt->tasklet, dvb_bt8xx_task);
+ tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
frontend_init(card, type);
diff --git a/drivers/media/pci/mantis/mantis_dma.c b/drivers/media/pci/mantis/mantis_dma.c
index 4df571ff272b..affc5977387f 100644
--- a/drivers/media/pci/mantis/mantis_dma.c
+++ b/drivers/media/pci/mantis/mantis_dma.c
@@ -200,9 +200,9 @@ void mantis_dma_stop(struct mantis_pci *mantis)
}
-void mantis_dma_xfer(struct tasklet_struct *t)
+void mantis_dma_xfer(unsigned long data)
{
- struct mantis_pci *mantis = from_tasklet(mantis, t, tasklet);
+ struct mantis_pci *mantis = (struct mantis_pci *) data;
struct mantis_hwconfig *config = mantis->hwconfig;
while (mantis->last_block != mantis->busy_block) {
diff --git a/drivers/media/pci/mantis/mantis_dma.h b/drivers/media/pci/mantis/mantis_dma.h
index 37da982c9c29..421663443d62 100644
--- a/drivers/media/pci/mantis/mantis_dma.h
+++ b/drivers/media/pci/mantis/mantis_dma.h
@@ -13,6 +13,6 @@ extern int mantis_dma_init(struct mantis_pci *mantis);
extern int mantis_dma_exit(struct mantis_pci *mantis);
extern void mantis_dma_start(struct mantis_pci *mantis);
extern void mantis_dma_stop(struct mantis_pci *mantis);
-extern void mantis_dma_xfer(struct tasklet_struct *t);
+extern void mantis_dma_xfer(unsigned long data);
#endif /* __MANTIS_DMA_H */
diff --git a/drivers/media/pci/mantis/mantis_dvb.c b/drivers/media/pci/mantis/mantis_dvb.c
index c7ba4a76e608..2da94be5b373 100644
--- a/drivers/media/pci/mantis/mantis_dvb.c
+++ b/drivers/media/pci/mantis/mantis_dvb.c
@@ -205,7 +205,7 @@ int mantis_dvb_init(struct mantis_pci *mantis)
}
dvb_net_init(&mantis->dvb_adapter, &mantis->dvbnet, &mantis->demux.dmx);
- tasklet_setup(&mantis->tasklet, mantis_dma_xfer);
+ tasklet_init(&mantis->tasklet, mantis_dma_xfer, (unsigned long) mantis);
tasklet_disable(&mantis->tasklet);
if (mantis->hwconfig) {
result = config->frontend_init(mantis, mantis->fe);
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c
index f9f94f47d76b..af15ca1c501b 100644
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -50,9 +50,9 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
/* nGene interrupt handler **************************************************/
/****************************************************************************/
-static void event_tasklet(struct tasklet_struct *t)
+static void event_tasklet(unsigned long data)
{
- struct ngene *dev = from_tasklet(dev, t, event_tasklet);
+ struct ngene *dev = (struct ngene *)data;
while (dev->EventQueueReadIndex != dev->EventQueueWriteIndex) {
struct EVENT_BUFFER Event =
@@ -68,9 +68,9 @@ static void event_tasklet(struct tasklet_struct *t)
}
}
-static void demux_tasklet(struct tasklet_struct *t)
+static void demux_tasklet(unsigned long data)
{
- struct ngene_channel *chan = from_tasklet(chan, t, demux_tasklet);
+ struct ngene_channel *chan = (struct ngene_channel *)data;
struct device *pdev = &chan->dev->pci_dev->dev;
struct SBufferHeader *Cur = chan->nextBuffer;
@@ -1181,7 +1181,7 @@ static void ngene_init(struct ngene *dev)
struct device *pdev = &dev->pci_dev->dev;
int i;
- tasklet_setup(&dev->event_tasklet, event_tasklet);
+ tasklet_init(&dev->event_tasklet, event_tasklet, (unsigned long)dev);
memset_io(dev->iomem + 0xc000, 0x00, 0x220);
memset_io(dev->iomem + 0xc400, 0x00, 0x100);
@@ -1445,7 +1445,7 @@ static int init_channel(struct ngene_channel *chan)
struct ngene_info *ni = dev->card_info;
int io = ni->io_type[nr];
- tasklet_setup(&chan->demux_tasklet, demux_tasklet);
+ tasklet_init(&chan->demux_tasklet, demux_tasklet, (unsigned long)chan);
chan->users = 0;
chan->type = io;
chan->mode = chan->type; /* for now only one mode */
diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c
index e7604b7ecc8d..9ca0fc3e6f80 100644
--- a/drivers/media/pci/smipcie/smipcie-main.c
+++ b/drivers/media/pci/smipcie/smipcie-main.c
@@ -280,9 +280,9 @@ static void smi_port_clearInterrupt(struct smi_port *port)
}
/* tasklet handler: DMA data to dmx.*/
-static void smi_dma_xfer(struct tasklet_struct *t)
+static void smi_dma_xfer(unsigned long data)
{
- struct smi_port *port = from_tasklet(port, t, tasklet);
+ struct smi_port *port = (struct smi_port *) data;
struct smi_dev *dev = port->dev;
u32 intr_status, finishedData, dmaManagement;
u8 dmaChan0State, dmaChan1State;
@@ -422,7 +422,7 @@ static int smi_port_init(struct smi_port *port, int dmaChanUsed)
}
smi_port_disableInterrupt(port);
- tasklet_setup(&port->tasklet, smi_dma_xfer);
+ tasklet_init(&port->tasklet, smi_dma_xfer, (unsigned long)port);
tasklet_disable(&port->tasklet);
port->enable = 1;
return 0;
diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 885e6bc40c19..bf36b1e22b63 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -357,9 +357,9 @@ static inline void start_debi_dma(struct av7110 *av7110, int dir,
irdebi(av7110, DEBISWAB, addr, 0, len);
}
-static void debiirq(struct tasklet_struct *t)
+static void debiirq(unsigned long cookie)
{
- struct av7110 *av7110 = from_tasklet(av7110, t, debi_tasklet);
+ struct av7110 *av7110 = (struct av7110 *)cookie;
int type = av7110->debitype;
int handle = (type >> 8) & 0x1f;
unsigned int xfer = 0;
@@ -458,9 +458,9 @@ static void debiirq(struct tasklet_struct *t)
}
/* irq from av7110 firmware writing the mailbox register in the DPRAM */
-static void gpioirq(struct tasklet_struct *t)
+static void gpioirq(unsigned long cookie)
{
- struct av7110 *av7110 = from_tasklet(av7110, t, gpio_tasklet);
+ struct av7110 *av7110 = (struct av7110 *)cookie;
u32 rxbuf, txbuf;
int len;
@@ -1230,9 +1230,9 @@ static int budget_stop_feed(struct dvb_demux_feed *feed)
return status;
}
-static void vpeirq(struct tasklet_struct *t)
+static void vpeirq(unsigned long cookie)
{
- struct av7110 *budget = from_tasklet(budget, t, vpe_tasklet);
+ struct av7110 *budget = (struct av7110 *)cookie;
u8 *mem = (u8 *) (budget->grabbing);
u32 olddma = budget->ttbp;
u32 newdma = saa7146_read(budget->dev, PCI_VDP3);
@@ -2518,7 +2518,7 @@ static int av7110_attach(struct saa7146_dev* dev,
saa7146_write(dev, NUM_LINE_BYTE3, (TS_HEIGHT << 16) | TS_WIDTH);
saa7146_write(dev, MC2, MASK_04 | MASK_20);
- tasklet_setup(&av7110->vpe_tasklet, vpeirq);
+ tasklet_init(&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110);
} else if (budgetpatch) {
spin_lock_init(&av7110->feedlock1);
@@ -2599,7 +2599,7 @@ static int av7110_attach(struct saa7146_dev* dev,
saa7146_write(dev, MC1, (MASK_13 | MASK_29));
/* end of budgetpatch register initialization */
- tasklet_setup(&av7110->vpe_tasklet, vpeirq);
+ tasklet_init (&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110);
} else {
saa7146_write(dev, PCI_BT_V1, 0x1c00101f);
saa7146_write(dev, BCS_CTRL, 0x80400040);
@@ -2614,8 +2614,8 @@ static int av7110_attach(struct saa7146_dev* dev,
saa7146_write(dev, GPIO_CTRL, 0x000000);
}
- tasklet_setup(&av7110->debi_tasklet, debiirq);
- tasklet_setup(&av7110->gpio_tasklet, gpioirq);
+ tasklet_init (&av7110->debi_tasklet, debiirq, (unsigned long) av7110);
+ tasklet_init (&av7110->gpio_tasklet, gpioirq, (unsigned long) av7110);
mutex_init(&av7110->pid_mutex);
diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c
index d59d18647371..77b102b8a013 100644
--- a/drivers/media/pci/ttpci/budget-ci.c
+++ b/drivers/media/pci/ttpci/budget-ci.c
@@ -99,10 +99,9 @@ struct budget_ci {
u8 tuner_pll_address; /* used for philips_tdm1316l configs */
};
-static void msp430_ir_interrupt(struct tasklet_struct *t)
+static void msp430_ir_interrupt(unsigned long data)
{
- struct budget_ci_ir *ir = from_tasklet(ir, t, msp430_irq_tasklet);
- struct budget_ci *budget_ci = container_of(ir, typeof(*budget_ci), ir);
+ struct budget_ci *budget_ci = (struct budget_ci *) data;
struct rc_dev *dev = budget_ci->ir.dev;
u32 command = ttpci_budget_debiread(&budget_ci->budget, DEBINOSWAP, DEBIADDR_IR, 2, 1, 0) >> 8;
@@ -230,7 +229,8 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
budget_ci->ir.dev = dev;
- tasklet_setup(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt);
+ tasklet_init(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt,
+ (unsigned long) budget_ci);
SAA7146_IER_ENABLE(saa, MASK_06);
saa7146_setgpio(saa, 3, SAA7146_GPIO_IRQHI);
@@ -348,10 +348,9 @@ static int ciintf_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot)
return 0;
}
-static void ciintf_interrupt(struct tasklet_struct *t)
+static void ciintf_interrupt(unsigned long data)
{
- struct budget_ci *budget_ci = from_tasklet(budget_ci, t,
- ciintf_irq_tasklet);
+ struct budget_ci *budget_ci = (struct budget_ci *) data;
struct saa7146_dev *saa = budget_ci->budget.dev;
unsigned int flags;
@@ -492,7 +491,7 @@ static int ciintf_init(struct budget_ci *budget_ci)
// Setup CI slot IRQ
if (budget_ci->ci_irq) {
- tasklet_setup(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt);
+ tasklet_init(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt, (unsigned long) budget_ci);
if (budget_ci->slot_status != SLOTSTATUS_NONE) {
saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQLO);
} else {
diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c
index d405eea5c37f..293867b9e796 100644
--- a/drivers/media/pci/ttpci/budget-core.c
+++ b/drivers/media/pci/ttpci/budget-core.c
@@ -171,9 +171,9 @@ static int budget_read_fe_status(struct dvb_frontend *fe,
return ret;
}
-static void vpeirq(struct tasklet_struct *t)
+static void vpeirq(unsigned long data)
{
- struct budget *budget = from_tasklet(budget, t, vpe_tasklet);
+ struct budget *budget = (struct budget *) data;
u8 *mem = (u8 *) (budget->grabbing);
u32 olddma = budget->ttbp;
u32 newdma = saa7146_read(budget->dev, PCI_VDP3);
@@ -519,7 +519,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
/* upload all */
saa7146_write(dev, GPIO_CTRL, 0x000000);
- tasklet_setup(&budget->vpe_tasklet, vpeirq);
+ tasklet_init(&budget->vpe_tasklet, vpeirq, (unsigned long) budget);
/* frontend power on */
if (bi->type != BUDGET_FS_ACTIVY)
diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c
index 9131265c2b87..84a58292a089 100644
--- a/drivers/media/pci/tw5864/tw5864-video.c
+++ b/drivers/media/pci/tw5864/tw5864-video.c
@@ -175,7 +175,7 @@ static const unsigned int intra4x4_lambda3[] = {
static v4l2_std_id tw5864_get_v4l2_std(enum tw5864_vid_std std);
static enum tw5864_vid_std tw5864_from_v4l2_std(v4l2_std_id v4l2_std);
-static void tw5864_handle_frame_task(struct tasklet_struct *t);
+static void tw5864_handle_frame_task(unsigned long data);
static void tw5864_handle_frame(struct tw5864_h264_frame *frame);
static void tw5864_frame_interval_set(struct tw5864_input *input);
@@ -1063,7 +1063,8 @@ int tw5864_video_init(struct tw5864_dev *dev, int *video_nr)
dev->irqmask |= TW5864_INTR_VLC_DONE | TW5864_INTR_TIMER;
tw5864_irqmask_apply(dev);
- tasklet_setup(&dev->tasklet, tw5864_handle_frame_task);
+ tasklet_init(&dev->tasklet, tw5864_handle_frame_task,
+ (unsigned long)dev);
for (i = 0; i < TW5864_INPUTS; i++) {
dev->inputs[i].root = dev;
@@ -1316,9 +1317,9 @@ static int tw5864_is_motion_triggered(struct tw5864_h264_frame *frame)
return detected;
}
-static void tw5864_handle_frame_task(struct tasklet_struct *t)
+static void tw5864_handle_frame_task(unsigned long data)
{
- struct tw5864_dev *dev = from_tasklet(dev, t, tasklet);
+ struct tw5864_dev *dev = (struct tw5864_dev *)data;
unsigned long flags;
int batch_size = H264_BUF_CNT;
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index c012fd2e1d29..cd297d14d2b1 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -439,9 +439,9 @@ static void mcam_ctlr_dma_vmalloc(struct mcam_camera *cam)
/*
* Copy data out to user space in the vmalloc case
*/
-static void mcam_frame_tasklet(struct tasklet_struct *t)
+static void mcam_frame_tasklet(unsigned long data)
{
- struct mcam_camera *cam = from_tasklet(cam, t, s_tasklet);
+ struct mcam_camera *cam = (struct mcam_camera *) data;
int i;
unsigned long flags;
struct mcam_vb_buffer *buf;
@@ -1300,7 +1300,8 @@ static int mcam_setup_vb2(struct mcam_camera *cam)
break;
case B_vmalloc:
#ifdef MCAM_MODE_VMALLOC
- tasklet_setup(&cam->s_tasklet, mcam_frame_tasklet);
+ tasklet_init(&cam->s_tasklet, mcam_frame_tasklet,
+ (unsigned long) cam);
vq->ops = &mcam_vb2_ops;
vq->mem_ops = &vb2_vmalloc_memops;
cam->dma_setup = mcam_ctlr_dma_vmalloc;
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index e47520fcb93c..0366c4a813ce 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -1150,9 +1150,9 @@ static void pxa_camera_deactivate(struct pxa_camera_dev *pcdev)
clk_disable_unprepare(pcdev->clk);
}
-static void pxa_camera_eof(struct tasklet_struct *t)
+static void pxa_camera_eof(unsigned long arg)
{
- struct pxa_camera_dev *pcdev = from_tasklet(pcdev, t, task_eof);
+ struct pxa_camera_dev *pcdev = (struct pxa_camera_dev *)arg;
unsigned long cifr;
struct pxa_buffer *buf;
@@ -2391,7 +2391,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
goto exit_free_dma;
}
- tasklet_setup(&pcdev->task_eof, pxa_camera_eof);
+ tasklet_init(&pcdev->task_eof, pxa_camera_eof, (unsigned long)pcdev);
pxa_camera_activate(pcdev);
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index dbe7788083a4..5baada4f65e5 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -77,9 +77,9 @@ static void c8sectpfe_timer_interrupt(struct timer_list *t)
add_timer(&fei->timer);
}
-static void channel_swdemux_tsklet(struct tasklet_struct *t)
+static void channel_swdemux_tsklet(unsigned long data)
{
- struct channel_info *channel = from_tasklet(channel, t, tsklet);
+ struct channel_info *channel = (struct channel_info *)data;
struct c8sectpfei *fei;
unsigned long wp, rp;
int pos, num_packets, n, size;
@@ -208,7 +208,8 @@ static int c8sectpfe_start_feed(struct dvb_demux_feed *dvbdmxfeed)
dev_dbg(fei->dev, "Starting channel=%p\n", channel);
- tasklet_setup(&channel->tsklet, channel_swdemux_tsklet);
+ tasklet_init(&channel->tsklet, channel_swdemux_tsklet,
+ (unsigned long) channel);
/* Reset the internal inputblock sram pointers */
writel(channel->fifo,
@@ -637,7 +638,8 @@ static int configure_memdma_and_inputblock(struct c8sectpfei *fei,
writel(tsin->back_buffer_busaddr, tsin->irec + DMA_PRDS_BUSRP_TP(0));
/* initialize tasklet */
- tasklet_setup(&tsin->tsklet, channel_swdemux_tsklet);
+ tasklet_init(&tsin->tsklet, channel_swdemux_tsklet,
+ (unsigned long) tsin);
return 0;
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index 5c395da74e17..cce97c9d5409 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -244,7 +244,7 @@ void fmc_update_region_info(struct fmdev *fmdev, u8 region_to_set)
* FM common sub-module will schedule this tasklet whenever it receives
* FM packet from ST driver.
*/
-static void recv_tasklet(struct tasklet_struct *t)
+static void recv_tasklet(unsigned long arg)
{
struct fmdev *fmdev;
struct fm_irq *irq_info;
@@ -253,7 +253,7 @@ static void recv_tasklet(struct tasklet_struct *t)
u8 num_fm_hci_cmds;
unsigned long flags;
- fmdev = from_tasklet(fmdev, t, tx_task);
+ fmdev = (struct fmdev *)arg;
irq_info = &fmdev->irq_info;
/* Process all packets in the RX queue */
while ((skb = skb_dequeue(&fmdev->rx_q))) {
@@ -328,13 +328,13 @@ static void recv_tasklet(struct tasklet_struct *t)
}
/* FM send tasklet: is scheduled when FM packet has to be sent to chip */
-static void send_tasklet(struct tasklet_struct *t)
+static void send_tasklet(unsigned long arg)
{
struct fmdev *fmdev;
struct sk_buff *skb;
int len;
- fmdev = from_tasklet(fmdev, t, tx_task);
+ fmdev = (struct fmdev *)arg;
if (!atomic_read(&fmdev->tx_cnt))
return;
@@ -1535,11 +1535,11 @@ int fmc_prepare(struct fmdev *fmdev)
/* Initialize TX queue and TX tasklet */
skb_queue_head_init(&fmdev->tx_q);
- tasklet_setup(&fmdev->tx_task, send_tasklet);
+ tasklet_init(&fmdev->tx_task, send_tasklet, (unsigned long)fmdev);
/* Initialize RX Queue and RX tasklet */
skb_queue_head_init(&fmdev->rx_q);
- tasklet_setup(&fmdev->rx_task, recv_tasklet);
+ tasklet_init(&fmdev->rx_task, recv_tasklet, (unsigned long)fmdev);
fmdev->irq_info.stage = 0;
atomic_set(&fmdev->tx_cnt, 1);
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index df6c5e4a0f05..b8d39b2f777f 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -769,9 +769,9 @@ static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b,
}
}
-static void ttusb_dec_process_urb_frame_list(struct tasklet_struct *t)
+static void ttusb_dec_process_urb_frame_list(unsigned long data)
{
- struct ttusb_dec *dec = from_tasklet(dec, t, urb_tasklet);
+ struct ttusb_dec *dec = (struct ttusb_dec *)data;
struct list_head *item;
struct urb_frame *frame;
unsigned long flags;
@@ -1209,7 +1209,8 @@ static void ttusb_dec_init_tasklet(struct ttusb_dec *dec)
{
spin_lock_init(&dec->urb_frame_list_lock);
INIT_LIST_HEAD(&dec->urb_frame_list);
- tasklet_setup(&dec->urb_tasklet, ttusb_dec_process_urb_frame_list);
+ tasklet_init(&dec->urb_tasklet, ttusb_dec_process_urb_frame_list,
+ (unsigned long)dec);
}
static int ttusb_init_rc( struct ttusb_dec *dec)

View File

@@ -2896,4 +2896,52 @@ static inline void sched_set_fifo(struct task_struct *p)
}
#endif
#ifdef NEED_DMA_MAP_SGTABLE
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
#include <linux/dma-mapping.h>
#define for_each_sgtable_sg(sgt, sg, i) \
for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
#define for_each_sgtable_dma_sg(sgt, sg, i) \
for_each_sg(sgt->sgl, sg, sgt->nents, i)
#define for_each_sgtable_page(sgt, piter, pgoffset) \
for_each_sg_page(sgt->sgl, piter, sgt->orig_nents, pgoffset)
#define for_each_sgtable_dma_page(sgt, dma_iter, pgoffset) \
for_each_sg_dma_page(sgt->sgl, dma_iter, sgt->nents, pgoffset)
static inline int dma_map_sgtable(struct device *dev, struct sg_table *sgt,
enum dma_data_direction dir, unsigned long attrs)
{
int nents;
nents = dma_map_sg_attrs(dev, sgt->sgl, sgt->orig_nents, dir, attrs);
if (nents <= 0)
return -EINVAL;
sgt->nents = nents;
return 0;
}
static inline void dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
enum dma_data_direction dir, unsigned long attrs)
{
dma_unmap_sg_attrs(dev, sgt->sgl, sgt->orig_nents, dir, attrs);
}
static inline void dma_sync_sgtable_for_cpu(struct device *dev,
struct sg_table *sgt, enum dma_data_direction dir)
{
dma_sync_sg_for_cpu(dev, sgt->sgl, sgt->orig_nents, dir);
}
static inline void dma_sync_sgtable_for_device(struct device *dev,
struct sg_table *sgt, enum dma_data_direction dir)
{
dma_sync_sg_for_device(dev, sgt->sgl, sgt->orig_nents, dir);
}
#endif
#endif
#endif /* _COMPAT_H */

View File

@@ -763,6 +763,7 @@ sub check_other_dependencies()
check_files_for_func("fwnode_graph_is_endpoint", "NEED_FWNODE_GRAPH_IS_ENDPOINT", "include/linux/property.h");
check_files_for_func("fallthrough", "NEED_FALLTHROUGH", "include/linux/compiler_attributes.h");
check_files_for_func("sched_set_fifo", "NEED_SCHED_SET_FIFO", "include/linux/sched.h");
check_files_for_func("dma_map_sgtable", "NEED_DMA_MAP_SGTABLE", "include/linux/dma-mapping.h");
# For tests for uapi-dependent logic
check_files_for_func_uapi("usb_endpoint_maxp", "NEED_USB_ENDPOINT_MAXP", "usb/ch9.h");

View File

@@ -28,6 +28,10 @@ VIDEO_OV9650
# Needs gpiod_set_consumer_name
VIDEO_MAX9286
[4.18.0]
# Needs proc_create_single
VIDEO_ZORAN
[4.17.0]
# Needs devm_nvmem_register
VIDEO_I2C