Re: [build bug, 2.6.24-rc1] CONFIG_VIDEO_DEV=m & CONFIG_VIDEO_SAA7146_VV=y

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Oct 2007, Ingo Molnar wrote:


* Randy Dunlap <[email protected]> wrote:

config VIDEO_SAA7146_VV
	tristate
	depends on VIDEO_DEV = y || VIDEO_DEV = VIDEO_SAA7146_VV
	select VIDEOBUF_DMA_SG
	select VIDEO_SAA7146

(untested)

Nope, won't work.  I tried that last night.  VIDEO_DEV_SAA7146_VV
has too many "select"s involved, but select doesn't follow the dependency
chains.  IOW, as written in Documentation/kbuild/kconfig-language.txt:

	select is evil.... select will by brute force set a symbol
	equal to 'y' without visiting the dependencies. So abusing
	select you are able to select a symbol FOO even if FOO depends
	on BAR that is not set.

so ... what should we do? Remove those ~7 select VIDEO_SAA7146_VV lines
and replace them with depends on VIDEO_SAA7146_VV ?

If select is not following the dependency chains, This would mean that we may need to rewrite also on other parts of /drivers/media Kconfig files that may be suffering the same kind of trouble.

There are several places where a similar logic is used, to select modules that are present only on some configurations.

For example, by default, bttv module selects all possible audio TV decoders that can be needed by a bttv device (msp34xx, tvaudio, tda7432, ...). Just one audio decoder is needed for a specific bttv hardware. So, there's also an option to manually select just the needed drivers.

The actual logic is:

menu "Encoders/decoders and other helper chips"
        depends on !VIDEO_HELPER_CHIPS_AUTO

config VIDEO_TVAUDIO
        tristate "Simple audio decoder chips"
        depends on VIDEO_V4L1 && I2C
...
endmenu

config VIDEO_BT848
        tristate "BT848 Video For Linux"
        depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L1
        select I2C_ALGOBIT
        select FW_LOADER
        select VIDEO_BTCX
        select VIDEOBUF_DMA_SG
        select VIDEO_IR
        select VIDEO_TUNER
        select VIDEO_TVEEPROM
        select VIDEO_MSP3400 if VIDEO_HELPER_CHIPS_AUTO
        select VIDEO_TVAUDIO if VIDEO_HELPER_CHIPS_AUTO
        select VIDEO_TDA7432 if VIDEO_HELPER_CHIPS_AUTO
        select VIDEO_TDA9875 if VIDEO_HELPER_CHIPS_AUTO

Also, the same audio decoders can be used by other devices. For example, msp34xx is used also with pvrusb2 and several em28xx devices.

So, converting this to "depend on" won't be trivial, since there's no direct dependency of a bridge driver (cx88, bttv, pvrusb2) and an auxiliary i2c device (msp34xx, tvaudio, ir, ...).

There's something weird, though. The select does the proper thing for tuners. Why is it failing for SAA7146_VV?

--
Cheers,
Mauro
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux