Skip to contentSkip to conversation

V4L/DVB fixes for 2.6.26

PATCH In review Mauro Carvalho Chehab 3 participants 11 messages May 14, 2008 – May 17, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 V4L/DVB fixes for 2.6.26

Linus,

Please pull from:
ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git master

For the following:

- Lots of Kbuild fixes, thanks to Ingo Molnar for his help of getting those;
- tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed;
- Fix error DVB register error logix at saa7134, cx88 and em28xx;
- Fix miscelaneous errors at the drivers: tuner, tea5767, cx23885, tda18271,

     ivtv, cx18, mt9v022, mt312, saa7134, dvb_ca_en50221 and xc5000;

- Adds newer USB/PCI IDs at em28xx, cx23885;
- Adds missing information about some audio/video decoders at tveeprom;
- Add MAINTAINERS for the new driver cx18;
- A few trivial namespace cleanups at the newer drivers;
- Add mxl5505s driver for MaxiLinear 5505 chipsets.

Most changes are trivial. The biggest change is due to the addition of a new driver for MaxiLinear mxl5505s tuner, that is meant to work together with the new cx18 driver to support some new devices based on both drivers.

PS.: There are yet a number of other Kconfig potential breakages at V4L/DVB. I'm currently working on fixing those issues. Basically, what users do is to select I2C, DVB and V4L as module. This works fine, but more complex scenarios where you mix 'M' and 'Y' inside the subsystem generally cause compilation breakage. Those scenarios are more theorical, since there's not much practical sense on having a DVB driver foo as module, and V4L driver bar as in-kernel. However, the better is to not allow compilation of the scenarios that don't work.

The main trouble at drivers/media Kbuild is that several rules there assumed that "select" would check the "depends on" dependencies of the selected drivers. However, this feature doesn't exist at the current Kbuild implementation. Even if implemented, I suspect that this will generate circular dependency errors on some cases.

I'm currently checking those rules and running some tests to fix the remaining issues.

Cheers,
Mauro.

