Re: [PATCH 00/11] drm: Restore helper usability

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

 



On Mon, Apr 22, 2024, at 21:42, Masahiro Yamada wrote:
> On Tue, Apr 23, 2024 at 3:24 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> On Mon, Apr 22, 2024, at 18:58, Geert Uytterhoeven wrote:
>> > On Mon, Apr 22, 2024 at 3:55 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> >> On Mon, Apr 22, 2024, at 15:28, Jani Nikula wrote:
>>
>> I think hiding this would make it much harder to get anything
>> right. The symbols in question are almost all ones that should
>> be enabled in normal configs, and the 'make menuconfig' help
>> doesn't make it too hard to figure things out normally, we just
>> have to find a way to avoid regressions when converting things
>> to 'depends on' that used an incorrect 'select'.
>
> I am confused because you repeatedly discussed
> the missing I2C dependency.
>
>
> Are you talking about DRM drivers,
> or is it just "an example" in general?
>
>
>
> DRM selects I2C.

It's a prominent example because I2C ends up showing
up in most circular dependencies. I forgot that CONFIG_DRM
itself selects this one, but this is clearly part of the
overall problem:

$ git grep -w 'select I2C' | wc -l
35
$ git grep -w 'depends on I2C' | wc -l
1068

Attempting to clean up some of the incorrect 'select'
statements, such as changing DRM_NOUVEAU to 'depends on
ACPI_VIDEO' instead of 'select' tends to run into
another 'select I2C' such as this one:

drivers/i2c/Kconfig:8:	symbol I2C is selected by DRM_NOUVEAU
drivers/gpu/drm/nouveau/Kconfig:2:	symbol DRM_NOUVEAU depends on ACPI_VIDEO
drivers/acpi/Kconfig:214:	symbol ACPI_VIDEO depends on BACKLIGHT_CLASS_DEVICE
drivers/video/backlight/Kconfig:136:	symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT
drivers/video/fbdev/core/Kconfig:184:	symbol FB_BACKLIGHT is selected by HT16K33
drivers/auxdisplay/Kconfig:490:	symbol HT16K33 depends on I2C

Again, I2C was probably not the best example for an urgent problem
as it ends up being selected unconditionally anyway, but
I think ACPI_VIDEO and BACKLIGHT_CLASS_DEVICE are the ones that
we should stop selecting.

> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 5a0c476361c3..6984b3fea271 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -29,6 +29,8 @@ menuconfig DRM
>           details.  You should also select and configure AGP
>           (/dev/agpgart) support if it is available for your platform.
> 
> +if DRM
> +
>  config DRM_MIPI_DBI
>         tristate
>         depends on DRM
> @@ -414,3 +416,5 @@ config DRM_LIB_RANDOM
>  config DRM_PRIVACY_SCREEN
>         bool
>        default n
> +
> +endif

This is a probably good idea (aside from DRM_PANEL_ORIENTATION_QUIRKS,
which needs to be moved out of the section), but seems completely
unrelated to the issue of selecting too many symbols.

     Arnd





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux