You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
(151) |
Apr
(278) |
May
(221) |
Jun
(161) |
Jul
(158) |
Aug
(204) |
Sep
(111) |
Oct
(344) |
Nov
(246) |
Dec
(348) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(393) |
Feb
(317) |
Mar
(225) |
Apr
(338) |
May
(328) |
Jun
(226) |
Jul
(195) |
Aug
(191) |
Sep
(211) |
Oct
(212) |
Nov
(304) |
Dec
(280) |
2003 |
Jan
(332) |
Feb
(401) |
Mar
(355) |
Apr
(240) |
May
(277) |
Jun
(299) |
Jul
(97) |
Aug
(280) |
Sep
(300) |
Oct
(200) |
Nov
(272) |
Dec
(281) |
2004 |
Jan
(384) |
Feb
(155) |
Mar
(155) |
Apr
(98) |
May
(191) |
Jun
(117) |
Jul
(119) |
Aug
(242) |
Sep
(146) |
Oct
(166) |
Nov
(101) |
Dec
(133) |
2005 |
Jan
(196) |
Feb
(133) |
Mar
(190) |
Apr
(100) |
May
(124) |
Jun
(78) |
Jul
(73) |
Aug
(110) |
Sep
(87) |
Oct
(102) |
Nov
(67) |
Dec
(77) |
2006 |
Jan
(75) |
Feb
(35) |
Mar
(51) |
Apr
(144) |
May
(40) |
Jun
(70) |
Jul
(53) |
Aug
(34) |
Sep
(31) |
Oct
(49) |
Nov
(80) |
Dec
(53) |
2007 |
Jan
(72) |
Feb
(21) |
Mar
(67) |
Apr
(56) |
May
(45) |
Jun
(23) |
Jul
(15) |
Aug
(27) |
Sep
(41) |
Oct
(20) |
Nov
(60) |
Dec
(52) |
2008 |
Jan
(40) |
Feb
(53) |
Mar
(41) |
Apr
(12) |
May
(25) |
Jun
(20) |
Jul
(19) |
Aug
(23) |
Sep
(29) |
Oct
(15) |
Nov
(10) |
Dec
(18) |
2009 |
Jan
(24) |
Feb
(19) |
Mar
(5) |
Apr
(17) |
May
(11) |
Jun
(43) |
Jul
(4) |
Aug
(2) |
Sep
(17) |
Oct
(15) |
Nov
(15) |
Dec
(4) |
2010 |
Jan
(8) |
Feb
(5) |
Mar
(4) |
Apr
(23) |
May
(16) |
Jun
|
Jul
(5) |
Aug
(1) |
Sep
(7) |
Oct
(31) |
Nov
(11) |
Dec
(6) |
2011 |
Jan
(10) |
Feb
(3) |
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(25) |
Oct
(1) |
Nov
(13) |
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(9) |
Dec
(3) |
2013 |
Jan
(3) |
Feb
(1) |
Mar
(9) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(4) |
Dec
(5) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(6) |
Jun
|
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(10) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(2) |
Mar
|
Apr
(7) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
(5) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
|
Dec
|
2021 |
Jan
(9) |
Feb
(4) |
Mar
(4) |
Apr
(2) |
May
(45) |
Jun
(1) |
Jul
|
Aug
|
Sep
(23) |
Oct
(39) |
Nov
(8) |
Dec
(19) |
2022 |
Jan
|
Feb
|
Mar
(10) |
Apr
(26) |
May
(8) |
Jun
(2) |
Jul
(10) |
Aug
(2) |
Sep
(3) |
Oct
(21) |
Nov
(3) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2024 |
Jan
(14) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Greg KH <gr...@li...> - 2022-04-25 04:45:39
|
On Sun, Apr 24, 2022 at 09:22:30PM -0400, Ian Cowan wrote: > On Sun, Apr 24, 2022 at 09:17:22PM +0200, LABBE Corentin wrote: > > Hello > > > > Thanks for your patchs, removing dprintk is a good idea. > > Please use pci_xxx() instead of dev_xxx() to be consistent with the rest of the driver. > > The comment title is misleading, zrdev_err is not about debugging. What about Logging macros ? > > > > Regards > > > > I have made those modifications, and I will resubmit patches 1 and 2 > shortly. Those are the only patches that affected by this change; 3 and > 4 will not change. You should send a whole new series, properly versioned as the documentation in the kernel asks you to. Otherwise it is impossible for reviewers and maintainers to know what is the "latest" version to accept. thanks, greg k-h |
From: Ian C. <ia...@li...> - 2022-04-25 01:39:31
|
This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_XXX() macros defined in the zoran header. In the zoran header, the new include is added to ensure all variables can be completely defined with the zoran and videocodec includes where they are located. > Slight modification made here so the patch will apply properly from > the modified patch 1 - sorry about that. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.h | 15 +++++++++++++++ drivers/staging/media/zoran/zoran.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 9dea348fee40..5e6057edd339 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -307,4 +307,19 @@ extern int videocodec_unregister(const struct videocodec *); int videocodec_debugfs_show(struct seq_file *m); +#include "zoran.h" +static inline struct zoran *videocodec_master_to_zoran(struct videocodec_master *master) +{ + struct zoran *zr = master->data; + + return zr; +} + +static inline struct zoran *videocodec_to_zoran(struct videocodec *codec) +{ + struct videocodec_master *master = codec->master_data; + + return videocodec_master_to_zoran(master); +} + #endif /*ifndef __LINUX_VIDEOCODEC_H */ diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index 42b86356c022..674658154e88 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -20,6 +20,7 @@ #include <linux/debugfs.h> #include <linux/pci.h> +#include <linux/i2c-algo-bit.h> #include <media/v4l2-device.h> #include <media/v4l2-ctrls.h> #include <media/videobuf2-core.h> -- 2.35.1 |
From: Ian C. <ia...@li...> - 2022-04-25 01:32:26
|
On Sun, Apr 24, 2022 at 09:17:22PM +0200, LABBE Corentin wrote: > Hello > > Thanks for your patchs, removing dprintk is a good idea. > Please use pci_xxx() instead of dev_xxx() to be consistent with the rest of the driver. > The comment title is misleading, zrdev_err is not about debugging. What about Logging macros ? > > Regards > I have made those modifications, and I will resubmit patches 1 and 2 shortly. Those are the only patches that affected by this change; 3 and 4 will not change. Thanks, Ian |
From: Ian C. <ia...@li...> - 2022-04-25 01:27:08
|
This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_XXX() macros defined in the zoran header. In the zoran header, the new include is added to ensure all variables can be completely defined with the zoran and videocodec includes where they are located. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.h | 15 +++++++++++++++ drivers/staging/media/zoran/zoran.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 9dea348fee40..5e6057edd339 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -307,4 +307,19 @@ extern int videocodec_unregister(const struct videocodec *); int videocodec_debugfs_show(struct seq_file *m); +#include "zoran.h" +static inline struct zoran *videocodec_master_to_zoran(struct videocodec_master *master) +{ + struct zoran *zr = master->data; + + return zr; +} + +static inline struct zoran *videocodec_to_zoran(struct videocodec *codec) +{ + struct videocodec_master *master = codec->master_data; + + return videocodec_master_to_zoran(master); +} + #endif /*ifndef __LINUX_VIDEOCODEC_H */ diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index 42b86356c022..674658154e88 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -20,6 +20,7 @@ #include <linux/debugfs.h> #include <linux/dev_printk.h> +#include <linux/i2c-algo-bit.h> #include <media/v4l2-device.h> #include <media/v4l2-ctrls.h> #include <media/videobuf2-core.h> -- 2.35.1 |
From: Ian C. <ia...@li...> - 2022-04-25 01:27:01
|
This adds the zrdev_dbg() (pointing to pci_dbg()), zrdev_err() (pointing to pci_err()), and zrdev_info() (pointing to pci_info()) macros to the zoran drivers. These are the preferred method for debugging and this will allow to extract the device from the zoran struct to make the call. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/zoran.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index 654c95fa5aba..4f7f71d8e93c 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -19,6 +19,7 @@ #define _BUZ_H_ #include <linux/debugfs.h> +#include <linux/pci.h> #include <media/v4l2-device.h> #include <media/v4l2-ctrls.h> #include <media/videobuf2-core.h> @@ -301,6 +302,18 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev) #endif +/** + * Debugging macros + */ +#define zrdev_dbg(zr, format, args...) \ + pci_dbg(zr->pci_dev, format, ##args) \ + +#define zrdev_err(zr, format, args...) \ + pci_err(zr->pci_dev, format, ##args) \ + +#define zrdev_info(zr, format, args...) \ + pci_info(zr->pci_dev, format, ##args) \ + int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir); void zoran_queue_exit(struct zoran *zr); int zr_set_buf(struct zoran *zr); -- 2.35.1 |
From: LABBE C. <cl...@ba...> - 2022-04-24 19:45:03
|
Le Sat, Apr 23, 2022 at 01:17:45AM -0400, Ian Cowan a écrit : > This adds the zrdev_dbg() (pointing to dev_dbg()), zrdev_err() (pointing > to dev_err()), and zrdev_info() (pointing to dev_info()) macros to the > zoran drivers. These are the preferred method for debugging and this > will allow to extract the device from the zoran struct to make the call. > > Signed-off-by: Ian Cowan <ia...@li...> > --- > drivers/staging/media/zoran/zoran.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h > index 654c95fa5aba..42b86356c022 100644 > --- a/drivers/staging/media/zoran/zoran.h > +++ b/drivers/staging/media/zoran/zoran.h > @@ -19,6 +19,7 @@ > #define _BUZ_H_ > > #include <linux/debugfs.h> > +#include <linux/dev_printk.h> > #include <media/v4l2-device.h> > #include <media/v4l2-ctrls.h> > #include <media/videobuf2-core.h> > @@ -301,6 +302,18 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev) > > #endif > > +/** > + * Debugging macros > + */ > +#define zrdev_dbg(zr, format, args...) \ > + dev_dbg(&zr->video_dev->dev, format, ##args) \ > + > +#define zrdev_err(zr, format, args...) \ > + dev_err(&zr->video_dev->dev, format, ##args) \ > + > +#define zrdev_info(zr, format, args...) \ > + dev_info(&zr->video_dev->dev, format, ##args) \ > + > int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir); > void zoran_queue_exit(struct zoran *zr); > int zr_set_buf(struct zoran *zr); > -- > 2.35.1 > Hello Thanks for your patchs, removing dprintk is a good idea. Please use pci_xxx() instead of dev_xxx() to be consistent with the rest of the driver. The comment title is misleading, zrdev_err is not about debugging. What about Logging macros ? Regards |
From: Greg KH <gr...@li...> - 2022-04-23 05:51:47
|
On Sat, Apr 23, 2022 at 01:23:31AM -0400, Ian Cowan wrote: > On Fri, Apr 22, 2022 at 07:10:34AM +0200, Greg KH wrote: > > On Thu, Apr 21, 2022 at 08:30:25PM -0400, Ian Cowan wrote: > > > On Thu, Apr 21, 2022 at 06:52:04PM +0300, Dan Carpenter wrote: > > > > On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote: > > > > > > > > > > For using the dev_dbg() macro, do you define this in the header file > > > > > (i.e. for this it would be videocodec.h), or where should this be > > > > > included from? > > > > > > > > dev_dbg() is defined in include/linux/dev_printk.h. Look around at how > > > > it's used. pr_debug() might be an option, but I don't know if we will > > > > accept that, we prefer dev_dbg(). > > > > > > > > regards, > > > > dan carpenter > > > > > > > > > > I'm about to submit the modified patch, but I went and looked and we > > > cannot use dev_dbg() because these specific drivers do not have any > > > association with a device struct. > > > > Then please fix that issue, as there is a real struct device that they > > are using somewhere. That is the correct solution as drivers should > > never use pr_* calls directly. > > > > thanks, > > > > greg k-h > > > > I just resubmitted and this time used dev_dbg() (I split the resubmitted > patch into 4 parts that will work if they are applied in order). There > were a few places that pr_debug() had to be used (or it can be changed > back to dprintk()) because they are cleanup functions and do not have > any devices available at the cleanup. If there is a better way to handle > that, I will go back and make a modification to that. Other than those 3 > spots, dev_dbg() is being used. Looks good, nice work! |
From: Ian C. <ia...@li...> - 2022-04-23 05:34:56
|
This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_dbg() macros defined in the zoran header. In the zoran header, the new include is added to ensure all variables can be completely defined with the zoran and videocodec includes where they are located. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.h | 15 +++++++++++++++ drivers/staging/media/zoran/zoran.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 9dea348fee40..5e6057edd339 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -307,4 +307,19 @@ extern int videocodec_unregister(const struct videocodec *); int videocodec_debugfs_show(struct seq_file *m); +#include "zoran.h" +static inline struct zoran *videocodec_master_to_zoran(struct videocodec_master *master) +{ + struct zoran *zr = master->data; + + return zr; +} + +static inline struct zoran *videocodec_to_zoran(struct videocodec *codec) +{ + struct videocodec_master *master = codec->master_data; + + return videocodec_master_to_zoran(master); +} + #endif /*ifndef __LINUX_VIDEOCODEC_H */ diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index 42b86356c022..674658154e88 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -20,6 +20,7 @@ #include <linux/debugfs.h> #include <linux/dev_printk.h> +#include <linux/i2c-algo-bit.h> #include <media/v4l2-device.h> #include <media/v4l2-ctrls.h> #include <media/videobuf2-core.h> -- 2.35.1 |
From: Ian C. <ia...@li...> - 2022-04-23 05:23:45
|
On Fri, Apr 22, 2022 at 07:10:34AM +0200, Greg KH wrote: > On Thu, Apr 21, 2022 at 08:30:25PM -0400, Ian Cowan wrote: > > On Thu, Apr 21, 2022 at 06:52:04PM +0300, Dan Carpenter wrote: > > > On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote: > > > > > > > > For using the dev_dbg() macro, do you define this in the header file > > > > (i.e. for this it would be videocodec.h), or where should this be > > > > included from? > > > > > > dev_dbg() is defined in include/linux/dev_printk.h. Look around at how > > > it's used. pr_debug() might be an option, but I don't know if we will > > > accept that, we prefer dev_dbg(). > > > > > > regards, > > > dan carpenter > > > > > > > I'm about to submit the modified patch, but I went and looked and we > > cannot use dev_dbg() because these specific drivers do not have any > > association with a device struct. > > Then please fix that issue, as there is a real struct device that they > are using somewhere. That is the correct solution as drivers should > never use pr_* calls directly. > > thanks, > > greg k-h > I just resubmitted and this time used dev_dbg() (I split the resubmitted patch into 4 parts that will work if they are applied in order). There were a few places that pr_debug() had to be used (or it can be changed back to dprintk()) because they are cleanup functions and do not have any devices available at the cleanup. If there is a better way to handle that, I will go back and make a modification to that. Other than those 3 spots, dev_dbg() is being used. --- Ian Cowan |
From: Ian C. <ia...@li...> - 2022-04-23 05:19:09
|
This replaces all of the dprintk() macro calls to the zrdev_dbg(), zrdev_info(), or zrdev_err() calls as appropriate. This allows for the removal of the dprintk() macro from each file it is defined in, along with removal of the module params that track the debugging level. In the case that a debugging level was used in a comparison, this has been replaced with checking the console level debugging and making a decision from there. If the console debugging level is at least the KERN_ debugging level equivalent, then the comparison will evaluate as true. There are a few instances where pr_debug() must be used over the zrdev_dbg(). These occur in the module cleanup functions because there should be no devices defined once we get to those modules, so we have no devices to pass to zrdev_dbg(). Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.c | 55 ++++------ drivers/staging/media/zoran/zr36016.c | 60 +++++------ drivers/staging/media/zoran/zr36050.c | 131 +++++++++++------------ drivers/staging/media/zoran/zr36060.c | 74 ++++++------- 4 files changed, 143 insertions(+), 177 deletions(-) diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index cabb291d302c..64ca3efbd3f5 100644 --- a/drivers/staging/media/zoran/videocodec.c +++ b/drivers/staging/media/zoran/videocodec.c @@ -16,16 +16,6 @@ #include "videocodec.h" -static int videocodec_debug; -module_param(videocodec_debug, int, 0); -MODULE_PARM_DESC(videocodec_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (videocodec_debug >= num) \ - printk(format, ##args); \ - } while (0) - struct attached_list { struct videocodec *codec; struct attached_list *next; @@ -69,7 +59,7 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) // attach only if the slave has at least the flags // expected by the master if ((master->flags & h->codec->flags) == master->flags) { - dprintk(4, "%s: try '%s'\n", __func__, h->codec->name); + zrdev_dbg(zr, "%s: try '%s'\n", __func__, h->codec->name); codec = kmemdup(h->codec, sizeof(struct videocodec), GFP_KERNEL); if (!codec) @@ -80,7 +70,7 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) codec->master_data = master; res = codec->setup(codec); if (res == 0) { - dprintk(3, "%s: '%s'\n", __func__, codec->name); + zrdev_dbg(zr, "%s: '%s'\n", __func__, codec->name); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); if (!ptr) goto out_kfree; @@ -89,12 +79,13 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) a = h->list; if (!a) { h->list = ptr; - dprintk(4, "videocodec: first element\n"); + zrdev_dbg(zr, "videocodec: first element\n"); } else { while (a->next) a = a->next; // find end a->next = ptr; - dprintk(4, "videocodec: in after '%s'\n", h->codec->name); + zrdev_dbg(zr, "videocodec: in after '%s'\n", + h->codec->name); } h->attached += 1; @@ -126,8 +117,8 @@ int videocodec_detach(struct videocodec *codec) return -EINVAL; } - dprintk(2, "%s: '%s', type: %x, flags %lx, magic %lx\n", __func__, - codec->name, codec->type, codec->flags, codec->magic); + zrdev_dbg(zr, "%s: '%s', type: %x, flags %lx, magic %lx\n", __func__, + codec->name, codec->type, codec->flags, codec->magic); if (!h) { zrdev_err(zr, "%s: no device left...\n", __func__); @@ -141,7 +132,7 @@ int videocodec_detach(struct videocodec *codec) if (codec == a->codec) { res = a->codec->unset(a->codec); if (res >= 0) { - dprintk(3, "%s: '%s'\n", __func__, a->codec->name); + zrdev_dbg(zr, "%s: '%s'\n", __func__, a->codec->name); a->codec->master_data = NULL; } else { zrdev_err(zr, "%s: '%s'\n", __func__, a->codec->name); @@ -149,10 +140,10 @@ int videocodec_detach(struct videocodec *codec) } if (!prev) { h->list = a->next; - dprintk(4, "videocodec: delete first\n"); + zrdev_dbg(zr, "videocodec: delete first\n"); } else { prev->next = a->next; - dprintk(4, "videocodec: delete middle\n"); + zrdev_dbg(zr, "videocodec: delete middle\n"); } kfree(a->codec); kfree(a); @@ -179,9 +170,8 @@ int videocodec_register(const struct videocodec *codec) return -EINVAL; } - dprintk(2, - "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", - codec->name, codec->type, codec->flags, codec->magic); + zrdev_dbg(zr, "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", + codec->name, codec->type, codec->flags, codec->magic); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); if (!ptr) @@ -190,13 +180,13 @@ int videocodec_register(const struct videocodec *codec) if (!h) { codeclist_top = ptr; - dprintk(4, "videocodec: hooked in as first element\n"); + zrdev_dbg(zr, "videocodec: hooked in as first element\n"); } else { while (h->next) h = h->next; // find the end h->next = ptr; - dprintk(4, "videocodec: hooked in after '%s'\n", - h->codec->name); + zrdev_dbg(zr, "videocodec: hooked in after '%s'\n", + h->codec->name); } return 0; @@ -212,9 +202,8 @@ int videocodec_unregister(const struct videocodec *codec) return -EINVAL; } - dprintk(2, - "videocodec: unregister '%s', type: %x, flags %lx, magic %lx\n", - codec->name, codec->type, codec->flags, codec->magic); + zrdev_dbg(zr, "videocodec: unregister '%s', type: %x, flags %lx, magic %lx\n", + codec->name, codec->type, codec->flags, codec->magic); if (!h) { zrdev_err(zr, "%s: no device left...\n", __func__); @@ -227,16 +216,14 @@ int videocodec_unregister(const struct videocodec *codec) zrdev_err(zr, "videocodec: '%s' is used\n", h->codec->name); return -EBUSY; } - dprintk(3, "videocodec: unregister '%s' is ok.\n", - h->codec->name); + zrdev_dbg(zr, "videocodec: unregister '%s' is ok.\n", + h->codec->name); if (!prev) { codeclist_top = h->next; - dprintk(4, - "videocodec: delete first element\n"); + zrdev_dbg(zr, "videocodec: delete first element\n"); } else { prev->next = h->next; - dprintk(4, - "videocodec: delete middle element\n"); + zrdev_dbg(zr, "videocodec: delete middle element\n"); } kfree(h); return 0; diff --git a/drivers/staging/media/zoran/zr36016.c b/drivers/staging/media/zoran/zr36016.c index 3e3376af0cfa..afdd74e7c59f 100644 --- a/drivers/staging/media/zoran/zr36016.c +++ b/drivers/staging/media/zoran/zr36016.c @@ -22,16 +22,6 @@ /* amount of chips attached via this driver */ static int zr36016_codecs; -static int zr36016_debug; -module_param(zr36016_debug, int, 0); -MODULE_PARM_DESC(zr36016_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (zr36016_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= Local hardware I/O functions: @@ -50,7 +40,7 @@ static u8 zr36016_read(struct zr36016 *ptr, u16 reg) else zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); - dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); + zrdev_dbg(zr, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); return value; } @@ -59,7 +49,7 @@ static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) { struct zoran *zr = videocodec_to_zoran(ptr->codec); - dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); + zrdev_dbg(zr, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) @@ -84,7 +74,7 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) zrdev_err(zr, "%s: invalid I/O setup, nothing read (i)!\n", ptr->name); } - dprintk(4, "%s: reading indirect from 0x%04x: %02x\n", ptr->name, reg, value); + zrdev_dbg(zr, "%s: reading indirect from 0x%04x: %02x\n", ptr->name, reg, value); return value; } @@ -92,8 +82,8 @@ static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value) { struct zoran *zr = videocodec_to_zoran(ptr->codec); - dprintk(4, "%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, - value, reg); + zrdev_dbg(zr, "%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, + value, reg); /* just in case something is wrong... */ if (ptr->codec->master_data->writereg) { @@ -127,14 +117,14 @@ static int zr36016_basic_test(struct zr36016 *ptr) { struct zoran *zr = videocodec_to_zoran(ptr->codec); - if (zr36016_debug) { + if (*KERN_INFO <= CONSOLE_LOGLEVEL_DEFAULT) { int i; zr36016_writei(ptr, ZR016I_PAX_LO, 0x55); - dprintk(1, KERN_INFO "%s: registers: ", ptr->name); + zrdev_info(zr, "%s: registers: ", ptr->name); for (i = 0; i <= 0x0b; i++) - dprintk(1, "%02x ", zr36016_readi(ptr, i)); - dprintk(1, "\n"); + zrdev_dbg(zr, "%02x ", zr36016_readi(ptr, i)); + zrdev_dbg(zr, "\n"); } // for testing just write 0, then the default value to a register and read // it back in both cases @@ -171,10 +161,11 @@ static int zr36016_pushit(struct zr36016 *ptr, u16 len, const char *data) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", - ptr->name, startreg, len); + zrdev_dbg(zr, "%s: write data block to 0x%04x (len=%d)\n", + ptr->name, startreg, len); while (i < len) { zr36016_writei(ptr, startreg++, data[i++]); } @@ -232,8 +223,9 @@ static void zr36016_init(struct zr36016 *ptr) static int zr36016_set_mode(struct videocodec *codec, int mode) { struct zr36016 *ptr = (struct zr36016 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + zrdev_dbg(zr, "%s: set_mode %d call\n", ptr->name, mode); if ((mode != CODEC_DO_EXPANSION) && (mode != CODEC_DO_COMPRESSION)) return -EINVAL; @@ -249,11 +241,12 @@ static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm struct vfe_settings *cap, struct vfe_polarity *pol) { struct zr36016 *ptr = (struct zr36016 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", - ptr->name, norm->h_start, norm->v_start, - cap->x, cap->y, cap->width, cap->height, - cap->decimation); + zrdev_dbg(zr, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", + ptr->name, norm->h_start, norm->v_start, + cap->x, cap->y, cap->width, cap->height, + cap->decimation); /* if () return -EINVAL; * trust the master driver that it knows what it does - so @@ -283,9 +276,10 @@ static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm static int zr36016_control(struct videocodec *codec, int type, int size, void *data) { struct zr36016 *ptr = (struct zr36016 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, size); + zrdev_dbg(zr, "%s: control %d call with %d byte\n", ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status - we don't know it ... */ @@ -332,11 +326,12 @@ static int zr36016_control(struct videocodec *codec, int type, int size, void *d static int zr36016_unset(struct videocodec *codec) { struct zr36016 *ptr = codec->data; + struct zoran *zr = videocodec_to_zoran(codec); if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, ptr->num); + zrdev_dbg(zr, "%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -362,7 +357,7 @@ static int zr36016_setup(struct videocodec *codec) struct zr36016 *ptr; int res; - dprintk(2, "zr36016: initializing VFE subsystem #%d.\n", zr36016_codecs); + zrdev_dbg(zr, "zr36016: initializing VFE subsystem #%d.\n", zr36016_codecs); if (zr36016_codecs == MAX_CODECS) { zrdev_err(zr, "zr36016: Can't attach more codecs!\n"); @@ -392,7 +387,7 @@ static int zr36016_setup(struct videocodec *codec) ptr->ydec = 0; zr36016_init(ptr); - dprintk(1, KERN_INFO "%s: codec v%d attached and running\n", ptr->name, ptr->version); + zrdev_info(zr, "%s: codec v%d attached and running\n", ptr->name, ptr->version); return 0; } @@ -425,9 +420,8 @@ int zr36016_init_module(void) void zr36016_cleanup_module(void) { if (zr36016_codecs) { - dprintk(1, - "zr36016: something's wrong - %d codecs left somehow.\n", - zr36016_codecs); + pr_debug("zr36016: something's wrong - %d codecs left somehow.\n", + zr36016_codecs); } videocodec_unregister(&zr36016_codec); } diff --git a/drivers/staging/media/zoran/zr36050.c b/drivers/staging/media/zoran/zr36050.c index 950dd79f5c81..b26b0711461c 100644 --- a/drivers/staging/media/zoran/zr36050.c +++ b/drivers/staging/media/zoran/zr36050.c @@ -29,17 +29,6 @@ /* amount of chips attached via this driver */ static int zr36050_codecs; -/* debugging is available via module parameter */ -static int zr36050_debug; -module_param(zr36050_debug, int, 0); -MODULE_PARM_DESC(zr36050_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (zr36050_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= Local hardware I/O functions: @@ -49,32 +38,32 @@ MODULE_PARM_DESC(zr36050_debug, "Debug level (0-4)"); /* read and write functions */ static u8 zr36050_read(struct zr36050 *ptr, u16 reg) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); u8 value = 0; /* just in case something is wrong... */ if (ptr->codec->master_data->readreg) value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; else - dprintk(1, - KERN_ERR "%s: invalid I/O setup, nothing read!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); - dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); + zrdev_dbg(zr, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); return value; } static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); + struct zoran *zr = videocodec_to_zoran(ptr->codec); + + zrdev_dbg(zr, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); /* just in case something is wrong... */ if (ptr->codec->master_data->writereg) ptr->codec->master_data->writereg(ptr->codec, reg, value); else - dprintk(1, - KERN_ERR - "%s: invalid I/O setup, nothing written!\n", - ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing written!\n", + ptr->name); } /* ========================================================================= @@ -117,14 +106,14 @@ static u16 zr36050_read_scalefactor(struct zr36050 *ptr) static void zr36050_wait_end(struct zr36050 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int i = 0; while (!(zr36050_read_status1(ptr) & 0x4)) { udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! - dprintk(1, - "%s: timeout at wait_end (last status: 0x%02x)\n", - ptr->name, ptr->status1); + zrdev_dbg(zr, "%s: timeout at wait_end (last status: 0x%02x)\n", + ptr->name, ptr->status1); break; } } @@ -138,33 +127,29 @@ static void zr36050_wait_end(struct zr36050 *ptr) static int zr36050_basic_test(struct zr36050 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); + zr36050_write(ptr, ZR050_SOF_IDX, 0x00); zr36050_write(ptr, ZR050_SOF_IDX + 1, 0x00); if ((zr36050_read(ptr, ZR050_SOF_IDX) | zr36050_read(ptr, ZR050_SOF_IDX + 1)) != 0x0000) { - dprintk(1, - KERN_ERR - "%s: attach failed, can't connect to jpeg processor!\n", - ptr->name); + zrdev_err(zr, "%s: attach failed, can't connect to jpeg processor!\n", + ptr->name); return -ENXIO; } zr36050_write(ptr, ZR050_SOF_IDX, 0xff); zr36050_write(ptr, ZR050_SOF_IDX + 1, 0xc0); if (((zr36050_read(ptr, ZR050_SOF_IDX) << 8) | zr36050_read(ptr, ZR050_SOF_IDX + 1)) != 0xffc0) { - dprintk(1, - KERN_ERR - "%s: attach failed, can't connect to jpeg processor!\n", - ptr->name); + zrdev_err(zr, "%s: attach failed, can't connect to jpeg processor!\n", + ptr->name); return -ENXIO; } zr36050_wait_end(ptr); if ((ptr->status1 & 0x4) == 0) { - dprintk(1, - KERN_ERR - "%s: attach failed, jpeg processor failed (end flag)!\n", - ptr->name); + zrdev_err(zr, "%s: attach failed, jpeg processor failed (end flag)!\n", + ptr->name); return -EBUSY; } @@ -179,10 +164,11 @@ static int zr36050_basic_test(struct zr36050 *ptr) static int zr36050_pushit(struct zr36050 *ptr, u16 startreg, u16 len, const char *data) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, - startreg, len); + zrdev_dbg(zr, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, + startreg, len); while (i < len) zr36050_write(ptr, startreg++, data[i++]); @@ -305,11 +291,12 @@ static const char zr36050_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 }; static int zr36050_set_sof(struct zr36050 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); char sof_data[34]; // max. size of register set int i; - dprintk(3, "%s: write SOF (%dx%d, %d components)\n", ptr->name, - ptr->width, ptr->height, NO_OF_COMPONENTS); + zrdev_dbg(zr, "%s: write SOF (%dx%d, %d components)\n", ptr->name, + ptr->width, ptr->height, NO_OF_COMPONENTS); sof_data[0] = 0xff; sof_data[1] = 0xc0; sof_data[2] = 0x00; @@ -336,10 +323,11 @@ static int zr36050_set_sof(struct zr36050 *ptr) static int zr36050_set_sos(struct zr36050 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); char sos_data[16]; // max. size of register set int i; - dprintk(3, "%s: write SOS\n", ptr->name); + zrdev_dbg(zr, "%s: write SOS\n", ptr->name); sos_data[0] = 0xff; sos_data[1] = 0xda; sos_data[2] = 0x00; @@ -363,9 +351,10 @@ static int zr36050_set_sos(struct zr36050 *ptr) static int zr36050_set_dri(struct zr36050 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); char dri_data[6]; // max. size of register set - dprintk(3, "%s: write DRI\n", ptr->name); + zrdev_dbg(zr, "%s: write DRI\n", ptr->name); dri_data[0] = 0xff; dri_data[1] = 0xdd; dri_data[2] = 0x00; @@ -390,7 +379,7 @@ static void zr36050_init(struct zr36050 *ptr) long bitcnt, tmp; if (ptr->mode == CODEC_DO_COMPRESSION) { - dprintk(2, "%s: COMPRESSION SETUP\n", ptr->name); + zrdev_dbg(zr, "%s: COMPRESSION SETUP\n", ptr->name); /* 050 communicates with 057 in master mode */ zr36050_write(ptr, ZR050_HARDWARE, ZR050_HW_MSTR); @@ -420,7 +409,7 @@ static void zr36050_init(struct zr36050 *ptr) /* setup the fixed jpeg tables - maybe variable, though - * (see table init section above) */ - dprintk(3, "%s: write DQT, DHT, APP\n", ptr->name); + zrdev_dbg(zr, "%s: write DQT, DHT, APP\n", ptr->name); sum += zr36050_pushit(ptr, ZR050_DQT_IDX, sizeof(zr36050_dqt), zr36050_dqt); sum += zr36050_pushit(ptr, ZR050_DHT_IDX, @@ -443,8 +432,8 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_GO, 1); // launch codec zr36050_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", - ptr->name, ptr->status1); + zrdev_dbg(zr, "%s: Status after table preload: 0x%02x\n", + ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { zrdev_err(zr, "%s: init aborted!\n", ptr->name); @@ -458,9 +447,8 @@ static void zr36050_init(struct zr36050 *ptr) bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; - dprintk(3, - "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", - ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); + zrdev_dbg(zr, "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", + ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_NET_HI, tmp >> 8); zr36050_write(ptr, ZR050_TCV_NET_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -471,8 +459,8 @@ static void zr36050_init(struct zr36050 *ptr) bitcnt -= ((bitcnt * 5) >> 6); // bits without eob tmp = bitcnt >> 16; - dprintk(3, "%s: code: nettobit=%ld, highnettobits=%ld\n", - ptr->name, bitcnt, tmp); + zrdev_dbg(zr, "%s: code: nettobit=%ld, highnettobits=%ld\n", + ptr->name, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_DATA_HI, tmp >> 8); zr36050_write(ptr, ZR050_TCV_DATA_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -490,7 +478,7 @@ static void zr36050_init(struct zr36050 *ptr) ((ptr->app.len > 0) ? ZR050_ME_APP : 0) | ((ptr->com.len > 0) ? ZR050_ME_COM : 0)); } else { - dprintk(2, "%s: EXPANSION SETUP\n", ptr->name); + zrdev_dbg(zr, "%s: EXPANSION SETUP\n", ptr->name); /* 050 communicates with 055 in master mode */ zr36050_write(ptr, ZR050_HARDWARE, @@ -503,7 +491,7 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_INT_REQ_0, 0); zr36050_write(ptr, ZR050_INT_REQ_1, 3); // low 2 bits always 1 - dprintk(3, "%s: write DHT\n", ptr->name); + zrdev_dbg(zr, "%s: write DHT\n", ptr->name); zr36050_pushit(ptr, ZR050_DHT_IDX, sizeof(zr36050_dht), zr36050_dht); @@ -512,8 +500,8 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_GO, 1); // launch codec zr36050_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", - ptr->name, ptr->status1); + zrdev_dbg(zr, "%s: Status after table preload: 0x%02x\n", + ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { zrdev_err(zr, "%s: init aborted!\n", ptr->name); @@ -540,8 +528,9 @@ static void zr36050_init(struct zr36050 *ptr) static int zr36050_set_mode(struct videocodec *codec, int mode) { struct zr36050 *ptr = (struct zr36050 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + zrdev_dbg(zr, "%s: set_mode %d call\n", ptr->name, mode); if ((mode != CODEC_DO_EXPANSION) && (mode != CODEC_DO_COMPRESSION)) return -EINVAL; @@ -557,12 +546,13 @@ static int zr36050_set_video(struct videocodec *codec, const struct tvnorm *norm struct vfe_settings *cap, struct vfe_polarity *pol) { struct zr36050 *ptr = (struct zr36050 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); int size; - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", - ptr->name, norm->h_start, norm->v_start, - cap->x, cap->y, cap->width, cap->height, - cap->decimation, cap->quality); + zrdev_dbg(zr, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", + ptr->name, norm->h_start, norm->v_start, + cap->x, cap->y, cap->width, cap->height, + cap->decimation, cap->quality); /* if () return -EINVAL; * trust the master driver that it knows what it does - so * we allow invalid startx/y and norm for now ... */ @@ -595,10 +585,11 @@ static int zr36050_set_video(struct videocodec *codec, const struct tvnorm *norm static int zr36050_control(struct videocodec *codec, int type, int size, void *data) { struct zr36050 *ptr = (struct zr36050 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, - size); + zrdev_dbg(zr, "%s: control %d call with %d byte\n", ptr->name, type, + size); switch (type) { case CODEC_G_STATUS: /* get last status */ @@ -714,12 +705,12 @@ static int zr36050_control(struct videocodec *codec, int type, int size, void *d static int zr36050_unset(struct videocodec *codec) { struct zr36050 *ptr = codec->data; + struct zoran *zr = videocodec_to_zoran(codec); if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, - ptr->num); + zrdev_dbg(zr, "%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -742,14 +733,14 @@ static int zr36050_unset(struct videocodec *codec) static int zr36050_setup(struct videocodec *codec) { struct zr36050 *ptr; + struct zoran *zr = videocodec_to_zoran(codec); int res; - dprintk(2, "zr36050: initializing MJPEG subsystem #%d.\n", - zr36050_codecs); + zrdev_dbg(zr, "zr36050: initializing MJPEG subsystem #%d.\n", + zr36050_codecs); if (zr36050_codecs == MAX_CODECS) { - dprintk(1, - KERN_ERR "zr36050: Can't attach more codecs!\n"); + zrdev_err(zr, "zr36050: Can't attach more codecs!\n"); return -ENOSPC; } //mem structure init @@ -790,8 +781,7 @@ static int zr36050_setup(struct videocodec *codec) zr36050_init(ptr); - dprintk(1, KERN_INFO "%s: codec attached and running\n", - ptr->name); + zrdev_info(zr, "%s: codec attached and running\n", ptr->name); return 0; } @@ -824,9 +814,8 @@ int zr36050_init_module(void) void zr36050_cleanup_module(void) { if (zr36050_codecs) { - dprintk(1, - "zr36050: something's wrong - %d codecs left somehow.\n", - zr36050_codecs); + pr_debug("zr36050: something's wrong - %d codecs left somehow.\n", + zr36050_codecs); } videocodec_unregister(&zr36050_codec); } diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c index c09910669585..81e8bfd05d6a 100644 --- a/drivers/staging/media/zoran/zr36060.c +++ b/drivers/staging/media/zoran/zr36060.c @@ -32,16 +32,6 @@ static bool low_bitrate; module_param(low_bitrate, bool, 0); MODULE_PARM_DESC(low_bitrate, "Buz compatibility option, halves bitrate"); -static int zr36060_debug; -module_param(zr36060_debug, int, 0); -MODULE_PARM_DESC(zr36060_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (zr36060_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= * Local hardware I/O functions: * read/write via codec layer (registers are located in the master device) @@ -66,7 +56,7 @@ static void zr36060_write(struct zr36060 *ptr, u16 reg, u8 value) { struct zoran *zr = videocodec_to_zoran(ptr->codec); - dprintk(4, "0x%02x @0x%04x\n", value, reg); + zrdev_dbg(zr, "0x%02x @0x%04x\n", value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) @@ -104,14 +94,14 @@ static u16 zr36060_read_scalefactor(struct zr36060 *ptr) /* wait if codec is ready to proceed (end of processing) or time is over */ static void zr36060_wait_end(struct zr36060 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int i = 0; while (zr36060_read_status(ptr) & ZR060_CFSR_BUSY) { udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! - dprintk(1, - "%s: timeout at wait_end (last status: 0x%02x)\n", - ptr->name, ptr->status); + zrdev_dbg(zr, "%s: timeout at wait_end (last status: 0x%02x)\n", + ptr->name, ptr->status); break; } } @@ -140,10 +130,11 @@ static int zr36060_basic_test(struct zr36060 *ptr) /* simple loop for pushing the init datasets */ static int zr36060_pushit(struct zr36060 *ptr, u16 startreg, u16 len, const char *data) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, - startreg, len); + zrdev_dbg(zr, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, + startreg, len); while (i < len) zr36060_write(ptr, startreg++, data[i++]); @@ -254,11 +245,12 @@ static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 }; /* SOF (start of frame) segment depends on width, height and sampling ratio of each color component */ static int zr36060_set_sof(struct zr36060 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); char sof_data[34]; // max. size of register set int i; - dprintk(3, "%s: write SOF (%dx%d, %d components)\n", ptr->name, - ptr->width, ptr->height, NO_OF_COMPONENTS); + zrdev_dbg(zr, "%s: write SOF (%dx%d, %d components)\n", ptr->name, + ptr->width, ptr->height, NO_OF_COMPONENTS); sof_data[0] = 0xff; sof_data[1] = 0xc0; sof_data[2] = 0x00; @@ -282,10 +274,11 @@ static int zr36060_set_sof(struct zr36060 *ptr) /* SOS (start of scan) segment depends on the used scan components of each color component */ static int zr36060_set_sos(struct zr36060 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); char sos_data[16]; // max. size of register set int i; - dprintk(3, "%s: write SOS\n", ptr->name); + zrdev_dbg(zr, "%s: write SOS\n", ptr->name); sos_data[0] = 0xff; sos_data[1] = 0xda; sos_data[2] = 0x00; @@ -307,9 +300,10 @@ static int zr36060_set_sos(struct zr36060 *ptr) /* DRI (define restart interval) */ static int zr36060_set_dri(struct zr36060 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); char dri_data[6]; // max. size of register set - dprintk(3, "%s: write DRI\n", ptr->name); + zrdev_dbg(zr, "%s: write DRI\n", ptr->name); dri_data[0] = 0xff; dri_data[1] = 0xdd; dri_data[2] = 0x00; @@ -329,7 +323,7 @@ static void zr36060_init(struct zr36060 *ptr) long bitcnt, tmp; if (ptr->mode == CODEC_DO_COMPRESSION) { - dprintk(2, "%s: COMPRESSION SETUP\n", ptr->name); + zrdev_dbg(zr, "%s: COMPRESSION SETUP\n", ptr->name); zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST); @@ -382,9 +376,8 @@ static void zr36060_init(struct zr36060 *ptr) bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; - dprintk(3, - "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", - ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); + zrdev_dbg(zr, "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", + ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36060_write(ptr, ZR060_TCV_NET_HI, tmp >> 8); zr36060_write(ptr, ZR060_TCV_NET_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -395,8 +388,8 @@ static void zr36060_init(struct zr36060 *ptr) bitcnt -= ((bitcnt * 5) >> 6); // bits without eob tmp = bitcnt >> 16; - dprintk(3, "%s: code: nettobit=%ld, highnettobits=%ld\n", - ptr->name, bitcnt, tmp); + zrdev_dbg(zr, "%s: code: nettobit=%ld, highnettobits=%ld\n", + ptr->name, bitcnt, tmp); zr36060_write(ptr, ZR060_TCV_DATA_HI, tmp >> 8); zr36060_write(ptr, ZR060_TCV_DATA_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -414,7 +407,7 @@ static void zr36060_init(struct zr36060 *ptr) zr36060_write(ptr, ZR060_VCR, ZR060_VCR_RANGE); } else { - dprintk(2, "%s: EXPANSION SETUP\n", ptr->name); + zrdev_dbg(zr, "%s: EXPANSION SETUP\n", ptr->name); zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST); @@ -447,7 +440,7 @@ static void zr36060_init(struct zr36060 *ptr) /* Load the tables */ zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST | ZR060_LOAD_LOAD); zr36060_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status); + zrdev_dbg(zr, "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status); if (ptr->status & ZR060_CFSR_BUSY) { zrdev_err(zr, "%s: init aborted!\n", ptr->name); @@ -467,8 +460,9 @@ static void zr36060_init(struct zr36060 *ptr) static int zr36060_set_mode(struct videocodec *codec, int mode) { struct zr36060 *ptr = (struct zr36060 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + zrdev_dbg(zr, "%s: set_mode %d call\n", ptr->name, mode); if (mode != CODEC_DO_EXPANSION && mode != CODEC_DO_COMPRESSION) return -EINVAL; @@ -484,11 +478,12 @@ static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm struct vfe_settings *cap, struct vfe_polarity *pol) { struct zr36060 *ptr = (struct zr36060 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); u32 reg; int size; - dprintk(2, "%s: set_video %d/%d-%dx%d (%%%d) call\n", ptr->name, - cap->x, cap->y, cap->width, cap->height, cap->decimation); + zrdev_dbg(zr, "%s: set_video %d/%d-%dx%d (%%%d) call\n", ptr->name, + cap->x, cap->y, cap->width, cap->height, cap->decimation); /* if () return -EINVAL; * trust the master driver that it knows what it does - so @@ -643,10 +638,11 @@ static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm static int zr36060_control(struct videocodec *codec, int type, int size, void *data) { struct zr36060 *ptr = (struct zr36060 *)codec->data; + struct zoran *zr = videocodec_to_zoran(codec); int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, - size); + zrdev_dbg(zr, "%s: control %d call with %d byte\n", ptr->name, type, + size); switch (type) { case CODEC_G_STATUS: /* get last status */ @@ -759,11 +755,12 @@ static int zr36060_control(struct videocodec *codec, int type, int size, void *d static int zr36060_unset(struct videocodec *codec) { struct zr36060 *ptr = codec->data; + struct zoran *zr = videocodec_to_zoran(codec); if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, ptr->num); + zrdev_dbg(zr, "%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -787,7 +784,7 @@ static int zr36060_setup(struct videocodec *codec) struct zr36060 *ptr; int res; - dprintk(2, "zr36060: initializing MJPEG subsystem #%d.\n", zr36060_codecs); + zrdev_dbg(zr, "zr36060: initializing MJPEG subsystem #%d.\n", zr36060_codecs); if (zr36060_codecs == MAX_CODECS) { zrdev_err(zr, "zr36060: Can't attach more codecs!\n"); @@ -830,7 +827,7 @@ static int zr36060_setup(struct videocodec *codec) zr36060_init(ptr); - dprintk(1, KERN_INFO "%s: codec attached and running\n", ptr->name); + zrdev_info(zr, "%s: codec attached and running\n", ptr->name); return 0; } @@ -859,9 +856,8 @@ int zr36060_init_module(void) void zr36060_cleanup_module(void) { if (zr36060_codecs) { - dprintk(1, - "zr36060: something's wrong - %d codecs left somehow.\n", - zr36060_codecs); + pr_debug("zr36060: something's wrong - %d codecs left somehow.\n", + zr36060_codecs); } /* however, we can't just stay alive */ -- 2.35.1 |
From: Ian C. <ia...@li...> - 2022-04-23 05:18:46
|
This replaces all of the pr_err() calls to the preferred zrdev_err() macro that calls the dev_dbg() macro. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.c | 32 +++++++++++++----------- drivers/staging/media/zoran/zr36016.c | 28 +++++++++++++-------- drivers/staging/media/zoran/zr36050.c | 5 ++-- drivers/staging/media/zoran/zr36060.c | 19 +++++++++----- 4 files changed, 52 insertions(+), 32 deletions(-) diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index 3af7d02bd910..cabb291d302c 100644 --- a/drivers/staging/media/zoran/videocodec.c +++ b/drivers/staging/media/zoran/videocodec.c @@ -47,20 +47,21 @@ static struct codec_list *codeclist_top; struct videocodec *videocodec_attach(struct videocodec_master *master) { struct codec_list *h = codeclist_top; + struct zoran *zr = videocodec_master_to_zoran(master); struct attached_list *a, *ptr; struct videocodec *codec; int res; if (!master) { - pr_err("%s: no data\n", __func__); + zrdev_err(zr, "%s: no data\n", __func__); return NULL; } - dprintk(2, "%s: '%s', flags %lx, magic %lx\n", __func__, - master->name, master->flags, master->magic); + zrdev_dbg(zr, "%s: '%s', flags %lx, magic %lx\n", __func__, + master->name, master->flags, master->magic); if (!h) { - pr_err("%s: no device available\n", __func__); + zrdev_err(zr, "%s: no device available\n", __func__); return NULL; } @@ -105,7 +106,7 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) h = h->next; } - pr_err("%s: no codec found!\n", __func__); + zrdev_err(zr, "%s: no codec found!\n", __func__); return NULL; out_kfree: @@ -116,11 +117,12 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) int videocodec_detach(struct videocodec *codec) { struct codec_list *h = codeclist_top; + struct zoran *zr = videocodec_to_zoran(codec); struct attached_list *a, *prev; int res; if (!codec) { - pr_err("%s: no data\n", __func__); + zrdev_err(zr, "%s: no data\n", __func__); return -EINVAL; } @@ -128,7 +130,7 @@ int videocodec_detach(struct videocodec *codec) codec->name, codec->type, codec->flags, codec->magic); if (!h) { - pr_err("%s: no device left...\n", __func__); + zrdev_err(zr, "%s: no device left...\n", __func__); return -ENXIO; } @@ -142,7 +144,7 @@ int videocodec_detach(struct videocodec *codec) dprintk(3, "%s: '%s'\n", __func__, a->codec->name); a->codec->master_data = NULL; } else { - pr_err("%s: '%s'\n", __func__, a->codec->name); + zrdev_err(zr, "%s: '%s'\n", __func__, a->codec->name); a->codec->master_data = NULL; } if (!prev) { @@ -163,16 +165,17 @@ int videocodec_detach(struct videocodec *codec) h = h->next; } - pr_err("%s: given codec not found!\n", __func__); + zrdev_err(zr, "%s: given codec not found!\n", __func__); return -EINVAL; } int videocodec_register(const struct videocodec *codec) { struct codec_list *ptr, *h = codeclist_top; + struct zoran *zr = videocodec_to_zoran((struct videocodec *)codec); if (!codec) { - pr_err("%s: no data!\n", __func__); + zrdev_err(zr, "%s: no data!\n", __func__); return -EINVAL; } @@ -202,9 +205,10 @@ int videocodec_register(const struct videocodec *codec) int videocodec_unregister(const struct videocodec *codec) { struct codec_list *prev = NULL, *h = codeclist_top; + struct zoran *zr = videocodec_to_zoran((struct videocodec *)codec); if (!codec) { - pr_err("%s: no data!\n", __func__); + zrdev_err(zr, "%s: no data!\n", __func__); return -EINVAL; } @@ -213,14 +217,14 @@ int videocodec_unregister(const struct videocodec *codec) codec->name, codec->type, codec->flags, codec->magic); if (!h) { - pr_err("%s: no device left...\n", __func__); + zrdev_err(zr, "%s: no device left...\n", __func__); return -ENXIO; } while (h) { if (codec == h->codec) { if (h->attached) { - pr_err("videocodec: '%s' is used\n", h->codec->name); + zrdev_err(zr, "videocodec: '%s' is used\n", h->codec->name); return -EBUSY; } dprintk(3, "videocodec: unregister '%s' is ok.\n", @@ -241,7 +245,7 @@ int videocodec_unregister(const struct videocodec *codec) h = h->next; } - pr_err("%s: given codec not found!\n", __func__); + zrdev_err(zr, "%s: given codec not found!\n", __func__); return -EINVAL; } diff --git a/drivers/staging/media/zoran/zr36016.c b/drivers/staging/media/zoran/zr36016.c index 26c7c32b6bc0..3e3376af0cfa 100644 --- a/drivers/staging/media/zoran/zr36016.c +++ b/drivers/staging/media/zoran/zr36016.c @@ -26,7 +26,6 @@ static int zr36016_debug; module_param(zr36016_debug, int, 0); MODULE_PARM_DESC(zr36016_debug, "Debug level (0-4)"); - #define dprintk(num, format, args...) \ do { \ if (zr36016_debug >= num) \ @@ -42,13 +41,14 @@ MODULE_PARM_DESC(zr36016_debug, "Debug level (0-4)"); /* read and write functions */ static u8 zr36016_read(struct zr36016 *ptr, u16 reg) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); u8 value = 0; /* just in case something is wrong... */ if (ptr->codec->master_data->readreg) value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; else - pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); @@ -57,13 +57,15 @@ static u8 zr36016_read(struct zr36016 *ptr, u16 reg) static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); + dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) ptr->codec->master_data->writereg(ptr->codec, reg, value); else - pr_err("%s: invalid I/O setup, nothing written!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing written!\n", ptr->name); } /* indirect read and write functions */ @@ -71,6 +73,7 @@ static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) * writing it all time cost not much and is safer... */ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); u8 value = 0; /* just in case something is wrong... */ @@ -78,7 +81,7 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F); // ADDR value = (ptr->codec->master_data->readreg(ptr->codec, ZR016_IDATA)) & 0xFF; // DATA } else { - pr_err("%s: invalid I/O setup, nothing read (i)!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing read (i)!\n", ptr->name); } dprintk(4, "%s: reading indirect from 0x%04x: %02x\n", ptr->name, reg, value); @@ -87,6 +90,8 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); + dprintk(4, "%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, value, reg); @@ -95,7 +100,7 @@ static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value) ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F); // ADDR ptr->codec->master_data->writereg(ptr->codec, ZR016_IDATA, value & 0x0FF); // DATA } else { - pr_err("%s: invalid I/O setup, nothing written (i)!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing written (i)!\n", ptr->name); } } @@ -120,6 +125,8 @@ static u8 zr36016_read_version(struct zr36016 *ptr) static int zr36016_basic_test(struct zr36016 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); + if (zr36016_debug) { int i; @@ -133,19 +140,19 @@ static int zr36016_basic_test(struct zr36016 *ptr) // it back in both cases zr36016_writei(ptr, ZR016I_PAX_LO, 0x00); if (zr36016_readi(ptr, ZR016I_PAX_LO) != 0x0) { - pr_err("%s: attach failed, can't connect to vfe processor!\n", ptr->name); + zrdev_err(zr, "%s: attach failed, can't connect to vfe processor!\n", ptr->name); return -ENXIO; } zr36016_writei(ptr, ZR016I_PAX_LO, 0x0d0); if (zr36016_readi(ptr, ZR016I_PAX_LO) != 0x0d0) { - pr_err("%s: attach failed, can't connect to vfe processor!\n", ptr->name); + zrdev_err(zr, "%s: attach failed, can't connect to vfe processor!\n", ptr->name); return -ENXIO; } // we allow version numbers from 0-3, should be enough, though zr36016_read_version(ptr); if (ptr->version & 0x0c) { - pr_err("%s: attach failed, suspicious version %d found...\n", ptr->name, - ptr->version); + zrdev_err(zr, "%s: attach failed, suspicious version %d found...\n", ptr->name, + ptr->version); return -ENXIO; } @@ -351,13 +358,14 @@ static int zr36016_unset(struct videocodec *codec) static int zr36016_setup(struct videocodec *codec) { + struct zoran *zr = videocodec_to_zoran(codec); struct zr36016 *ptr; int res; dprintk(2, "zr36016: initializing VFE subsystem #%d.\n", zr36016_codecs); if (zr36016_codecs == MAX_CODECS) { - pr_err("zr36016: Can't attach more codecs!\n"); + zrdev_err(zr, "zr36016: Can't attach more codecs!\n"); return -ENOSPC; } //mem structure init diff --git a/drivers/staging/media/zoran/zr36050.c b/drivers/staging/media/zoran/zr36050.c index 38f7021e7b06..950dd79f5c81 100644 --- a/drivers/staging/media/zoran/zr36050.c +++ b/drivers/staging/media/zoran/zr36050.c @@ -385,6 +385,7 @@ static int zr36050_set_dri(struct zr36050 *ptr) ========================================================================= */ static void zr36050_init(struct zr36050 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int sum = 0; long bitcnt, tmp; @@ -446,7 +447,7 @@ static void zr36050_init(struct zr36050 *ptr) ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { - pr_err("%s: init aborted!\n", ptr->name); + zrdev_err(zr, "%s: init aborted!\n", ptr->name); return; // something is wrong, its timed out!!!! } @@ -515,7 +516,7 @@ static void zr36050_init(struct zr36050 *ptr) ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { - pr_err("%s: init aborted!\n", ptr->name); + zrdev_err(zr, "%s: init aborted!\n", ptr->name); return; // something is wrong, its timed out!!!! } diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c index d0c369e31c81..c09910669585 100644 --- a/drivers/staging/media/zoran/zr36060.c +++ b/drivers/staging/media/zoran/zr36060.c @@ -50,26 +50,29 @@ MODULE_PARM_DESC(zr36060_debug, "Debug level (0-4)"); static u8 zr36060_read(struct zr36060 *ptr, u16 reg) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); u8 value = 0; // just in case something is wrong... if (ptr->codec->master_data->readreg) value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xff; else - pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); return value; } static void zr36060_write(struct zr36060 *ptr, u16 reg, u8 value) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); + dprintk(4, "0x%02x @0x%04x\n", value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) ptr->codec->master_data->writereg(ptr->codec, reg, value); else - pr_err("%s: invalid I/O setup, nothing written!\n", ptr->name); + zrdev_err(zr, "%s: invalid I/O setup, nothing written!\n", ptr->name); } /* ========================================================================= @@ -117,15 +120,17 @@ static void zr36060_wait_end(struct zr36060 *ptr) /* Basic test of "connectivity", writes/reads to/from memory the SOF marker */ static int zr36060_basic_test(struct zr36060 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); + if ((zr36060_read(ptr, ZR060_IDR_DEV) != 0x33) && (zr36060_read(ptr, ZR060_IDR_REV) != 0x01)) { - pr_err("%s: attach failed, can't connect to jpeg processor!\n", ptr->name); + zrdev_err(zr, "%s: attach failed, can't connect to jpeg processor!\n", ptr->name); return -ENXIO; } zr36060_wait_end(ptr); if (ptr->status & ZR060_CFSR_BUSY) { - pr_err("%s: attach failed, jpeg processor failed (end flag)!\n", ptr->name); + zrdev_err(zr, "%s: attach failed, jpeg processor failed (end flag)!\n", ptr->name); return -EBUSY; } @@ -319,6 +324,7 @@ static int zr36060_set_dri(struct zr36060 *ptr) */ static void zr36060_init(struct zr36060 *ptr) { + struct zoran *zr = videocodec_to_zoran(ptr->codec); int sum = 0; long bitcnt, tmp; @@ -444,7 +450,7 @@ static void zr36060_init(struct zr36060 *ptr) dprintk(2, "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status); if (ptr->status & ZR060_CFSR_BUSY) { - pr_err("%s: init aborted!\n", ptr->name); + zrdev_err(zr, "%s: init aborted!\n", ptr->name); return; // something is wrong, its timed out!!!! } } @@ -777,13 +783,14 @@ static int zr36060_unset(struct videocodec *codec) */ static int zr36060_setup(struct videocodec *codec) { + struct zoran *zr = videocodec_to_zoran(codec); struct zr36060 *ptr; int res; dprintk(2, "zr36060: initializing MJPEG subsystem #%d.\n", zr36060_codecs); if (zr36060_codecs == MAX_CODECS) { - pr_err("zr36060: Can't attach more codecs!\n"); + zrdev_err(zr, "zr36060: Can't attach more codecs!\n"); return -ENOSPC; } //mem structure init -- 2.35.1 |
From: Ian C. <ia...@li...> - 2022-04-23 05:18:17
|
This adds the zrdev_dbg() (pointing to dev_dbg()), zrdev_err() (pointing to dev_err()), and zrdev_info() (pointing to dev_info()) macros to the zoran drivers. These are the preferred method for debugging and this will allow to extract the device from the zoran struct to make the call. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/zoran.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h index 654c95fa5aba..42b86356c022 100644 --- a/drivers/staging/media/zoran/zoran.h +++ b/drivers/staging/media/zoran/zoran.h @@ -19,6 +19,7 @@ #define _BUZ_H_ #include <linux/debugfs.h> +#include <linux/dev_printk.h> #include <media/v4l2-device.h> #include <media/v4l2-ctrls.h> #include <media/videobuf2-core.h> @@ -301,6 +302,18 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev) #endif +/** + * Debugging macros + */ +#define zrdev_dbg(zr, format, args...) \ + dev_dbg(&zr->video_dev->dev, format, ##args) \ + +#define zrdev_err(zr, format, args...) \ + dev_err(&zr->video_dev->dev, format, ##args) \ + +#define zrdev_info(zr, format, args...) \ + dev_info(&zr->video_dev->dev, format, ##args) \ + int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir); void zoran_queue_exit(struct zoran *zr); int zr_set_buf(struct zoran *zr); -- 2.35.1 |
From: Greg KH <gr...@li...> - 2022-04-22 05:10:56
|
On Thu, Apr 21, 2022 at 08:30:25PM -0400, Ian Cowan wrote: > On Thu, Apr 21, 2022 at 06:52:04PM +0300, Dan Carpenter wrote: > > On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote: > > > > > > For using the dev_dbg() macro, do you define this in the header file > > > (i.e. for this it would be videocodec.h), or where should this be > > > included from? > > > > dev_dbg() is defined in include/linux/dev_printk.h. Look around at how > > it's used. pr_debug() might be an option, but I don't know if we will > > accept that, we prefer dev_dbg(). > > > > regards, > > dan carpenter > > > > I'm about to submit the modified patch, but I went and looked and we > cannot use dev_dbg() because these specific drivers do not have any > association with a device struct. Then please fix that issue, as there is a real struct device that they are using somewhere. That is the correct solution as drivers should never use pr_* calls directly. thanks, greg k-h |
From: Ian C. <ia...@li...> - 2022-04-22 00:34:15
|
This removed the dprintk() function which used the printk() function for kernel debug printing. These have all been replaced with the appropriate pr_X() functions. Where the log level is necessary, this has been replace by using CONSOLE_LOGLEVEL_DEFAULT. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.c | 66 ++++++-------- drivers/staging/media/zoran/zr36016.c | 59 +++++------- drivers/staging/media/zoran/zr36050.c | 109 +++++++++-------------- drivers/staging/media/zoran/zr36060.c | 70 ++++++--------- 4 files changed, 120 insertions(+), 184 deletions(-) diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index 3af7d02bd910..16760f259c35 100644 --- a/drivers/staging/media/zoran/videocodec.c +++ b/drivers/staging/media/zoran/videocodec.c @@ -16,16 +16,6 @@ #include "videocodec.h" -static int videocodec_debug; -module_param(videocodec_debug, int, 0); -MODULE_PARM_DESC(videocodec_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (videocodec_debug >= num) \ - printk(format, ##args); \ - } while (0) - struct attached_list { struct videocodec *codec; struct attached_list *next; @@ -56,8 +46,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) return NULL; } - dprintk(2, "%s: '%s', flags %lx, magic %lx\n", __func__, - master->name, master->flags, master->magic); + pr_debug("%s: '%s', flags %lx, magic %lx\n", __func__, + master->name, master->flags, master->magic); if (!h) { pr_err("%s: no device available\n", __func__); @@ -68,7 +58,7 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) // attach only if the slave has at least the flags // expected by the master if ((master->flags & h->codec->flags) == master->flags) { - dprintk(4, "%s: try '%s'\n", __func__, h->codec->name); + pr_debug("%s: try '%s'\n", __func__, h->codec->name); codec = kmemdup(h->codec, sizeof(struct videocodec), GFP_KERNEL); if (!codec) @@ -79,7 +69,7 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) codec->master_data = master; res = codec->setup(codec); if (res == 0) { - dprintk(3, "%s: '%s'\n", __func__, codec->name); + pr_debug("%s: '%s'\n", __func__, codec->name); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); if (!ptr) goto out_kfree; @@ -88,12 +78,13 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) a = h->list; if (!a) { h->list = ptr; - dprintk(4, "videocodec: first element\n"); + pr_debug("videocodec: first element\n"); } else { while (a->next) a = a->next; // find end a->next = ptr; - dprintk(4, "videocodec: in after '%s'\n", h->codec->name); + pr_debug("videocodec: in after '%s'\n", + h->codec->name); } h->attached += 1; @@ -124,8 +115,8 @@ int videocodec_detach(struct videocodec *codec) return -EINVAL; } - dprintk(2, "%s: '%s', type: %x, flags %lx, magic %lx\n", __func__, - codec->name, codec->type, codec->flags, codec->magic); + pr_debug("%s: '%s', type: %x, flags %lx, magic %lx\n", __func__, + codec->name, codec->type, codec->flags, codec->magic); if (!h) { pr_err("%s: no device left...\n", __func__); @@ -139,18 +130,20 @@ int videocodec_detach(struct videocodec *codec) if (codec == a->codec) { res = a->codec->unset(a->codec); if (res >= 0) { - dprintk(3, "%s: '%s'\n", __func__, a->codec->name); + pr_debug("%s: '%s'\n", __func__, + a->codec->name); a->codec->master_data = NULL; } else { - pr_err("%s: '%s'\n", __func__, a->codec->name); + pr_err("%s: '%s'\n", __func__, + a->codec->name); a->codec->master_data = NULL; } if (!prev) { h->list = a->next; - dprintk(4, "videocodec: delete first\n"); + pr_debug("videocodec: delete first\n"); } else { prev->next = a->next; - dprintk(4, "videocodec: delete middle\n"); + pr_debug("videocodec: delete middle\n"); } kfree(a->codec); kfree(a); @@ -176,9 +169,8 @@ int videocodec_register(const struct videocodec *codec) return -EINVAL; } - dprintk(2, - "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", - codec->name, codec->type, codec->flags, codec->magic); + pr_debug("videocodec: register '%s', type: %x, flags %lx, magic %lx\n", + codec->name, codec->type, codec->flags, codec->magic); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); if (!ptr) @@ -187,13 +179,13 @@ int videocodec_register(const struct videocodec *codec) if (!h) { codeclist_top = ptr; - dprintk(4, "videocodec: hooked in as first element\n"); + pr_debug("videocodec: hooked in as first element\n"); } else { while (h->next) h = h->next; // find the end h->next = ptr; - dprintk(4, "videocodec: hooked in after '%s'\n", - h->codec->name); + pr_debug("videocodec: hooked in after '%s'\n", + h->codec->name); } return 0; @@ -208,9 +200,8 @@ int videocodec_unregister(const struct videocodec *codec) return -EINVAL; } - dprintk(2, - "videocodec: unregister '%s', type: %x, flags %lx, magic %lx\n", - codec->name, codec->type, codec->flags, codec->magic); + pr_debug("videocodec: unregister '%s', type: %x, flags %lx, magic %lx\n", + codec->name, codec->type, codec->flags, codec->magic); if (!h) { pr_err("%s: no device left...\n", __func__); @@ -220,19 +211,18 @@ int videocodec_unregister(const struct videocodec *codec) while (h) { if (codec == h->codec) { if (h->attached) { - pr_err("videocodec: '%s' is used\n", h->codec->name); + pr_err("videocodec: '%s' is used\n", + h->codec->name); return -EBUSY; } - dprintk(3, "videocodec: unregister '%s' is ok.\n", - h->codec->name); + pr_debug("videocodec: unregister '%s' is ok.\n", + h->codec->name); if (!prev) { codeclist_top = h->next; - dprintk(4, - "videocodec: delete first element\n"); + pr_debug("videocodec: delete first element\n"); } else { prev->next = h->next; - dprintk(4, - "videocodec: delete middle element\n"); + pr_debug("videocodec: delete middle element\n"); } kfree(h); return 0; diff --git a/drivers/staging/media/zoran/zr36016.c b/drivers/staging/media/zoran/zr36016.c index 26c7c32b6bc0..81b7677f43dc 100644 --- a/drivers/staging/media/zoran/zr36016.c +++ b/drivers/staging/media/zoran/zr36016.c @@ -22,17 +22,6 @@ /* amount of chips attached via this driver */ static int zr36016_codecs; -static int zr36016_debug; -module_param(zr36016_debug, int, 0); -MODULE_PARM_DESC(zr36016_debug, "Debug level (0-4)"); - - -#define dprintk(num, format, args...) \ - do { \ - if (zr36016_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= Local hardware I/O functions: @@ -50,14 +39,14 @@ static u8 zr36016_read(struct zr36016 *ptr, u16 reg) else pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); - dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); + pr_debug("%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); return value; } static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); + pr_debug("%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) @@ -81,14 +70,14 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) pr_err("%s: invalid I/O setup, nothing read (i)!\n", ptr->name); } - dprintk(4, "%s: reading indirect from 0x%04x: %02x\n", ptr->name, reg, value); + pr_debug("%s: reading indirect from 0x%04x: %02x\n", ptr->name, reg, value); return value; } static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, - value, reg); + pr_debug("%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, + value, reg); /* just in case something is wrong... */ if (ptr->codec->master_data->writereg) { @@ -120,14 +109,14 @@ static u8 zr36016_read_version(struct zr36016 *ptr) static int zr36016_basic_test(struct zr36016 *ptr) { - if (zr36016_debug) { + if (*KERN_INFO <= CONSOLE_LOGLEVEL_DEFAULT) { int i; zr36016_writei(ptr, ZR016I_PAX_LO, 0x55); - dprintk(1, KERN_INFO "%s: registers: ", ptr->name); + pr_info("%s: registers: ", ptr->name); for (i = 0; i <= 0x0b; i++) - dprintk(1, "%02x ", zr36016_readi(ptr, i)); - dprintk(1, "\n"); + pr_info("%02x ", zr36016_readi(ptr, i)); + pr_info("\n"); } // for testing just write 0, then the default value to a register and read // it back in both cases @@ -144,8 +133,8 @@ static int zr36016_basic_test(struct zr36016 *ptr) // we allow version numbers from 0-3, should be enough, though zr36016_read_version(ptr); if (ptr->version & 0x0c) { - pr_err("%s: attach failed, suspicious version %d found...\n", ptr->name, - ptr->version); + pr_err("%s: attach failed, suspicious version %d found...\n", + ptr->name, ptr->version); return -ENXIO; } @@ -166,8 +155,8 @@ static int zr36016_pushit(struct zr36016 *ptr, { int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", - ptr->name, startreg, len); + pr_debug("%s: write data block to 0x%04x (len=%d)\n", + ptr->name, startreg, len); while (i < len) { zr36016_writei(ptr, startreg++, data[i++]); } @@ -226,7 +215,7 @@ static int zr36016_set_mode(struct videocodec *codec, int mode) { struct zr36016 *ptr = (struct zr36016 *)codec->data; - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + pr_debug("%s: set_mode %d call\n", ptr->name, mode); if ((mode != CODEC_DO_EXPANSION) && (mode != CODEC_DO_COMPRESSION)) return -EINVAL; @@ -243,10 +232,9 @@ static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm { struct zr36016 *ptr = (struct zr36016 *)codec->data; - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", - ptr->name, norm->h_start, norm->v_start, - cap->x, cap->y, cap->width, cap->height, - cap->decimation); + pr_debug("%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", + ptr->name, norm->h_start, norm->v_start, + cap->x, cap->y, cap->width, cap->height, cap->decimation); /* if () return -EINVAL; * trust the master driver that it knows what it does - so @@ -278,7 +266,7 @@ static int zr36016_control(struct videocodec *codec, int type, int size, void *d struct zr36016 *ptr = (struct zr36016 *)codec->data; int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, size); + pr_debug("%s: control %d call with %d byte\n", ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status - we don't know it ... */ @@ -329,7 +317,7 @@ static int zr36016_unset(struct videocodec *codec) if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, ptr->num); + pr_debug("%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -354,7 +342,7 @@ static int zr36016_setup(struct videocodec *codec) struct zr36016 *ptr; int res; - dprintk(2, "zr36016: initializing VFE subsystem #%d.\n", zr36016_codecs); + pr_debug("zr36016: initializing VFE subsystem #%d.\n", zr36016_codecs); if (zr36016_codecs == MAX_CODECS) { pr_err("zr36016: Can't attach more codecs!\n"); @@ -384,7 +372,7 @@ static int zr36016_setup(struct videocodec *codec) ptr->ydec = 0; zr36016_init(ptr); - dprintk(1, KERN_INFO "%s: codec v%d attached and running\n", ptr->name, ptr->version); + pr_info("%s: codec v%d attached and running\n", ptr->name, ptr->version); return 0; } @@ -417,9 +405,8 @@ int zr36016_init_module(void) void zr36016_cleanup_module(void) { if (zr36016_codecs) { - dprintk(1, - "zr36016: something's wrong - %d codecs left somehow.\n", - zr36016_codecs); + pr_err("zr36016: something's wrong - %d codecs left somehow.\n", + zr36016_codecs); } videocodec_unregister(&zr36016_codec); } diff --git a/drivers/staging/media/zoran/zr36050.c b/drivers/staging/media/zoran/zr36050.c index 38f7021e7b06..b4efa735ad4d 100644 --- a/drivers/staging/media/zoran/zr36050.c +++ b/drivers/staging/media/zoran/zr36050.c @@ -29,17 +29,6 @@ /* amount of chips attached via this driver */ static int zr36050_codecs; -/* debugging is available via module parameter */ -static int zr36050_debug; -module_param(zr36050_debug, int, 0); -MODULE_PARM_DESC(zr36050_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (zr36050_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= Local hardware I/O functions: @@ -55,26 +44,22 @@ static u8 zr36050_read(struct zr36050 *ptr, u16 reg) if (ptr->codec->master_data->readreg) value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; else - dprintk(1, - KERN_ERR "%s: invalid I/O setup, nothing read!\n", ptr->name); + pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); - dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); + pr_debug("%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); return value; } static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); + pr_debug("%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); /* just in case something is wrong... */ if (ptr->codec->master_data->writereg) ptr->codec->master_data->writereg(ptr->codec, reg, value); else - dprintk(1, - KERN_ERR - "%s: invalid I/O setup, nothing written!\n", - ptr->name); + pr_err("%s: invalid I/O setup, nothing written!\n", ptr->name); } /* ========================================================================= @@ -122,9 +107,8 @@ static void zr36050_wait_end(struct zr36050 *ptr) while (!(zr36050_read_status1(ptr) & 0x4)) { udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! - dprintk(1, - "%s: timeout at wait_end (last status: 0x%02x)\n", - ptr->name, ptr->status1); + pr_err("%s: timeout at wait_end (last status: 0x%02x)\n", + ptr->name, ptr->status1); break; } } @@ -142,29 +126,23 @@ static int zr36050_basic_test(struct zr36050 *ptr) zr36050_write(ptr, ZR050_SOF_IDX + 1, 0x00); if ((zr36050_read(ptr, ZR050_SOF_IDX) | zr36050_read(ptr, ZR050_SOF_IDX + 1)) != 0x0000) { - dprintk(1, - KERN_ERR - "%s: attach failed, can't connect to jpeg processor!\n", - ptr->name); + pr_err("%s: attach failed, can't connect to jpeg processor!\n", + ptr->name); return -ENXIO; } zr36050_write(ptr, ZR050_SOF_IDX, 0xff); zr36050_write(ptr, ZR050_SOF_IDX + 1, 0xc0); if (((zr36050_read(ptr, ZR050_SOF_IDX) << 8) | zr36050_read(ptr, ZR050_SOF_IDX + 1)) != 0xffc0) { - dprintk(1, - KERN_ERR - "%s: attach failed, can't connect to jpeg processor!\n", - ptr->name); + pr_err("%s: attach failed, can't connect to jpeg processor!\n", + ptr->name); return -ENXIO; } zr36050_wait_end(ptr); if ((ptr->status1 & 0x4) == 0) { - dprintk(1, - KERN_ERR - "%s: attach failed, jpeg processor failed (end flag)!\n", - ptr->name); + pr_err("%s: attach failed, jpeg processor failed (end flag)!\n", + ptr->name); return -EBUSY; } @@ -181,8 +159,8 @@ static int zr36050_pushit(struct zr36050 *ptr, u16 startreg, u16 len, const char { int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, - startreg, len); + pr_debug("%s: write data block to 0x%04x (len=%d)\n", ptr->name, + startreg, len); while (i < len) zr36050_write(ptr, startreg++, data[i++]); @@ -308,8 +286,8 @@ static int zr36050_set_sof(struct zr36050 *ptr) char sof_data[34]; // max. size of register set int i; - dprintk(3, "%s: write SOF (%dx%d, %d components)\n", ptr->name, - ptr->width, ptr->height, NO_OF_COMPONENTS); + pr_debug("%s: write SOF (%dx%d, %d components)\n", ptr->name, + ptr->width, ptr->height, NO_OF_COMPONENTS); sof_data[0] = 0xff; sof_data[1] = 0xc0; sof_data[2] = 0x00; @@ -339,7 +317,7 @@ static int zr36050_set_sos(struct zr36050 *ptr) char sos_data[16]; // max. size of register set int i; - dprintk(3, "%s: write SOS\n", ptr->name); + pr_debug("%s: write SOS\n", ptr->name); sos_data[0] = 0xff; sos_data[1] = 0xda; sos_data[2] = 0x00; @@ -365,7 +343,7 @@ static int zr36050_set_dri(struct zr36050 *ptr) { char dri_data[6]; // max. size of register set - dprintk(3, "%s: write DRI\n", ptr->name); + pr_debug("%s: write DRI\n", ptr->name); dri_data[0] = 0xff; dri_data[1] = 0xdd; dri_data[2] = 0x00; @@ -389,7 +367,7 @@ static void zr36050_init(struct zr36050 *ptr) long bitcnt, tmp; if (ptr->mode == CODEC_DO_COMPRESSION) { - dprintk(2, "%s: COMPRESSION SETUP\n", ptr->name); + pr_debug("%s: COMPRESSION SETUP\n", ptr->name); /* 050 communicates with 057 in master mode */ zr36050_write(ptr, ZR050_HARDWARE, ZR050_HW_MSTR); @@ -419,7 +397,7 @@ static void zr36050_init(struct zr36050 *ptr) /* setup the fixed jpeg tables - maybe variable, though - * (see table init section above) */ - dprintk(3, "%s: write DQT, DHT, APP\n", ptr->name); + pr_debug("%s: write DQT, DHT, APP\n", ptr->name); sum += zr36050_pushit(ptr, ZR050_DQT_IDX, sizeof(zr36050_dqt), zr36050_dqt); sum += zr36050_pushit(ptr, ZR050_DHT_IDX, @@ -442,8 +420,8 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_GO, 1); // launch codec zr36050_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", - ptr->name, ptr->status1); + pr_debug("%s: Status after table preload: 0x%02x\n", + ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { pr_err("%s: init aborted!\n", ptr->name); @@ -457,9 +435,8 @@ static void zr36050_init(struct zr36050 *ptr) bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; - dprintk(3, - "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", - ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); + pr_debug("%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", + ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_NET_HI, tmp >> 8); zr36050_write(ptr, ZR050_TCV_NET_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -470,8 +447,8 @@ static void zr36050_init(struct zr36050 *ptr) bitcnt -= ((bitcnt * 5) >> 6); // bits without eob tmp = bitcnt >> 16; - dprintk(3, "%s: code: nettobit=%ld, highnettobits=%ld\n", - ptr->name, bitcnt, tmp); + pr_debug("%s: code: nettobit=%ld, highnettobits=%ld\n", + ptr->name, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_DATA_HI, tmp >> 8); zr36050_write(ptr, ZR050_TCV_DATA_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -489,7 +466,7 @@ static void zr36050_init(struct zr36050 *ptr) ((ptr->app.len > 0) ? ZR050_ME_APP : 0) | ((ptr->com.len > 0) ? ZR050_ME_COM : 0)); } else { - dprintk(2, "%s: EXPANSION SETUP\n", ptr->name); + pr_debug("%s: EXPANSION SETUP\n", ptr->name); /* 050 communicates with 055 in master mode */ zr36050_write(ptr, ZR050_HARDWARE, @@ -502,7 +479,7 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_INT_REQ_0, 0); zr36050_write(ptr, ZR050_INT_REQ_1, 3); // low 2 bits always 1 - dprintk(3, "%s: write DHT\n", ptr->name); + pr_debug("%s: write DHT\n", ptr->name); zr36050_pushit(ptr, ZR050_DHT_IDX, sizeof(zr36050_dht), zr36050_dht); @@ -511,8 +488,8 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_GO, 1); // launch codec zr36050_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", - ptr->name, ptr->status1); + pr_debug("%s: Status after table preload: 0x%02x\n", + ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { pr_err("%s: init aborted!\n", ptr->name); @@ -540,7 +517,7 @@ static int zr36050_set_mode(struct videocodec *codec, int mode) { struct zr36050 *ptr = (struct zr36050 *)codec->data; - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + pr_debug("%s: set_mode %d call\n", ptr->name, mode); if ((mode != CODEC_DO_EXPANSION) && (mode != CODEC_DO_COMPRESSION)) return -EINVAL; @@ -558,8 +535,8 @@ static int zr36050_set_video(struct videocodec *codec, const struct tvnorm *norm struct zr36050 *ptr = (struct zr36050 *)codec->data; int size; - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", - ptr->name, norm->h_start, norm->v_start, + pr_debug("%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", + ptr->name, norm->h_start, norm->v_start, cap->x, cap->y, cap->width, cap->height, cap->decimation, cap->quality); /* if () return -EINVAL; @@ -596,8 +573,7 @@ static int zr36050_control(struct videocodec *codec, int type, int size, void *d struct zr36050 *ptr = (struct zr36050 *)codec->data; int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, - size); + pr_debug("%s: control %d call with %d byte\n", ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status */ @@ -717,8 +693,7 @@ static int zr36050_unset(struct videocodec *codec) if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, - ptr->num); + pr_debug("%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -743,12 +718,10 @@ static int zr36050_setup(struct videocodec *codec) struct zr36050 *ptr; int res; - dprintk(2, "zr36050: initializing MJPEG subsystem #%d.\n", - zr36050_codecs); + pr_debug("zr36050: initializing MJPEG subsystem #%d.\n", zr36050_codecs); if (zr36050_codecs == MAX_CODECS) { - dprintk(1, - KERN_ERR "zr36050: Can't attach more codecs!\n"); + pr_err("zr36050: Can't attach more codecs!\n"); return -ENOSPC; } //mem structure init @@ -789,8 +762,7 @@ static int zr36050_setup(struct videocodec *codec) zr36050_init(ptr); - dprintk(1, KERN_INFO "%s: codec attached and running\n", - ptr->name); + pr_info("%s: codec attached and running\n", ptr->name); return 0; } @@ -823,9 +795,8 @@ int zr36050_init_module(void) void zr36050_cleanup_module(void) { if (zr36050_codecs) { - dprintk(1, - "zr36050: something's wrong - %d codecs left somehow.\n", - zr36050_codecs); + pr_err("zr36050: something's wrong - %d codecs left somehow.\n", + zr36050_codecs); } videocodec_unregister(&zr36050_codec); } diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c index d0c369e31c81..950b0c34cde9 100644 --- a/drivers/staging/media/zoran/zr36060.c +++ b/drivers/staging/media/zoran/zr36060.c @@ -32,16 +32,6 @@ static bool low_bitrate; module_param(low_bitrate, bool, 0); MODULE_PARM_DESC(low_bitrate, "Buz compatibility option, halves bitrate"); -static int zr36060_debug; -module_param(zr36060_debug, int, 0); -MODULE_PARM_DESC(zr36060_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (zr36060_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= * Local hardware I/O functions: * read/write via codec layer (registers are located in the master device) @@ -63,7 +53,7 @@ static u8 zr36060_read(struct zr36060 *ptr, u16 reg) static void zr36060_write(struct zr36060 *ptr, u16 reg, u8 value) { - dprintk(4, "0x%02x @0x%04x\n", value, reg); + pr_debug("0x%02x @0x%04x\n", value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) @@ -106,9 +96,8 @@ static void zr36060_wait_end(struct zr36060 *ptr) while (zr36060_read_status(ptr) & ZR060_CFSR_BUSY) { udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! - dprintk(1, - "%s: timeout at wait_end (last status: 0x%02x)\n", - ptr->name, ptr->status); + pr_err("%s: timeout at wait_end (last status: 0x%02x)\n", + ptr->name, ptr->status); break; } } @@ -119,13 +108,15 @@ static int zr36060_basic_test(struct zr36060 *ptr) { if ((zr36060_read(ptr, ZR060_IDR_DEV) != 0x33) && (zr36060_read(ptr, ZR060_IDR_REV) != 0x01)) { - pr_err("%s: attach failed, can't connect to jpeg processor!\n", ptr->name); + pr_err("%s: attach failed, can't connect to jpeg processor!\n", + ptr->name); return -ENXIO; } zr36060_wait_end(ptr); if (ptr->status & ZR060_CFSR_BUSY) { - pr_err("%s: attach failed, jpeg processor failed (end flag)!\n", ptr->name); + pr_err("%s: attach failed, jpeg processor failed (end flag)!\n", + ptr->name); return -EBUSY; } @@ -137,8 +128,8 @@ static int zr36060_pushit(struct zr36060 *ptr, u16 startreg, u16 len, const char { int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, - startreg, len); + pr_debug("%s: write data block to 0x%04x (len=%d)\n", ptr->name, + startreg, len); while (i < len) zr36060_write(ptr, startreg++, data[i++]); @@ -252,8 +243,8 @@ static int zr36060_set_sof(struct zr36060 *ptr) char sof_data[34]; // max. size of register set int i; - dprintk(3, "%s: write SOF (%dx%d, %d components)\n", ptr->name, - ptr->width, ptr->height, NO_OF_COMPONENTS); + pr_debug("%s: write SOF (%dx%d, %d components)\n", ptr->name, + ptr->width, ptr->height, NO_OF_COMPONENTS); sof_data[0] = 0xff; sof_data[1] = 0xc0; sof_data[2] = 0x00; @@ -280,7 +271,7 @@ static int zr36060_set_sos(struct zr36060 *ptr) char sos_data[16]; // max. size of register set int i; - dprintk(3, "%s: write SOS\n", ptr->name); + pr_debug("%s: write SOS\n", ptr->name); sos_data[0] = 0xff; sos_data[1] = 0xda; sos_data[2] = 0x00; @@ -304,7 +295,7 @@ static int zr36060_set_dri(struct zr36060 *ptr) { char dri_data[6]; // max. size of register set - dprintk(3, "%s: write DRI\n", ptr->name); + pr_debug("%s: write DRI\n", ptr->name); dri_data[0] = 0xff; dri_data[1] = 0xdd; dri_data[2] = 0x00; @@ -323,7 +314,7 @@ static void zr36060_init(struct zr36060 *ptr) long bitcnt, tmp; if (ptr->mode == CODEC_DO_COMPRESSION) { - dprintk(2, "%s: COMPRESSION SETUP\n", ptr->name); + pr_debug("%s: COMPRESSION SETUP\n", ptr->name); zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST); @@ -376,9 +367,8 @@ static void zr36060_init(struct zr36060 *ptr) bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; - dprintk(3, - "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", - ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); + pr_debug("%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", + ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36060_write(ptr, ZR060_TCV_NET_HI, tmp >> 8); zr36060_write(ptr, ZR060_TCV_NET_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -389,8 +379,8 @@ static void zr36060_init(struct zr36060 *ptr) bitcnt -= ((bitcnt * 5) >> 6); // bits without eob tmp = bitcnt >> 16; - dprintk(3, "%s: code: nettobit=%ld, highnettobits=%ld\n", - ptr->name, bitcnt, tmp); + pr_debug("%s: code: nettobit=%ld, highnettobits=%ld\n", + ptr->name, bitcnt, tmp); zr36060_write(ptr, ZR060_TCV_DATA_HI, tmp >> 8); zr36060_write(ptr, ZR060_TCV_DATA_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -408,7 +398,7 @@ static void zr36060_init(struct zr36060 *ptr) zr36060_write(ptr, ZR060_VCR, ZR060_VCR_RANGE); } else { - dprintk(2, "%s: EXPANSION SETUP\n", ptr->name); + pr_debug("%s: EXPANSION SETUP\n", ptr->name); zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST); @@ -441,7 +431,7 @@ static void zr36060_init(struct zr36060 *ptr) /* Load the tables */ zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST | ZR060_LOAD_LOAD); zr36060_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status); + pr_debug("%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status); if (ptr->status & ZR060_CFSR_BUSY) { pr_err("%s: init aborted!\n", ptr->name); @@ -462,7 +452,7 @@ static int zr36060_set_mode(struct videocodec *codec, int mode) { struct zr36060 *ptr = (struct zr36060 *)codec->data; - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + pr_debug("%s: set_mode %d call\n", ptr->name, mode); if (mode != CODEC_DO_EXPANSION && mode != CODEC_DO_COMPRESSION) return -EINVAL; @@ -481,8 +471,8 @@ static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm u32 reg; int size; - dprintk(2, "%s: set_video %d/%d-%dx%d (%%%d) call\n", ptr->name, - cap->x, cap->y, cap->width, cap->height, cap->decimation); + pr_debug("%s: set_video %d/%d-%dx%d (%%%d) call\n", ptr->name, + cap->x, cap->y, cap->width, cap->height, cap->decimation); /* if () return -EINVAL; * trust the master driver that it knows what it does - so @@ -639,8 +629,7 @@ static int zr36060_control(struct videocodec *codec, int type, int size, void *d struct zr36060 *ptr = (struct zr36060 *)codec->data; int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, - size); + pr_debug("%s: control %d call with %d byte\n", ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status */ @@ -757,7 +746,7 @@ static int zr36060_unset(struct videocodec *codec) if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, ptr->num); + pr_debug("%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -780,7 +769,7 @@ static int zr36060_setup(struct videocodec *codec) struct zr36060 *ptr; int res; - dprintk(2, "zr36060: initializing MJPEG subsystem #%d.\n", zr36060_codecs); + pr_debug("zr36060: initializing MJPEG subsystem #%d.\n", zr36060_codecs); if (zr36060_codecs == MAX_CODECS) { pr_err("zr36060: Can't attach more codecs!\n"); @@ -823,7 +812,7 @@ static int zr36060_setup(struct videocodec *codec) zr36060_init(ptr); - dprintk(1, KERN_INFO "%s: codec attached and running\n", ptr->name); + pr_info("%s: codec attached and running\n", ptr->name); return 0; } @@ -852,9 +841,8 @@ int zr36060_init_module(void) void zr36060_cleanup_module(void) { if (zr36060_codecs) { - dprintk(1, - "zr36060: something's wrong - %d codecs left somehow.\n", - zr36060_codecs); + pr_err("zr36060: something's wrong - %d codecs left somehow.\n", + zr36060_codecs); } /* however, we can't just stay alive */ -- 2.32.0 |
From: Ian C. <ia...@li...> - 2022-04-22 00:30:51
|
On Thu, Apr 21, 2022 at 06:52:04PM +0300, Dan Carpenter wrote: > On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote: > > > > For using the dev_dbg() macro, do you define this in the header file > > (i.e. for this it would be videocodec.h), or where should this be > > included from? > > dev_dbg() is defined in include/linux/dev_printk.h. Look around at how > it's used. pr_debug() might be an option, but I don't know if we will > accept that, we prefer dev_dbg(). > > regards, > dan carpenter > I'm about to submit the modified patch, but I went and looked and we cannot use dev_dbg() because these specific drivers do not have any association with a device struct. The best we can do is use the pr_X() functions which I have updated in the modified patch. That still removes the module params and the repetitive dprintk() definition. --- Ian Cowan |
From: Ian C. <ia...@li...> - 2022-04-21 18:14:18
|
On Thu, Apr 21, 2022 at 06:52:04PM +0300, Dan Carpenter wrote: > On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote: > > > > For using the dev_dbg() macro, do you define this in the header file > > (i.e. for this it would be videocodec.h), or where should this be > > included from? > > dev_dbg() is defined in include/linux/dev_printk.h. Look around at how > it's used. pr_debug() might be an option, but I don't know if we will > accept that, we prefer dev_dbg(). > > regards, > dan carpenter > Okay, I will make these few changes and resubmit. --- Ian Cowan |
From: Dan C. <dan...@or...> - 2022-04-21 15:52:55
|
On Thu, Apr 21, 2022 at 11:22:00AM -0400, Ian Cowan wrote: > > For using the dev_dbg() macro, do you define this in the header file > (i.e. for this it would be videocodec.h), or where should this be > included from? dev_dbg() is defined in include/linux/dev_printk.h. Look around at how it's used. pr_debug() might be an option, but I don't know if we will accept that, we prefer dev_dbg(). regards, dan carpenter |
From: Ian C. <ia...@li...> - 2022-04-21 15:22:25
|
On Thu, Apr 21, 2022 at 05:21:54PM +0300, Dan Carpenter wrote: > On Wed, Apr 20, 2022 at 08:23:16PM -0400, Ian Cowan wrote: > > This is a patch to refactor the zoran debugging function. This function > > existed in all of the changed files and they also all import the > > videocodec header file. This patch moves the dprintk function into the > > videocodec header file and out of each of the individual files. > > > > -#define dprintk(num, format, args...) \ > > - do { \ > > - if (videocodec_debug >= num) \ > > - printk(format, ##args); \ > > - } while (0) > > - [ snip ] > > > +/* Print debug information based on the specified level of debugging */ > > +#define dprintk(debug, num, format, args...) \ > > +do { \ > > + if (debug > num) \ > > + printk(format, ##args); \ > > +} while (0) > > + > > I don't like the new format. It needs to have a KERN_DEBUG at the > start. Passing the param_module is awkward. No one knows what the > magic "num" things are. I was going to put KERN_DEBUG at the beginning, but it appears that some of the calls already include KERN_ERR, KERN_WARNING, or KERN_INFO, but most of them do not. Would it be better to split these into multiple macros or use printk in those specific spots that difer? > Using a module parameter is old school badness. The standard dev_dbg() > macros are better and more flexible. Just use them instead. > > regards, > dan carpenter > For using the dev_dbg() macro, do you define this in the header file (i.e. for this it would be videocodec.h), or where should this be included from? --- Ian Cowan |
From: Dan C. <dan...@or...> - 2022-04-21 14:22:44
|
On Wed, Apr 20, 2022 at 08:23:16PM -0400, Ian Cowan wrote: > This is a patch to refactor the zoran debugging function. This function > existed in all of the changed files and they also all import the > videocodec header file. This patch moves the dprintk function into the > videocodec header file and out of each of the individual files. > > Signed-off-by: Ian Cowan <ia...@li...> > --- > drivers/staging/media/zoran/videocodec.c | 67 +++++++++++++-------- > drivers/staging/media/zoran/videocodec.h | 7 +++ > drivers/staging/media/zoran/zr36016.c | 48 ++++++++------- > drivers/staging/media/zoran/zr36050.c | 77 ++++++++++++------------ > drivers/staging/media/zoran/zr36060.c | 54 ++++++++--------- > 5 files changed, 141 insertions(+), 112 deletions(-) > > diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c > index 3af7d02bd910..e35d1f54d9b8 100644 > --- a/drivers/staging/media/zoran/videocodec.c > +++ b/drivers/staging/media/zoran/videocodec.c > @@ -20,12 +20,6 @@ static int videocodec_debug; > module_param(videocodec_debug, int, 0); > MODULE_PARM_DESC(videocodec_debug, "Debug level (0-4)"); > > -#define dprintk(num, format, args...) \ > - do { \ > - if (videocodec_debug >= num) \ > - printk(format, ##args); \ > - } while (0) > - > struct attached_list { > struct videocodec *codec; > struct attached_list *next; > @@ -56,8 +50,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) > return NULL; > } > > - dprintk(2, "%s: '%s', flags %lx, magic %lx\n", __func__, > - master->name, master->flags, master->magic); > + dprintk(videocodec_debug, 2, "%s: '%s', flags %lx, magic %lx\n", > + __func__, master->name, master->flags, master->magic); [ snip ] > +/* Print debug information based on the specified level of debugging */ > +#define dprintk(debug, num, format, args...) \ > +do { \ > + if (debug > num) \ > + printk(format, ##args); \ > +} while (0) > + I don't like the new format. It needs to have a KERN_DEBUG at the start. Passing the param_module is awkward. No one knows what the magic "num" things are. Using a module parameter is old school badness. The standard dev_dbg() macros are better and more flexible. Just use them instead. regards, dan carpenter |
From: Ian C. <ia...@li...> - 2022-04-21 01:02:35
|
This is a patch to refactor the zoran debugging function. This function existed in all of the changed files and they also all import the videocodec header file. This patch moves the dprintk function into the videocodec header file and out of each of the individual files. Signed-off-by: Ian Cowan <ia...@li...> --- drivers/staging/media/zoran/videocodec.c | 67 +++++++++++++-------- drivers/staging/media/zoran/videocodec.h | 7 +++ drivers/staging/media/zoran/zr36016.c | 48 ++++++++------- drivers/staging/media/zoran/zr36050.c | 77 ++++++++++++------------ drivers/staging/media/zoran/zr36060.c | 54 ++++++++--------- 5 files changed, 141 insertions(+), 112 deletions(-) diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index 3af7d02bd910..e35d1f54d9b8 100644 --- a/drivers/staging/media/zoran/videocodec.c +++ b/drivers/staging/media/zoran/videocodec.c @@ -20,12 +20,6 @@ static int videocodec_debug; module_param(videocodec_debug, int, 0); MODULE_PARM_DESC(videocodec_debug, "Debug level (0-4)"); -#define dprintk(num, format, args...) \ - do { \ - if (videocodec_debug >= num) \ - printk(format, ##args); \ - } while (0) - struct attached_list { struct videocodec *codec; struct attached_list *next; @@ -56,8 +50,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) return NULL; } - dprintk(2, "%s: '%s', flags %lx, magic %lx\n", __func__, - master->name, master->flags, master->magic); + dprintk(videocodec_debug, 2, "%s: '%s', flags %lx, magic %lx\n", + __func__, master->name, master->flags, master->magic); if (!h) { pr_err("%s: no device available\n", __func__); @@ -68,7 +62,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) // attach only if the slave has at least the flags // expected by the master if ((master->flags & h->codec->flags) == master->flags) { - dprintk(4, "%s: try '%s'\n", __func__, h->codec->name); + dprintk(videocodec_debug, 4, + "%s: try '%s'\n", __func__, h->codec->name); codec = kmemdup(h->codec, sizeof(struct videocodec), GFP_KERNEL); if (!codec) @@ -79,7 +74,8 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) codec->master_data = master; res = codec->setup(codec); if (res == 0) { - dprintk(3, "%s: '%s'\n", __func__, codec->name); + dprintk(videocodec_debug, 3, + "%s: '%s'\n", __func__, codec->name); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL); if (!ptr) goto out_kfree; @@ -88,12 +84,16 @@ struct videocodec *videocodec_attach(struct videocodec_master *master) a = h->list; if (!a) { h->list = ptr; - dprintk(4, "videocodec: first element\n"); + dprintk(videocodec_debug, 4, + "videocodec: first element\n"); } else { while (a->next) a = a->next; // find end a->next = ptr; - dprintk(4, "videocodec: in after '%s'\n", h->codec->name); + dprintk(videocodec_debug, + 4, + "videocodec: in after '%s'\n", + h->codec->name); } h->attached += 1; @@ -124,8 +124,14 @@ int videocodec_detach(struct videocodec *codec) return -EINVAL; } - dprintk(2, "%s: '%s', type: %x, flags %lx, magic %lx\n", __func__, - codec->name, codec->type, codec->flags, codec->magic); + dprintk(videocodec_debug, + 2, + "%s: '%s', type: %x, flags %lx, magic %lx\n", + __func__, + codec->name, + codec->type, + codec->flags, + codec->magic); if (!h) { pr_err("%s: no device left...\n", __func__); @@ -139,7 +145,11 @@ int videocodec_detach(struct videocodec *codec) if (codec == a->codec) { res = a->codec->unset(a->codec); if (res >= 0) { - dprintk(3, "%s: '%s'\n", __func__, a->codec->name); + dprintk(videocodec_debug, + 3, + "%s: '%s'\n", + __func__, + a->codec->name); a->codec->master_data = NULL; } else { pr_err("%s: '%s'\n", __func__, a->codec->name); @@ -147,10 +157,14 @@ int videocodec_detach(struct videocodec *codec) } if (!prev) { h->list = a->next; - dprintk(4, "videocodec: delete first\n"); + dprintk(videocodec_debug, + 4, + "videocodec: delete first\n"); } else { prev->next = a->next; - dprintk(4, "videocodec: delete middle\n"); + dprintk(videocodec_debug, + 4, + "videocodec: delete middle\n"); } kfree(a->codec); kfree(a); @@ -176,7 +190,7 @@ int videocodec_register(const struct videocodec *codec) return -EINVAL; } - dprintk(2, + dprintk(videocodec_debug, 2, "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", codec->name, codec->type, codec->flags, codec->magic); @@ -187,12 +201,15 @@ int videocodec_register(const struct videocodec *codec) if (!h) { codeclist_top = ptr; - dprintk(4, "videocodec: hooked in as first element\n"); + dprintk(videocodec_debug, + 4, "videocodec: hooked in as first element\n"); } else { while (h->next) h = h->next; // find the end h->next = ptr; - dprintk(4, "videocodec: hooked in after '%s'\n", + dprintk(videocodec_debug, + 4, + "videocodec: hooked in after '%s'\n", h->codec->name); } @@ -208,7 +225,7 @@ int videocodec_unregister(const struct videocodec *codec) return -EINVAL; } - dprintk(2, + dprintk(videocodec_debug, 2, "videocodec: unregister '%s', type: %x, flags %lx, magic %lx\n", codec->name, codec->type, codec->flags, codec->magic); @@ -223,15 +240,17 @@ int videocodec_unregister(const struct videocodec *codec) pr_err("videocodec: '%s' is used\n", h->codec->name); return -EBUSY; } - dprintk(3, "videocodec: unregister '%s' is ok.\n", + dprintk(videocodec_debug, + 3, + "videocodec: unregister '%s' is ok.\n", h->codec->name); if (!prev) { codeclist_top = h->next; - dprintk(4, + dprintk(videocodec_debug, 4, "videocodec: delete first element\n"); } else { prev->next = h->next; - dprintk(4, + dprintk(videocodec_debug, 4, "videocodec: delete middle element\n"); } kfree(h); diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 9dea348fee40..857d0ef2847a 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -307,4 +307,11 @@ extern int videocodec_unregister(const struct videocodec *); int videocodec_debugfs_show(struct seq_file *m); +/* Print debug information based on the specified level of debugging */ +#define dprintk(debug, num, format, args...) \ +do { \ + if (debug > num) \ + printk(format, ##args); \ +} while (0) + #endif /*ifndef __LINUX_VIDEOCODEC_H */ diff --git a/drivers/staging/media/zoran/zr36016.c b/drivers/staging/media/zoran/zr36016.c index 26c7c32b6bc0..8c51235f504e 100644 --- a/drivers/staging/media/zoran/zr36016.c +++ b/drivers/staging/media/zoran/zr36016.c @@ -26,13 +26,6 @@ static int zr36016_debug; module_param(zr36016_debug, int, 0); MODULE_PARM_DESC(zr36016_debug, "Debug level (0-4)"); - -#define dprintk(num, format, args...) \ - do { \ - if (zr36016_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= Local hardware I/O functions: @@ -50,14 +43,16 @@ static u8 zr36016_read(struct zr36016 *ptr, u16 reg) else pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); - dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); + dprintk(zr36016_debug, 4, "%s: reading from 0x%04x: %02x\n", + ptr->name, reg, value); return value; } static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); + dprintk(zr36016_debug, 4, "%s: writing 0x%02x to 0x%04x\n", + ptr->name, value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) @@ -81,14 +76,15 @@ static u8 zr36016_readi(struct zr36016 *ptr, u16 reg) pr_err("%s: invalid I/O setup, nothing read (i)!\n", ptr->name); } - dprintk(4, "%s: reading indirect from 0x%04x: %02x\n", ptr->name, reg, value); + dprintk(zr36016_debug, 4, "%s: reading indirect from 0x%04x: %02x\n", + ptr->name, reg, value); return value; } static void zr36016_writei(struct zr36016 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, - value, reg); + dprintk(zr36016_debug, 4, "%s: writing indirect 0x%02x to 0x%04x\n", + ptr->name, value, reg); /* just in case something is wrong... */ if (ptr->codec->master_data->writereg) { @@ -124,10 +120,10 @@ static int zr36016_basic_test(struct zr36016 *ptr) int i; zr36016_writei(ptr, ZR016I_PAX_LO, 0x55); - dprintk(1, KERN_INFO "%s: registers: ", ptr->name); + dprintk(zr36016_debug, 1, KERN_INFO "%s: registers: ", ptr->name); for (i = 0; i <= 0x0b; i++) - dprintk(1, "%02x ", zr36016_readi(ptr, i)); - dprintk(1, "\n"); + dprintk(zr36016_debug, 1, "%02x ", zr36016_readi(ptr, i)); + dprintk(zr36016_debug, 1, "\n"); } // for testing just write 0, then the default value to a register and read // it back in both cases @@ -166,7 +162,7 @@ static int zr36016_pushit(struct zr36016 *ptr, { int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", + dprintk(zr36016_debug, 4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, startreg, len); while (i < len) { zr36016_writei(ptr, startreg++, data[i++]); @@ -226,7 +222,7 @@ static int zr36016_set_mode(struct videocodec *codec, int mode) { struct zr36016 *ptr = (struct zr36016 *)codec->data; - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + dprintk(zr36016_debug, 2, "%s: set_mode %d call\n", ptr->name, mode); if ((mode != CODEC_DO_EXPANSION) && (mode != CODEC_DO_COMPRESSION)) return -EINVAL; @@ -243,7 +239,8 @@ static int zr36016_set_video(struct videocodec *codec, const struct tvnorm *norm { struct zr36016 *ptr = (struct zr36016 *)codec->data; - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", + dprintk(zr36016_debug, 2, + "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", ptr->name, norm->h_start, norm->v_start, cap->x, cap->y, cap->width, cap->height, cap->decimation); @@ -278,7 +275,8 @@ static int zr36016_control(struct videocodec *codec, int type, int size, void *d struct zr36016 *ptr = (struct zr36016 *)codec->data; int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, size); + dprintk(zr36016_debug, 2, "%s: control %d call with %d byte\n", + ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status - we don't know it ... */ @@ -329,7 +327,8 @@ static int zr36016_unset(struct videocodec *codec) if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, ptr->num); + dprintk(zr36016_debug, 1, "%s: finished codec #%d\n", + ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -354,7 +353,8 @@ static int zr36016_setup(struct videocodec *codec) struct zr36016 *ptr; int res; - dprintk(2, "zr36016: initializing VFE subsystem #%d.\n", zr36016_codecs); + dprintk(zr36016_debug, 2, "zr36016: initializing VFE subsystem #%d.\n", + zr36016_codecs); if (zr36016_codecs == MAX_CODECS) { pr_err("zr36016: Can't attach more codecs!\n"); @@ -384,7 +384,9 @@ static int zr36016_setup(struct videocodec *codec) ptr->ydec = 0; zr36016_init(ptr); - dprintk(1, KERN_INFO "%s: codec v%d attached and running\n", ptr->name, ptr->version); + dprintk(zr36016_debug, 1, + KERN_INFO "%s: codec v%d attached and running\n", + ptr->name, ptr->version); return 0; } @@ -417,7 +419,7 @@ int zr36016_init_module(void) void zr36016_cleanup_module(void) { if (zr36016_codecs) { - dprintk(1, + dprintk(zr36016_debug, 1, "zr36016: something's wrong - %d codecs left somehow.\n", zr36016_codecs); } diff --git a/drivers/staging/media/zoran/zr36050.c b/drivers/staging/media/zoran/zr36050.c index 38f7021e7b06..af30e9794ba8 100644 --- a/drivers/staging/media/zoran/zr36050.c +++ b/drivers/staging/media/zoran/zr36050.c @@ -34,12 +34,6 @@ static int zr36050_debug; module_param(zr36050_debug, int, 0); MODULE_PARM_DESC(zr36050_debug, "Debug level (0-4)"); -#define dprintk(num, format, args...) \ - do { \ - if (zr36050_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= Local hardware I/O functions: @@ -55,23 +49,26 @@ static u8 zr36050_read(struct zr36050 *ptr, u16 reg) if (ptr->codec->master_data->readreg) value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; else - dprintk(1, - KERN_ERR "%s: invalid I/O setup, nothing read!\n", ptr->name); + dprintk(zr36050_debug, 1, + KERN_ERR "%s: invalid I/O setup, nothing read!\n", + ptr->name); - dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); + dprintk(zr36050_debug, 4, "%s: reading from 0x%04x: %02x\n", + ptr->name, reg, value); return value; } static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 value) { - dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); + dprintk(zr36050_debug, 4, "%s: writing 0x%02x to 0x%04x\n", + ptr->name, value, reg); /* just in case something is wrong... */ if (ptr->codec->master_data->writereg) ptr->codec->master_data->writereg(ptr->codec, reg, value); else - dprintk(1, + dprintk(zr36050_debug, 1, KERN_ERR "%s: invalid I/O setup, nothing written!\n", ptr->name); @@ -122,7 +119,7 @@ static void zr36050_wait_end(struct zr36050 *ptr) while (!(zr36050_read_status1(ptr) & 0x4)) { udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! - dprintk(1, + dprintk(zr36050_debug, 1, "%s: timeout at wait_end (last status: 0x%02x)\n", ptr->name, ptr->status1); break; @@ -142,7 +139,7 @@ static int zr36050_basic_test(struct zr36050 *ptr) zr36050_write(ptr, ZR050_SOF_IDX + 1, 0x00); if ((zr36050_read(ptr, ZR050_SOF_IDX) | zr36050_read(ptr, ZR050_SOF_IDX + 1)) != 0x0000) { - dprintk(1, + dprintk(zr36050_debug, 1, KERN_ERR "%s: attach failed, can't connect to jpeg processor!\n", ptr->name); @@ -152,7 +149,7 @@ static int zr36050_basic_test(struct zr36050 *ptr) zr36050_write(ptr, ZR050_SOF_IDX + 1, 0xc0); if (((zr36050_read(ptr, ZR050_SOF_IDX) << 8) | zr36050_read(ptr, ZR050_SOF_IDX + 1)) != 0xffc0) { - dprintk(1, + dprintk(zr36050_debug, 1, KERN_ERR "%s: attach failed, can't connect to jpeg processor!\n", ptr->name); @@ -161,7 +158,7 @@ static int zr36050_basic_test(struct zr36050 *ptr) zr36050_wait_end(ptr); if ((ptr->status1 & 0x4) == 0) { - dprintk(1, + dprintk(zr36050_debug, 1, KERN_ERR "%s: attach failed, jpeg processor failed (end flag)!\n", ptr->name); @@ -181,8 +178,8 @@ static int zr36050_pushit(struct zr36050 *ptr, u16 startreg, u16 len, const char { int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, - startreg, len); + dprintk(zr36050_debug, 4, "%s: write data block to 0x%04x (len=%d)\n", + ptr->name, startreg, len); while (i < len) zr36050_write(ptr, startreg++, data[i++]); @@ -308,8 +305,8 @@ static int zr36050_set_sof(struct zr36050 *ptr) char sof_data[34]; // max. size of register set int i; - dprintk(3, "%s: write SOF (%dx%d, %d components)\n", ptr->name, - ptr->width, ptr->height, NO_OF_COMPONENTS); + dprintk(zr36050_debug, 3, "%s: write SOF (%dx%d, %d components)\n", + ptr->name, ptr->width, ptr->height, NO_OF_COMPONENTS); sof_data[0] = 0xff; sof_data[1] = 0xc0; sof_data[2] = 0x00; @@ -339,7 +336,7 @@ static int zr36050_set_sos(struct zr36050 *ptr) char sos_data[16]; // max. size of register set int i; - dprintk(3, "%s: write SOS\n", ptr->name); + dprintk(zr36050_debug, 3, "%s: write SOS\n", ptr->name); sos_data[0] = 0xff; sos_data[1] = 0xda; sos_data[2] = 0x00; @@ -365,7 +362,7 @@ static int zr36050_set_dri(struct zr36050 *ptr) { char dri_data[6]; // max. size of register set - dprintk(3, "%s: write DRI\n", ptr->name); + dprintk(zr36050_debug, 3, "%s: write DRI\n", ptr->name); dri_data[0] = 0xff; dri_data[1] = 0xdd; dri_data[2] = 0x00; @@ -389,7 +386,7 @@ static void zr36050_init(struct zr36050 *ptr) long bitcnt, tmp; if (ptr->mode == CODEC_DO_COMPRESSION) { - dprintk(2, "%s: COMPRESSION SETUP\n", ptr->name); + dprintk(zr36050_debug, 2, "%s: COMPRESSION SETUP\n", ptr->name); /* 050 communicates with 057 in master mode */ zr36050_write(ptr, ZR050_HARDWARE, ZR050_HW_MSTR); @@ -419,7 +416,7 @@ static void zr36050_init(struct zr36050 *ptr) /* setup the fixed jpeg tables - maybe variable, though - * (see table init section above) */ - dprintk(3, "%s: write DQT, DHT, APP\n", ptr->name); + dprintk(zr36050_debug, 3, "%s: write DQT, DHT, APP\n", ptr->name); sum += zr36050_pushit(ptr, ZR050_DQT_IDX, sizeof(zr36050_dqt), zr36050_dqt); sum += zr36050_pushit(ptr, ZR050_DHT_IDX, @@ -442,7 +439,8 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_GO, 1); // launch codec zr36050_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", + dprintk(zr36050_debug, 2, + "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { @@ -457,7 +455,7 @@ static void zr36050_init(struct zr36050 *ptr) bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; - dprintk(3, + dprintk(zr36050_debug, 3, "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_NET_HI, tmp >> 8); @@ -470,7 +468,8 @@ static void zr36050_init(struct zr36050 *ptr) bitcnt -= ((bitcnt * 5) >> 6); // bits without eob tmp = bitcnt >> 16; - dprintk(3, "%s: code: nettobit=%ld, highnettobits=%ld\n", + dprintk(zr36050_debug, 3, + "%s: code: nettobit=%ld, highnettobits=%ld\n", ptr->name, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_DATA_HI, tmp >> 8); zr36050_write(ptr, ZR050_TCV_DATA_MH, tmp & 0xff); @@ -489,7 +488,7 @@ static void zr36050_init(struct zr36050 *ptr) ((ptr->app.len > 0) ? ZR050_ME_APP : 0) | ((ptr->com.len > 0) ? ZR050_ME_COM : 0)); } else { - dprintk(2, "%s: EXPANSION SETUP\n", ptr->name); + dprintk(zr36050_debug, 2, "%s: EXPANSION SETUP\n", ptr->name); /* 050 communicates with 055 in master mode */ zr36050_write(ptr, ZR050_HARDWARE, @@ -502,7 +501,7 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_INT_REQ_0, 0); zr36050_write(ptr, ZR050_INT_REQ_1, 3); // low 2 bits always 1 - dprintk(3, "%s: write DHT\n", ptr->name); + dprintk(zr36050_debug, 3, "%s: write DHT\n", ptr->name); zr36050_pushit(ptr, ZR050_DHT_IDX, sizeof(zr36050_dht), zr36050_dht); @@ -511,7 +510,8 @@ static void zr36050_init(struct zr36050 *ptr) zr36050_write(ptr, ZR050_GO, 1); // launch codec zr36050_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", + dprintk(zr36050_debug, 2, + "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status1); if ((ptr->status1 & 0x4) == 0) { @@ -540,7 +540,7 @@ static int zr36050_set_mode(struct videocodec *codec, int mode) { struct zr36050 *ptr = (struct zr36050 *)codec->data; - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + dprintk(zr36050_debug, 2, "%s: set_mode %d call\n", ptr->name, mode); if ((mode != CODEC_DO_EXPANSION) && (mode != CODEC_DO_COMPRESSION)) return -EINVAL; @@ -558,7 +558,8 @@ static int zr36050_set_video(struct videocodec *codec, const struct tvnorm *norm struct zr36050 *ptr = (struct zr36050 *)codec->data; int size; - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", + dprintk(zr36050_debug, 2, + "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", ptr->name, norm->h_start, norm->v_start, cap->x, cap->y, cap->width, cap->height, cap->decimation, cap->quality); @@ -596,8 +597,8 @@ static int zr36050_control(struct videocodec *codec, int type, int size, void *d struct zr36050 *ptr = (struct zr36050 *)codec->data; int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, - size); + dprintk(zr36050_debug, 2, "%s: control %d call with %d byte\n", + ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status */ @@ -717,7 +718,7 @@ static int zr36050_unset(struct videocodec *codec) if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, + dprintk(zr36050_debug, 1, "%s: finished codec #%d\n", ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -743,11 +744,11 @@ static int zr36050_setup(struct videocodec *codec) struct zr36050 *ptr; int res; - dprintk(2, "zr36050: initializing MJPEG subsystem #%d.\n", + dprintk(zr36050_debug, 2, "zr36050: initializing MJPEG subsystem #%d.\n", zr36050_codecs); if (zr36050_codecs == MAX_CODECS) { - dprintk(1, + dprintk(zr36050_debug, 1, KERN_ERR "zr36050: Can't attach more codecs!\n"); return -ENOSPC; } @@ -789,7 +790,7 @@ static int zr36050_setup(struct videocodec *codec) zr36050_init(ptr); - dprintk(1, KERN_INFO "%s: codec attached and running\n", + dprintk(zr36050_debug, 1, KERN_INFO "%s: codec attached and running\n", ptr->name); return 0; @@ -823,7 +824,7 @@ int zr36050_init_module(void) void zr36050_cleanup_module(void) { if (zr36050_codecs) { - dprintk(1, + dprintk(zr36050_debug, 1, "zr36050: something's wrong - %d codecs left somehow.\n", zr36050_codecs); } diff --git a/drivers/staging/media/zoran/zr36060.c b/drivers/staging/media/zoran/zr36060.c index d0c369e31c81..a49af1b3a07f 100644 --- a/drivers/staging/media/zoran/zr36060.c +++ b/drivers/staging/media/zoran/zr36060.c @@ -36,12 +36,6 @@ static int zr36060_debug; module_param(zr36060_debug, int, 0); MODULE_PARM_DESC(zr36060_debug, "Debug level (0-4)"); -#define dprintk(num, format, args...) \ - do { \ - if (zr36060_debug >= num) \ - printk(format, ##args); \ - } while (0) - /* ========================================================================= * Local hardware I/O functions: * read/write via codec layer (registers are located in the master device) @@ -63,7 +57,7 @@ static u8 zr36060_read(struct zr36060 *ptr, u16 reg) static void zr36060_write(struct zr36060 *ptr, u16 reg, u8 value) { - dprintk(4, "0x%02x @0x%04x\n", value, reg); + dprintk(zr36060_debug, 4, "0x%02x @0x%04x\n", value, reg); // just in case something is wrong... if (ptr->codec->master_data->writereg) @@ -106,7 +100,7 @@ static void zr36060_wait_end(struct zr36060 *ptr) while (zr36060_read_status(ptr) & ZR060_CFSR_BUSY) { udelay(1); if (i++ > 200000) { // 200ms, there is for sure something wrong!!! - dprintk(1, + dprintk(zr36060_debug, 1, "%s: timeout at wait_end (last status: 0x%02x)\n", ptr->name, ptr->status); break; @@ -137,7 +131,7 @@ static int zr36060_pushit(struct zr36060 *ptr, u16 startreg, u16 len, const char { int i = 0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, + dprintk(zr36060_debug, 4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, startreg, len); while (i < len) zr36060_write(ptr, startreg++, data[i++]); @@ -252,8 +246,8 @@ static int zr36060_set_sof(struct zr36060 *ptr) char sof_data[34]; // max. size of register set int i; - dprintk(3, "%s: write SOF (%dx%d, %d components)\n", ptr->name, - ptr->width, ptr->height, NO_OF_COMPONENTS); + dprintk(zr36060_debug, 3, "%s: write SOF (%dx%d, %d components)\n", + ptr->name, ptr->width, ptr->height, NO_OF_COMPONENTS); sof_data[0] = 0xff; sof_data[1] = 0xc0; sof_data[2] = 0x00; @@ -280,7 +274,7 @@ static int zr36060_set_sos(struct zr36060 *ptr) char sos_data[16]; // max. size of register set int i; - dprintk(3, "%s: write SOS\n", ptr->name); + dprintk(zr36060_debug, 3, "%s: write SOS\n", ptr->name); sos_data[0] = 0xff; sos_data[1] = 0xda; sos_data[2] = 0x00; @@ -304,7 +298,7 @@ static int zr36060_set_dri(struct zr36060 *ptr) { char dri_data[6]; // max. size of register set - dprintk(3, "%s: write DRI\n", ptr->name); + dprintk(zr36060_debug, 3, "%s: write DRI\n", ptr->name); dri_data[0] = 0xff; dri_data[1] = 0xdd; dri_data[2] = 0x00; @@ -323,7 +317,7 @@ static void zr36060_init(struct zr36060 *ptr) long bitcnt, tmp; if (ptr->mode == CODEC_DO_COMPRESSION) { - dprintk(2, "%s: COMPRESSION SETUP\n", ptr->name); + dprintk(zr36060_debug, 2, "%s: COMPRESSION SETUP\n", ptr->name); zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST); @@ -376,7 +370,7 @@ static void zr36060_init(struct zr36060 *ptr) bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; - dprintk(3, + dprintk(zr36060_debug, 3, "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36060_write(ptr, ZR060_TCV_NET_HI, tmp >> 8); @@ -389,7 +383,8 @@ static void zr36060_init(struct zr36060 *ptr) bitcnt -= ((bitcnt * 5) >> 6); // bits without eob tmp = bitcnt >> 16; - dprintk(3, "%s: code: nettobit=%ld, highnettobits=%ld\n", + dprintk(zr36060_debug, 3, + "%s: code: nettobit=%ld, highnettobits=%ld\n", ptr->name, bitcnt, tmp); zr36060_write(ptr, ZR060_TCV_DATA_HI, tmp >> 8); zr36060_write(ptr, ZR060_TCV_DATA_MH, tmp & 0xff); @@ -408,7 +403,7 @@ static void zr36060_init(struct zr36060 *ptr) zr36060_write(ptr, ZR060_VCR, ZR060_VCR_RANGE); } else { - dprintk(2, "%s: EXPANSION SETUP\n", ptr->name); + dprintk(zr36060_debug, 2, "%s: EXPANSION SETUP\n", ptr->name); zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST); @@ -441,7 +436,8 @@ static void zr36060_init(struct zr36060 *ptr) /* Load the tables */ zr36060_write(ptr, ZR060_LOAD, ZR060_LOAD_SYNC_RST | ZR060_LOAD_LOAD); zr36060_wait_end(ptr); - dprintk(2, "%s: Status after table preload: 0x%02x\n", ptr->name, ptr->status); + dprintk(zr36060_debug, 2, "%s: Status after table preload: 0x%02x\n", + ptr->name, ptr->status); if (ptr->status & ZR060_CFSR_BUSY) { pr_err("%s: init aborted!\n", ptr->name); @@ -462,7 +458,7 @@ static int zr36060_set_mode(struct videocodec *codec, int mode) { struct zr36060 *ptr = (struct zr36060 *)codec->data; - dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); + dprintk(zr36060_debug, 2, "%s: set_mode %d call\n", ptr->name, mode); if (mode != CODEC_DO_EXPANSION && mode != CODEC_DO_COMPRESSION) return -EINVAL; @@ -481,8 +477,9 @@ static int zr36060_set_video(struct videocodec *codec, const struct tvnorm *norm u32 reg; int size; - dprintk(2, "%s: set_video %d/%d-%dx%d (%%%d) call\n", ptr->name, - cap->x, cap->y, cap->width, cap->height, cap->decimation); + dprintk(zr36060_debug, 2, "%s: set_video %d/%d-%dx%d (%%%d) call\n", + ptr->name, cap->x, cap->y, cap->width, + cap->height, cap->decimation); /* if () return -EINVAL; * trust the master driver that it knows what it does - so @@ -639,8 +636,8 @@ static int zr36060_control(struct videocodec *codec, int type, int size, void *d struct zr36060 *ptr = (struct zr36060 *)codec->data; int *ival = (int *)data; - dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, - size); + dprintk(zr36060_debug, 2, "%s: control %d call with %d byte\n", + ptr->name, type, size); switch (type) { case CODEC_G_STATUS: /* get last status */ @@ -757,7 +754,8 @@ static int zr36060_unset(struct videocodec *codec) if (ptr) { /* do wee need some codec deinit here, too ???? */ - dprintk(1, "%s: finished codec #%d\n", ptr->name, ptr->num); + dprintk(zr36060_debug, 1, "%s: finished codec #%d\n", + ptr->name, ptr->num); kfree(ptr); codec->data = NULL; @@ -780,7 +778,8 @@ static int zr36060_setup(struct videocodec *codec) struct zr36060 *ptr; int res; - dprintk(2, "zr36060: initializing MJPEG subsystem #%d.\n", zr36060_codecs); + dprintk(zr36060_debug, 2, "zr36060: initializing MJPEG subsystem #%d.\n", + zr36060_codecs); if (zr36060_codecs == MAX_CODECS) { pr_err("zr36060: Can't attach more codecs!\n"); @@ -823,7 +822,8 @@ static int zr36060_setup(struct videocodec *codec) zr36060_init(ptr); - dprintk(1, KERN_INFO "%s: codec attached and running\n", ptr->name); + dprintk(zr36060_debug, 1, KERN_INFO "%s: codec attached and running\n", + ptr->name); return 0; } @@ -852,7 +852,7 @@ int zr36060_init_module(void) void zr36060_cleanup_module(void) { if (zr36060_codecs) { - dprintk(1, + dprintk(zr36060_debug, 1, "zr36060: something's wrong - %d codecs left somehow.\n", zr36060_codecs); } -- 2.32.0 |
From: Shuah K. <sk...@li...> - 2022-03-18 21:58:08
|
On 3/14/22 1:55 AM, Mauro Carvalho Chehab wrote: > media Kconfig has two entries associated to V4L API: > VIDEO_DEV and VIDEO_V4L2. > > On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. > VIDEO_DEV were meant to: > 1) enable Video4Linux and make its Kconfig options to appear; > 2) it makes the Kernel build the V4L core. > > while VIDEO_V4L2 where used to distinguish between drivers that > implement the newer API and drivers that implemented the former one. > > With time, such meaning changed, specially after the removal of > all V4L version 1 drivers. > > At the current implementation, VIDEO_DEV only does (1): it enables > the media options related to V4L, that now has: > > menu "Video4Linux options" > visible if VIDEO_DEV > > source "drivers/media/v4l2-core/Kconfig" > endmenu > > but it doesn't affect anymore the V4L core drivers. > > The rationale is that the V4L2 core has a "soft" dependency > at the I2C bus, and now requires to select a number of other > Kconfig options: > > config VIDEO_V4L2 > tristate > depends on (I2C || I2C=n) && VIDEO_DEV > select RATIONAL > select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE > default (I2C || I2C=n) && VIDEO_DEV > > In the past, merging them would be tricky, but it seems that it is now > possible to merge those symbols, in order to simplify V4L dependencies. > > Let's keep VIDEO_DEV, as this one is used on some make *defconfig > configurations. > > Suggested-by: Laurent Pinchart <lau...@id...> > Reviewed-by: Laurent Pinchart <lau...@id...> > Signed-off-by: Mauro Carvalho Chehab <mc...@ke...> > --- > > drivers/media/test-drivers/vicodec/Kconfig | 2 +- > drivers/media/test-drivers/vimc/Kconfig | 2 +- > drivers/media/test-drivers/vivid/Kconfig | 2 +- > For vimc change: (trimmed the recipient list to send response) Acked-by: Shuah Khan <sk...@li...> thanks, -- Shuah |
From: Lukasz S. <l.s...@sa...> - 2022-03-17 19:38:21
|
It was <2022-03-14 pon 17:35>, when Mauro Carvalho Chehab wrote: > media Kconfig has two entries associated to V4L API: > VIDEO_DEV and VIDEO_V4L2. > > On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. > VIDEO_DEV were meant to: > 1) enable Video4Linux and make its Kconfig options to appear; > 2) it makes the Kernel build the V4L core. > > while VIDEO_V4L2 where used to distinguish between drivers that > implement the newer API and drivers that implemented the former one. > > With time, such meaning changed, specially after the removal of > all V4L version 1 drivers. > > At the current implementation, VIDEO_DEV only does (1): it enables > the media options related to V4L, that now has: > > menu "Video4Linux options" > visible if VIDEO_DEV > > source "drivers/media/v4l2-core/Kconfig" > endmenu > > but it doesn't affect anymore the V4L core drivers. > > The rationale is that the V4L2 core has a "soft" dependency > at the I2C bus, and now requires to select a number of other > Kconfig options: > > config VIDEO_V4L2 > tristate > depends on (I2C || I2C=n) && VIDEO_DEV > select RATIONAL > select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE > default (I2C || I2C=n) && VIDEO_DEV > > In the past, merging them would be tricky, but it seems that it is now > possible to merge those symbols, in order to simplify V4L dependencies. > > Let's keep VIDEO_DEV, as this one is used on some make *defconfig > configurations. > > Suggested-by: Laurent Pinchart <lau...@id...> > Reviewed-by: Laurent Pinchart <lau...@id...> > Reviewed-by: Jacopo Mondi <ja...@jm...> > Signed-off-by: Mauro Carvalho Chehab <mc...@ke...> > --- > > To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. > See [PATCH v2 00/67] at: https://lore.kernel.org/all/cov...@ke.../ > > drivers/input/rmi4/Kconfig | 2 +- > drivers/input/touchscreen/Kconfig | 4 +- > drivers/media/Kconfig | 3 + > drivers/media/common/saa7146/Kconfig | 2 +- > drivers/media/dvb-core/Kconfig | 2 +- > drivers/media/dvb-frontends/Kconfig | 4 +- > drivers/media/i2c/Kconfig | 250 +++++++++--------- > drivers/media/i2c/ccs/Kconfig | 2 +- > drivers/media/i2c/cx25840/Kconfig | 2 +- > drivers/media/i2c/et8ek8/Kconfig | 2 +- > drivers/media/i2c/m5mols/Kconfig | 2 +- > drivers/media/pci/Kconfig | 2 +- > drivers/media/pci/bt8xx/Kconfig | 2 +- > drivers/media/pci/cobalt/Kconfig | 2 +- > drivers/media/pci/cx18/Kconfig | 2 +- > drivers/media/pci/dt3155/Kconfig | 2 +- > drivers/media/pci/intel/ipu3/Kconfig | 2 +- > drivers/media/pci/ivtv/Kconfig | 2 +- > drivers/media/pci/meye/Kconfig | 2 +- > drivers/media/pci/saa7146/Kconfig | 6 +- > drivers/media/pci/sta2x11/Kconfig | 2 +- > drivers/media/pci/tw5864/Kconfig | 2 +- > drivers/media/pci/tw68/Kconfig | 2 +- > drivers/media/pci/tw686x/Kconfig | 2 +- > drivers/media/platform/Kconfig | 6 +- > drivers/media/platform/allegro-dvt/Kconfig | 2 +- > .../platform/allwinner/sun4i-csi/Kconfig | 2 +- > .../platform/allwinner/sun6i-csi/Kconfig | 2 +- > .../media/platform/allwinner/sun8i-di/Kconfig | 2 +- > .../platform/allwinner/sun8i-rotate/Kconfig | 2 +- > .../media/platform/amlogic/meson-ge2d/Kconfig | 2 +- > drivers/media/platform/amphion/Kconfig | 1 - > drivers/media/platform/aspeed/Kconfig | 2 +- > drivers/media/platform/atmel/Kconfig | 8 +- > drivers/media/platform/cadence/Kconfig | 4 +- > drivers/media/platform/chips-media/Kconfig | 2 +- > drivers/media/platform/intel/Kconfig | 2 +- > drivers/media/platform/marvell/Kconfig | 4 +- > .../media/platform/mediatek/mtk-jpeg/Kconfig | 2 +- > .../media/platform/mediatek/mtk-mdp/Kconfig | 2 +- > .../platform/mediatek/mtk-vcodec/Kconfig | 2 +- > .../media/platform/mediatek/mtk-vpu/Kconfig | 2 +- > .../media/platform/nvidia/tegra-vde/Kconfig | 2 +- > drivers/media/platform/nxp/Kconfig | 6 +- > drivers/media/platform/nxp/imx-jpeg/Kconfig | 2 +- > drivers/media/platform/qcom/camss/Kconfig | 2 +- > drivers/media/platform/qcom/venus/Kconfig | 2 +- > drivers/media/platform/renesas/Kconfig | 30 +-- > .../media/platform/renesas/rcar-vin/Kconfig | 4 +- > drivers/media/platform/rockchip/rga/Kconfig | 2 +- > .../media/platform/rockchip/rkisp1/Kconfig | 2 +- > .../media/platform/samsung/exynos-gsc/Kconfig | 2 +- > .../media/platform/samsung/exynos4-is/Kconfig | 2 +- > .../media/platform/samsung/s3c-camif/Kconfig | 2 +- > .../media/platform/samsung/s5p-g2d/Kconfig | 2 +- > .../media/platform/samsung/s5p-jpeg/Kconfig | 2 +- > .../media/platform/samsung/s5p-mfc/Kconfig | 2 +- > drivers/media/platform/stm/sti/bdisp/Kconfig | 2 +- > drivers/media/platform/stm/sti/delta/Kconfig | 2 +- > drivers/media/platform/stm/sti/hva/Kconfig | 2 +- > drivers/media/platform/stm/stm32/Kconfig | 4 +- > drivers/media/platform/ti/am437x/Kconfig | 2 +- > drivers/media/platform/ti/davinci/Kconfig | 12 +- > drivers/media/platform/ti/omap/Kconfig | 2 +- > drivers/media/platform/ti/omap3isp/Kconfig | 2 +- > drivers/media/platform/via/Kconfig | 2 +- > drivers/media/platform/xilinx/Kconfig | 2 +- > drivers/media/radio/Kconfig | 42 ++- > drivers/media/radio/si470x/Kconfig | 2 +- > drivers/media/radio/wl128x/Kconfig | 2 +- > drivers/media/spi/Kconfig | 4 +- > drivers/media/test-drivers/Kconfig | 2 +- > drivers/media/test-drivers/vicodec/Kconfig | 2 +- > drivers/media/test-drivers/vimc/Kconfig | 2 +- > drivers/media/test-drivers/vivid/Kconfig | 2 +- > drivers/media/tuners/Kconfig | 6 +- > drivers/media/tuners/e4000.c | 6 +- > drivers/media/tuners/fc2580.c | 6 +- > drivers/media/usb/airspy/Kconfig | 2 +- > drivers/media/usb/au0828/Kconfig | 6 +- > drivers/media/usb/cpia2/Kconfig | 2 +- > drivers/media/usb/dvb-usb-v2/Kconfig | 8 +- > drivers/media/usb/dvb-usb/Kconfig | 4 +- > drivers/media/usb/gspca/Kconfig | 96 +++---- > drivers/media/usb/gspca/gl860/Kconfig | 2 +- > drivers/media/usb/gspca/m5602/Kconfig | 2 +- > drivers/media/usb/hackrf/Kconfig | 2 +- > drivers/media/usb/hdpvr/Kconfig | 2 +- > drivers/media/usb/msi2500/Kconfig | 2 +- > drivers/media/usb/pvrusb2/Kconfig | 2 +- > drivers/media/usb/pwc/Kconfig | 2 +- > drivers/media/usb/s2255/Kconfig | 2 +- > drivers/media/usb/stkwebcam/Kconfig | 2 +- > drivers/media/usb/usbtv/Kconfig | 2 +- > drivers/media/usb/uvc/Kconfig | 2 +- > drivers/media/usb/zr364xx/Kconfig | 2 +- > drivers/media/v4l2-core/Kconfig | 12 +- > drivers/media/v4l2-core/Makefile | 2 +- > drivers/staging/media/atomisp/Kconfig | 2 +- > drivers/staging/media/atomisp/i2c/Kconfig | 14 +- > drivers/staging/media/hantro/Kconfig | 2 +- > drivers/staging/media/imx/Kconfig | 2 +- > drivers/staging/media/ipu3/Kconfig | 2 +- > drivers/staging/media/max96712/Kconfig | 2 +- > drivers/staging/media/meson/vdec/Kconfig | 2 +- > drivers/staging/media/omap4iss/Kconfig | 2 +- > drivers/staging/media/rkvdec/Kconfig | 2 +- > drivers/staging/media/sunxi/cedrus/Kconfig | 2 +- > drivers/staging/media/tegra-video/Kconfig | 2 +- > drivers/staging/media/zoran/Kconfig | 2 +- > drivers/staging/most/video/Kconfig | 2 +- > .../vc04_services/bcm2835-camera/Kconfig | 2 +- > drivers/usb/gadget/Kconfig | 2 +- > drivers/usb/gadget/legacy/Kconfig | 2 +- > sound/pci/Kconfig | 4 +- > 115 files changed, 356 insertions(+), 374 deletions(-) > Acked-by: Łukasz Stelmach <l.s...@sa...> [...] > diff --git a/drivers/media/platform/samsung/s5p-g2d/Kconfig b/drivers/media/platform/samsung/s5p-g2d/Kconfig > index 9bc9d90a666a..28ab88fc2d7c 100644 > --- a/drivers/media/platform/samsung/s5p-g2d/Kconfig > +++ b/drivers/media/platform/samsung/s5p-g2d/Kconfig > @@ -1,7 +1,7 @@ > config VIDEO_SAMSUNG_S5P_G2D > tristate "Samsung S5P and EXYNOS4 G2D 2d graphics accelerator driver" > depends on V4L_MEM2MEM_DRIVERS > - depends on VIDEO_DEV && VIDEO_V4L2 > + depends on VIDEO_DEV > depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST > select VIDEOBUF2_DMA_CONTIG > select V4L2_MEM2MEM_DEV [...] -- Łukasz Stelmach Samsung R&D Institute Poland Samsung Electronics |
From: Mauro C. C. <mc...@ke...> - 2022-03-14 16:35:23
|
media Kconfig has two entries associated to V4L API: VIDEO_DEV and VIDEO_V4L2. On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. VIDEO_DEV were meant to: 1) enable Video4Linux and make its Kconfig options to appear; 2) it makes the Kernel build the V4L core. while VIDEO_V4L2 where used to distinguish between drivers that implement the newer API and drivers that implemented the former one. With time, such meaning changed, specially after the removal of all V4L version 1 drivers. At the current implementation, VIDEO_DEV only does (1): it enables the media options related to V4L, that now has: menu "Video4Linux options" visible if VIDEO_DEV source "drivers/media/v4l2-core/Kconfig" endmenu but it doesn't affect anymore the V4L core drivers. The rationale is that the V4L2 core has a "soft" dependency at the I2C bus, and now requires to select a number of other Kconfig options: config VIDEO_V4L2 tristate depends on (I2C || I2C=n) && VIDEO_DEV select RATIONAL select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE default (I2C || I2C=n) && VIDEO_DEV In the past, merging them would be tricky, but it seems that it is now possible to merge those symbols, in order to simplify V4L dependencies. Let's keep VIDEO_DEV, as this one is used on some make *defconfig configurations. Suggested-by: Laurent Pinchart <lau...@id...> Reviewed-by: Laurent Pinchart <lau...@id...> Reviewed-by: Jacopo Mondi <ja...@jm...> Signed-off-by: Mauro Carvalho Chehab <mc...@ke...> --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH v2 00/67] at: https://lore.kernel.org/all/cov...@ke.../ drivers/input/rmi4/Kconfig | 2 +- drivers/input/touchscreen/Kconfig | 4 +- drivers/media/Kconfig | 3 + drivers/media/common/saa7146/Kconfig | 2 +- drivers/media/dvb-core/Kconfig | 2 +- drivers/media/dvb-frontends/Kconfig | 4 +- drivers/media/i2c/Kconfig | 250 +++++++++--------- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/cx25840/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/i2c/m5mols/Kconfig | 2 +- drivers/media/pci/Kconfig | 2 +- drivers/media/pci/bt8xx/Kconfig | 2 +- drivers/media/pci/cobalt/Kconfig | 2 +- drivers/media/pci/cx18/Kconfig | 2 +- drivers/media/pci/dt3155/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/pci/ivtv/Kconfig | 2 +- drivers/media/pci/meye/Kconfig | 2 +- drivers/media/pci/saa7146/Kconfig | 6 +- drivers/media/pci/sta2x11/Kconfig | 2 +- drivers/media/pci/tw5864/Kconfig | 2 +- drivers/media/pci/tw68/Kconfig | 2 +- drivers/media/pci/tw686x/Kconfig | 2 +- drivers/media/platform/Kconfig | 6 +- drivers/media/platform/allegro-dvt/Kconfig | 2 +- .../platform/allwinner/sun4i-csi/Kconfig | 2 +- .../platform/allwinner/sun6i-csi/Kconfig | 2 +- .../media/platform/allwinner/sun8i-di/Kconfig | 2 +- .../platform/allwinner/sun8i-rotate/Kconfig | 2 +- .../media/platform/amlogic/meson-ge2d/Kconfig | 2 +- drivers/media/platform/amphion/Kconfig | 1 - drivers/media/platform/aspeed/Kconfig | 2 +- drivers/media/platform/atmel/Kconfig | 8 +- drivers/media/platform/cadence/Kconfig | 4 +- drivers/media/platform/chips-media/Kconfig | 2 +- drivers/media/platform/intel/Kconfig | 2 +- drivers/media/platform/marvell/Kconfig | 4 +- .../media/platform/mediatek/mtk-jpeg/Kconfig | 2 +- .../media/platform/mediatek/mtk-mdp/Kconfig | 2 +- .../platform/mediatek/mtk-vcodec/Kconfig | 2 +- .../media/platform/mediatek/mtk-vpu/Kconfig | 2 +- .../media/platform/nvidia/tegra-vde/Kconfig | 2 +- drivers/media/platform/nxp/Kconfig | 6 +- drivers/media/platform/nxp/imx-jpeg/Kconfig | 2 +- drivers/media/platform/qcom/camss/Kconfig | 2 +- drivers/media/platform/qcom/venus/Kconfig | 2 +- drivers/media/platform/renesas/Kconfig | 30 +-- .../media/platform/renesas/rcar-vin/Kconfig | 4 +- drivers/media/platform/rockchip/rga/Kconfig | 2 +- .../media/platform/rockchip/rkisp1/Kconfig | 2 +- .../media/platform/samsung/exynos-gsc/Kconfig | 2 +- .../media/platform/samsung/exynos4-is/Kconfig | 2 +- .../media/platform/samsung/s3c-camif/Kconfig | 2 +- .../media/platform/samsung/s5p-g2d/Kconfig | 2 +- .../media/platform/samsung/s5p-jpeg/Kconfig | 2 +- .../media/platform/samsung/s5p-mfc/Kconfig | 2 +- drivers/media/platform/stm/sti/bdisp/Kconfig | 2 +- drivers/media/platform/stm/sti/delta/Kconfig | 2 +- drivers/media/platform/stm/sti/hva/Kconfig | 2 +- drivers/media/platform/stm/stm32/Kconfig | 4 +- drivers/media/platform/ti/am437x/Kconfig | 2 +- drivers/media/platform/ti/davinci/Kconfig | 12 +- drivers/media/platform/ti/omap/Kconfig | 2 +- drivers/media/platform/ti/omap3isp/Kconfig | 2 +- drivers/media/platform/via/Kconfig | 2 +- drivers/media/platform/xilinx/Kconfig | 2 +- drivers/media/radio/Kconfig | 42 ++- drivers/media/radio/si470x/Kconfig | 2 +- drivers/media/radio/wl128x/Kconfig | 2 +- drivers/media/spi/Kconfig | 4 +- drivers/media/test-drivers/Kconfig | 2 +- drivers/media/test-drivers/vicodec/Kconfig | 2 +- drivers/media/test-drivers/vimc/Kconfig | 2 +- drivers/media/test-drivers/vivid/Kconfig | 2 +- drivers/media/tuners/Kconfig | 6 +- drivers/media/tuners/e4000.c | 6 +- drivers/media/tuners/fc2580.c | 6 +- drivers/media/usb/airspy/Kconfig | 2 +- drivers/media/usb/au0828/Kconfig | 6 +- drivers/media/usb/cpia2/Kconfig | 2 +- drivers/media/usb/dvb-usb-v2/Kconfig | 8 +- drivers/media/usb/dvb-usb/Kconfig | 4 +- drivers/media/usb/gspca/Kconfig | 96 +++---- drivers/media/usb/gspca/gl860/Kconfig | 2 +- drivers/media/usb/gspca/m5602/Kconfig | 2 +- drivers/media/usb/hackrf/Kconfig | 2 +- drivers/media/usb/hdpvr/Kconfig | 2 +- drivers/media/usb/msi2500/Kconfig | 2 +- drivers/media/usb/pvrusb2/Kconfig | 2 +- drivers/media/usb/pwc/Kconfig | 2 +- drivers/media/usb/s2255/Kconfig | 2 +- drivers/media/usb/stkwebcam/Kconfig | 2 +- drivers/media/usb/usbtv/Kconfig | 2 +- drivers/media/usb/uvc/Kconfig | 2 +- drivers/media/usb/zr364xx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 12 +- drivers/media/v4l2-core/Makefile | 2 +- drivers/staging/media/atomisp/Kconfig | 2 +- drivers/staging/media/atomisp/i2c/Kconfig | 14 +- drivers/staging/media/hantro/Kconfig | 2 +- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/ipu3/Kconfig | 2 +- drivers/staging/media/max96712/Kconfig | 2 +- drivers/staging/media/meson/vdec/Kconfig | 2 +- drivers/staging/media/omap4iss/Kconfig | 2 +- drivers/staging/media/rkvdec/Kconfig | 2 +- drivers/staging/media/sunxi/cedrus/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +- drivers/staging/media/zoran/Kconfig | 2 +- drivers/staging/most/video/Kconfig | 2 +- .../vc04_services/bcm2835-camera/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 2 +- drivers/usb/gadget/legacy/Kconfig | 2 +- sound/pci/Kconfig | 4 +- 115 files changed, 356 insertions(+), 374 deletions(-) diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig index 16119f760d11..c0163b983ce6 100644 --- a/drivers/input/rmi4/Kconfig +++ b/drivers/input/rmi4/Kconfig @@ -110,7 +110,7 @@ config RMI4_F3A config RMI4_F54 bool "RMI4 Function 54 (Analog diagnostics)" - depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m) + depends on VIDEO_DEV=y || (RMI4_CORE=m && VIDEO_DEV=m) select VIDEOBUF2_VMALLOC select RMI4_F55 help diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 2f6adfb7b938..ff7794cecf69 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -131,7 +131,7 @@ config TOUCHSCREEN_ATMEL_MXT config TOUCHSCREEN_ATMEL_MXT_T37 bool "Support T37 Diagnostic Data" depends on TOUCHSCREEN_ATMEL_MXT - depends on VIDEO_V4L2=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_V4L2=m) + depends on VIDEO_DEV=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_DEV=m) select VIDEOBUF2_VMALLOC help Say Y here if you want support to output data from the T37 @@ -1252,7 +1252,7 @@ config TOUCHSCREEN_SUN4I config TOUCHSCREEN_SUR40 tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen" depends on USB && MEDIA_USB_SUPPORT && HAS_DMA - depends on VIDEO_V4L2 + depends on VIDEO_DEV select VIDEOBUF2_DMA_SG help Say Y here if you want support for the Samsung SUR40 touchscreen diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 1a75058df374..ba6592b3dab2 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -160,6 +160,9 @@ menu "Media core support" config VIDEO_DEV tristate "Video4Linux core" default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT + depends on (I2C || I2C=n) + select RATIONAL + select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE help Enables the V4L2 API, used by cameras, analog TV, video grabbers, radio devices and by some input devices. diff --git a/drivers/media/common/saa7146/Kconfig b/drivers/media/common/saa7146/Kconfig index 3e85c0c3fd9a..a0aa155e5d85 100644 --- a/drivers/media/common/saa7146/Kconfig +++ b/drivers/media/common/saa7146/Kconfig @@ -5,6 +5,6 @@ config VIDEO_SAA7146 config VIDEO_SAA7146_VV tristate - depends on VIDEO_V4L2 + depends on VIDEO_DEV select VIDEOBUF_DMA_SG select VIDEO_SAA7146 diff --git a/drivers/media/dvb-core/Kconfig b/drivers/media/dvb-core/Kconfig index 6ffac618417b..8b3f2d53cd62 100644 --- a/drivers/media/dvb-core/Kconfig +++ b/drivers/media/dvb-core/Kconfig @@ -6,7 +6,7 @@ config DVB_MMAP bool "Enable DVB memory-mapped API (EXPERIMENTAL)" depends on DVB_CORE - depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE + depends on VIDEO_DEV=y || VIDEO_DEV=DVB_CORE select VIDEOBUF2_VMALLOC help This option enables DVB experimental memory-mapped API, which diff --git a/drivers/media/dvb-frontends/Kconfig b/drivers/media/dvb-frontends/Kconfig index 2c1ed98d43c5..4101f9b1e731 100644 --- a/drivers/media/dvb-frontends/Kconfig +++ b/drivers/media/dvb-frontends/Kconfig @@ -510,7 +510,7 @@ config DVB_RTL2832 config DVB_RTL2832_SDR tristate "Realtek RTL2832 SDR" - depends on DVB_CORE && I2C && I2C_MUX && VIDEO_V4L2 && MEDIA_SDR_SUPPORT && USB + depends on DVB_CORE && I2C && I2C_MUX && VIDEO_DEV && MEDIA_SDR_SUPPORT && USB select DVB_RTL2832 select VIDEOBUF2_VMALLOC default m if !MEDIA_SUBDRV_AUTOSELECT @@ -681,7 +681,7 @@ config DVB_AU8522_DTV config DVB_AU8522_V4L tristate "Auvitek AU8522 based ATV demod" - depends on VIDEO_V4L2 && DVB_CORE && I2C + depends on VIDEO_DEV && DVB_CORE && I2C select DVB_AU8522 default m if !MEDIA_SUBDRV_AUTOSELECT help diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index e7194c1be4d2..5abc169f0a5c 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -3,7 +3,7 @@ # Multimedia Video device configuration # -if VIDEO_V4L2 +if VIDEO_DEV comment "IR I2C driver auto-selected by 'Autoselect ancillary drivers'" depends on MEDIA_SUBDRV_AUTOSELECT && I2C && RC_CORE @@ -36,7 +36,7 @@ menu "Audio decoders, processors and mixers" config VIDEO_TVAUDIO tristate "Simple audio decoder chips" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for several audio decoder chips found on some bt8xx boards: Philips: tda9840, tda9873h, tda9874h/a, tda9850, tda985x, tea6300, @@ -48,7 +48,7 @@ config VIDEO_TVAUDIO config VIDEO_TDA7432 tristate "Philips TDA7432 audio processor" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for tda7432 audio decoder chip found on some bt8xx boards. @@ -66,7 +66,7 @@ config VIDEO_TDA9840 config VIDEO_TDA1997X tristate "NXP TDA1997x HDMI receiver" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on SND_SOC select HDMI select SND_PCM @@ -99,7 +99,7 @@ config VIDEO_TEA6420 config VIDEO_MSP3400 tristate "Micronas MSP34xx audio decoders" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Micronas MSP34xx series of audio decoders. @@ -108,7 +108,7 @@ config VIDEO_MSP3400 config VIDEO_CS3308 tristate "Cirrus Logic CS3308 audio ADC" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Cirrus Logic CS3308 High Performance 8-Channel Analog Volume Control @@ -118,7 +118,7 @@ config VIDEO_CS3308 config VIDEO_CS5345 tristate "Cirrus Logic CS5345 audio ADC" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Cirrus Logic CS5345 24-bit, 192 kHz stereo A/D converter. @@ -128,7 +128,7 @@ config VIDEO_CS5345 config VIDEO_CS53L32A tristate "Cirrus Logic CS53L32A audio ADC" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Cirrus Logic CS53L32A low voltage stereo A/D converter. @@ -138,7 +138,7 @@ config VIDEO_CS53L32A config VIDEO_TLV320AIC23B tristate "Texas Instruments TLV320AIC23B audio codec" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Texas Instruments TLV320AIC23B audio codec. @@ -147,7 +147,7 @@ config VIDEO_TLV320AIC23B config VIDEO_UDA1342 tristate "Philips UDA1342 audio codec" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Philips UDA1342 audio codec. @@ -156,7 +156,7 @@ config VIDEO_UDA1342 config VIDEO_WM8775 tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Wolfson Microelectronics WM8775 high performance stereo A/D Converter with a 4 channel input mixer. @@ -166,7 +166,7 @@ config VIDEO_WM8775 config VIDEO_WM8739 tristate "Wolfson Microelectronics WM8739 stereo audio ADC" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Wolfson Microelectronics WM8739 stereo A/D Converter. @@ -176,7 +176,7 @@ config VIDEO_WM8739 config VIDEO_VP27SMPX tristate "Panasonic VP27's internal MPX" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the internal MPX of the Panasonic VP27s tuner. @@ -185,7 +185,7 @@ config VIDEO_VP27SMPX config VIDEO_SONY_BTF_MPX tristate "Sony BTF's internal MPX" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the internal MPX of the Sony BTF-PG472Z tuner. @@ -198,7 +198,7 @@ menu "RDS decoders" config VIDEO_SAA6588 tristate "SAA6588 Radio Chip RDS decoder support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for this Radio Data System (RDS) decoder. This allows @@ -214,7 +214,7 @@ menu "Video decoders" config VIDEO_ADV7180 tristate "Analog Devices ADV7180 decoder" - depends on GPIOLIB && VIDEO_V4L2 && I2C + depends on GPIOLIB && VIDEO_DEV && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_ASYNC @@ -226,7 +226,7 @@ config VIDEO_ADV7180 config VIDEO_ADV7183 tristate "Analog Devices ADV7183 decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help V4l2 subdevice driver for the Analog Devices ADV7183 video decoder. @@ -236,7 +236,7 @@ config VIDEO_ADV7183 config VIDEO_ADV748X tristate "Analog Devices ADV748x decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on OF select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -251,7 +251,7 @@ config VIDEO_ADV748X config VIDEO_ADV7604 tristate "Analog Devices ADV7604 decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on GPIOLIB || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -277,7 +277,7 @@ config VIDEO_ADV7604_CEC config VIDEO_ADV7842 tristate "Analog Devices ADV7842 decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select HDMI @@ -300,7 +300,7 @@ config VIDEO_ADV7842_CEC config VIDEO_BT819 tristate "BT819A VideoStream decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for BT819A video decoder. @@ -309,7 +309,7 @@ config VIDEO_BT819 config VIDEO_BT856 tristate "BT856 VideoStream decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for BT856 video decoder. @@ -318,7 +318,7 @@ config VIDEO_BT856 config VIDEO_BT866 tristate "BT866 VideoStream decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for BT866 video decoder. @@ -327,7 +327,7 @@ config VIDEO_BT866 config VIDEO_ISL7998X tristate "Intersil ISL7998x video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on OF_GPIO select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -337,7 +337,7 @@ config VIDEO_ISL7998X config VIDEO_KS0127 tristate "KS0127 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for KS0127 video decoder. @@ -349,7 +349,7 @@ config VIDEO_KS0127 config VIDEO_ML86V7667 tristate "OKI ML86V7667 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the OKI Semiconductor ML86V7667 video decoder. @@ -358,7 +358,7 @@ config VIDEO_ML86V7667 config VIDEO_SAA7110 tristate "Philips SAA7110 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Philips SAA7110 video decoders. @@ -367,7 +367,7 @@ config VIDEO_SAA7110 config VIDEO_SAA711X tristate "Philips SAA7111/3/4/5 video decoders" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Philips SAA7111/3/4/5 video decoders. @@ -376,7 +376,7 @@ config VIDEO_SAA711X config VIDEO_TC358743 tristate "Toshiba TC358743 decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select HDMI @@ -397,7 +397,7 @@ config VIDEO_TC358743_CEC config VIDEO_TVP514X tristate "Texas Instruments TVP514x video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_FWNODE help This is a Video4Linux2 sensor driver for the TI TVP5146/47 @@ -409,7 +409,7 @@ config VIDEO_TVP514X config VIDEO_TVP5150 tristate "Texas Instruments TVP5150 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_FWNODE select REGMAP_I2C help @@ -420,7 +420,7 @@ config VIDEO_TVP5150 config VIDEO_TVP7002 tristate "Texas Instruments TVP7002 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_FWNODE help Support for the Texas Instruments TVP7002 video decoder. @@ -430,7 +430,7 @@ config VIDEO_TVP7002 config VIDEO_TW2804 tristate "Techwell TW2804 multiple video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Techwell tw2804 multiple video decoder. @@ -439,7 +439,7 @@ config VIDEO_TW2804 config VIDEO_TW9903 tristate "Techwell TW9903 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Techwell tw9903 multi-standard video decoder with high quality down scaler. @@ -449,7 +449,7 @@ config VIDEO_TW9903 config VIDEO_TW9906 tristate "Techwell TW9906 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Techwell tw9906 enhanced multi-standard comb filter video decoder with YCbCr input support. @@ -459,7 +459,7 @@ config VIDEO_TW9906 config VIDEO_TW9910 tristate "Techwell TW9910 video decoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_ASYNC help Support for Techwell TW9910 NTSC/PAL/SECAM video decoder. @@ -469,7 +469,7 @@ config VIDEO_TW9910 config VIDEO_VPX3220 tristate "vpx3220a, vpx3216b & vpx3214c video decoders" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for VPX322x video decoders. @@ -479,7 +479,7 @@ config VIDEO_VPX3220 config VIDEO_MAX9286 tristate "Maxim MAX9286 GMSL deserializer support" depends on I2C && I2C_MUX - depends on VIDEO_V4L2 + depends on VIDEO_DEV depends on OF_GPIO select V4L2_FWNODE select VIDEO_V4L2_SUBDEV_API @@ -494,7 +494,7 @@ comment "Video and audio decoders" config VIDEO_SAA717X tristate "Philips SAA7171/3/4 audio/video decoders" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Philips SAA7171/3/4 audio/video decoders. @@ -510,7 +510,7 @@ menu "Video encoders" config VIDEO_SAA7127 tristate "Philips SAA7127/9 digital video encoders" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Philips SAA7127/9 digital video encoders. @@ -519,7 +519,7 @@ config VIDEO_SAA7127 config VIDEO_SAA7185 tristate "Philips SAA7185 video encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Philips SAA7185 video encoder. @@ -528,7 +528,7 @@ config VIDEO_SAA7185 config VIDEO_ADV7170 tristate "Analog Devices ADV7170 video encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Analog Devices ADV7170 video encoder driver @@ -537,7 +537,7 @@ config VIDEO_ADV7170 config VIDEO_ADV7175 tristate "Analog Devices ADV7175 video encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Analog Devices ADV7175 video encoder driver @@ -565,7 +565,7 @@ config VIDEO_ADV7393 config VIDEO_ADV7511 tristate "Analog Devices ADV7511 encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on DRM_I2C_ADV7511=n || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -588,7 +588,7 @@ config VIDEO_ADV7511_CEC config VIDEO_AD9389B tristate "Analog Devices AD9389B encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -608,7 +608,7 @@ config VIDEO_AK881X config VIDEO_THS8200 tristate "Texas Instruments THS8200 video encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_ASYNC help Support for the Texas Instruments THS8200 video encoder. @@ -622,7 +622,7 @@ menu "Video improvement chips" config VIDEO_UPD64031A tristate "NEC Electronics uPD64031A Ghost Reduction" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_ASYNC help Support for the NEC Electronics uPD64031A Ghost Reduction @@ -635,7 +635,7 @@ config VIDEO_UPD64031A config VIDEO_UPD64083 tristate "NEC Electronics uPD64083 3-Dimensional Y/C separation" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the NEC Electronics uPD64083 3-Dimensional Y/C separation video chip. It is used to improve the quality of @@ -650,7 +650,7 @@ menu "Audio/Video compression chips" config VIDEO_SAA6752HS tristate "Philips SAA6752HS MPEG-2 Audio/Video Encoder" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select CRC32 help Support for the Philips SAA6752HS MPEG-2 video and MPEG-audio/AC-3 @@ -666,7 +666,7 @@ menu "SDR tuner chips" config SDR_MAX2175 tristate "Maxim 2175 RF to Bits tuner" - depends on VIDEO_V4L2 && MEDIA_SDR_SUPPORT && I2C + depends on VIDEO_DEV && MEDIA_SDR_SUPPORT && I2C select REGMAP_I2C select V4L2_ASYNC help @@ -684,7 +684,7 @@ menu "Miscellaneous helper chips" config VIDEO_THS7303 tristate "THS7303/53 Video Amplifier" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select V4L2_ASYNC help Support for TI THS7303/53 video amplifier @@ -694,7 +694,7 @@ config VIDEO_THS7303 config VIDEO_M52790 tristate "Mitsubishi M52790 A/V switch" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Mitsubishi M52790 A/V switch. @@ -703,7 +703,7 @@ config VIDEO_M52790 config VIDEO_I2C tristate "I2C transport video support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select VIDEOBUF2_VMALLOC imply HWMON help @@ -717,7 +717,7 @@ config VIDEO_I2C config VIDEO_ST_MIPID02 tristate "STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -745,7 +745,7 @@ config VIDEO_CCS_PLL config VIDEO_HI556 tristate "Hynix Hi-556 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -758,7 +758,7 @@ config VIDEO_HI556 config VIDEO_HI846 tristate "Hynix Hi-846 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -771,7 +771,7 @@ config VIDEO_HI846 config VIDEO_HI847 tristate "Hynix Hi-847 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -784,7 +784,7 @@ config VIDEO_HI847 config VIDEO_IMX208 tristate "Sony IMX208 sensor support" - depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + depends on I2C && VIDEO_DEV && VIDEO_V4L2_SUBDEV_API depends on MEDIA_CAMERA_SUPPORT help This is a Video4Linux2 sensor driver for the Sony @@ -795,7 +795,7 @@ config VIDEO_IMX208 config VIDEO_IMX214 tristate "Sony IMX214 sensor support" - depends on GPIOLIB && I2C && VIDEO_V4L2 + depends on GPIOLIB && I2C && VIDEO_DEV select V4L2_FWNODE select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -809,7 +809,7 @@ config VIDEO_IMX214 config VIDEO_IMX219 tristate "Sony IMX219 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -822,7 +822,7 @@ config VIDEO_IMX219 config VIDEO_IMX258 tristate "Sony IMX258 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -834,7 +834,7 @@ config VIDEO_IMX258 config VIDEO_IMX274 tristate "Sony IMX274 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C @@ -844,7 +844,7 @@ config VIDEO_IMX274 config VIDEO_IMX290 tristate "Sony IMX290 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C @@ -858,7 +858,7 @@ config VIDEO_IMX290 config VIDEO_IMX319 tristate "Sony IMX319 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -871,7 +871,7 @@ config VIDEO_IMX319 config VIDEO_IMX334 tristate "Sony IMX334 sensor support" depends on OF_GPIO - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER select V4L2_FWNODE @@ -885,7 +885,7 @@ config VIDEO_IMX334 config VIDEO_IMX335 tristate "Sony IMX335 sensor support" depends on OF_GPIO - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER select V4L2_FWNODE @@ -898,7 +898,7 @@ config VIDEO_IMX335 config VIDEO_IMX355 tristate "Sony IMX355 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -911,7 +911,7 @@ config VIDEO_IMX355 config VIDEO_IMX412 tristate "Sony IMX412 sensor support" depends on OF_GPIO - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER select V4L2_FWNODE @@ -924,7 +924,7 @@ config VIDEO_IMX412 config VIDEO_OG01A1B tristate "OmniVision OG01A1B sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -937,7 +937,7 @@ config VIDEO_OG01A1B config VIDEO_OV02A10 tristate "OmniVision OV02A10 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -950,7 +950,7 @@ config VIDEO_OV02A10 config VIDEO_OV08D10 tristate "OmniVision OV08D10 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -963,7 +963,7 @@ config VIDEO_OV08D10 config VIDEO_OV2640 tristate "OmniVision OV2640 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help This is a Video4Linux2 sensor driver for the OmniVision OV2640 camera. @@ -973,7 +973,7 @@ config VIDEO_OV2640 config VIDEO_OV2659 tristate "OmniVision OV2659 sensor support" - depends on VIDEO_V4L2 && I2C && GPIOLIB + depends on VIDEO_DEV && I2C && GPIOLIB select V4L2_FWNODE help This is a Video4Linux2 sensor driver for the OmniVision @@ -984,7 +984,7 @@ config VIDEO_OV2659 config VIDEO_OV2680 tristate "OmniVision OV2680 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select MEDIA_CONTROLLER select V4L2_FWNODE help @@ -996,7 +996,7 @@ config VIDEO_OV2680 config VIDEO_OV2685 tristate "OmniVision OV2685 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C select MEDIA_CONTROLLER select V4L2_FWNODE help @@ -1008,7 +1008,7 @@ config VIDEO_OV2685 config VIDEO_OV2740 tristate "OmniVision OV2740 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on ACPI || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -1024,7 +1024,7 @@ config VIDEO_OV2740 config VIDEO_OV5640 tristate "OmniVision OV5640 sensor support" depends on OF - depends on GPIOLIB && VIDEO_V4L2 && I2C + depends on GPIOLIB && VIDEO_DEV && I2C select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1035,7 +1035,7 @@ config VIDEO_OV5640 config VIDEO_OV5645 tristate "OmniVision OV5645 sensor support" depends on OF - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1048,7 +1048,7 @@ config VIDEO_OV5645 config VIDEO_OV5647 tristate "OmniVision OV5647 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1061,7 +1061,7 @@ config VIDEO_OV5647 config VIDEO_OV5648 tristate "OmniVision OV5648 sensor support" - depends on I2C && PM && VIDEO_V4L2 + depends on I2C && PM && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1074,7 +1074,7 @@ config VIDEO_OV5648 config VIDEO_OV6650 tristate "OmniVision OV6650 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a Video4Linux2 sensor driver for the OmniVision OV6650 camera. @@ -1084,7 +1084,7 @@ config VIDEO_OV6650 config VIDEO_OV5670 tristate "OmniVision OV5670 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1097,7 +1097,7 @@ config VIDEO_OV5670 config VIDEO_OV5675 tristate "OmniVision OV5675 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1110,7 +1110,7 @@ config VIDEO_OV5675 config VIDEO_OV5693 tristate "OmniVision OV5693 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select V4L2_FWNODE help This is a Video4Linux2 sensor driver for the OmniVision @@ -1121,7 +1121,7 @@ config VIDEO_OV5693 config VIDEO_OV5695 tristate "OmniVision OV5695 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select V4L2_FWNODE help This is a Video4Linux2 sensor driver for the OmniVision @@ -1132,7 +1132,7 @@ config VIDEO_OV5695 config VIDEO_OV7251 tristate "OmniVision OV7251 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1145,7 +1145,7 @@ config VIDEO_OV7251 config VIDEO_OV772X tristate "OmniVision OV772x sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select REGMAP_SCCB select V4L2_FWNODE help @@ -1157,7 +1157,7 @@ config VIDEO_OV772X config VIDEO_OV7640 tristate "OmniVision OV7640 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a Video4Linux2 sensor driver for the OmniVision OV7640 camera. @@ -1167,7 +1167,7 @@ config VIDEO_OV7640 config VIDEO_OV7670 tristate "OmniVision OV7670 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select V4L2_FWNODE help This is a Video4Linux2 sensor driver for the OmniVision @@ -1176,7 +1176,7 @@ config VIDEO_OV7670 config VIDEO_OV7740 tristate "OmniVision OV7740 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select REGMAP_SCCB help This is a Video4Linux2 sensor driver for the OmniVision @@ -1184,7 +1184,7 @@ config VIDEO_OV7740 config VIDEO_OV8856 tristate "OmniVision OV8856 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1197,7 +1197,7 @@ config VIDEO_OV8856 config VIDEO_OV8865 tristate "OmniVision OV8865 sensor support" - depends on I2C && PM && VIDEO_V4L2 + depends on I2C && PM && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1211,7 +1211,7 @@ config VIDEO_OV8865 config VIDEO_OV9282 tristate "OmniVision OV9282 sensor support" depends on OF_GPIO - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select VIDEO_V4L2_SUBDEV_API select MEDIA_CONTROLLER select V4L2_FWNODE @@ -1224,14 +1224,14 @@ config VIDEO_OV9282 config VIDEO_OV9640 tristate "OmniVision OV9640 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a Video4Linux2 sensor driver for the OmniVision OV9640 camera sensor. config VIDEO_OV9650 tristate "OmniVision OV9650/OV9652 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_SCCB @@ -1241,7 +1241,7 @@ config VIDEO_OV9650 config VIDEO_OV9734 tristate "OmniVision OV9734 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on ACPI || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -1255,7 +1255,7 @@ config VIDEO_OV9734 config VIDEO_OV13858 tristate "OmniVision OV13858 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1265,7 +1265,7 @@ config VIDEO_OV13858 config VIDEO_OV13B10 tristate "OmniVision OV13B10 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1275,7 +1275,7 @@ config VIDEO_OV13B10 config VIDEO_VS6624 tristate "ST VS6624 sensor support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help This is a Video4Linux2 sensor driver for the ST VS6624 camera. @@ -1285,7 +1285,7 @@ config VIDEO_VS6624 config VIDEO_MT9M001 tristate "mt9m001 support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -1294,7 +1294,7 @@ config VIDEO_MT9M001 config VIDEO_MT9M032 tristate "MT9M032 camera sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEO_APTINA_PLL @@ -1304,7 +1304,7 @@ config VIDEO_MT9M032 config VIDEO_MT9M111 tristate "mt9m111, mt9m112 and mt9m131 support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select V4L2_FWNODE help This driver supports MT9M111, MT9M112 and MT9M131 cameras from @@ -1312,7 +1312,7 @@ config VIDEO_MT9M111 config VIDEO_MT9P031 tristate "Aptina MT9P031 support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEO_APTINA_PLL @@ -1323,7 +1323,7 @@ config VIDEO_MT9P031 config VIDEO_MT9T001 tristate "Aptina MT9T001 support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -1332,7 +1332,7 @@ config VIDEO_MT9T001 config VIDEO_MT9T112 tristate "Aptina MT9T111/MT9T112 support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a Video4Linux2 sensor driver for the Aptina (Micron) MT9T111 and MT9T112 3 Mpixel camera. @@ -1342,7 +1342,7 @@ config VIDEO_MT9T112 config VIDEO_MT9V011 tristate "Micron mt9v011 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a Video4Linux2 sensor driver for the Micron mt0v011 1.3 Mpixel camera. It currently only works with the @@ -1350,7 +1350,7 @@ config VIDEO_MT9V011 config VIDEO_MT9V032 tristate "Micron MT9V032 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP_I2C @@ -1361,7 +1361,7 @@ config VIDEO_MT9V032 config VIDEO_MT9V111 tristate "Aptina MT9V111 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a Video4Linux2 sensor driver for the Aptina/Micron MT9V111 sensor. @@ -1371,13 +1371,13 @@ config VIDEO_MT9V111 config VIDEO_SR030PC30 tristate "Siliconfile SR030PC30 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This driver supports SR030PC30 VGA camera from Siliconfile config VIDEO_NOON010PC30 tristate "Siliconfile NOON010PC30 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -1418,7 +1418,7 @@ config VIDEO_RDACM21 config VIDEO_RJ54N1 tristate "Sharp RJ54N1CB0C sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV help This is a V4L2 sensor driver for Sharp RJ54N1CB0C CMOS image sensor. @@ -1428,7 +1428,7 @@ config VIDEO_RJ54N1 config VIDEO_S5K6AA tristate "Samsung S5K6AAFX sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -1437,7 +1437,7 @@ config VIDEO_S5K6AA config VIDEO_S5K6A3 tristate "Samsung S5K6A3 sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help @@ -1446,7 +1446,7 @@ config VIDEO_S5K6A3 config VIDEO_S5K4ECGX tristate "Samsung S5K4ECGX sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select CRC32 @@ -1456,7 +1456,7 @@ config VIDEO_S5K4ECGX config VIDEO_S5K5BAF tristate "Samsung S5K5BAF sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1469,7 +1469,7 @@ source "drivers/media/i2c/et8ek8/Kconfig" config VIDEO_S5C73M3 tristate "Samsung S5C73M3 sensor support" - depends on I2C && SPI && VIDEO_V4L2 + depends on I2C && SPI && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1484,7 +1484,7 @@ menu "Lens drivers" config VIDEO_AD5820 tristate "AD5820 lens voice coil support" - depends on GPIOLIB && I2C && VIDEO_V4L2 + depends on GPIOLIB && I2C && VIDEO_DEV select MEDIA_CONTROLLER select V4L2_ASYNC help @@ -1493,7 +1493,7 @@ config VIDEO_AD5820 config VIDEO_AK7375 tristate "AK7375 lens voice coil support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_ASYNC @@ -1505,7 +1505,7 @@ config VIDEO_AK7375 config VIDEO_DW9714 tristate "DW9714 lens voice coil support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_ASYNC @@ -1517,7 +1517,7 @@ config VIDEO_DW9714 config VIDEO_DW9768 tristate "DW9768 lens voice coil support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -1529,7 +1529,7 @@ config VIDEO_DW9768 config VIDEO_DW9807_VCM tristate "DW9807 lens voice coil support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_ASYNC @@ -1546,7 +1546,7 @@ menu "Flash devices" config VIDEO_ADP1653 tristate "ADP1653 flash support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select V4L2_ASYNC help @@ -1555,7 +1555,7 @@ config VIDEO_ADP1653 config VIDEO_LM3560 tristate "LM3560 dual flash driver support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select REGMAP_I2C select V4L2_ASYNC @@ -1565,7 +1565,7 @@ config VIDEO_LM3560 config VIDEO_LM3646 tristate "LM3646 dual flash driver support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select REGMAP_I2C select V4L2_ASYNC @@ -1574,4 +1574,4 @@ config VIDEO_LM3646 flash, torch LEDs. endmenu -endif # VIDEO_V4L2 +endif # VIDEO_DEV diff --git a/drivers/media/i2c/ccs/Kconfig b/drivers/media/i2c/ccs/Kconfig index 59f35b33ddc1..71671db3d993 100644 --- a/drivers/media/i2c/ccs/Kconfig +++ b/drivers/media/i2c/ccs/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CCS tristate "MIPI CCS/SMIA++/SMIA sensor support" - depends on I2C && VIDEO_V4L2 && HAVE_CLK + depends on I2C && VIDEO_DEV && HAVE_CLK select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select VIDEO_CCS_PLL diff --git a/drivers/media/i2c/cx25840/Kconfig b/drivers/media/i2c/cx25840/Kconfig index e392f8e023f6..46f15702cf55 100644 --- a/drivers/media/i2c/cx25840/Kconfig +++ b/drivers/media/i2c/cx25840/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX25840 tristate "Conexant CX2584x audio/video decoders" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C help Support for the Conexant CX2584x audio/video decoders. diff --git a/drivers/media/i2c/et8ek8/Kconfig b/drivers/media/i2c/et8ek8/Kconfig index afcc4ea764f6..398dd4d21df1 100644 --- a/drivers/media/i2c/et8ek8/Kconfig +++ b/drivers/media/i2c/et8ek8/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_ET8EK8 tristate "ET8EK8 camera sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE diff --git a/drivers/media/i2c/m5mols/Kconfig b/drivers/media/i2c/m5mols/Kconfig index 6f0ef33b7ee1..7f0af32f4376 100644 --- a/drivers/media/i2c/m5mols/Kconfig +++ b/drivers/media/i2c/m5mols/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_M5MOLS tristate "Fujitsu M-5MOLS 8MP sensor support" - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API help diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig index 2cd8e328dda9..92b156530d91 100644 --- a/drivers/media/pci/Kconfig +++ b/drivers/media/pci/Kconfig @@ -61,7 +61,7 @@ config VIDEO_PCI_SKELETON tristate "Skeleton PCI V4L2 driver" depends on SAMPLES depends on MEDIA_TEST_SUPPORT - depends on PCI && VIDEO_V4L2 + depends on PCI && VIDEO_DEV select VIDEOBUF2_MEMOPS select VIDEOBUF2_DMA_CONTIG help diff --git a/drivers/media/pci/bt8xx/Kconfig b/drivers/media/pci/bt8xx/Kconfig index 3f56decbb681..927190281bd5 100644 --- a/drivers/media/pci/bt8xx/Kconfig +++ b/drivers/media/pci/bt8xx/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_BT848 tristate "BT848 Video For Linux" - depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2 + depends on PCI && I2C && VIDEO_DEV select I2C_ALGOBIT select VIDEOBUF_DMA_SG depends on RC_CORE diff --git a/drivers/media/pci/cobalt/Kconfig b/drivers/media/pci/cobalt/Kconfig index d8d9ea6b09bc..e13e36141199 100644 --- a/drivers/media/pci/cobalt/Kconfig +++ b/drivers/media/pci/cobalt/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_COBALT tristate "Cisco Cobalt support" - depends on VIDEO_V4L2 && I2C + depends on VIDEO_DEV && I2C depends on PCI_MSI && MTD_COMPLEX_MAPPINGS depends on (GPIOLIB && DRM_I2C_ADV7511=n) || COMPILE_TEST depends on SND diff --git a/drivers/media/pci/cx18/Kconfig b/drivers/media/pci/cx18/Kconfig index 7074a1071302..a4e32fdcfd3d 100644 --- a/drivers/media/pci/cx18/Kconfig +++ b/drivers/media/pci/cx18/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX18 tristate "Conexant cx23418 MPEG encoder support" - depends on VIDEO_V4L2 && DVB_CORE && PCI && I2C + depends on VIDEO_DEV && DVB_CORE && PCI && I2C select I2C_ALGOBIT select VIDEOBUF_VMALLOC depends on RC_CORE diff --git a/drivers/media/pci/dt3155/Kconfig b/drivers/media/pci/dt3155/Kconfig index a3d24b8a719b..2b76de195aa5 100644 --- a/drivers/media/pci/dt3155/Kconfig +++ b/drivers/media/pci/dt3155/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_DT3155 tristate "DT3155 frame grabber" - depends on PCI && VIDEO_DEV && VIDEO_V4L2 + depends on PCI && VIDEO_DEV select VIDEOBUF2_DMA_CONTIG help Enables dt3155 device driver for the DataTranslation DT3155 frame grabber. diff --git a/drivers/media/pci/intel/ipu3/Kconfig b/drivers/media/pci/intel/ipu3/Kconfig index dce8274c81e6..39bd3be0b43d 100644 --- a/drivers/media/pci/intel/ipu3/Kconfig +++ b/drivers/media/pci/intel/ipu3/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_IPU3_CIO2 tristate "Intel ipu3-cio2 driver" - depends on VIDEO_V4L2 && PCI + depends on VIDEO_DEV && PCI depends on ACPI || COMPILE_TEST depends on X86 select MEDIA_CONTROLLER diff --git a/drivers/media/pci/ivtv/Kconfig b/drivers/media/pci/ivtv/Kconfig index e70502902b73..9be52101bc4f 100644 --- a/drivers/media/pci/ivtv/Kconfig +++ b/drivers/media/pci/ivtv/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_IVTV tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" - depends on VIDEO_V4L2 && PCI && I2C + depends on VIDEO_DEV && PCI && I2C select I2C_ALGOBIT depends on RC_CORE select VIDEO_TUNER diff --git a/drivers/media/pci/meye/Kconfig b/drivers/media/pci/meye/Kconfig index fed1f4a01817..3e69b66f1a5b 100644 --- a/drivers/media/pci/meye/Kconfig +++ b/drivers/media/pci/meye/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_MEYE tristate "Sony Vaio Picturebook Motion Eye Video For Linux" - depends on PCI && VIDEO_V4L2 + depends on PCI && VIDEO_DEV depends on SONY_LAPTOP depends on X86 || COMPILE_TEST help diff --git a/drivers/media/pci/saa7146/Kconfig b/drivers/media/pci/saa7146/Kconfig index 8e83cd044075..3bbb68a0ed7b 100644 --- a/drivers/media/pci/saa7146/Kconfig +++ b/drivers/media/pci/saa7146/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_HEXIUM_GEMINI tristate "Hexium Gemini frame grabber" - depends on PCI && VIDEO_V4L2 && I2C + depends on PCI && VIDEO_DEV && I2C select VIDEO_SAA7146_VV help This is a video4linux driver for the Hexium Gemini frame @@ -13,7 +13,7 @@ config VIDEO_HEXIUM_GEMINI config VIDEO_HEXIUM_ORION tristate "Hexium HV-PCI6 and Orion frame grabber" - depends on PCI && VIDEO_V4L2 && I2C + depends on PCI && VIDEO_DEV && I2C select VIDEO_SAA7146_VV help This is a video4linux driver for the Hexium HV-PCI6 and @@ -24,7 +24,7 @@ config VIDEO_HEXIUM_ORION config VIDEO_MXB tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" - depends on PCI && VIDEO_V4L2 && I2C + depends on PCI && VIDEO_DEV && I2C select VIDEO_SAA7146_VV select VIDEO_TUNER select VIDEO_SAA711X if MEDIA_SUBDRV_AUTOSELECT diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig index 27bb78513631..a96e170ab04e 100644 --- a/drivers/media/pci/sta2x11/Kconfig +++ b/drivers/media/pci/sta2x11/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config STA2X11_VIP tristate "STA2X11 VIP Video For Linux" - depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS && I2C + depends on PCI && VIDEO_DEV && VIRT_TO_BUS && I2C depends on STA2X11 || COMPILE_TEST select GPIOLIB if MEDIA_SUBDRV_AUTOSELECT select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT diff --git a/drivers/media/pci/tw5864/Kconfig b/drivers/media/pci/tw5864/Kconfig index d376d4ed65b9..111da223efb0 100644 --- a/drivers/media/pci/tw5864/Kconfig +++ b/drivers/media/pci/tw5864/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_TW5864 tristate "Techwell TW5864 video/audio grabber and encoder" - depends on VIDEO_DEV && PCI && VIDEO_V4L2 + depends on VIDEO_DEV && PCI select VIDEOBUF2_DMA_CONTIG help Support for boards based on Techwell TW5864 chip which provides diff --git a/drivers/media/pci/tw68/Kconfig b/drivers/media/pci/tw68/Kconfig index af0cb60337bb..ef9c0e886a09 100644 --- a/drivers/media/pci/tw68/Kconfig +++ b/drivers/media/pci/tw68/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_TW68 tristate "Techwell tw68x Video For Linux" - depends on VIDEO_DEV && PCI && VIDEO_V4L2 + depends on VIDEO_DEV && PCI select VIDEOBUF2_DMA_SG help Support for Techwell tw68xx based frame grabber boards. diff --git a/drivers/media/pci/tw686x/Kconfig b/drivers/media/pci/tw686x/Kconfig index 631c90868b8b..a4edad6aaf89 100644 --- a/drivers/media/pci/tw686x/Kconfig +++ b/drivers/media/pci/tw686x/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_TW686X tristate "Intersil/Techwell TW686x video capture cards" - depends on PCI && VIDEO_DEV && VIDEO_V4L2 && SND + depends on PCI && VIDEO_DEV && SND select VIDEOBUF2_VMALLOC select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_DMA_SG diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 3a5211d8e59a..def0749a07ba 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -30,7 +30,7 @@ config DVB_PLATFORM_DRIVERS config V4L_MEM2MEM_DRIVERS bool "Memory-to-memory multimedia devices" - depends on VIDEO_V4L2 + depends on VIDEO_DEV help Say Y here to enable selecting drivers for V4L devices that use system memory for both source and destination buffers, as opposed @@ -42,7 +42,7 @@ config V4L_MEM2MEM_DRIVERS config VIDEO_MEM2MEM_DEINTERLACE tristate "Deinterlace support" depends on V4L_MEM2MEM_DRIVERS - depends on VIDEO_DEV && VIDEO_V4L2 + depends on VIDEO_DEV depends on HAS_DMA select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV @@ -53,7 +53,7 @@ config VIDEO_MUX tristate "Video Multiplexer" depends on V4L_PLATFORM_DRIVERS select MULTIPLEXER - depends on VIDEO_V4L2 && OF + depends on VIDEO_DEV && OF select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select REGMAP diff --git a/drivers/media/platform/allegro-dvt/Kconfig b/drivers/media/platform/allegro-dvt/Kconfig index 674d234be5de..735440369c5c 100644 --- a/drivers/media/platform/allegro-dvt/Kconfig +++ b/drivers/media/platform/allegro-dvt/Kconfig @@ -5,7 +5,7 @@ comment "Allegro DVT drivers" config VIDEO_ALLEGRO_DVT tristate "Allegro DVT Video IP Core" depends on V4L_MEM2MEM_DRIVERS - depends on VIDEO_DEV && VIDEO_V4L2 + depends on VIDEO_DEV depends on ARCH_ZYNQMP || COMPILE_TEST select V4L2_MEM2MEM_DEV select VIDEOBUF2_DMA_CONTIG diff --git a/drivers/media/platform/allwinner/sun4i-csi/Kconfig b/drivers/media/platform/allwinner/sun4i-csi/Kconfig index 43ad2dd7da5d..7960e6836f41 100644 --- a/drivers/media/platform/allwinner/sun4i-csi/Kconfig +++ b/drivers/media/platform/allwinner/sun4i-csi/Kconfig @@ -3,7 +3,7 @@ config VIDEO_SUN4I_CSI tristate "Allwinner A10 CMOS Sensor Interface Support" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 && COMMON_CLK && HAS_DMA + depends on VIDEO_DEV && COMMON_CLK && HAS_DMA depends on ARCH_SUNXI || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API diff --git a/drivers/media/platform/allwinner/sun6i-csi/Kconfig b/drivers/media/platform/allwinner/sun6i-csi/Kconfig index 6d9cf1963c41..0345901617d4 100644 --- a/drivers/media/platform/allwinner/sun6i-csi/Kconfig +++ b/drivers/media/platform/allwinner/sun6i-csi/Kconfig @@ -2,7 +2,7 @@ config VIDEO_SUN6I_CSI tristate "Allwinner V3s Camera Sensor Interface driver" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 && COMMON_CLK && HAS_DMA + depends on VIDEO_DEV && COMMON_CLK && HAS_DMA depends on ARCH_SUNXI || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API diff --git a/drivers/media/platform/allwinner/sun8i-di/Kconfig b/drivers/media/platform/allwinner/sun8i-di/Kconfig index 8d762e664d45..ff71e06ee2df 100644 --- a/drivers/media/platform/allwinner/sun8i-di/Kconfig +++ b/drivers/media/platform/allwinner/sun8i-di/Kconfig @@ -2,7 +2,7 @@ config VIDEO_SUN8I_DEINTERLACE tristate "Allwinner Deinterlace driver" depends on V4L_MEM2MEM_DRIVERS - depends on VIDEO_DEV && VIDEO_V4L2 + depends on VIDEO_DEV depends on ARCH_SUNXI || COMPILE_TEST depends on COMMON_CLK && OF depends on PM diff --git a/drivers/media/platform/allwinner/sun8i-rotate/Kconfig b/drivers/media/platform/allwinner/sun8i-rotate/Kconfig index 64a8ea76e917..cfba29072d75 100644 --- a/drivers/media/platform/allwinner/sun8i-rotate/Kconfig +++ b/drivers/media/platform/allwinner/sun8i-rotate/Kconfig @@ -3,7 +3,7 @@ config VIDEO_SUN8I_ROTATE tristate "Allwinner DE2 rotation driver" depends on V4L_MEM2MEM_DRIVERS - depends on VIDEO_DEV && VIDEO_V4L2 + depends on VIDEO_DEV depends on ARCH_SUNXI || COMPILE_TEST depends on COMMON_CLK && OF depends on PM diff --git a/drivers/media/platform/amlogic/meson-ge2d/Kconfig b/drivers/media/platform/amlogic/meson-ge2d/Kconfig index 8c3f3b1b6b05..312c4169e3c2 100644 --- a/drivers/media/platform/amlogic/meson-ge2d/Kconfig +++ b/drivers/media/platform/amlogic/meson-ge2d/Kconfig @@ -1,7 +1,7 @@ config VIDEO_MESON_GE2D tristate "Amlogic 2D Graphic Acceleration Unit" depends on V4L_MEM2MEM_DRIVERS - depends on VIDEO_DEV && VIDEO_V4L2 + depends on VIDEO_DEV depends on ARCH_MESON || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV diff --git a/drivers/media/platform/amphion/Kconfig b/drivers/media/platform/amphion/Kconfig index e0e8098965bd..6eea97b7063a 100644 --- a/drivers/media/platform/amphion/Kconfig +++ b/drivers/media/platform/amphion/Kconfig @@ -8,7 +8,6 @@ config VIDEO_AMPHION_VPU depends on ARCH_MXC || COMPILE_TEST depends on MEDIA_SUPPORT depends on VIDEO_DEV - depends on VIDEO_V4L2 select MEDIA_CONTROLLER select V4L2_MEM2MEM_DEV select VIDEOBUF2_DMA_CONTIG diff --git a/drivers/media/platform/aspeed/Kconfig b/drivers/media/platform/aspeed/Kconfig index 153e3e5381d5..af95b08adf46 100644 --- a/drivers/media/platform/aspeed/Kconfig +++ b/drivers/media/platform/aspeed/Kconfig @@ -5,7 +5,7 @@ comment "Aspeed drivers" config VIDEO_ASPEED tristate "Aspeed AST2400 and AST2500 Video Engine driver" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 + depends on VIDEO_DEV select VIDEOBUF2_DMA_CONTIG help Support for the Aspeed Video Engine (VE) embedded in the Aspeed diff --git a/drivers/media/platform/atmel/Kconfig b/drivers/media/platform/atmel/Kconfig index cef12629f4ef..ae0fa7f96f66 100644 --- a/drivers/media/platform/atmel/Kconfig +++ b/drivers/media/platform/atmel/Kconfig @@ -5,7 +5,7 @@ comment "Atmel drivers" config VIDEO_ATMEL_ISC tristate "ATMEL Image Sensor Controller (ISC) support" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 && COMMON_CLK + depends on VIDEO_DEV && COMMON_CLK depends on ARCH_AT91 || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API @@ -20,7 +20,7 @@ config VIDEO_ATMEL_ISC config VIDEO_ATMEL_XISC tristate "ATMEL eXtended Image Sensor Controller (XISC) support" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 && COMMON_CLK && VIDEO_V4L2_SUBDEV_API + depends on VIDEO_DEV && COMMON_CLK && VIDEO_V4L2_SUBDEV_API depends on ARCH_AT91 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select REGMAP_MMIO @@ -39,7 +39,7 @@ config VIDEO_ATMEL_ISC_BASE config VIDEO_ATMEL_ISI tristate "ATMEL Image Sensor Interface (ISI) support" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 && OF + depends on VIDEO_DEV && OF depends on ARCH_AT91 || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG select V4L2_FWNODE @@ -50,7 +50,7 @@ config VIDEO_ATMEL_ISI config VIDEO_MICROCHIP_CSI2DC tristate "Microchip CSI2 Demux Controller" depends on V4L_PLATFORM_DRIVERS - depends on VIDEO_V4L2 && COMMON_CLK && OF + depends on VIDEO_DEV && COMMON_CLK && OF depends on ARCH_AT91 || COMPILE_TEST select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API diff --git a/drivers/media/platform/cadence/Kconfig b/drivers/media/platform/cadence/Kconfig index 3ae6f4e51eec..1a0f2d9a6a28 100644 --- a/drivers/media/platform/cadence/Kconfig +++ b/drivers/media/platform/cadence/Kconfig @@ -4,7 +4,7 @@ comment "Cadence drivers" config VIDEO_CADENCE_CSI2RX tristate "Cadence MIPI-CSI2 RX Controller" - depends on VIDEO_V4L2 + depends on VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE @@ -16,7 +16,7 @@ config VIDEO_CADENCE_CSI2RX config VIDEO_CADENCE_CSI2TX tristate "Cadence MIPI-CSI2 TX Controller" - depends on VIDEO_V4L2 + depends on VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE diff --git a/drivers/media/platform/chips-media/Kconfig b/drivers/media/platform/chips-media/Kconfig index adf466a05699..ea49b3563320 100644 --- a/drivers/media/platform/chips-media/Kconfig +++ b/drivers/media/platform/chips-media/Kconfig @@ -5,7 +5,7 @@ comment "Chips&Media drivers" config VIDEO_CODA tristate "Chips&Media Coda multi-standard codec IP" depends on V4L_MEM2MEM_DRIVERS - depends on VIDEO_DEV && VIDEO_V4L2 && OF && (ARCH_MXC || COMPILE_TEST) + depends on VIDEO_DEV && OF && (ARCH_MXC || COMPILE_TEST) select SRAM select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_VMALLOC diff --git a/drivers/media/platform/intel/Kconfig b/drivers/media/platform/intel/Kconfig index 8a730d9bcf52..091e15f00ef5 100644 --- a/drivers/media/platform/intel/Kc... [truncated message content] |
From: Mauro C. C. <mc...@ke...> - 2022-03-14 16:35:19
|
I opted to join two series and one separate patch on a single series, as they're related and one depends on the others. That's the second version of it. It basically sorts the main media Makefile/Kconfig files and reorganizes drivers/media/platform building system. Now, the entries there are organized per-vendor, and each per-vendor directory under drivers/media/platform contains its own Kconfig/Makefile. It should be noticed that I opted to not sort the manufacturer's Kconfig files on this series by purpose. After this series, the per-vendor Kconfig menus have only a few drivers (up to ~10 config symbols). That makes it a lot more manageable than what we had before when almost every platform driver config entry were on a single file. My current understaning is that the driver maintainers knows best how to better organize their Kconfig files, considering that: - the per-vendor driver order may not be in alphabetical order, as it may make sense to group drivers per type, platform and/or by its dependency chain; - It is now easy to sort the per-vendor entries alphabetically, either per config title or per Kconfig symbol; - Now that the main sort criteria is per-vendor, IMO it makes sense to define a per-vendor config space, like: config VIDEO_VNDR_bar ... config VIDEO_VNDR_foo ... config VIDEO_VNDR_foobar ... Regards, Mauro v2: - ampion was moved out of nxp/; - STMicroelectronics has a new dir (stm) with two subdirectories on it (sti and stm32); - Mediatek's subdirectories were renamed; - The other media Kconfig main directories were sorted as well; - Simplified VIDEO_DEV dependencies at radio Kconfig; Mauro Carvalho Chehab (66): media: xc2028: rename the driver from tuner-xc2028 media: Makefiles: remove extra spaces media: Makefiles: sort entries where it fits media: platform: Makefile: reorganize its contents media: platform: move platform menu dependencies to drivers media: platform: place Aspeed driver on a separate dir media: platform: place NXP drivers on a separate dir media: platform: place Intel drivers on a separate dir media: platform: place Via drivers on a separate dir media: platform: place Renesas drivers on a separate dir media: platform: allegro-dvt: move config to its own file media: platform: amphion: move config to its own file media: platform: coda: move config to its own file media: platform: exynos-gsc: move config to its own file media: platform: ge2d: move config to its own file media: platform: mtk-jpeg: move config to its own file media: platform: mtk-mdp: move config to its own file media: platform: mtk-vcodec: move config to its own file media: platform: mtk-vpu: move config to its own file media: platform: omap3isp: move config to its own file media: platform: camss: move config to its own file media: platform: venus: move config to its own file media: platform: rga: move config to its own file media: platform: s3c-camif: move config to its own file media: platform: s5p-g2d: move config to its own file media: platform: hva: move config to its own file media: platform: stm32: move config to its own file media: platform: sun8i-di: move config to its own file media: platform: sun8i-rotate: move config to its own file media: platform: vde: move config to its own file media: platform: ti-vpe: move config to its own file media: platform: rkisp1: move config to its own file media: platform: delta: move config to its own file media: platform: bdisp: move config to its own file media: platform: s5p-mfc: move config to its own file media: platform: s5p-jpeg: move config to its own file media: platform: Kconfig: sort entries media: platform: move some manufacturer entries media: platform: Kconfig: place platform drivers on a submenu media: platform: rename coda/ to chips-media/ media: platform: rename marvell-ccic/ to marvell/ media: platform: rename meson/ge2d/ to amlogic/meson-ge2d/ media: platform: rename mtk-jpeg/ to mediatek/mtk-jpeg/ media: platform: rename mtk-mdp/ to mediatek/mtk-mdp/ media: platform: rename mtk-vcodec/ to mediatek/mtk-vcodec/ media: platform: rename mtk-vpu/ to mediatek/mtk-vpu/ media: platform: rename sunxi/ to allwinner/ media: platform: rename tegra/vde/ to nvidia/tegra-vde/ media: platform: rename exynos4-is/ to samsung/exynos4-is/ media: platform: rename exynos-gsc/ to samsung/exynos-gsc/ media: platform: rename s3c-camif/ to samsung/s3c-camif/ media: platform: rename s5p-g2d/ to samsung/s5p-g2d/ media: platform: rename s5p-jpeg/ to samsung/s5p-jpeg/ media: platform: rename s5p-mfc/ to samsung/s5p-mfc/ media: platform: rename stm32/ to stm/stm32/ media: platform: rename sti/ to stm/sti/ media: platform: rename am437x/ to ti/am437x/ media: platform: rename davinci/ to ti/davinci/ media: platform: rename omap3isp/ to ti/omap3isp/ media: platform: rename omap/ to ti/omap/ media: platform: ti/Kconfig: move VPE/CAL entries to it media: platform: Create vendor/{Makefile,Kconfig} files media: platform/*/Kconfig: make manufacturer menus more uniform media: Kconfig: cleanup VIDEO_DEV dependencies media: media/*/Kconfig: sort entries media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/ Pratyush Yadav (1): media: platform: re-structure TI drivers Documentation/admin-guide/media/fimc.rst | 2 +- .../admin-guide/media/i2c-cardlist.rst | 2 +- Documentation/admin-guide/media/omap3isp.rst | 2 +- .../admin-guide/media/omap4_camera.rst | 2 +- .../media/drivers/davinci-vpbe-devel.rst | 20 +- .../driver-api/media/drivers/fimc-devel.rst | 14 +- Documentation/driver-api/media/v4l2-event.rst | 2 +- MAINTAINERS | 79 +- drivers/input/rmi4/Kconfig | 2 +- drivers/input/touchscreen/Kconfig | 4 +- drivers/media/Kconfig | 11 +- drivers/media/Makefile | 4 +- drivers/media/cec/platform/Makefile | 16 +- drivers/media/common/Kconfig | 16 +- drivers/media/common/Makefile | 7 +- drivers/media/common/saa7146/Kconfig | 2 +- drivers/media/common/videobuf2/Makefile | 8 +- drivers/media/dvb-core/Kconfig | 2 +- drivers/media/dvb-frontends/Kconfig | 761 ++++++++-------- drivers/media/dvb-frontends/Makefile | 193 ++-- drivers/media/firewire/Makefile | 2 +- drivers/media/i2c/Kconfig | 832 +++++++++--------- drivers/media/i2c/Makefile | 192 ++-- drivers/media/i2c/ccs/Kconfig | 2 +- drivers/media/i2c/cx25840/Kconfig | 2 +- drivers/media/i2c/et8ek8/Kconfig | 2 +- drivers/media/i2c/m5mols/Kconfig | 2 +- drivers/media/mmc/Kconfig | 1 + drivers/media/pci/Kconfig | 31 +- drivers/media/pci/Makefile | 22 +- drivers/media/pci/bt8xx/Kconfig | 2 +- drivers/media/pci/cobalt/Kconfig | 2 +- drivers/media/pci/cx18/Kconfig | 2 +- drivers/media/pci/cx18/cx18-driver.c | 2 +- drivers/media/pci/cx18/cx18-dvb.c | 2 +- drivers/media/pci/cx18/cx18-gpio.c | 2 +- drivers/media/pci/cx23885/cx23885-cards.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- drivers/media/pci/cx23885/cx23885-video.c | 2 +- drivers/media/pci/cx88/cx88.h | 2 +- drivers/media/pci/dt3155/Kconfig | 2 +- drivers/media/pci/intel/ipu3/Kconfig | 2 +- drivers/media/pci/ivtv/Kconfig | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 2 +- drivers/media/pci/ivtv/ivtv-gpio.c | 2 +- drivers/media/pci/meye/Kconfig | 2 +- drivers/media/pci/saa7134/saa7134-cards.c | 2 +- drivers/media/pci/saa7134/saa7134-dvb.c | 2 +- drivers/media/pci/saa7146/Kconfig | 6 +- drivers/media/pci/sta2x11/Kconfig | 2 +- drivers/media/pci/tw5864/Kconfig | 2 +- drivers/media/pci/tw68/Kconfig | 2 +- drivers/media/pci/tw686x/Kconfig | 2 +- drivers/media/platform/Kconfig | 741 ++-------------- drivers/media/platform/Makefile | 114 +-- drivers/media/platform/allegro-dvt/Kconfig | 19 + drivers/media/platform/allwinner/Kconfig | 6 + .../platform/{sunxi => allwinner}/Makefile | 0 .../{sunxi => allwinner}/sun4i-csi/Kconfig | 3 +- .../{sunxi => allwinner}/sun4i-csi/Makefile | 0 .../sun4i-csi/sun4i_csi.c | 0 .../sun4i-csi/sun4i_csi.h | 0 .../sun4i-csi/sun4i_dma.c | 0 .../sun4i-csi/sun4i_v4l2.c | 0 .../{sunxi => allwinner}/sun6i-csi/Kconfig | 3 +- .../{sunxi => allwinner}/sun6i-csi/Makefile | 0 .../sun6i-csi/sun6i_csi.c | 0 .../sun6i-csi/sun6i_csi.h | 0 .../sun6i-csi/sun6i_csi_reg.h | 0 .../sun6i-csi/sun6i_video.c | 0 .../sun6i-csi/sun6i_video.h | 0 .../media/platform/allwinner/sun8i-di/Kconfig | 14 + .../{sunxi => allwinner}/sun8i-di/Makefile | 0 .../{sunxi => allwinner}/sun8i-di/sun8i-di.c | 0 .../{sunxi => allwinner}/sun8i-di/sun8i-di.h | 0 .../platform/allwinner/sun8i-rotate/Kconfig | 14 + .../sun8i-rotate/Makefile | 0 .../sun8i-rotate/sun8i-formats.h | 0 .../sun8i-rotate/sun8i-rotate.h | 0 .../sun8i-rotate/sun8i_formats.c | 0 .../sun8i-rotate/sun8i_rotate.c | 0 drivers/media/platform/amlogic/Kconfig | 5 + drivers/media/platform/amlogic/Makefile | 2 + .../media/platform/amlogic/meson-ge2d/Kconfig | 14 + .../ge2d => amlogic/meson-ge2d}/Makefile | 0 .../ge2d => amlogic/meson-ge2d}/ge2d-regs.h | 0 .../{meson/ge2d => amlogic/meson-ge2d}/ge2d.c | 0 drivers/media/platform/amphion/Kconfig | 22 + drivers/media/platform/aspeed/Kconfig | 13 + drivers/media/platform/aspeed/Makefile | 2 + .../platform/{ => aspeed}/aspeed-video.c | 0 drivers/media/platform/atmel/Kconfig | 15 +- drivers/media/platform/cadence/Kconfig | 16 +- drivers/media/platform/chips-media/Kconfig | 20 + .../platform/{coda => chips-media}/Makefile | 0 .../platform/{coda => chips-media}/coda-bit.c | 0 .../{coda => chips-media}/coda-common.c | 0 .../platform/{coda => chips-media}/coda-gdi.c | 0 .../{coda => chips-media}/coda-h264.c | 0 .../{coda => chips-media}/coda-jpeg.c | 0 .../{coda => chips-media}/coda-mpeg2.c | 0 .../{coda => chips-media}/coda-mpeg4.c | 0 .../platform/{coda => chips-media}/coda.h | 0 .../{coda => chips-media}/coda_regs.h | 2 +- .../platform/{coda => chips-media}/imx-vdoa.c | 0 .../platform/{coda => chips-media}/imx-vdoa.h | 0 .../platform/{coda => chips-media}/trace.h | 2 +- drivers/media/platform/imx/Kconfig | 24 - drivers/media/platform/imx/Makefile | 1 - drivers/media/platform/intel/Kconfig | 14 + drivers/media/platform/intel/Makefile | 2 + .../media/platform/{ => intel}/pxa_camera.c | 0 .../{marvell-ccic => marvell}/Kconfig | 9 +- .../{marvell-ccic => marvell}/Makefile | 0 .../{marvell-ccic => marvell}/cafe-driver.c | 0 .../{marvell-ccic => marvell}/mcam-core.c | 0 .../{marvell-ccic => marvell}/mcam-core.h | 0 .../{marvell-ccic => marvell}/mmp-driver.c | 0 drivers/media/platform/mediatek/Kconfig | 8 + drivers/media/platform/mediatek/Makefile | 5 + drivers/media/platform/mediatek/jpeg/Kconfig | 16 + .../{mtk-jpeg => mediatek/jpeg}/Makefile | 0 .../jpeg}/mtk_jpeg_core.c | 0 .../jpeg}/mtk_jpeg_core.h | 0 .../jpeg}/mtk_jpeg_dec_hw.c | 0 .../jpeg}/mtk_jpeg_dec_hw.h | 0 .../jpeg}/mtk_jpeg_dec_parse.c | 0 .../jpeg}/mtk_jpeg_dec_parse.h | 0 .../jpeg}/mtk_jpeg_dec_reg.h | 0 .../jpeg}/mtk_jpeg_enc_hw.c | 0 .../jpeg}/mtk_jpeg_enc_hw.h | 0 drivers/media/platform/mediatek/mdp/Kconfig | 17 + .../{mtk-mdp => mediatek/mdp}/Makefile | 2 +- .../{mtk-mdp => mediatek/mdp}/mtk_mdp_comp.c | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_comp.h | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_core.c | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_core.h | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_ipi.h | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_m2m.c | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_m2m.h | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_regs.c | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_regs.h | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_vpu.c | 0 .../{mtk-mdp => mediatek/mdp}/mtk_mdp_vpu.h | 0 .../media/platform/mediatek/vcodec/Kconfig | 36 + .../{mtk-vcodec => mediatek/vcodec}/Makefile | 0 .../vcodec}/mtk_vcodec_dec.c | 0 .../vcodec}/mtk_vcodec_dec.h | 0 .../vcodec}/mtk_vcodec_dec_drv.c | 0 .../vcodec}/mtk_vcodec_dec_hw.c | 0 .../vcodec}/mtk_vcodec_dec_hw.h | 0 .../vcodec}/mtk_vcodec_dec_pm.c | 0 .../vcodec}/mtk_vcodec_dec_pm.h | 0 .../vcodec}/mtk_vcodec_dec_stateful.c | 0 .../vcodec}/mtk_vcodec_dec_stateless.c | 0 .../vcodec}/mtk_vcodec_drv.h | 0 .../vcodec}/mtk_vcodec_enc.c | 0 .../vcodec}/mtk_vcodec_enc.h | 0 .../vcodec}/mtk_vcodec_enc_drv.c | 0 .../vcodec}/mtk_vcodec_enc_pm.c | 0 .../vcodec}/mtk_vcodec_enc_pm.h | 0 .../vcodec}/mtk_vcodec_fw.c | 0 .../vcodec}/mtk_vcodec_fw.h | 2 +- .../vcodec}/mtk_vcodec_fw_priv.h | 0 .../vcodec}/mtk_vcodec_fw_scp.c | 0 .../vcodec}/mtk_vcodec_fw_vpu.c | 0 .../vcodec}/mtk_vcodec_intr.c | 0 .../vcodec}/mtk_vcodec_intr.h | 0 .../vcodec}/mtk_vcodec_util.c | 0 .../vcodec}/mtk_vcodec_util.h | 0 .../vcodec}/vdec/vdec_h264_if.c | 0 .../vcodec}/vdec/vdec_h264_req_if.c | 0 .../vcodec}/vdec/vdec_vp8_if.c | 0 .../vcodec}/vdec/vdec_vp9_if.c | 0 .../vcodec}/vdec_drv_base.h | 0 .../vcodec}/vdec_drv_if.c | 0 .../vcodec}/vdec_drv_if.h | 0 .../vcodec}/vdec_ipi_msg.h | 0 .../vcodec}/vdec_msg_queue.c | 0 .../vcodec}/vdec_msg_queue.h | 0 .../vcodec}/vdec_vpu_if.c | 0 .../vcodec}/vdec_vpu_if.h | 0 .../vcodec}/venc/venc_h264_if.c | 0 .../vcodec}/venc/venc_vp8_if.c | 0 .../vcodec}/venc_drv_base.h | 0 .../vcodec}/venc_drv_if.c | 0 .../vcodec}/venc_drv_if.h | 0 .../vcodec}/venc_ipi_msg.h | 0 .../vcodec}/venc_vpu_if.c | 0 .../vcodec}/venc_vpu_if.h | 0 drivers/media/platform/mediatek/vpu/Kconfig | 15 + .../{mtk-vpu => mediatek/vpu}/Makefile | 0 .../{mtk-vpu => mediatek/vpu}/mtk_vpu.c | 0 .../{mtk-vpu => mediatek/vpu}/mtk_vpu.h | 0 drivers/media/platform/nvidia/Kconfig | 5 + drivers/media/platform/nvidia/Makefile | 3 + .../media/platform/nvidia/tegra-vde/Kconfig | 17 + .../{tegra/vde => nvidia/tegra-vde}/Makefile | 0 .../vde => nvidia/tegra-vde}/dmabuf-cache.c | 0 .../{tegra/vde => nvidia/tegra-vde}/h264.c | 0 .../{tegra/vde => nvidia/tegra-vde}/iommu.c | 0 .../{tegra/vde => nvidia/tegra-vde}/trace.h | 2 +- .../{tegra/vde => nvidia/tegra-vde}/v4l2.c | 0 .../{tegra/vde => nvidia/tegra-vde}/vde.c | 0 .../{tegra/vde => nvidia/tegra-vde}/vde.h | 0 drivers/media/platform/nxp/Kconfig | 54 ++ drivers/media/platform/nxp/Makefile | 8 + drivers/media/platform/{ => nxp}/fsl-viu.c | 0 .../media/platform/{ => nxp}/imx-jpeg/Kconfig | 3 +- .../platform/{ => nxp}/imx-jpeg/Makefile | 0 .../platform/{ => nxp}/imx-jpeg/mxc-jpeg-hw.c | 0 .../platform/{ => nxp}/imx-jpeg/mxc-jpeg-hw.h | 0 .../platform/{ => nxp}/imx-jpeg/mxc-jpeg.c | 2 +- .../platform/{ => nxp}/imx-jpeg/mxc-jpeg.h | 0 .../platform/{imx => nxp}/imx-mipi-csis.c | 0 drivers/media/platform/{ => nxp}/imx-pxp.c | 0 drivers/media/platform/{ => nxp}/imx-pxp.h | 0 .../media/platform/{ => nxp}/mx2_emmaprp.c | 0 drivers/media/platform/qcom/Kconfig | 6 + drivers/media/platform/qcom/Makefile | 3 + drivers/media/platform/qcom/camss/Kconfig | 9 + drivers/media/platform/qcom/venus/Kconfig | 14 + drivers/media/platform/renesas/Kconfig | 121 +++ drivers/media/platform/renesas/Makefile | 15 + .../media/platform/{ => renesas}/rcar-fcp.c | 0 .../media/platform/{ => renesas}/rcar-isp.c | 0 .../platform/{ => renesas}/rcar-vin/Kconfig | 6 +- .../platform/{ => renesas}/rcar-vin/Makefile | 0 .../{ => renesas}/rcar-vin/rcar-core.c | 0 .../{ => renesas}/rcar-vin/rcar-csi2.c | 0 .../{ => renesas}/rcar-vin/rcar-dma.c | 0 .../{ => renesas}/rcar-vin/rcar-v4l2.c | 0 .../{ => renesas}/rcar-vin/rcar-vin.h | 0 .../media/platform/{ => renesas}/rcar_drif.c | 0 .../media/platform/{ => renesas}/rcar_fdp1.c | 0 .../media/platform/{ => renesas}/rcar_jpu.c | 2 +- .../platform/{ => renesas}/renesas-ceu.c | 0 drivers/media/platform/{ => renesas}/sh_vou.c | 0 .../platform/{ => renesas}/vsp1/Makefile | 0 .../media/platform/{ => renesas}/vsp1/vsp1.h | 0 .../platform/{ => renesas}/vsp1/vsp1_brx.c | 0 .../platform/{ => renesas}/vsp1/vsp1_brx.h | 0 .../platform/{ => renesas}/vsp1/vsp1_clu.c | 0 .../platform/{ => renesas}/vsp1/vsp1_clu.h | 0 .../platform/{ => renesas}/vsp1/vsp1_dl.c | 0 .../platform/{ => renesas}/vsp1/vsp1_dl.h | 0 .../platform/{ => renesas}/vsp1/vsp1_drm.c | 0 .../platform/{ => renesas}/vsp1/vsp1_drm.h | 0 .../platform/{ => renesas}/vsp1/vsp1_drv.c | 0 .../platform/{ => renesas}/vsp1/vsp1_entity.c | 0 .../platform/{ => renesas}/vsp1/vsp1_entity.h | 0 .../platform/{ => renesas}/vsp1/vsp1_hgo.c | 0 .../platform/{ => renesas}/vsp1/vsp1_hgo.h | 0 .../platform/{ => renesas}/vsp1/vsp1_hgt.c | 0 .../platform/{ => renesas}/vsp1/vsp1_hgt.h | 0 .../platform/{ => renesas}/vsp1/vsp1_histo.c | 0 .../platform/{ => renesas}/vsp1/vsp1_histo.h | 0 .../platform/{ => renesas}/vsp1/vsp1_hsit.c | 0 .../platform/{ => renesas}/vsp1/vsp1_hsit.h | 0 .../platform/{ => renesas}/vsp1/vsp1_lif.c | 0 .../platform/{ => renesas}/vsp1/vsp1_lif.h | 0 .../platform/{ => renesas}/vsp1/vsp1_lut.c | 0 .../platform/{ => renesas}/vsp1/vsp1_lut.h | 0 .../platform/{ => renesas}/vsp1/vsp1_pipe.c | 0 .../platform/{ => renesas}/vsp1/vsp1_pipe.h | 0 .../platform/{ => renesas}/vsp1/vsp1_regs.h | 0 .../platform/{ => renesas}/vsp1/vsp1_rpf.c | 0 .../platform/{ => renesas}/vsp1/vsp1_rwpf.c | 0 .../platform/{ => renesas}/vsp1/vsp1_rwpf.h | 0 .../platform/{ => renesas}/vsp1/vsp1_sru.c | 0 .../platform/{ => renesas}/vsp1/vsp1_sru.h | 0 .../platform/{ => renesas}/vsp1/vsp1_uds.c | 0 .../platform/{ => renesas}/vsp1/vsp1_uds.h | 0 .../platform/{ => renesas}/vsp1/vsp1_uif.c | 0 .../platform/{ => renesas}/vsp1/vsp1_uif.h | 0 .../platform/{ => renesas}/vsp1/vsp1_video.c | 0 .../platform/{ => renesas}/vsp1/vsp1_video.h | 0 .../platform/{ => renesas}/vsp1/vsp1_wpf.c | 0 drivers/media/platform/rockchip/Kconfig | 6 + drivers/media/platform/rockchip/Makefile | 3 + drivers/media/platform/rockchip/rga/Kconfig | 14 + .../media/platform/rockchip/rkisp1/Kconfig | 19 + drivers/media/platform/samsung/Kconfig | 10 + drivers/media/platform/samsung/Makefile | 7 + .../media/platform/samsung/exynos-gsc/Kconfig | 10 + .../{ => samsung}/exynos-gsc/Makefile | 0 .../{ => samsung}/exynos-gsc/gsc-core.c | 0 .../{ => samsung}/exynos-gsc/gsc-core.h | 0 .../{ => samsung}/exynos-gsc/gsc-m2m.c | 0 .../{ => samsung}/exynos-gsc/gsc-regs.c | 0 .../{ => samsung}/exynos-gsc/gsc-regs.h | 0 .../platform/{ => samsung}/exynos4-is/Kconfig | 3 +- .../{ => samsung}/exynos4-is/Makefile | 0 .../{ => samsung}/exynos4-is/common.c | 0 .../{ => samsung}/exynos4-is/common.h | 0 .../{ => samsung}/exynos4-is/fimc-capture.c | 0 .../{ => samsung}/exynos4-is/fimc-core.c | 0 .../{ => samsung}/exynos4-is/fimc-core.h | 0 .../exynos4-is/fimc-is-command.h | 0 .../{ => samsung}/exynos4-is/fimc-is-errno.c | 0 .../{ => samsung}/exynos4-is/fimc-is-errno.h | 0 .../{ => samsung}/exynos4-is/fimc-is-i2c.c | 0 .../{ => samsung}/exynos4-is/fimc-is-i2c.h | 0 .../{ => samsung}/exynos4-is/fimc-is-param.c | 0 .../{ => samsung}/exynos4-is/fimc-is-param.h | 0 .../{ => samsung}/exynos4-is/fimc-is-regs.c | 0 .../{ => samsung}/exynos4-is/fimc-is-regs.h | 0 .../{ => samsung}/exynos4-is/fimc-is-sensor.c | 0 .../{ => samsung}/exynos4-is/fimc-is-sensor.h | 0 .../{ => samsung}/exynos4-is/fimc-is.c | 0 .../{ => samsung}/exynos4-is/fimc-is.h | 0 .../{ => samsung}/exynos4-is/fimc-isp-video.c | 0 .../{ => samsung}/exynos4-is/fimc-isp-video.h | 0 .../{ => samsung}/exynos4-is/fimc-isp.c | 0 .../{ => samsung}/exynos4-is/fimc-isp.h | 0 .../{ => samsung}/exynos4-is/fimc-lite-reg.c | 0 .../{ => samsung}/exynos4-is/fimc-lite-reg.h | 0 .../{ => samsung}/exynos4-is/fimc-lite.c | 0 .../{ => samsung}/exynos4-is/fimc-lite.h | 0 .../{ => samsung}/exynos4-is/fimc-m2m.c | 0 .../{ => samsung}/exynos4-is/fimc-reg.c | 0 .../{ => samsung}/exynos4-is/fimc-reg.h | 0 .../{ => samsung}/exynos4-is/media-dev.c | 0 .../{ => samsung}/exynos4-is/media-dev.h | 0 .../{ => samsung}/exynos4-is/mipi-csis.c | 0 .../{ => samsung}/exynos4-is/mipi-csis.h | 0 .../media/platform/samsung/s3c-camif/Kconfig | 15 + .../platform/{ => samsung}/s3c-camif/Makefile | 0 .../{ => samsung}/s3c-camif/camif-capture.c | 0 .../{ => samsung}/s3c-camif/camif-core.c | 0 .../{ => samsung}/s3c-camif/camif-core.h | 0 .../{ => samsung}/s3c-camif/camif-regs.c | 0 .../{ => samsung}/s3c-camif/camif-regs.h | 0 .../media/platform/samsung/s5p-g2d/Kconfig | 11 + .../platform/{ => samsung}/s5p-g2d/Makefile | 0 .../platform/{ => samsung}/s5p-g2d/g2d-hw.c | 0 .../platform/{ => samsung}/s5p-g2d/g2d-regs.h | 0 .../platform/{ => samsung}/s5p-g2d/g2d.c | 0 .../platform/{ => samsung}/s5p-g2d/g2d.h | 0 .../media/platform/samsung/s5p-jpeg/Kconfig | 12 + .../platform/{ => samsung}/s5p-jpeg/Makefile | 0 .../{ => samsung}/s5p-jpeg/jpeg-core.c | 2 +- .../{ => samsung}/s5p-jpeg/jpeg-core.h | 2 +- .../s5p-jpeg/jpeg-hw-exynos3250.c | 0 .../s5p-jpeg/jpeg-hw-exynos3250.h | 2 +- .../{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.c | 0 .../{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.h | 0 .../{ => samsung}/s5p-jpeg/jpeg-hw-s5p.c | 2 +- .../{ => samsung}/s5p-jpeg/jpeg-hw-s5p.h | 2 +- .../{ => samsung}/s5p-jpeg/jpeg-regs.h | 2 +- .../media/platform/samsung/s5p-mfc/Kconfig | 9 + .../platform/{ => samsung}/s5p-mfc/Makefile | 0 .../{ => samsung}/s5p-mfc/regs-mfc-v10.h | 0 .../{ => samsung}/s5p-mfc/regs-mfc-v6.h | 0 .../{ => samsung}/s5p-mfc/regs-mfc-v7.h | 0 .../{ => samsung}/s5p-mfc/regs-mfc-v8.h | 0 .../platform/{ => samsung}/s5p-mfc/regs-mfc.h | 0 .../platform/{ => samsung}/s5p-mfc/s5p_mfc.c | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_cmd.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_cmd.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_common.h | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_ctrl.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_ctrl.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_debug.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_dec.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_dec.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_enc.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_enc.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_intr.c | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_intr.h | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_iommu.h | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_opr.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_opr.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v5.c | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v5.h | 0 .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v6.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_opr_v6.h | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_pm.c | 2 +- .../{ => samsung}/s5p-mfc/s5p_mfc_pm.h | 2 +- drivers/media/platform/stm/Kconfig | 6 + drivers/media/platform/stm/Makefile | 7 + drivers/media/platform/stm/sti/Kconfig | 5 + drivers/media/platform/stm/sti/Makefile | 6 + drivers/media/platform/stm/sti/bdisp/Kconfig | 10 + .../platform/{ => stm}/sti/bdisp/Makefile | 0 .../{ => stm}/sti/bdisp/bdisp-debug.c | 0 .../{ => stm}/sti/bdisp/bdisp-filter.h | 0 .../platform/{ => stm}/sti/bdisp/bdisp-hw.c | 0 .../platform/{ => stm}/sti/bdisp/bdisp-reg.h | 0 .../platform/{ => stm}/sti/bdisp/bdisp-v4l2.c | 0 .../platform/{ => stm}/sti/bdisp/bdisp.h | 0 .../platform/{ => stm}/sti/c8sectpfe/Kconfig | 1 + .../platform/{ => stm}/sti/c8sectpfe/Makefile | 0 .../sti/c8sectpfe/c8sectpfe-common.c | 0 .../sti/c8sectpfe/c8sectpfe-common.h | 0 .../{ => stm}/sti/c8sectpfe/c8sectpfe-core.c | 0 .../{ => stm}/sti/c8sectpfe/c8sectpfe-core.h | 0 .../sti/c8sectpfe/c8sectpfe-debugfs.c | 0 .../sti/c8sectpfe/c8sectpfe-debugfs.h | 0 .../{ => stm}/sti/c8sectpfe/c8sectpfe-dvb.c | 0 .../{ => stm}/sti/c8sectpfe/c8sectpfe-dvb.h | 0 drivers/media/platform/stm/sti/delta/Kconfig | 36 + .../platform/{ => stm}/sti/delta/Makefile | 0 .../platform/{ => stm}/sti/delta/delta-cfg.h | 0 .../{ => stm}/sti/delta/delta-debug.c | 0 .../{ => stm}/sti/delta/delta-debug.h | 0 .../platform/{ => stm}/sti/delta/delta-ipc.c | 0 .../platform/{ => stm}/sti/delta/delta-ipc.h | 0 .../platform/{ => stm}/sti/delta/delta-mem.c | 0 .../platform/{ => stm}/sti/delta/delta-mem.h | 0 .../{ => stm}/sti/delta/delta-mjpeg-dec.c | 0 .../{ => stm}/sti/delta/delta-mjpeg-fw.h | 0 .../{ => stm}/sti/delta/delta-mjpeg-hdr.c | 0 .../{ => stm}/sti/delta/delta-mjpeg.h | 0 .../platform/{ => stm}/sti/delta/delta-v4l2.c | 0 .../platform/{ => stm}/sti/delta/delta.h | 0 drivers/media/platform/stm/sti/hva/Kconfig | 26 + .../media/platform/{ => stm}/sti/hva/Makefile | 0 .../platform/{ => stm}/sti/hva/hva-debugfs.c | 0 .../platform/{ => stm}/sti/hva/hva-h264.c | 0 .../media/platform/{ => stm}/sti/hva/hva-hw.c | 0 .../media/platform/{ => stm}/sti/hva/hva-hw.h | 0 .../platform/{ => stm}/sti/hva/hva-mem.c | 0 .../platform/{ => stm}/sti/hva/hva-mem.h | 0 .../platform/{ => stm}/sti/hva/hva-v4l2.c | 0 .../media/platform/{ => stm}/sti/hva/hva.h | 0 drivers/media/platform/stm/stm32/Kconfig | 31 + .../media/platform/{ => stm}/stm32/Makefile | 0 .../platform/{ => stm}/stm32/dma2d/dma2d-hw.c | 0 .../{ => stm}/stm32/dma2d/dma2d-regs.h | 0 .../platform/{ => stm}/stm32/dma2d/dma2d.c | 0 .../platform/{ => stm}/stm32/dma2d/dma2d.h | 0 .../platform/{ => stm}/stm32/stm32-dcmi.c | 0 drivers/media/platform/sunxi/Kconfig | 4 - drivers/media/platform/ti/Kconfig | 69 ++ drivers/media/platform/ti/Makefile | 7 + .../media/platform/{ => ti}/am437x/Kconfig | 3 +- .../media/platform/{ => ti}/am437x/Makefile | 0 .../platform/{ => ti}/am437x/am437x-vpfe.c | 0 .../platform/{ => ti}/am437x/am437x-vpfe.h | 0 .../{ => ti}/am437x/am437x-vpfe_regs.h | 0 drivers/media/platform/ti/cal/Makefile | 3 + .../{ti-vpe => ti/cal}/cal-camerarx.c | 0 .../platform/{ti-vpe => ti/cal}/cal-video.c | 0 .../media/platform/{ti-vpe => ti/cal}/cal.c | 0 .../media/platform/{ti-vpe => ti/cal}/cal.h | 0 .../platform/{ti-vpe => ti/cal}/cal_regs.h | 0 .../media/platform/{ => ti}/davinci/Kconfig | 18 +- .../media/platform/{ => ti}/davinci/Makefile | 0 .../{ => ti}/davinci/ccdc_hw_device.h | 0 .../platform/{ => ti}/davinci/dm355_ccdc.c | 0 .../{ => ti}/davinci/dm355_ccdc_regs.h | 0 .../platform/{ => ti}/davinci/dm644x_ccdc.c | 0 .../{ => ti}/davinci/dm644x_ccdc_regs.h | 0 .../media/platform/{ => ti}/davinci/isif.c | 0 .../platform/{ => ti}/davinci/isif_regs.h | 0 .../media/platform/{ => ti}/davinci/vpbe.c | 0 .../platform/{ => ti}/davinci/vpbe_display.c | 0 .../platform/{ => ti}/davinci/vpbe_osd.c | 0 .../platform/{ => ti}/davinci/vpbe_osd_regs.h | 0 .../platform/{ => ti}/davinci/vpbe_venc.c | 0 .../{ => ti}/davinci/vpbe_venc_regs.h | 0 .../platform/{ => ti}/davinci/vpfe_capture.c | 0 .../media/platform/{ => ti}/davinci/vpif.c | 0 .../media/platform/{ => ti}/davinci/vpif.h | 0 .../platform/{ => ti}/davinci/vpif_capture.c | 0 .../platform/{ => ti}/davinci/vpif_capture.h | 0 .../platform/{ => ti}/davinci/vpif_display.c | 0 .../platform/{ => ti}/davinci/vpif_display.h | 0 .../media/platform/{ => ti}/davinci/vpss.c | 0 drivers/media/platform/{ => ti}/omap/Kconfig | 3 +- drivers/media/platform/{ => ti}/omap/Makefile | 0 .../media/platform/{ => ti}/omap/omap_vout.c | 0 .../platform/{ => ti}/omap/omap_vout_vrfb.c | 0 .../platform/{ => ti}/omap/omap_vout_vrfb.h | 0 .../platform/{ => ti}/omap/omap_voutdef.h | 0 .../platform/{ => ti}/omap/omap_voutlib.c | 0 .../platform/{ => ti}/omap/omap_voutlib.h | 0 drivers/media/platform/ti/omap3isp/Kconfig | 21 + .../media/platform/{ => ti}/omap3isp/Makefile | 0 .../{ => ti}/omap3isp/cfa_coef_table.h | 0 .../platform/{ => ti}/omap3isp/gamma_table.h | 0 .../media/platform/{ => ti}/omap3isp/isp.c | 0 .../media/platform/{ => ti}/omap3isp/isp.h | 0 .../platform/{ => ti}/omap3isp/ispccdc.c | 0 .../platform/{ => ti}/omap3isp/ispccdc.h | 0 .../platform/{ => ti}/omap3isp/ispccp2.c | 0 .../platform/{ => ti}/omap3isp/ispccp2.h | 0 .../platform/{ => ti}/omap3isp/ispcsi2.c | 0 .../platform/{ => ti}/omap3isp/ispcsi2.h | 0 .../platform/{ => ti}/omap3isp/ispcsiphy.c | 0 .../platform/{ => ti}/omap3isp/ispcsiphy.h | 0 .../media/platform/{ => ti}/omap3isp/isph3a.h | 0 .../platform/{ => ti}/omap3isp/isph3a_aewb.c | 0 .../platform/{ => ti}/omap3isp/isph3a_af.c | 0 .../platform/{ => ti}/omap3isp/isphist.c | 0 .../platform/{ => ti}/omap3isp/isphist.h | 0 .../platform/{ => ti}/omap3isp/isppreview.c | 0 .../platform/{ => ti}/omap3isp/isppreview.h | 0 .../media/platform/{ => ti}/omap3isp/ispreg.h | 0 .../platform/{ => ti}/omap3isp/ispresizer.c | 0 .../platform/{ => ti}/omap3isp/ispresizer.h | 0 .../platform/{ => ti}/omap3isp/ispstat.c | 0 .../platform/{ => ti}/omap3isp/ispstat.h | 0 .../platform/{ => ti}/omap3isp/ispvideo.c | 0 .../platform/{ => ti}/omap3isp/ispvideo.h | 0 .../{ => ti}/omap3isp/luma_enhance_table.h | 0 .../{ => ti}/omap3isp/noise_filter_table.h | 0 .../platform/{ => ti}/omap3isp/omap3isp.h | 0 .../platform/{ti-vpe => ti/vpe}/Makefile | 4 - .../media/platform/{ti-vpe => ti/vpe}/csc.c | 0 .../media/platform/{ti-vpe => ti/vpe}/csc.h | 0 .../media/platform/{ti-vpe => ti/vpe}/sc.c | 0 .../media/platform/{ti-vpe => ti/vpe}/sc.h | 0 .../platform/{ti-vpe => ti/vpe}/sc_coeff.h | 0 .../media/platform/{ti-vpe => ti/vpe}/vpdma.c | 0 .../media/platform/{ti-vpe => ti/vpe}/vpdma.h | 0 .../platform/{ti-vpe => ti/vpe}/vpdma_priv.h | 0 .../media/platform/{ti-vpe => ti/vpe}/vpe.c | 0 .../platform/{ti-vpe => ti/vpe}/vpe_regs.h | 0 drivers/media/platform/via/Kconfig | 14 + drivers/media/platform/via/Makefile | 2 + drivers/media/platform/{ => via}/via-camera.c | 0 drivers/media/platform/{ => via}/via-camera.h | 0 drivers/media/platform/xilinx/Kconfig | 10 +- drivers/media/radio/Kconfig | 362 ++++---- drivers/media/radio/Makefile | 43 +- drivers/media/radio/si470x/Kconfig | 2 +- drivers/media/radio/wl128x/Kconfig | 2 +- drivers/media/rc/Kconfig | 382 ++++---- drivers/media/rc/Makefile | 47 +- drivers/media/rc/keymaps/Makefile | 34 +- drivers/media/spi/Kconfig | 4 +- drivers/media/spi/Makefile | 7 +- drivers/media/test-drivers/Kconfig | 8 +- drivers/media/test-drivers/Makefile | 14 +- drivers/media/test-drivers/vicodec/Kconfig | 2 +- drivers/media/test-drivers/vidtv/Kconfig | 1 - drivers/media/test-drivers/vimc/Kconfig | 2 +- drivers/media/test-drivers/vivid/Kconfig | 2 +- drivers/media/tuners/Kconfig | 407 ++++----- drivers/media/tuners/Makefile | 66 +- drivers/media/tuners/e4000.c | 6 +- drivers/media/tuners/fc2580.c | 6 +- drivers/media/tuners/tuner-types.c | 2 +- .../{tuner-xc2028-types.h => xc2028-types.h} | 6 +- .../media/tuners/{tuner-xc2028.c => xc2028.c} | 6 +- .../media/tuners/{tuner-xc2028.h => xc2028.h} | 2 +- drivers/media/tuners/xc4000.c | 2 +- drivers/media/usb/Kconfig | 33 +- drivers/media/usb/Makefile | 40 +- drivers/media/usb/airspy/Kconfig | 2 +- drivers/media/usb/au0828/Kconfig | 6 +- drivers/media/usb/cpia2/Kconfig | 2 +- drivers/media/usb/dvb-usb-v2/Kconfig | 34 +- drivers/media/usb/dvb-usb/Kconfig | 392 +++++---- drivers/media/usb/dvb-usb/cxusb.c | 2 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 2 +- drivers/media/usb/em28xx/em28xx-i2c.c | 2 +- drivers/media/usb/em28xx/em28xx.h | 2 +- drivers/media/usb/gspca/Kconfig | 121 ++- drivers/media/usb/gspca/Makefile | 88 +- drivers/media/usb/gspca/gl860/Kconfig | 2 +- drivers/media/usb/gspca/m5602/Kconfig | 2 +- drivers/media/usb/hackrf/Kconfig | 2 +- drivers/media/usb/hdpvr/Kconfig | 2 +- drivers/media/usb/msi2500/Kconfig | 2 +- drivers/media/usb/pvrusb2/Kconfig | 2 +- drivers/media/usb/pwc/Kconfig | 2 +- drivers/media/usb/s2255/Kconfig | 2 +- drivers/media/usb/stkwebcam/Kconfig | 2 +- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- drivers/media/usb/tm6000/tm6000-dvb.c | 2 +- drivers/media/usb/tm6000/tm6000-i2c.c | 2 +- drivers/media/usb/usbtv/Kconfig | 2 +- drivers/media/usb/uvc/Kconfig | 2 +- drivers/media/usb/zr364xx/Kconfig | 2 +- drivers/media/v4l2-core/Kconfig | 12 +- drivers/media/v4l2-core/Makefile | 34 +- drivers/media/v4l2-core/tuner-core.c | 2 +- drivers/staging/media/atomisp/Kconfig | 2 +- drivers/staging/media/atomisp/i2c/Kconfig | 14 +- drivers/staging/media/hantro/Kconfig | 2 +- drivers/staging/media/imx/Kconfig | 2 +- drivers/staging/media/ipu3/Kconfig | 2 +- drivers/staging/media/max96712/Kconfig | 2 +- drivers/staging/media/meson/vdec/Kconfig | 2 +- drivers/staging/media/omap4iss/Kconfig | 2 +- drivers/staging/media/rkvdec/Kconfig | 2 +- drivers/staging/media/sunxi/cedrus/Kconfig | 2 +- drivers/staging/media/tegra-video/Kconfig | 2 +- drivers/staging/media/zoran/Kconfig | 2 +- drivers/staging/most/video/Kconfig | 2 +- .../vc04_services/bcm2835-camera/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 2 +- drivers/usb/gadget/legacy/Kconfig | 2 +- sound/pci/Kconfig | 4 +- 601 files changed, 3334 insertions(+), 3123 deletions(-) create mode 100644 drivers/media/platform/allegro-dvt/Kconfig create mode 100644 drivers/media/platform/allwinner/Kconfig rename drivers/media/platform/{sunxi => allwinner}/Makefile (100%) rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/Kconfig (83%) rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/Makefile (100%) rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.h (100%) rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_dma.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_v4l2.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/Kconfig (81%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/Makefile (100%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.h (100%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi_reg.h (100%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.h (100%) create mode 100644 drivers/media/platform/allwinner/sun8i-di/Kconfig rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/Makefile (100%) rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/sun8i-di.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/sun8i-di.h (100%) create mode 100644 drivers/media/platform/allwinner/sun8i-rotate/Kconfig rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/Makefile (100%) rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i-formats.h (100%) rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i-rotate.h (100%) rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i_formats.c (100%) rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i_rotate.c (100%) create mode 100644 drivers/media/platform/amlogic/Kconfig create mode 100644 drivers/media/platform/amlogic/Makefile create mode 100644 drivers/media/platform/amlogic/meson-ge2d/Kconfig rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/Makefile (100%) rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/ge2d-regs.h (100%) rename drivers/media/platform/{meson/ge2d => amlogic/meson-ge2d}/ge2d.c (100%) create mode 100644 drivers/media/platform/amphion/Kconfig create mode 100644 drivers/media/platform/aspeed/Kconfig create mode 100644 drivers/media/platform/aspeed/Makefile rename drivers/media/platform/{ => aspeed}/aspeed-video.c (100%) create mode 100644 drivers/media/platform/chips-media/Kconfig rename drivers/media/platform/{coda => chips-media}/Makefile (100%) rename drivers/media/platform/{coda => chips-media}/coda-bit.c (100%) rename drivers/media/platform/{coda => chips-media}/coda-common.c (100%) rename drivers/media/platform/{coda => chips-media}/coda-gdi.c (100%) rename drivers/media/platform/{coda => chips-media}/coda-h264.c (100%) rename drivers/media/platform/{coda => chips-media}/coda-jpeg.c (100%) rename drivers/media/platform/{coda => chips-media}/coda-mpeg2.c (100%) rename drivers/media/platform/{coda => chips-media}/coda-mpeg4.c (100%) rename drivers/media/platform/{coda => chips-media}/coda.h (100%) rename drivers/media/platform/{coda => chips-media}/coda_regs.h (99%) rename drivers/media/platform/{coda => chips-media}/imx-vdoa.c (100%) rename drivers/media/platform/{coda => chips-media}/imx-vdoa.h (100%) rename drivers/media/platform/{coda => chips-media}/trace.h (98%) delete mode 100644 drivers/media/platform/imx/Kconfig delete mode 100644 drivers/media/platform/imx/Makefile create mode 100644 drivers/media/platform/intel/Kconfig create mode 100644 drivers/media/platform/intel/Makefile rename drivers/media/platform/{ => intel}/pxa_camera.c (100%) rename drivers/media/platform/{marvell-ccic => marvell}/Kconfig (85%) rename drivers/media/platform/{marvell-ccic => marvell}/Makefile (100%) rename drivers/media/platform/{marvell-ccic => marvell}/cafe-driver.c (100%) rename drivers/media/platform/{marvell-ccic => marvell}/mcam-core.c (100%) rename drivers/media/platform/{marvell-ccic => marvell}/mcam-core.h (100%) rename drivers/media/platform/{marvell-ccic => marvell}/mmp-driver.c (100%) create mode 100644 drivers/media/platform/mediatek/Kconfig create mode 100644 drivers/media/platform/mediatek/Makefile create mode 100644 drivers/media/platform/mediatek/jpeg/Kconfig rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/Makefile (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_core.c (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_core.h (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_dec_hw.c (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_dec_hw.h (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_dec_parse.c (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_dec_parse.h (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_dec_reg.h (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_enc_hw.c (100%) rename drivers/media/platform/{mtk-jpeg => mediatek/jpeg}/mtk_jpeg_enc_hw.h (100%) create mode 100644 drivers/media/platform/mediatek/mdp/Kconfig rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/Makefile (78%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_comp.c (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_comp.h (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_core.c (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_core.h (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_ipi.h (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_m2m.c (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_m2m.h (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_regs.c (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_regs.h (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_vpu.c (100%) rename drivers/media/platform/{mtk-mdp => mediatek/mdp}/mtk_mdp_vpu.h (100%) create mode 100644 drivers/media/platform/mediatek/vcodec/Kconfig rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/Makefile (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_drv.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_hw.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_hw.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_pm.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_pm.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_stateful.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_dec_stateless.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_drv.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_enc.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_enc.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_enc_drv.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_enc_pm.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_enc_pm.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_fw.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_fw.h (97%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_fw_priv.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_fw_scp.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_fw_vpu.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_intr.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_intr.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_util.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/mtk_vcodec_util.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec/vdec_h264_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec/vdec_h264_req_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec/vdec_vp8_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec/vdec_vp9_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_drv_base.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_drv_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_drv_if.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_ipi_msg.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_msg_queue.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_msg_queue.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_vpu_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/vdec_vpu_if.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc/venc_h264_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc/venc_vp8_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc_drv_base.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc_drv_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc_drv_if.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc_ipi_msg.h (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc_vpu_if.c (100%) rename drivers/media/platform/{mtk-vcodec => mediatek/vcodec}/venc_vpu_if.h (100%) create mode 100644 drivers/media/platform/mediatek/vpu/Kconfig rename drivers/media/platform/{mtk-vpu => mediatek/vpu}/Makefile (100%) rename drivers/media/platform/{mtk-vpu => mediatek/vpu}/mtk_vpu.c (100%) rename drivers/media/platform/{mtk-vpu => mediatek/vpu}/mtk_vpu.h (100%) create mode 100644 drivers/media/platform/nvidia/Kconfig create mode 100644 drivers/media/platform/nvidia/Makefile create mode 100644 drivers/media/platform/nvidia/tegra-vde/Kconfig rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/Makefile (100%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/dmabuf-cache.c (100%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/h264.c (100%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/iommu.c (100%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/trace.h (97%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/v4l2.c (100%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/vde.c (100%) rename drivers/media/platform/{tegra/vde => nvidia/tegra-vde}/vde.h (100%) create mode 100644 drivers/media/platform/nxp/Kconfig create mode 100644 drivers/media/platform/nxp/Makefile rename drivers/media/platform/{ => nxp}/fsl-viu.c (100%) rename drivers/media/platform/{ => nxp}/imx-jpeg/Kconfig (85%) rename drivers/media/platform/{ => nxp}/imx-jpeg/Makefile (100%) rename drivers/media/platform/{ => nxp}/imx-jpeg/mxc-jpeg-hw.c (100%) rename drivers/media/platform/{ => nxp}/imx-jpeg/mxc-jpeg-hw.h (100%) rename drivers/media/platform/{ => nxp}/imx-jpeg/mxc-jpeg.c (99%) rename drivers/media/platform/{ => nxp}/imx-jpeg/mxc-jpeg.h (100%) rename drivers/media/platform/{imx => nxp}/imx-mipi-csis.c (100%) rename drivers/media/platform/{ => nxp}/imx-pxp.c (100%) rename drivers/media/platform/{ => nxp}/imx-pxp.h (100%) rename drivers/media/platform/{ => nxp}/mx2_emmaprp.c (100%) create mode 100644 drivers/media/platform/qcom/Kconfig create mode 100644 drivers/media/platform/qcom/Makefile create mode 100644 drivers/media/platform/qcom/camss/Kconfig create mode 100644 drivers/media/platform/qcom/venus/Kconfig create mode 100644 drivers/media/platform/renesas/Kconfig create mode 100644 drivers/media/platform/renesas/Makefile rename drivers/media/platform/{ => renesas}/rcar-fcp.c (100%) rename drivers/media/platform/{ => renesas}/rcar-isp.c (100%) rename drivers/media/platform/{ => renesas}/rcar-vin/Kconfig (87%) rename drivers/media/platform/{ => renesas}/rcar-vin/Makefile (100%) rename drivers/media/platform/{ => renesas}/rcar-vin/rcar-core.c (100%) rename drivers/media/platform/{ => renesas}/rcar-vin/rcar-csi2.c (100%) rename drivers/media/platform/{ => renesas}/rcar-vin/rcar-dma.c (100%) rename drivers/media/platform/{ => renesas}/rcar-vin/rcar-v4l2.c (100%) rename drivers/media/platform/{ => renesas}/rcar-vin/rcar-vin.h (100%) rename drivers/media/platform/{ => renesas}/rcar_drif.c (100%) rename drivers/media/platform/{ => renesas}/rcar_fdp1.c (100%) rename drivers/media/platform/{ => renesas}/rcar_jpu.c (99%) rename drivers/media/platform/{ => renesas}/renesas-ceu.c (100%) rename drivers/media/platform/{ => renesas}/sh_vou.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/Makefile (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_brx.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_brx.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_clu.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_clu.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_dl.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_dl.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_drm.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_drm.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_drv.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_entity.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_entity.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_hgo.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_hgo.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_hgt.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_hgt.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_histo.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_histo.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_hsit.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_hsit.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_lif.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_lif.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_lut.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_lut.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_pipe.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_pipe.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_regs.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_rpf.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_rwpf.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_rwpf.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_sru.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_sru.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_uds.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_uds.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_uif.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_uif.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_video.c (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_video.h (100%) rename drivers/media/platform/{ => renesas}/vsp1/vsp1_wpf.c (100%) create mode 100644 drivers/media/platform/rockchip/Kconfig create mode 100644 drivers/media/platform/rockchip/Makefile create mode 100644 drivers/media/platform/rockchip/rga/Kconfig create mode 100644 drivers/media/platform/rockchip/rkisp1/Kconfig create mode 100644 drivers/media/platform/samsung/Kconfig create mode 100644 drivers/media/platform/samsung/Makefile create mode 100644 drivers/media/platform/samsung/exynos-gsc/Kconfig rename drivers/media/platform/{ => samsung}/exynos-gsc/Makefile (100%) rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-core.c (100%) rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-core.h (100%) rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-m2m.c (100%) rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-regs.c (100%) rename drivers/media/platform/{ => samsung}/exynos-gsc/gsc-regs.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/Kconfig (96%) rename drivers/media/platform/{ => samsung}/exynos4-is/Makefile (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/common.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/common.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-capture.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-core.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-core.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-command.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-errno.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-errno.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-i2c.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-i2c.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-param.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-param.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-regs.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-regs.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-sensor.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is-sensor.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-is.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp-video.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp-video.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-isp.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite-reg.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite-reg.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-lite.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-m2m.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-reg.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/fimc-reg.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/media-dev.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/media-dev.h (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/mipi-csis.c (100%) rename drivers/media/platform/{ => samsung}/exynos4-is/mipi-csis.h (100%) create mode 100644 drivers/media/platform/samsung/s3c-camif/Kconfig rename drivers/media/platform/{ => samsung}/s3c-camif/Makefile (100%) rename drivers/media/platform/{ => samsung}/s3c-camif/camif-capture.c (100%) rename drivers/media/platform/{ => samsung}/s3c-camif/camif-core.c (100%) rename drivers/media/platform/{ => samsung}/s3c-camif/camif-core.h (100%) rename drivers/media/platform/{ => samsung}/s3c-camif/camif-regs.c (100%) rename drivers/media/platform/{ => samsung}/s3c-camif/camif-regs.h (100%) create mode 100644 drivers/media/platform/samsung/s5p-g2d/Kconfig rename drivers/media/platform/{ => samsung}/s5p-g2d/Makefile (100%) rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d-hw.c (100%) rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d-regs.h (100%) rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d.c (100%) rename drivers/media/platform/{ => samsung}/s5p-g2d/g2d.h (100%) create mode 100644 drivers/media/platform/samsung/s5p-jpeg/Kconfig rename drivers/media/platform/{ => samsung}/s5p-jpeg/Makefile (100%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-core.c (99%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-core.h (99%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos3250.c (100%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos3250.h (97%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.c (100%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-exynos4.h (100%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-s5p.c (99%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-hw-s5p.h (97%) rename drivers/media/platform/{ => samsung}/s5p-jpeg/jpeg-regs.h (99%) create mode 100644 drivers/media/platform/samsung/s5p-mfc/Kconfig rename drivers/media/platform/{ => samsung}/s5p-mfc/Makefile (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v10.h (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v6.h (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v7.h (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc-v8.h (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/regs-mfc.h (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc.c (100%) rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd.c (89%) rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd.h (92%) rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.c (98%) rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v5.h (82%) rename drivers/media/platform/{ => samsung}/s5p-mfc/s5p_mfc_cmd_v6.c (98%) rename drivers/media/platform/{ => samsung}/s5p-mfc/... [truncated message content] |
From: Mauro C. C. <mc...@ke...> - 2022-03-14 16:09:15
|
Em Mon, 14 Mar 2022 16:07:45 +0100 Jacopo Mondi <ja...@jm...> escreveu: > Hi Mauro > > On Sun, Mar 13, 2022 at 08:12:05AM +0100, Mauro Carvalho Chehab wrote: > > media Kconfig has two entries associated to V4L API: > > VIDEO_DEV and VIDEO_V4L2. > > > > On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. > > VIDEO_DEV were meant to: > > 1) enable Video4Linux and make its Kconfig options to appear; > > 2) it makes the Kernel build the V4L core. > > > > while VIDEO_V4L2 where used to distinguish between drivers that > > implement the newer API and drivers that implemented the former one. > > > > With time, such meaning changed, specially after the removal of > > all V4L version 1 drivers. > > > > At the current implementation, VIDEO_DEV only does (1): it enables > > the media options related to V4L, that now has: > > > > menu "Video4Linux options" > > visible if VIDEO_DEV > > > > source "drivers/media/v4l2-core/Kconfig" > > endmenu > > > > but it doesn't affect anymore the V4L core drivers. > > > > The rationale is that the V4L2 core has a "soft" dependency > > at the I2C bus, and now requires to select a number of other > > Kconfig options: > > > > config VIDEO_V4L2 > > tristate > > depends on (I2C || I2C=n) && VIDEO_DEV > > select RATIONAL > > select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE > > default (I2C || I2C=n) && VIDEO_DEV > > > > In the past, merging them would be tricky, but it seems that it is now > > possible to merge those symbols, in order to simplify V4L dependencies. > > > > Let's keep VIDEO_DEV, as this one is used on some make *defconfig > > configurations. > > > > Suggested-by: Laurent Pinchart <lau...@id...> > > Signed-off-by: Mauro Carvalho Chehab <mc...@ke...> > > --- > > drivers/input/rmi4/Kconfig | 2 +- > > drivers/input/touchscreen/Kconfig | 4 +- > > drivers/media/Kconfig | 3 + > > drivers/media/common/saa7146/Kconfig | 2 +- > > drivers/media/dvb-core/Kconfig | 2 +- > > drivers/media/dvb-frontends/Kconfig | 4 +- > > drivers/media/i2c/Kconfig | 250 +++++++++--------- > > drivers/media/i2c/ccs/Kconfig | 2 +- > > drivers/media/i2c/cx25840/Kconfig | 2 +- > > drivers/media/i2c/et8ek8/Kconfig | 2 +- > > drivers/media/i2c/m5mols/Kconfig | 2 +- > > drivers/media/pci/Kconfig | 2 +- > > drivers/media/pci/bt8xx/Kconfig | 2 +- > > drivers/media/pci/cobalt/Kconfig | 2 +- > > drivers/media/pci/cx18/Kconfig | 2 +- > > drivers/media/pci/dt3155/Kconfig | 2 +- > > drivers/media/pci/intel/ipu3/Kconfig | 2 +- > > drivers/media/pci/ivtv/Kconfig | 2 +- > > drivers/media/pci/meye/Kconfig | 2 +- > > drivers/media/pci/saa7146/Kconfig | 6 +- > > drivers/media/pci/sta2x11/Kconfig | 2 +- > > drivers/media/pci/tw5864/Kconfig | 2 +- > > drivers/media/pci/tw68/Kconfig | 2 +- > > drivers/media/pci/tw686x/Kconfig | 2 +- > > drivers/media/platform/Kconfig | 6 +- > > drivers/media/platform/allegro-dvt/Kconfig | 2 +- > > drivers/media/platform/am437x/Kconfig | 2 +- > > drivers/media/platform/amphion/Kconfig | 2 +- > > drivers/media/platform/aspeed/Kconfig | 2 +- > > drivers/media/platform/atmel/Kconfig | 8 +- > > drivers/media/platform/cadence/Kconfig | 4 +- > > drivers/media/platform/coda/Kconfig | 2 +- > > drivers/media/platform/davinci/Kconfig | 12 +- > > drivers/media/platform/exynos-gsc/Kconfig | 2 +- > > drivers/media/platform/exynos4-is/Kconfig | 2 +- > > drivers/media/platform/intel/Kconfig | 2 +- > > drivers/media/platform/marvell-ccic/Kconfig | 4 +- > > drivers/media/platform/meson/ge2d/Kconfig | 2 +- > > drivers/media/platform/mtk-jpeg/Kconfig | 2 +- > > drivers/media/platform/mtk-mdp/Kconfig | 2 +- > > drivers/media/platform/mtk-vcodec/Kconfig | 2 +- > > drivers/media/platform/mtk-vpu/Kconfig | 2 +- > > drivers/media/platform/nxp/Kconfig | 8 +- > > drivers/media/platform/nxp/imx-jpeg/Kconfig | 2 +- > > drivers/media/platform/omap/Kconfig | 2 +- > > drivers/media/platform/omap3isp/Kconfig | 2 +- > > drivers/media/platform/qcom/camss/Kconfig | 2 +- > > drivers/media/platform/qcom/venus/Kconfig | 2 +- > > drivers/media/platform/renesas/Kconfig | 12 +- > > .../media/platform/renesas/rcar-vin/Kconfig | 4 +- > > drivers/media/platform/rockchip/rga/Kconfig | 2 +- > > .../media/platform/rockchip/rkisp1/Kconfig | 2 +- > > drivers/media/platform/s3c-camif/Kconfig | 2 +- > > drivers/media/platform/s5p-g2d/Kconfig | 2 +- > > drivers/media/platform/s5p-jpeg/Kconfig | 2 +- > > drivers/media/platform/s5p-mfc/Kconfig | 2 +- > > drivers/media/platform/sti/bdisp/Kconfig | 2 +- > > drivers/media/platform/sti/delta/Kconfig | 2 +- > > drivers/media/platform/sti/hva/Kconfig | 2 +- > > drivers/media/platform/stm32/Kconfig | 4 +- > > .../media/platform/sunxi/sun4i-csi/Kconfig | 2 +- > > .../media/platform/sunxi/sun6i-csi/Kconfig | 2 +- > > drivers/media/platform/sunxi/sun8i-di/Kconfig | 2 +- > > .../media/platform/sunxi/sun8i-rotate/Kconfig | 2 +- > > drivers/media/platform/tegra/vde/Kconfig | 2 +- > > drivers/media/platform/ti-vpe/Kconfig | 4 +- > > drivers/media/platform/via/Kconfig | 2 +- > > drivers/media/platform/xilinx/Kconfig | 2 +- > > drivers/media/radio/Kconfig | 54 ++-- > > drivers/media/radio/si470x/Kconfig | 2 +- > > drivers/media/radio/wl128x/Kconfig | 2 +- > > drivers/media/spi/Kconfig | 4 +- > > drivers/media/test-drivers/Kconfig | 2 +- > > drivers/media/test-drivers/vicodec/Kconfig | 2 +- > > drivers/media/test-drivers/vimc/Kconfig | 2 +- > > drivers/media/test-drivers/vivid/Kconfig | 2 +- > > drivers/media/tuners/Kconfig | 6 +- > > drivers/media/tuners/e4000.c | 6 +- > > drivers/media/tuners/fc2580.c | 6 +- > > drivers/media/usb/airspy/Kconfig | 2 +- > > drivers/media/usb/au0828/Kconfig | 6 +- > > drivers/media/usb/cpia2/Kconfig | 2 +- > > drivers/media/usb/dvb-usb-v2/Kconfig | 8 +- > > drivers/media/usb/dvb-usb/Kconfig | 4 +- > > drivers/media/usb/gspca/Kconfig | 96 +++---- > > drivers/media/usb/gspca/gl860/Kconfig | 2 +- > > drivers/media/usb/gspca/m5602/Kconfig | 2 +- > > drivers/media/usb/hackrf/Kconfig | 2 +- > > drivers/media/usb/hdpvr/Kconfig | 2 +- > > drivers/media/usb/msi2500/Kconfig | 2 +- > > drivers/media/usb/pvrusb2/Kconfig | 2 +- > > drivers/media/usb/pwc/Kconfig | 2 +- > > drivers/media/usb/s2255/Kconfig | 2 +- > > drivers/media/usb/stkwebcam/Kconfig | 2 +- > > drivers/media/usb/usbtv/Kconfig | 2 +- > > drivers/media/usb/uvc/Kconfig | 2 +- > > drivers/media/usb/zr364xx/Kconfig | 2 +- > > drivers/media/v4l2-core/Kconfig | 12 +- > > drivers/media/v4l2-core/Makefile | 2 +- > > drivers/staging/media/atomisp/Kconfig | 2 +- > > drivers/staging/media/atomisp/i2c/Kconfig | 14 +- > > drivers/staging/media/hantro/Kconfig | 2 +- > > drivers/staging/media/imx/Kconfig | 2 +- > > drivers/staging/media/ipu3/Kconfig | 2 +- > > drivers/staging/media/max96712/Kconfig | 2 +- > > drivers/staging/media/meson/vdec/Kconfig | 2 +- > > drivers/staging/media/omap4iss/Kconfig | 2 +- > > drivers/staging/media/rkvdec/Kconfig | 2 +- > > drivers/staging/media/sunxi/cedrus/Kconfig | 2 +- > > drivers/staging/media/tegra-video/Kconfig | 2 +- > > drivers/staging/media/zoran/Kconfig | 2 +- > > drivers/staging/most/video/Kconfig | 2 +- > > .../vc04_services/bcm2835-camera/Kconfig | 2 +- > > drivers/usb/gadget/Kconfig | 2 +- > > drivers/usb/gadget/legacy/Kconfig | 2 +- > > sound/pci/Kconfig | 4 +- > > 116 files changed, 363 insertions(+), 368 deletions(-) > > > > diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig > > index 16119f760d11..c0163b983ce6 100644 > > --- a/drivers/input/rmi4/Kconfig > > +++ b/drivers/input/rmi4/Kconfig > > @@ -110,7 +110,7 @@ config RMI4_F3A > > > > config RMI4_F54 > > bool "RMI4 Function 54 (Analog diagnostics)" > > - depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m) > > + depends on VIDEO_DEV=y || (RMI4_CORE=m && VIDEO_DEV=m) > > select VIDEOBUF2_VMALLOC > > select RMI4_F55 > > help > > diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig > > index 2f6adfb7b938..ff7794cecf69 100644 > > --- a/drivers/input/touchscreen/Kconfig > > +++ b/drivers/input/touchscreen/Kconfig > > @@ -131,7 +131,7 @@ config TOUCHSCREEN_ATMEL_MXT > > config TOUCHSCREEN_ATMEL_MXT_T37 > > bool "Support T37 Diagnostic Data" > > depends on TOUCHSCREEN_ATMEL_MXT > > - depends on VIDEO_V4L2=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_V4L2=m) > > + depends on VIDEO_DEV=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_DEV=m) > > select VIDEOBUF2_VMALLOC > > help > > Say Y here if you want support to output data from the T37 > > @@ -1252,7 +1252,7 @@ config TOUCHSCREEN_SUN4I > > config TOUCHSCREEN_SUR40 > > tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen" > > depends on USB && MEDIA_USB_SUPPORT && HAS_DMA > > - depends on VIDEO_V4L2 > > + depends on VIDEO_DEV > > select VIDEOBUF2_DMA_SG > > help > > Say Y here if you want support for the Samsung SUR40 touchscreen > > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig > > index 01b536863657..2d02d9a44b94 100644 > > --- a/drivers/media/Kconfig > > +++ b/drivers/media/Kconfig > > @@ -160,6 +160,9 @@ menu "Media core support" > > config VIDEO_DEV > > tristate "Video4Linux core" > > default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT > > + depends on (I2C || I2C=n) > > Is this I2C || I2C=n intentional ? Yes. See, I2C is a tristate, so, the above evaluates to: if I2C=n => no dependency at I2C If I2C is either "M" or "Y" config VIDEO_DEV depends on I2C. That's the way to tell the build system that, if I2C is compiled as "M", VIDEO_DEV can't be compiled as "Y". > > > + select RATIONAL > > + select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE > > help > > Enables the V4L2 API, used by cameras, analog TV, video grabbers, > > radio devices and by some input devices. > > diff --git a/drivers/media/common/saa7146/Kconfig b/drivers/media/common/saa7146/Kconfig > > index 3e85c0c3fd9a..a0aa155e5d85 100644 > > --- a/drivers/media/common/saa7146/Kconfig > > +++ b/drivers/media/common/saa7146/Kconfig > > @@ -5,6 +5,6 @@ config VIDEO_SAA7146 > > > > config VIDEO_SAA7146_VV > > tristate > > - depends on VIDEO_V4L2 > > + depends on VIDEO_DEV > > select VIDEOBUF_DMA_SG > > select VIDEO_SAA7146 > > diff --git a/drivers/media/dvb-core/Kconfig b/drivers/media/dvb-core/Kconfig > > index 6ffac618417b..8b3f2d53cd62 100644 > > --- a/drivers/media/dvb-core/Kconfig > > +++ b/drivers/media/dvb-core/Kconfig > > @@ -6,7 +6,7 @@ > > config DVB_MMAP > > bool "Enable DVB memory-mapped API (EXPERIMENTAL)" > > depends on DVB_CORE > > - depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE > > + depends on VIDEO_DEV=y || VIDEO_DEV=DVB_CORE > > select VIDEOBUF2_VMALLOC > > help > > This option enables DVB experimental memory-mapped API, which > > diff --git a/drivers/media/dvb-frontends/Kconfig b/drivers/media/dvb-frontends/Kconfig > > index 2c1ed98d43c5..4101f9b1e731 100644 > > --- a/drivers/media/dvb-frontends/Kconfig > > +++ b/drivers/media/dvb-frontends/Kconfig > > @@ -510,7 +510,7 @@ config DVB_RTL2832 > > > > config DVB_RTL2832_SDR > > tristate "Realtek RTL2832 SDR" > > - depends on DVB_CORE && I2C && I2C_MUX && VIDEO_V4L2 && MEDIA_SDR_SUPPORT && USB > > + depends on DVB_CORE && I2C && I2C_MUX && VIDEO_DEV && MEDIA_SDR_SUPPORT && USB > > select DVB_RTL2832 > > select VIDEOBUF2_VMALLOC > > default m if !MEDIA_SUBDRV_AUTOSELECT > > @@ -681,7 +681,7 @@ config DVB_AU8522_DTV > > > > config DVB_AU8522_V4L > > tristate "Auvitek AU8522 based ATV demod" > > - depends on VIDEO_V4L2 && DVB_CORE && I2C > > + depends on VIDEO_DEV && DVB_CORE && I2C > > select DVB_AU8522 > > default m if !MEDIA_SUBDRV_AUTOSELECT > > help > > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig > > index e7194c1be4d2..5abc169f0a5c 100644 > > --- a/drivers/media/i2c/Kconfig > > +++ b/drivers/media/i2c/Kconfig > > @@ -3,7 +3,7 @@ > > # Multimedia Video device configuration > > # > > > > -if VIDEO_V4L2 > > +if VIDEO_DEV > > > > comment "IR I2C driver auto-selected by 'Autoselect ancillary drivers'" > > depends on MEDIA_SUBDRV_AUTOSELECT && I2C && RC_CORE > > @@ -36,7 +36,7 @@ menu "Audio decoders, processors and mixers" > > > > config VIDEO_TVAUDIO > > tristate "Simple audio decoder chips" > > - depends on VIDEO_V4L2 && I2C > > + depends on VIDEO_DEV && I2C > > Are there symbols in drivers/media/i2c that do not depend on I2C ? > Could we make the menu conditional on I2C presence ? It shouldn't have any, but simplifying it is outside the scope of this patch. > > > help > > Support for several audio decoder chips found on some bt8xx boards: > > Philips: tda9840, tda9873h, tda9874h/a, tda9850, tda985x, tea6300, > > @@ -48,7 +48,7 @@ config VIDEO_TVAUDIO > > [snip] > > > @@ -1,7 +1,7 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > config VIDEO_TW5864 > > tristate "Techwell TW5864 video/audio grabber and encoder" > > - depends on VIDEO_DEV && PCI && VIDEO_V4L2 > > + depends on VIDEO_DEV && PCI && VIDEO_DEV > > Double VIDEO_DEV > > > select VIDEOBUF2_DMA_CONTIG > > help > > Support for boards based on Techwell TW5864 chip which provides > > diff --git a/drivers/media/pci/tw68/Kconfig b/drivers/media/pci/tw68/Kconfig > > index af0cb60337bb..ef29be7db493 100644 > > --- a/drivers/media/pci/tw68/Kconfig > > +++ b/drivers/media/pci/tw68/Kconfig > > @@ -1,7 +1,7 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > config VIDEO_TW68 > > tristate "Techwell tw68x Video For Linux" > > - depends on VIDEO_DEV && PCI && VIDEO_V4L2 > > + depends on VIDEO_DEV && PCI && VIDEO_DEV > > Same here > > > select VIDEOBUF2_DMA_SG > > help > > Support for Techwell tw68xx based frame grabber boards. > > [snip] > > > diff --git a/drivers/media/platform/amphion/Kconfig b/drivers/media/platform/amphion/Kconfig > > index 13899649f766..e9ddca7a9e4a 100644 > > --- a/drivers/media/platform/amphion/Kconfig > > +++ b/drivers/media/platform/amphion/Kconfig > > @@ -5,7 +5,7 @@ config VIDEO_AMPHION_VPU > > depends on ARCH_MXC || COMPILE_TEST > > depends on MEDIA_SUPPORT > > depends on VIDEO_DEV > > - depends on VIDEO_V4L2 > > + depends on VIDEO_DEV > > VIDEO_DEV already listed > > > select MEDIA_CONTROLLER > > select V4L2_MEM2MEM_DEV > > select VIDEOBUF2_DMA_CONTIG > > [snip] > > > > > -if RADIO_ADAPTERS && VIDEO_V4L2 > > +if RADIO_ADAPTERS && VIDEO_DEV > > > > config RADIO_TEA575X > > tristate > > @@ -20,13 +20,13 @@ source "drivers/media/radio/si470x/Kconfig" > > > > config RADIO_SI4713 > > tristate "Silicon Labs Si4713 FM Radio with RDS Transmitter support" > > - depends on VIDEO_V4L2 > > + depends on VIDEO_DEV > > Isn't this menu section already conditional to VIDEO_DEV Yes. I'll drop those extra dependencies on this file. > > [snip] > > With the above minors fixed > > Reviewed-by: Jacopo Mondi <ja...@jm...> > > Thanks > j Thanks, Mauro |