---

 Documentation/video4linux/CARDLIST.cx23885    |    2 +-
 Documentation/video4linux/CARDLIST.em28xx     |    2 +-
 MAINTAINERS                                   |    9 +
 drivers/media/Kconfig                         |    3 +-
 drivers/media/common/tuners/Kconfig           |   50 +-
 drivers/media/common/tuners/Makefile          |    1 +
 drivers/media/common/tuners/mxl5005s.c        | 4110 +++++++++++++++++++++++++
 drivers/media/common/tuners/mxl5005s.h        |  131 +
 drivers/media/common/tuners/tda18271-common.c |   24 +-
 drivers/media/common/tuners/tda18271-fe.c     |  168 +-
 drivers/media/common/tuners/tda18271-priv.h   |    9 +
 drivers/media/common/tuners/tea5767.c         |    6 +-
 drivers/media/common/tuners/xc5000.c          |    9 +-
 drivers/media/common/tuners/xc5000.h          |   22 +-
 drivers/media/common/tuners/xc5000_priv.h     |    2 +
 drivers/media/dvb/b2c2/flexcop-fe-tuner.c     |    2 +-
 drivers/media/dvb/bt8xx/Kconfig               |    1 +
 drivers/media/dvb/cinergyT2/Kconfig           |    2 +-
 drivers/media/dvb/dvb-core/dvb_ca_en50221.c   |   28 +-
 drivers/media/dvb/dvb-usb/Kconfig             |    1 +
 drivers/media/dvb/frontends/Kconfig           |   18 +-
 drivers/media/dvb/frontends/itd1000.c         |    2 +-
 drivers/media/dvb/frontends/mt312.c           |    9 +-
 drivers/media/dvb/frontends/mt312.h           |    4 +-
 drivers/media/dvb/ttpci/Kconfig               |    2 +
 drivers/media/dvb/ttusb-dec/Kconfig           |    1 +
 drivers/media/video/Kconfig                   |   10 +-
 drivers/media/video/Makefile                  |    2 +-
 drivers/media/video/au0828/Kconfig            |    3 +-
 drivers/media/video/au0828/au0828-dvb.c       |    6 +-
 drivers/media/video/bt8xx/Kconfig             |    3 +-
 drivers/media/video/cx18/Kconfig              |    5 +-
 drivers/media/video/cx18/cx18-cards.c         |   25 +-
 drivers/media/video/cx18/cx18-cards.h         |    5 +-
 drivers/media/video/cx18/cx18-driver.c        |   29 +-
 drivers/media/video/cx18/cx18-driver.h        |    3 -
 drivers/media/video/cx18/cx18-dvb.c           |   40 +-
 drivers/media/video/cx18/cx18-fileops.c       |    6 +-
 drivers/media/video/cx18/cx18-fileops.h       |    9 -
 drivers/media/video/cx18/cx18-gpio.c          |   47 +-
 drivers/media/video/cx18/cx18-i2c.c           |    1 +
 drivers/media/video/cx18/cx18-queue.c         |   22 +-
 drivers/media/video/cx18/cx18-queue.h         |    4 -
 drivers/media/video/cx18/cx18-streams.c       |   13 +-
 drivers/media/video/cx18/cx18-streams.h       |    2 +-
 drivers/media/video/cx23885/Kconfig           |    6 +-
 drivers/media/video/cx23885/cx23885-cards.c   |   36 +-
 drivers/media/video/cx23885/cx23885-dvb.c     |    7 +-
 drivers/media/video/cx25840/Kconfig           |    1 +
 drivers/media/video/cx88/Kconfig              |    6 +-
 drivers/media/video/cx88/cx88-dvb.c           |  253 +-
 drivers/media/video/em28xx/Kconfig            |    3 +-
 drivers/media/video/em28xx/em28xx-cards.c     |    8 +-
 drivers/media/video/em28xx/em28xx-dvb.c       |    1 -
 drivers/media/video/ivtv/Kconfig              |    4 +-
 drivers/media/video/ivtv/ivtv-controls.c      |    4 +-
 drivers/media/video/ivtv/ivtv-driver.c        |    8 +-
 drivers/media/video/ivtv/ivtv-fileops.c       |    2 +
 drivers/media/video/ivtv/ivtv-ioctl.c         |   16 +-
 drivers/media/video/ivtv/ivtv-ioctl.h         |    6 +-
 drivers/media/video/ivtv/ivtv-queue.c         |   12 +-
 drivers/media/video/ivtv/ivtv-streams.c       |   13 +-
 drivers/media/video/ivtv/ivtv-streams.h       |    2 +-
 drivers/media/video/ivtv/ivtv-vbi.c           |    3 +-
 drivers/media/video/ivtv/ivtv-yuv.c           |    2 +-
 drivers/media/video/ivtv/ivtvfb.c             |    6 +-
 drivers/media/video/mt9m001.c                 |    5 +-
 drivers/media/video/mt9v022.c                 |    7 +-
 drivers/media/video/pvrusb2/Kconfig           |    4 +-
 drivers/media/video/saa7134/Kconfig           |    3 +-
 drivers/media/video/saa7134/saa7134-core.c    |    6 -
 drivers/media/video/saa7134/saa7134-dvb.c     |  140 +-
 drivers/media/video/stk-webcam.c              |    7 +
 drivers/media/video/tuner-core.c              |   38 +-
 drivers/media/video/tveeprom.c                |   10 +-
 drivers/media/video/usbvision/Kconfig         |    2 +-
 76 files changed, 4976 insertions(+), 498 deletions(-)
 create mode 100644 drivers/media/common/tuners/mxl5005s.c
 create mode 100644 drivers/media/common/tuners/mxl5005s.h

Adrian Bunk (2):

      V4L/DVB (7856): cx18/: possible cleanups
      V4L/DVB (7857): make itd1000_fre_values[] static const

Andrew Morton (1):
V4L/DVB (7800): tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed

Andy Walls (1):

      V4L/DVB (7891): cx18/ivtv: fix open() kernel oops

Guennadi Liakhovetski (2):

      V4L/DVB (7810): soc_camera: mt9v022 and mt9m001 depend on I2C
      V4L/DVB (7859): mt9v022: fix a copy-paste error in comment

Hans Verkuil (8):
V4L/DVB (7852): ivtv: prefix ivtv external functions with ivtv_ V4L/DVB (7853): ivtv/cx18: fix compile warnings V4L/DVB (7854): cx18/ivtv: improve and fix out-of-memory handling V4L/DVB (7860a): Add MAINTAINERS for cx18
V4L/DVB (7887): cx18: fix Compro H900 analog support. V4L/DVB (7888): cx18: minor card definition updates. V4L/DVB (7889): cx18: improve HVR-1600 detection. V4L/DVB (7890): cx18: removed bogus and confusing conditional

Hartmut Hackmann (2):
V4L/DVB (7880): saa7134: remove explicit GPIO initialization V4L/DVB (7881): saa7134: fixed a compile warning in saa7134-core.c

Ingo Molnar (3):

      V4L/DVB (7834): build fix for drivers/media/video/au0828
      V4L/DVB (7836): cinergyT2 build fix
      V4L/DVB (7858): video: build fix for drivers/media/video/mt9v022.c

Matthias Schwarzott (1):
V4L/DVB (7861): mt312: Prefix functions only with mt312_, Add zl10313 to kconfig description

Mauro Carvalho Chehab (15):
V4L/DVB (7801): saa7134: detach frontend, if tuner or Diseqc attach fails V4L/DVB (7802): tuner: Failures at tuner_attach were producing OOPS
V4L/DVB (7804): tea5767: Fix error logic
V4L/DVB (7805): saa7134: dvb_unregister_frontend() shouldn't be called, if not registered yet V4L/DVB (7806): em28xx: dvb_unregister_frontend() shouldn't be called, if not registered yet V4L/DVB (7807): cx88: Fix error handling, when dvb_attach() fails
V4L/DVB (7813): Fix compilation, when V4L1_COMPAT is disabled
V4L/DVB (7846): Re-creates VIDEO_TUNER
V4L/DVB (7847): Simplifies Kconfig rules
V4L/DVB (7848): Fix dependencies for tuner-xc2028 and em28xx-dvb
V4L/DVB (7849): cx88: fix Kconfig depencencies for FW_LOADER
V4L/DVB (7851): Fix FW_LOADER depencency at v4l/dvb
V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic
V4L/DVB (7899): Fixes a few remaining Kbuild issues at common/tuners
V4L/DVB (7900): pvrusb: Fix Kconfig if DVB=m V4L_core=y

Michael Krufky (16):

      V4L/DVB (7808): cx23885: fix kbuild dependencies
      V4L/DVB (7823): em28xx: add additional usb subids for Hauppauge HVR-950
      V4L/DVB (7827): cx23885: add missing subsystem ID for Hauppauge HVR-1200 OEM
      V4L/DVB (7828): cx23885: update model matrix for Hauppauge WinTV HVR-1200 & WinTV HVR-1700
      V4L/DVB (7829): cx23885: remove remaining references to dvb-pll
      V4L/DVB (7832): xc5000: MEDIA_TUNER_XC5000 must select FW_LOADER
      V4L/DVB (7837): tda18271: fix error handling in init and sleep paths
      V4L/DVB (7838): tda18271: fix error handling in tda18271c2_rf_cal_init path
      V4L/DVB (7839): tda18271: abort rf band calibration loop on errors
      V4L/DVB (7840): tda18271: make tda18271_set_standby_mode less verbose for basic debug
      V4L/DVB (7841): tda18271: fix error handling in tda18271_channel_configuration
      V4L/DVB (7842): tda18271: fix error handling in tda18271c2_rf_tracking_filters_correction
      V4L/DVB (7843): tda18271: fix error handling in tda18271c1_rf_tracking_filter_calibration
      V4L/DVB (7844): tda18271: add tda_fail macro to log error cases
      V4L/DVB (7893): xc5000: bug-fix: allow multiple devices in a single system
      V4L/DVB (7895): tveeprom: update Hauppauge analog audio and video decoders

Randy Dunlap (1):

      V4L/DVB (7835): multimedia/video: fix au0828 Kconfig

Robert Schedel (1):
V4L/DVB (7830): dvb_ca_en50221: Fix High CPU load in 'top' due to budget_av slot polling

Steven Toth (17):

      V4L/DVB (7862): Add mxl5505s driver for MaxiLinear 5505 chipsets
      V4L/DVB (7864): mxl5005s: Cleanup #1
      V4L/DVB (7865): mxl5005s: Cleanup #2
      V4L/DVB (7866): mxl5005s: Cleanup #3
      V4L/DVB (7867): mxl5005s: Cleanup #4
      V4L/DVB (7868): mxl5005s: Cleanup #5
      V4L/DVB(7869): mxl5005s: Cleanup #6
      V4L/DVB (7870): mxl5005s: Basic digital support.
      V4L/DVB(7871): mxl5005s: Re-org code and update copyrights
      V4L/DVB(7872): mxl5005s: checkpatch.pl compliance
      V4L/DVB(7873): mxl5005s: Fix header includes.
      V4L/DVB(7874): mxl5005s: Fix function statics
      V4L/DVB(7875): mxl5005s: Remove redundant functions
      V4L/DVB(7876): mxl5005s: Remove incorrect copyright holders
      V4L/DVB(7877): mxl5005s: Ensure debug is off
      V4L/DVB(7878): mxl55005s: Makefile and Kconfig additions
      V4L/DVB(7879): Adding cx18 Support for mxl5005s

---------------------------------------------------
V4L/DVB development is hosted at http://linuxtv.org

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#1 lore raw
Quoted 9 lines · Mauro Carvalho Chehab

...
PS.: There are yet a number of other Kconfig potential breakages at V4L/DVB. I'm currently working on fixing those issues. Basically, what users do is to select I2C, DVB and V4L as module. This works fine, but more complex scenarios where you mix 'M' and 'Y' inside the subsystem generally cause compilation breakage. Those scenarios are more theorical, since there's not much practical sense on having a DVB driver foo as module, and V4L driver bar as in-kernel. However, the better is to not allow compilation of the scenarios that don't work.

Quoted 6 lines

The main trouble at drivers/media Kbuild is that several rules there assumed that "select" would check the "depends on" dependencies of the selected drivers. However, this feature doesn't exist at the current Kbuild implementation. Even if implemented, I suspect that this will generate circular dependency errors on some cases.
...

The basic problem is that drivers/media/ does the most fancy kconfig stuff in the kernel since it tries to both have very fine grained dependencies and offer a usable kconfig UI to the user, which results in very complicated dependencies.

We are not getting this solved by any changes in the kconfig implementation.

Thinking about reasonable ways to reduce the problem space:

Where could we reduce the complexity without big disadvantages?

Could we e.g. let VIDEO_DEV select I2C which would remove all the fiddling with I2C dependencies (which is a bigger part of recent problems)?

I can make a patch for it after this pull went into Linus' tree if it is considered an acceptable option.

Quoted 3 lines

Cheers,
Mauro.
...

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
Quoted 17 lines · On Wed, 14 May 2008 19:54:34 +0300 Adrian Bunk <[email protected]> wrote:
Quoted 9 lines · Mauro Carvalho Chehab

...
PS.: There are yet a number of other Kconfig potential breakages at V4L/DVB. I'm currently working on fixing those issues. Basically, what users do is to select I2C, DVB and V4L as module. This works fine, but more complex scenarios where you mix 'M' and 'Y' inside the subsystem generally cause compilation breakage. Those scenarios are more theorical, since there's not much practical sense on having a DVB driver foo as module, and V4L driver bar as in-kernel. However, the better is to not allow compilation of the scenarios that don't work.

Quoted 6 lines

The main trouble at drivers/media Kbuild is that several rules there assumed that "select" would check the "depends on" dependencies of the selected drivers. However, this feature doesn't exist at the current Kbuild implementation. Even if implemented, I suspect that this will generate circular dependency errors on some cases.
...

Quoted 4 lines

The basic problem is that drivers/media/ does the most fancy kconfig stuff in the kernel since it tries to both have very fine grained dependencies and offer a usable kconfig UI to the user, which results in very complicated dependencies.

True.

Quoted 10 lines

We are not getting this solved by any changes in the kconfig implementation.

Thinking about reasonable ways to reduce the problem space:

Where could we reduce the complexity without big disadvantages?

Could we e.g. let VIDEO_DEV select I2C which would remove all the fiddling with I2C dependencies (which is a bigger part of recent problems)?

This seems to be reasonable. However, there are quite a few devices that don't need I2C (for example, some legacy ISA radio modules - also, some webcam drivers don't use i2c layer to communicate with their i2c sensor - so - they don't need I2C. The same also applies to some DVB drivers).

So, I'm not sure if this would be a good idea, since it will force I2C even for devices that don't need. This is bad, for example, on embedded devices like set-top-boxes and maybe on cellular phones with non-i2c webcams.

Quoted 2 lines

I can make a patch for it after this pull went into Linus' tree if it is considered an acceptable option.

It would be nice if you could help on fixing those issues.

One dependency that will probably solve is to add "depends on VIDEO_MEDIA && I2C" to all devices that are hybrid (bttv, saa7134, cx88, pvrusb, em28xx).

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#3 lore raw
Quoted 38 lines · Mauro Carvalho Chehab
Quoted 17 lines · On Wed, 14 May 2008 19:54:34 +0300 Adrian Bunk <[email protected]> wrote:
Quoted 9 lines · Mauro Carvalho Chehab

...
PS.: There are yet a number of other Kconfig potential breakages at V4L/DVB. I'm currently working on fixing those issues. Basically, what users do is to select I2C, DVB and V4L as module. This works fine, but more complex scenarios where you mix 'M' and 'Y' inside the subsystem generally cause compilation breakage. Those scenarios are more theorical, since there's not much practical sense on having a DVB driver foo as module, and V4L driver bar as in-kernel. However, the better is to not allow compilation of the scenarios that don't work.

Quoted 6 lines

The main trouble at drivers/media Kbuild is that several rules there assumed that "select" would check the "depends on" dependencies of the selected drivers. However, this feature doesn't exist at the current Kbuild implementation. Even if implemented, I suspect that this will generate circular dependency errors on some cases.
...

Quoted 4 lines

The basic problem is that drivers/media/ does the most fancy kconfig stuff in the kernel since it tries to both have very fine grained dependencies and offer a usable kconfig UI to the user, which results in very complicated dependencies.

True.

Quoted 10 lines

We are not getting this solved by any changes in the kconfig implementation.

Thinking about reasonable ways to reduce the problem space:

Where could we reduce the complexity without big disadvantages?

Could we e.g. let VIDEO_DEV select I2C which would remove all the fiddling with I2C dependencies (which is a bigger part of recent problems)?

Quoted 8 lines

This seems to be reasonable. However, there are quite a few devices that don't need I2C (for example, some legacy ISA radio modules - also, some webcam drivers don't use i2c layer to communicate with their i2c sensor - so - they don't need I2C. The same also applies to some DVB drivers).

So, I'm not sure if this would be a good idea, since it will force I2C even for devices that don't need. This is bad, for example, on embedded devices like set-top-boxes and maybe on cellular phones with non-i2c webcams.

I'm not completely agreeing the space savings you are doing are worth the complicated stuff, but OK.

Quoted 7 lines
Quoted 2 lines

I can make a patch for it after this pull went into Linus' tree if it is considered an acceptable option.

It would be nice if you could help on fixing those issues.

One dependency that will probably solve is to add "depends on VIDEO_MEDIA && I2C" to all devices that are hybrid (bttv, saa7134, cx88, pvrusb, em28xx).

What about converting all dependencies on I2C to select's?

VIDEO_V4L2_COMMON might perhaps need a small trick, but otherwise that would be a straightforward solution to solve these problems.

Any problem I miss or should I bake a patch?

Quoted 2 lines

Cheers,
Mauro

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#4 lore raw
Quoted 10 lines
Quoted 8 lines
Quoted 3 lines

I can make a patch for it after this pull went into Linus' tree if it is considered an acceptable option.

It would be nice if you could help on fixing those issues.

One dependency that will probably solve is to add "depends on VIDEO_MEDIA && I2C" to all devices that are hybrid (bttv, saa7134, cx88, pvrusb, em28xx).

What about converting all dependencies on I2C to select's?

This seems to be a good idea.

Quoted 1 line

VIDEO_V4L2_COMMON might perhaps need a small trick,

I suspect that this can now be replaced by VIDEO_DEV, on webcam/radio drivers or VIDEO_MEDIA for hybrid V4L/DVB drivers. Btw, I think we can replace VIDEO_MEDIA into just MEDIA.

Quoted 2 lines

but otherwise that
would be a straightforward solution to solve these problems.

This will solve several troubles. Still, I think that there are still some other missing dependencies (like INPUT, on drivers that select IR).

Quoted 2 lines

Any problem I miss or should I bake a patch?

I can't see any trouble on this approach. Feel free to work on it.

Thanks,
Mauro

#9 lore raw
In reply to Adrian Bunk
Quoted 6 lines · Adrian Bunk
Quoted 4 lines

It would be nice if you could help on fixing those issues.

