From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Alistair John Strachan <alistair@devzero.co.uk>,
Robin Holt <holt@sgi.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.6.26-rc1
Date: Tue, 6 May 2008 16:13:46 -0300 [thread overview]
Message-ID: <20080506161346.183f367c@gaivota> (raw)
In-Reply-To: <48206C73.80509@s5r6.in-berlin.de>
On Tue, 06 May 2008 16:34:27 +0200
Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
> Mauro Carvalho Chehab wrote:
> > the Kconfig logic for V4L/DVB is complex. It tries to address two
> > different issues:
> > - an easy board selection for the end-user (just selecting CX88 should
> > allow his board to work);
> > - an advanced selection for embedded set-top-boxes, where you can
> > select just what you really need.
> >
> > Due to that, there are several "select" clauses, that don't consider the
> > "depends on". So, it is very easy to break it, unfortunately.
>
> No, it is not easy to break, it /is/ broken.
True, unfortunately.
> But it is /trivial/ to fix. If A selects B, you have to copy all of B's
> dependencies to A or select these dependencies by A.
>
> So it's totally simple to do it right. The only nuisance is that you
> always have to update B's dependencies and selections whenever A's
> dependencies are changed.
This is easy to maintain, if you have just a few selects, but this is not the
case of V4L drivers. Look some examples:
IVTV driver:
config VIDEO_IVTV
tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support"
depends on VIDEO_V4L1 && VIDEO_V4L2 && PCI && I2C && EXPERIMENTAL
select I2C_ALGOBIT
select FW_LOADER
select VIDEO_IR
select MEDIA_TUNER
select VIDEO_TVEEPROM
select VIDEO_CX2341X
select VIDEO_CX25840
select VIDEO_MSP3400
select VIDEO_SAA711X
select VIDEO_SAA717X
select VIDEO_SAA7127
select VIDEO_TVAUDIO
select VIDEO_CS53L32A
select VIDEO_M52790
select VIDEO_WM8775
select VIDEO_WM8739
select VIDEO_VP27SMPX
select VIDEO_UPD64031A
select VIDEO_UPD64083
config VIDEO_FB_IVTV
tristate "Conexant cx23415 framebuffer support"
depends on VIDEO_IVTV && FB && EXPERIMENTAL
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
(btw, on above, IVTV is missing INPUT)
This is Cx88 driver:
config VIDEO_CX88
tristate "Conexant 2388x (bt878 successor) support"
depends on VIDEO_DEV && PCI && I2C && INPUT
select I2C_ALGOBIT
select FW_LOADER
select VIDEO_BTCX
select VIDEOBUF_DMA_SG
select MEDIA_TUNER
select VIDEO_TVEEPROM
select VIDEO_IR
select VIDEO_WM8775 if VIDEO_HELPER_CHIPS_AUTO
config VIDEO_CX88_ALSA
tristate "Conexant 2388x DMA audio support"
depends on VIDEO_CX88 && SND && EXPERIMENTAL
select SND_PCM
config VIDEO_CX88_BLACKBIRD
tristate "Blackbird MPEG encoder support (cx2388x + cx23416)"
depends on VIDEO_CX88
select VIDEO_CX2341X
config VIDEO_CX88_DVB
tristate "DVB/ATSC Support for cx2388x based TV cards"
depends on VIDEO_CX88 && DVB_CORE
select VIDEOBUF_DVB
select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_MT352 if !DVB_FE_CUSTOMISE
select DVB_ZL10353 if !DVB_FE_CUSTOMISE
select DVB_OR51132 if !DVB_FE_CUSTOMISE
select DVB_CX22702 if !DVB_FE_CUSTOMISE
select DVB_LGDT330X if !DVB_FE_CUSTOMISE
select DVB_NXT200X if !DVB_FE_CUSTOMISE
select DVB_CX24123 if !DVB_FE_CUSTOMISE
select DVB_ISL6421 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
select DVB_S5H1411 if !DVB_FE_CUSTOMISE
(here, FW_LOADER is at the wrong sub-driver - it should be at CX88_DVB - and
HOTPLUG dependency is missing)
Ok, most of those select's have the same set of dependencies. Yet, it is really
hard to maintain. The result is that almost every new driver has some missing
dependencies.
Those two drivers are just two examples where I found some bugs today. Most of
the drivers have dozens of select.
You may argue to not use select, but it is really hard to avoid, since each of
those main drivers (cx88, ivtv, bttv, etc) supports a large number of different
devices, that needs different chips. Most V4L/DVB devices has an internal I2C
bus that gives the flexibility for the board manufacturers to add/replace the
internal components at the i2c bus. So, the Kernel uses abstraction layers that
allows that the same driver to use different internal components.
What the Kbuild system does is to autoselect, by default, all drivers that
might be needed, in order to support all variants. At runtime (if module), only
the drivers effectively needed will be loaded. Advanced users have the option
of manually select the needed drivers, if they are 100% sure of what their
device needs (generally, this is valuable only for embedded systems).
Cheers,
Mauro
next prev parent reply other threads:[~2008-05-06 19:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8287f540805041818g534c4e02qaadb0e749c5f3439@mail.gmail.com>
2008-05-03 19:38 ` Linux 2.6.26-rc1 Linus Torvalds
2008-05-03 21:47 ` Alistair John Strachan
2008-05-03 21:53 ` Alistair John Strachan
2008-05-04 12:30 ` Robin Holt
2008-05-04 13:56 ` Alistair John Strachan
2008-05-04 16:09 ` Robin Holt
2008-05-04 16:33 ` Alistair John Strachan
2008-05-05 21:04 ` Mauro Carvalho Chehab
2008-05-06 8:02 ` Alistair John Strachan
2008-05-06 10:31 ` Mauro Carvalho Chehab
2008-05-06 14:34 ` Stefan Richter
2008-05-06 14:54 ` Stefan Richter
2008-05-06 19:13 ` Mauro Carvalho Chehab [this message]
2008-05-06 19:44 ` Stefan Richter
2008-05-06 20:06 ` Mauro Carvalho Chehab
2008-05-06 20:47 ` Stefan Richter
2008-05-06 22:39 ` Mauro Carvalho Chehab
2008-05-06 23:36 ` Stefan Richter
2008-05-08 12:48 ` Mauro Carvalho Chehab
2008-05-08 14:11 ` Stefan Richter
2008-05-06 23:48 ` Stefan Richter
2008-05-04 7:29 ` [patch] sysfs: build fix Ingo Molnar
2008-05-04 18:40 ` Linux 2.6.26-rc1 Jan Engelhardt
2008-05-05 5:39 ` Andreas Mohr
2008-05-05 7:30 ` Ingo Molnar
2008-05-05 20:14 ` Mauro Carvalho Chehab
2008-05-06 13:07 ` Ingo Molnar
2008-05-07 8:35 ` Ingo Molnar
2008-05-05 23:51 ` Stephen Rothwell
2008-05-05 23:55 ` David Miller
2008-05-06 0:16 ` Andrew Morton
2008-05-06 5:57 ` Stephen Rothwell
2008-05-06 0:21 ` Ingo Molnar
2008-05-06 5:35 ` Stephen Rothwell
2008-05-06 6:56 ` David Miller
2008-05-06 7:26 ` Stephen Rothwell
2008-05-06 0:17 ` Ingo Molnar
2008-05-06 5:48 ` Stephen Rothwell
2008-05-06 6:07 ` Scheduling problems ? [ Was: Linux 2.6.26-rc1 ] J.A. Magallón
2008-05-06 13:11 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080506161346.183f367c@gaivota \
--to=mchehab@infradead.org \
--cc=alistair@devzero.co.uk \
--cc=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox