linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Wang Jinchao <wangjinchao@xfusion.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, stone.xulei@xfusion.com
Subject: Re: [PATCH] drm/i915: Fix Kconfig error for CONFIG_DRM_I915
Date: Mon, 14 Aug 2023 15:13:32 +0300	[thread overview]
Message-ID: <87h6p1ddoz.fsf@intel.com> (raw)
In-Reply-To: <ZNoY9bnpLlUwY8ai@fedora>

On Mon, 14 Aug 2023, Wang Jinchao <wangjinchao@xfusion.com> wrote:
> On Mon, Aug 14, 2023 at 10:26:45AM +0300, Jani Nikula wrote:
>> On Sat, 12 Aug 2023, Wang Jinchao <wangjinchao@xfusion.com> wrote:
>> > When CONFIG_DRM_I915 is set to 'y' and CONFIG_BACKLIGHT_CLASS_DEVICE
>> > is set to 'm', we encountered an ld.lld error during the build process:
>> >
>> > 	ld.lld: error: undefined symbol: backlight_device_get_by_name
>> > 	>>> referenced by intel_backlight.c:955
>> > 	>>>               vmlinux.o:(intel_backlight_device_register)
>> >
>> > 	ld.lld: error: undefined symbol: backlight_device_register
>> > 	>>> referenced by intel_backlight.c:971
>> > 	>>>               vmlinux.o:(intel_backlight_device_register)
>> >
>> > 	ld.lld: error: undefined symbol: backlight_device_unregister
>> > 	>>> referenced by intel_backlight.c:999
>> > 	>>>               vmlinux.o:(intel_backlight_device_unregister)
>> >
>> > This issue occurred because intel_backlight_device_register and
>> > intel_backlight_device_unregister were enclosed within
>> > However, according to Kconfig, CONFIG_DRM_I915 will select
>> > BACKLIGHT_CLASS_DEVICE only if ACPI is enabled.
>> > This led to an error, which can be resolved by removing the
>> > conditional statements related to ACPI.
>> 
>> The real fix is to use
>> 
>> 	depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n
> it works.
>> 
>> but in order to do that, you need to change a lot of places to depend
> Why, what are the other places?

Generally when you have a mixture of depends on and select on a kconfig
symbol, you'll eventually end up with dependency problems.

BR,
Jani.


>> on, not select BACKLIGHT_CLASS_DEVICE, because otherwise you end up with
> got it.
>> other dependency issues.
>> 
>> BR,
>> Jani.
>> 
>> >
>> > Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
>> > ---
>> >  drivers/gpu/drm/i915/Kconfig | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
>> > index 01b5a8272a27..5003de921bf7 100644
>> > --- a/drivers/gpu/drm/i915/Kconfig
>> > +++ b/drivers/gpu/drm/i915/Kconfig
>> > @@ -24,7 +24,7 @@ config DRM_I915
>> >  	select IRQ_WORK
>> >  	# i915 depends on ACPI_VIDEO when ACPI is enabled
>> >  	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
>> > -	select BACKLIGHT_CLASS_DEVICE if ACPI
>> > +	select BACKLIGHT_CLASS_DEVICE
>> >  	select INPUT if ACPI
>> >  	select X86_PLATFORM_DEVICES if ACPI
>> >  	select ACPI_WMI if ACPI
>> 
>> -- 
>> Jani Nikula, Intel Open Source Graphics Center

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-08-14 12:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  9:19 [PATCH] drm/i915: Fix Kconfig error for CONFIG_DRM_I915 Wang Jinchao
2023-08-12  9:39 ` [PATCH v2] " Wang Jinchao
2023-08-14  7:26 ` [PATCH] " Jani Nikula
2023-08-14 12:07   ` Wang Jinchao
2023-08-14 12:13     ` Jani Nikula [this message]
2023-08-14 13:07       ` Wang Jinchao
2023-08-15  1:27       ` Wang Jinchao

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=87h6p1ddoz.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=stone.xulei@xfusion.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    --cc=wangjinchao@xfusion.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).