One dependency that will probably solve is to add "depends on VIDEO_MEDIA && I2C" to all devices that are hybrid (bttv, saa7134, cx88, pvrusb, em28xx).

What about converting all dependencies on I2C to select's?

Doesn't that just increase the problems with failing to have correct dependencies? Anything that selects I2C needs to depend on everything I2C depends on.

#10 lore raw
Quoted 12 lines · Trent Piepho
Quoted 6 lines · Adrian Bunk
Quoted 4 lines

It would be nice if you could help on fixing those issues.

One dependency that will probably solve is to add "depends on VIDEO_MEDIA && I2C" to all devices that are hybrid (bttv, saa7134, cx88, pvrusb, em28xx).

What about converting all dependencies on I2C to select's?

Doesn't that just increase the problems with failing to have correct dependencies? Anything that selects I2C needs to depend on everything I2C depends on.

True. Currently, the only dependency is this one:

menuconfig I2C
tristate "I2C support"
depends on HAS_IOMEM

HAS_IOMEM is true on every architecture, except usermode linux (um) and s390. Also, Multimedia menu is already dependent of HAS_IOMEM, so, this currently won't add any extra complexity.

I agree that this may add an extra issue to concern, since future changes at I2C dependencies will need to be addressed.

Signature · 9 lines
Cheers,
Mauro Carvalho Chehab
http://linuxtv.org
[email protected]

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
#5 lore raw
In reply to Mauro Carvalho Chehab
Quoted 6 lines · Mauro Carvalho Chehab

...

Quoted 2 lines

but otherwise that
would be a straightforward solution to solve these problems.

This will solve several troubles. Still, I think that there are still some other missing dependencies (like INPUT, on drivers that select IR).

We could select INPUT from drivers/media/

And FW_LOADER should really select HOTPLUG - there's no good reason for FW_LOADER to be a user-visible option with dependencies.

But these two are problems that are only relevant for randconfig users while the I2C troubles hit real users, so I want to attack the I2C issues first.

Quoted 3 lines
Quoted 1 line

Any problem I miss or should I bake a patch?

I can't see any trouble on this approach. Feel free to work on it.

First issue when working on it:

The dependencies between VIDEO_IR and VIDEO_IR_I2C look wrong (consider VIDEO_IR=y and I2C=m).

It's not a problem since currently all users of VIDEO_IR also depend on I2C.

Should I fix the dependency or can I let VIDEO_IR select I2C and remove VIDEO_IR_I2C?

Quoted 2 lines

Thanks,
Mauro

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#6 lore raw
Quoted 9 lines · On Thu, 15 May 2008 19:02:46 +0300 Adrian Bunk <[email protected]> wrote:
Quoted 6 lines · Mauro Carvalho Chehab

...

Quoted 2 lines

but otherwise that
would be a straightforward solution to solve these problems.

This will solve several troubles. Still, I think that there are still some other missing dependencies (like INPUT, on drivers that select IR).

We could select INPUT from drivers/media/

Several drivers don't need INPUT (webcams, radio, etc). This is needed only by the TV reception devices (analog and digital).

Yet, I can't imagine any production kernel without INPUT. What happens if INPUT is disabled? No keyboard, no tablet and no mouse at all?

Quoted 2 lines

And FW_LOADER should really select HOTPLUG - there's no good reason for FW_LOADER to be a user-visible option with dependencies.

It seems safe to select HOTPLUG instead of depending on it.

Quoted 1 line

But these two are problems that are only relevant for randconfig users

True. Hotplug may eventually be relevant for embedded users. However, "depends on HOTPLUG" is already present to all points where FW_LOADER is needed (I added such patch at my previous pull request). So, the way it is seems OK. I don't see much reason to change it.

Quoted 2 lines

while the I2C troubles hit real users, so I want to attack the I2C issues first.

Very true. Also, it is not obvious to the final user that he would need to select I2C to have a video input driver.

Quoted 11 lines
Quoted 3 lines
Quoted 1 line

Any problem I miss or should I bake a patch?

I can't see any trouble on this approach. Feel free to work on it.

First issue when working on it:

The dependencies between VIDEO_IR and VIDEO_IR_I2C look wrong (consider VIDEO_IR=y and I2C=m).

It's not a problem since currently all users of VIDEO_IR also depend on I2C.

True. I got a compilation error with saa7134 that seems to be caused by this trouble.

