Re: Kconfig DRM_USB/DRM_UDL, and select vs. depends, and causing Tegra USB to be disabled

2012-09-05 Thread Guenter Roeck
On Tue, Sep 04, 2012 at 01:19:12PM -0600, Stephen Warren wrote:
 With respect to the following commits:
 
 df0b344 drm/usb: select USB_SUPPORT in Kconfig
 8f057d7 gpu/mfd/usb: Fix USB randconfig problems
 
 ... which end up with the following in next-20120904:
 
 config DRM_USB
 depends on DRM
 depends on USB_ARCH_HAS_HCD
 select USB
 select USB_SUPPORT
 
 config DRM_UDL
 depends on DRM  EXPERIMENTAL
 depends on USB_ARCH_HAS_HCD
 select DRM_USB
 
 Surely this is backwards; these should be dependencies, not selects? In
 other words:
 
 config DRM_USB
 depends on DRM  USB
 
 config DRM_UDL
 depends on DRM  EXPERIMENTAL  USB
 select DRM_USB
 
 or perhaps:
 
 config DRM_USB
 depends on DRM  USB
 
 config DRM_UDL
 depends on DRM  EXPERIMENTAL  DRM_USB
 
 The problem here is that currently, the dependency logic for USB:
 
 config USB
   depends on USB_ARCH_HAS_HCD
 
 ... is duplicated into each of DRM_USB and DRM_UDL, thus requiring both
 of those to be edited should the dependencies for USB ever change.
 
This should be fixed with in https://patchwork.kernel.org/patch/1373371/ (drm:
udl: usb: Fix recursive Kconfig dependency), which should make it into the next
iteration of linux-next.

Guenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Kconfig DRM_USB/DRM_UDL, and select vs. depends, and causing Tegra USB to be disabled

2012-09-05 Thread Stephen Warren
With respect to the following commits:

df0b344 drm/usb: select USB_SUPPORT in Kconfig
8f057d7 gpu/mfd/usb: Fix USB randconfig problems

... which end up with the following in next-20120904:

config DRM_USB
depends on DRM
depends on USB_ARCH_HAS_HCD
select USB
select USB_SUPPORT

config DRM_UDL
depends on DRM  EXPERIMENTAL
depends on USB_ARCH_HAS_HCD
select DRM_USB

Surely this is backwards; these should be dependencies, not selects? In
other words:

config DRM_USB
depends on DRM  USB

config DRM_UDL
depends on DRM  EXPERIMENTAL  USB
select DRM_USB

or perhaps:

config DRM_USB
depends on DRM  USB

config DRM_UDL
depends on DRM  EXPERIMENTAL  DRM_USB

The problem here is that currently, the dependency logic for USB:

config USB
depends on USB_ARCH_HAS_HCD

... is duplicated into each of DRM_USB and DRM_UDL, thus requiring both
of those to be edited should the dependencies for USB ever change.

The current state of the code also causes some strange problem with
ARM's tegra_defconfig, whereby running make tegra_defconfig will
result in USB support fully enabled in .config as expected, yet
subsequently running make oldconfig will cause all USB support to be
removed from .config. For some reason, the above DRM logic is causing
CONFIG_USB_ARCH_HAS_HCD not to be selected (perhaps it isn't evaluated
because USB is selected, so there's no need to evaluate USB's
dependencies?). Arguably, this is a deficiency in Tegra's Kconfig, in
that it probably should say:

select USB_ARCH_HAS_EHCI

not:

select USB_ARCH_HAS_EHCI if USB_SUPPORT

... but it has contained the latter for quite some time, and it's always
worked before somehow.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: Kconfig DRM_USB/DRM_UDL, and select vs. depends, and causing Tegra USB to be disabled

2012-09-05 Thread Stephen Warren
On 09/04/2012 02:00 PM, Guenter Roeck wrote:
 On Tue, Sep 04, 2012 at 01:19:12PM -0600, Stephen Warren wrote:
 With respect to the following commits:

 df0b344 drm/usb: select USB_SUPPORT in Kconfig
 8f057d7 gpu/mfd/usb: Fix USB randconfig problems

 ... which end up with the following in next-20120904:

 config DRM_USB
 depends on DRM
 depends on USB_ARCH_HAS_HCD
 select USB
 select USB_SUPPORT

 config DRM_UDL
 depends on DRM  EXPERIMENTAL
 depends on USB_ARCH_HAS_HCD
 select DRM_USB

 Surely this is backwards; these should be dependencies, not selects? In
 other words:

 config DRM_USB
 depends on DRM  USB

 config DRM_UDL
 depends on DRM  EXPERIMENTAL  USB
 select DRM_USB

 or perhaps:

 config DRM_USB
 depends on DRM  USB

 config DRM_UDL
 depends on DRM  EXPERIMENTAL  DRM_USB

 The problem here is that currently, the dependency logic for USB:

 config USB
  depends on USB_ARCH_HAS_HCD

 ... is duplicated into each of DRM_USB and DRM_UDL, thus requiring both
 of those to be edited should the dependencies for USB ever change.

 This should be fixed with in https://patchwork.kernel.org/patch/1373371/ (drm:
 udl: usb: Fix recursive Kconfig dependency), which should make it into the 
 next
 iteration of linux-next.

Yes, this does appear to solve all the problems for me. Thanks.

I still tend to believe that drivers should probably depend on things
rather than select them, but given the common precedent for select USB
that exists here, others clearly don't agree!

Sorry; accidentally sent the email too early last time:-(
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Kconfig DRM_USB/DRM_UDL, and select vs. depends, and causing Tegra USB to be disabled

2012-09-04 Thread Stephen Warren
On 09/04/2012 02:00 PM, Guenter Roeck wrote:
> On Tue, Sep 04, 2012 at 01:19:12PM -0600, Stephen Warren wrote:
>> With respect to the following commits:
>>
>> df0b344 drm/usb: select USB_SUPPORT in Kconfig
>> 8f057d7 gpu/mfd/usb: Fix USB randconfig problems
>>
>> ... which end up with the following in next-20120904:
>>
>> config DRM_USB
>> depends on DRM
>> depends on USB_ARCH_HAS_HCD
>> select USB
>> select USB_SUPPORT
>>
>> config DRM_UDL
>> depends on DRM && EXPERIMENTAL
>> depends on USB_ARCH_HAS_HCD
>> select DRM_USB
>>
>> Surely this is backwards; these should be dependencies, not selects? In
>> other words:
>>
>> config DRM_USB
>> depends on DRM && USB
>>
>> config DRM_UDL
>> depends on DRM && EXPERIMENTAL && USB
>> select DRM_USB
>>
>> or perhaps:
>>
>> config DRM_USB
>> depends on DRM && USB
>>
>> config DRM_UDL
>> depends on DRM && EXPERIMENTAL && DRM_USB
>>
>> The problem here is that currently, the dependency logic for USB:
>>
>> config USB
>>  depends on USB_ARCH_HAS_HCD
>>
>> ... is duplicated into each of DRM_USB and DRM_UDL, thus requiring both
>> of those to be edited should the dependencies for USB ever change.
>
> This should be fixed with in https://patchwork.kernel.org/patch/1373371/ (drm:
> udl: usb: Fix recursive Kconfig dependency), which should make it into the 
> next
> iteration of linux-next.

Yes, this does appear to solve all the problems for me. Thanks.

I still tend to believe that drivers should probably depend on things
rather than select them, but given the common precedent for "select USB"
that exists here, others clearly don't agree!

Sorry; accidentally sent the email too early last time:-(


Kconfig DRM_USB/DRM_UDL, and select vs. depends, and causing Tegra USB to be disabled

2012-09-04 Thread Stephen Warren
With respect to the following commits:

df0b344 drm/usb: select USB_SUPPORT in Kconfig
8f057d7 gpu/mfd/usb: Fix USB randconfig problems

... which end up with the following in next-20120904:

config DRM_USB
depends on DRM
depends on USB_ARCH_HAS_HCD
select USB
select USB_SUPPORT

config DRM_UDL
depends on DRM && EXPERIMENTAL
depends on USB_ARCH_HAS_HCD
select DRM_USB

Surely this is backwards; these should be dependencies, not selects? In
other words:

config DRM_USB
depends on DRM && USB

config DRM_UDL
depends on DRM && EXPERIMENTAL && USB
select DRM_USB

or perhaps:

config DRM_USB
depends on DRM && USB

config DRM_UDL
depends on DRM && EXPERIMENTAL && DRM_USB

The problem here is that currently, the dependency logic for USB:

config USB
depends on USB_ARCH_HAS_HCD

... is duplicated into each of DRM_USB and DRM_UDL, thus requiring both
of those to be edited should the dependencies for USB ever change.

The current state of the code also causes some strange problem with
ARM's tegra_defconfig, whereby running "make tegra_defconfig" will
result in USB support fully enabled in .config as expected, yet
subsequently running "make oldconfig" will cause all USB support to be
removed from .config. For some reason, the above DRM logic is causing
CONFIG_USB_ARCH_HAS_HCD not to be selected (perhaps it isn't evaluated
because USB is selected, so there's no need to evaluate USB's
dependencies?). Arguably, this is a deficiency in Tegra's Kconfig, in
that it probably should say:

select USB_ARCH_HAS_EHCI

not:

select USB_ARCH_HAS_EHCI if USB_SUPPORT

... but it has contained the latter for quite some time, and it's always
worked before somehow.


Kconfig DRM_USB/DRM_UDL, and select vs. depends, and causing Tegra USB to be disabled

2012-09-04 Thread Guenter Roeck
On Tue, Sep 04, 2012 at 01:19:12PM -0600, Stephen Warren wrote:
> With respect to the following commits:
> 
> df0b344 drm/usb: select USB_SUPPORT in Kconfig
> 8f057d7 gpu/mfd/usb: Fix USB randconfig problems
> 
> ... which end up with the following in next-20120904:
> 
> config DRM_USB
> depends on DRM
> depends on USB_ARCH_HAS_HCD
> select USB
> select USB_SUPPORT
> 
> config DRM_UDL
> depends on DRM && EXPERIMENTAL
> depends on USB_ARCH_HAS_HCD
> select DRM_USB
> 
> Surely this is backwards; these should be dependencies, not selects? In
> other words:
> 
> config DRM_USB
> depends on DRM && USB
> 
> config DRM_UDL
> depends on DRM && EXPERIMENTAL && USB
> select DRM_USB
> 
> or perhaps:
> 
> config DRM_USB
> depends on DRM && USB
> 
> config DRM_UDL
> depends on DRM && EXPERIMENTAL && DRM_USB
> 
> The problem here is that currently, the dependency logic for USB:
> 
> config USB
>   depends on USB_ARCH_HAS_HCD
> 
> ... is duplicated into each of DRM_USB and DRM_UDL, thus requiring both
> of those to be edited should the dependencies for USB ever change.
> 
This should be fixed with in https://patchwork.kernel.org/patch/1373371/ (drm:
udl: usb: Fix recursive Kconfig dependency), which should make it into the next
iteration of linux-next.

Guenter