From: Darren Hart <dvhart@infradead.org>
To: Jani Nikula <jani.nikula@intel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
linux-fbdev@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
Daniel Drake <dsd@laptop.org>,
Jens Frederich <jfrederich@gmail.com>,
David Airlie <airlied@linux.ie>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jon Nettleton <jon.nettleton@gmail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
platform-driver-x86@vger.kernel.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Daniel Vetter <daniel.vetter@intel.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] drivers: depend on instead of select BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO
Date: Tue, 21 Oct 2014 13:50:07 -0700 [thread overview]
Message-ID: <20141021205006.GC20951@vmdeb7> (raw)
In-Reply-To: <1413580403-16225-1-git-send-email-jani.nikula@intel.com>
On Sat, Oct 18, 2014 at 12:13:23AM +0300, Jani Nikula wrote:
> Documentation/kbuild/kconfig-language.txt warns to use select with care,
> and in general use select only for non-visible symbols and for symbols
> with no dependencies, because select will force a symbol to a value
> without visiting the dependencies.
>
> Select has become particularly problematic, interdependently, with the
> BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO configs. For example:
>
> scripts/kconfig/conf --randconfig Kconfig
> KCONFIG_SEED=0x48312B00
> warning: (DRM_RADEON && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 &&
> DRM_SHMOBILE && DRM_TILCDC && FB_BACKLIGHT && FB_MX3 && USB_APPLEDISPLAY
> && FB_OLPC_DCON && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI &&
> EEEPC_LAPTOP && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE
> which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)
> warning: (DRM_RADEON && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 &&
> DRM_SHMOBILE && DRM_TILCDC && FB_BACKLIGHT && FB_MX3 && USB_APPLEDISPLAY
> && FB_OLPC_DCON && ASUS_LAPTOP && SONY_LAPTOP && THINKPAD_ACPI &&
> EEEPC_LAPTOP && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE
> which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)
>
> With tristates it's possible to end up selecting FOO=y depending on
> BAR=m in the config, which gets discovered at build time, not config
> time, like reported in the thread referenced below.
>
> Do the following to fix the dependencies:
>
> * Depend on instead of select BACKLIGHT_CLASS_DEVICE everywhere. Drop
> select BACKLIGHT_LCD_SUPPORT in such cases, as it's a dependency of
> BACKLIGHT_CLASS_DEVICE.
>
> * Remove config FB_BACKLIGHT altogether, and replace it with a
> dependency on BACKLIGHT_CLASS_DEVICE. All configs selecting
> FB_BACKLIGHT select or depend on FB anyway, so we can simplify.
>
> * Depend on (ACPI && ACPI_VIDEO) || ACPI=n in several places instead of
> selecting ACPI_VIDEO and a number of its dependencies if ACPI is
> enabled. This is tied to backlight, as ACPI_VIDEO depends on
> BACKLIGHT_CLASS_DEVICE.
>
> * Replace a couple of select INPUT/VT with depends as it seemed to be
> necessary.
>
> Reference: http://lkml.kernel.org/r/CA+r1ZhhmT4DrWtf6MbRQo5EqXwx+LxCqh15Vsu_d9WpftLhnxw@mail.gmail.com
> Reported-by: Jim Davis <jim.epost@gmail.com>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Jens Frederich <jfrederich@gmail.com>
> Cc: Daniel Drake <dsd@laptop.org>
> Cc: Jon Nettleton <jon.nettleton@gmail.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
As for the drivers/platform/x86/Kconfig:
Acked-by: Darren Hart <dvhart@linux.intel.com>
Thanks,
--
Darren Hart
Intel Open Source Technology Center
next prev parent reply other threads:[~2014-10-21 20:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 21:13 [PATCH] drivers: depend on instead of select BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO Jani Nikula
2014-10-21 20:50 ` Darren Hart [this message]
2014-10-22 8:02 ` Tomi Valkeinen
2014-10-23 8:10 ` Daniel Vetter
2014-10-23 11:38 ` Tomi Valkeinen
2014-10-27 11:59 ` Jani Nikula
2014-10-27 13:13 ` Tomi Valkeinen
2014-10-28 20:29 ` Randy Dunlap
2014-10-29 3:04 ` Michael Ellerman
2014-10-29 7:54 ` Jani Nikula
2014-10-29 8:27 ` Michael Ellerman
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=20141021205006.GC20951@vmdeb7 \
--to=dvhart@infradead.org \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=dsd@laptop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jani.nikula@intel.com \
--cc=jfrederich@gmail.com \
--cc=jon.nettleton@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=plagnioj@jcrosoft.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=tomi.valkeinen@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).