Quoted 3 lines

Should I fix the dependency or can I let VIDEO_IR select I2C and remove VIDEO_IR_I2C?

The better would be to fix the dependency. The proper way seems to remove the select from VIDEO_IR, and add an explicit select to VIDEO_IR_I2C where needed.

I would add an entry to allow the user to select this explicitly, for power users, and select it implicitly. Something like:

select VIDEO_IR_I2C if VIDEO_HELPER_CHIPS_AUTO

at the drivers under media/video that selects IR. This need to be mandatory for a few drivers like saa7134, where some exported symbols at kbd-ir-i2c are used there.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#7 lore raw
Quoted 8 lines · Mauro Carvalho Chehab
Quoted 5 lines · On Thu, 15 May 2008 19:02:46 +0300 Adrian Bunk <[email protected]> wrote:
Quoted 4 lines · Mauro Carvalho Chehab

...

Quoted 2 lines

but otherwise that
would be a straightforward solution to solve these problems.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

This will solve several troubles. Still, I think that there are still some other missing dependencies (like INPUT, on drivers that select IR).

We could select INPUT from drivers/media/

Several drivers don't need INPUT (webcams, radio, etc). This is needed only by the TV reception devices (analog and digital).

I wanted to simply turn the existing dependencies on INPUT to select's (and add a dependency on S390 to the "Multimedia devices" menu).

Quoted 2 lines

Yet, I can't imagine any production kernel without INPUT. What happens if INPUT is disabled? No keyboard, no tablet and no mouse at all?

CONFIG_INPUT is always y unless you enable CONFIG_EMBEDDED.

But on some kinds of embedded systems kernels without INPUT are actually not uncommon - and they don't have any keyboard or mouse.

Quoted 11 lines
Quoted 2 lines

And FW_LOADER should really select HOTPLUG - there's no good reason for FW_LOADER to be a user-visible option with dependencies.

It seems safe to select HOTPLUG instead of depending on it.

Quoted 1 line

But these two are problems that are only relevant for randconfig users

True. Hotplug may eventually be relevant for embedded users. However, "depends on HOTPLUG" is already present to all points where FW_LOADER is needed (I added such patch at my previous pull request). So, the way it is seems OK. I don't see much reason to change it.

I'm not only thinking about today, that's an ongoing problem that could be fixed this way.

Plus the fact that the dependencies on HOTPLUG don't help you when the option gets select'ed.

Quoted 12 lines
Quoted 2 lines

while the I2C troubles hit real users, so I want to attack the I2C issues first.

Very true. Also, it is not obvious to the final user that he would need to select I2C to have a video input driver.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Any problem I miss or should I bake a patch?

I can't see any trouble on this approach. Feel free to work on it.

First issue when working on it:

Quoted 8 lines
Quoted 5 lines

The dependencies between VIDEO_IR and VIDEO_IR_I2C look wrong (consider VIDEO_IR=y and I2C=m).

It's not a problem since currently all users of VIDEO_IR also depend on I2C.

True. I got a compilation error with saa7134 that seems to be caused by this trouble.

That sounds unrelated.

Do you have a list of open issues (preferably with .config's)?

Quoted 6 lines
Quoted 2 lines

Should I fix the dependency or can I let VIDEO_IR select I2C and remove VIDEO_IR_I2C?

The better would be to fix the dependency. The proper way seems to remove the select from VIDEO_IR, and add an explicit select to VIDEO_IR_I2C where needed.

Quoted 8 lines

I would add an entry to allow the user to select this explicitly, for power users, and select it implicitly. Something like:

select VIDEO_IR_I2C if VIDEO_HELPER_CHIPS_AUTO

at the drivers under media/video that selects IR. This need to be mandatory for a few drivers like saa7134, where some exported symbols at kbd-ir-i2c are used there.

Are there any real use cases for this justifying adding yet another twist to the kconfig stuff?

I want to make it simpler, not more complicated, and your last sentence just describes another new pitfall.

I get the point that it makes sense that it's possible to build only the one tuner you actually have instead of a dozen automatically select'ed, but you must somewhere draw a "this twist is not worth the maintainance overhead" line.

The overall picture is that we cannot add a kconfig option and an #ifdef around each line of code in the kernel only because someone might want to disable it.

We simply cannot maintain that in the long term
(drivers/media/ is already at the edge).

And as soon as you enter the 10kB object code size area there are enough lower hanging fruits for saving space that do not involve increased complexity in kconfig.

Quoted 2 lines

Cheers,
Mauro

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#8 lore raw
Quoted 2 lines · Adrian Bunk

I wanted to simply turn the existing dependencies on INPUT to select's (and add a dependency on S390 to the "Multimedia devices" menu).

I suspect you're maning depends on !S390. This is not needed, since Multimedia devices is already dependent on HAS_IOMEM.

Quoted 7 lines
Quoted 2 lines

Yet, I can't imagine any production kernel without INPUT. What happens if INPUT is disabled? No keyboard, no tablet and no mouse at all?

CONFIG_INPUT is always y unless you enable CONFIG_EMBEDDED.

But on some kinds of embedded systems kernels without INPUT are actually not uncommon - and they don't have any keyboard or mouse.

There are several embedded V4L/DVB devices: Cellular phones, Set Top Boxes, surveillance systems, etc. I'm not sure if forcing the need for INPUT would be nice. Also, from time to time, people ask for a feature of allowing to disable the IR.

Maybe the better would be to allow the user to explicitly select/unselect IR (for advanced users, and if INPUT). If IR is disabled, we may disable the corresponding <board>-input.c compilation. It doesn't seem hard to do this way, but it will require more time to bake a patch.

Quoted 5 lines

I'm not only thinking about today, that's an ongoing problem that could be fixed this way.

Plus the fact that the dependencies on HOTPLUG don't help you when the option gets select'ed.

Yes, but the committed patch is adding "depends on HOTPLUG" to all devices that selects FW_LOADER.

If you want, feel free to change this to select, although I can't see any real gain.

Quoted 1 line

Do you have a list of open issues (preferably with .config's)?

The open issue I see is to check the "depends on" for all symbols that are selected.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Should I fix the dependency or can I let VIDEO_IR select I2C and remove VIDEO_IR_I2C?

I would remove the select inside VIDEO_IR, adding a separate select for VIDEO_IR_I2C. There's a problem on saa7134-input: It uses some symbols defined on ir-kbd-i2c:

$ grep EXPORT ir-kbd-i2c.c
EXPORT_SYMBOL_GPL(get_key_pinnacle_grey);
EXPORT_SYMBOL_GPL(get_key_pinnacle_color);

This breaks saa7134 compilation, if IR-I2C is not selected (or if it is a module, and saa7134 is 'Y).

The proper fix here is to move those symbols to ir-keymaps.c, where the shared IR tables should be.

Except for this, it is safe to allow the user to not compile VIDEO_IR_I2C, even for devices that has i2c IR's. If the module is not compiled, request_module() will fail, but everything else will work properly.

Quoted 20 lines
Quoted 8 lines

I would add an entry to allow the user to select this explicitly, for power users, and select it implicitly. Something like:

select VIDEO_IR_I2C if VIDEO_HELPER_CHIPS_AUTO

at the drivers under media/video that selects IR. This need to be mandatory for a few drivers like saa7134, where some exported symbols at kbd-ir-i2c are used there.

Are there any real use cases for this justifying adding yet another twist to the kconfig stuff?

I want to make it simpler, not more complicated, and your last sentence just describes another new pitfall.

I get the point that it makes sense that it's possible to build only the one tuner you actually have instead of a dozen automatically select'ed, but you must somewhere draw a "this twist is not worth the maintainance overhead" line.

Quoted 6 lines

The overall picture is that we cannot add a kconfig option and an #ifdef around each line of code in the kernel only because someone might want to disable it.

We simply cannot maintain that in the long term
(drivers/media/ is already at the edge).

True.

Quoted 4 lines

And as soon as you enter the 10kB object code size area there are enough lower hanging fruits for saving space that do not involve increased complexity in kconfig.

Yes, but in is, in fact, 10K * lots of modules.

The point is that the I2C modules behave very well if they aren't compiled.

I can, for example, compile bttv with just tuner-simple, and nothing else. This will work with all bttv functionalities for two devices I have here. A third analog-only device will require TVAUDIO, otherwise, the audio chip won't be loaded, and audio decoder won't happen. So, the device will work only with video.

I don't see much troubles with most of those I2C helper modules, since the vast majority depends only on I2C (only a few also depends on FW_LOADER).

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list