From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B98CB1C5F03 for ; Wed, 11 Dec 2024 08:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733904072; cv=none; b=L/DCTvkUc8P7o3LiywBSQp4wQ0AVZ+fwJ2f4uCzhNgfvTduJaofSMs6A4g2L4iwMaghP9U4AgvXJWF2ksDLPBaItYRe3blQyHH7gKC5beLwyaSNQHiYBXJFsq476yahazzWhSnRzIqfgSjrvkpNTLeCKKZU6lj90NHJhrRITa2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733904072; c=relaxed/simple; bh=0vRIXiBcCKNQvSXS9ocTW33BeE6y07+9M5ovs/D8lMU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hLLTwC9SeHGzXyGEAzdarnBexeSi+gKZcX4YW1QarTCO98OwNla86/HTgSAgoOlYRN60i05ZAj9YnZ7VXqmPRM3oj6ld7Dh0jzXiawBUsT+5iA6GEPog3yfBGF7bE+UAwkxU1+JZBPUOFKVt+7bmYOBF7+di0EDhB04pnnipEP4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DE0952115D; Wed, 11 Dec 2024 08:01:07 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 926DC13983; Wed, 11 Dec 2024 08:01:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id zT5tIsNGWWePLwAAD6G6ig (envelope-from ); Wed, 11 Dec 2024 08:01:07 +0000 Message-ID: <16c09ca8-aa73-4fc2-b693-0bfcc8dcac6d@suse.de> Date: Wed, 11 Dec 2024 09:01:07 +0100 Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE To: Helge Deller , javierm@redhat.com, arnd@arndb.de, simona@ffwll.ch, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linuxppc-dev@lists.ozlabs.org References: <20241210142329.660801-1-tzimmermann@suse.de> <20241210142329.660801-2-tzimmermann@suse.de> <6b543ccd-23dd-474d-9828-1eb0ecec9c5d@gmx.de> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3W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K2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r12+lqdsA EQEAAcLAdgQYAQgAIAIbDBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftOH6AAoJEGgNwR1T C3ojVSkIALpAPkIJPQoURPb1VWjh34l0HlglmYHvZszJWTXYwavHR8+k6Baa6H7ufXNQtThR yIxJrQLW6rV5lm7TjhffEhxVCn37+cg0zZ3j7zIsSS0rx/aMwi6VhFJA5hfn3T0TtrijKP4A SAQO9xD1Zk9/61JWk8OysuIh7MXkl0fxbRKWE93XeQBhIJHQfnc+YBLprdnxR446Sh8Wn/2D Ya8cavuWf2zrB6cZurs048xe0UbSW5AOSo4V9M0jzYI4nZqTmPxYyXbm30Kvmz0rYVRaitYJ 4kyYYMhuULvrJDMjZRvaNe52tkKAvMevcGdt38H4KSVXAylqyQOW5zvPc4/sq9c= In-Reply-To: <6b543ccd-23dd-474d-9828-1eb0ecec9c5d@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Spam-Flag: NO X-Rspamd-Queue-Id: DE0952115D X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org Hi Am 11.12.24 um 00:37 schrieb Helge Deller: > On 12/10/24 16:41, Thomas Zimmermann wrote: >> Hi >> >> >> Am 10.12.24 um 15:34 schrieb Helge Deller: >>> On 12/10/24 15:29, Helge Deller wrote: >>>> On 12/10/24 15:09, Thomas Zimmermann wrote: >>>>> diff --git a/drivers/staging/fbtft/Kconfig >>>>> b/drivers/staging/fbtft/Kconfig >>>>> index 77ab44362f16..577e91ff7bf6 100644 >>>>> --- a/drivers/staging/fbtft/Kconfig >>>>> +++ b/drivers/staging/fbtft/Kconfig >>>>> @@ -3,6 +3,7 @@ menuconfig FB_TFT >>>>>       tristate "Support for small TFT LCD display modules" >>>>>       depends on FB && SPI >>>>>       depends on FB_DEVICE >>>>> +    depends on BACKLIGHT_DEVICE_CLASS >>>> >>>> Typo. Should be BACKLIGHT_CLASS_DEVICE... >> >> Ah, thanks. I'll better check the rest of the series for similar >> mistakes. >> >>> >>> Beside the typo: >>> In this case, doesn't it make sense to "select >>> BACKLIGHT_DEVICE_CLASS" instead? >> >> That causes the dependency error mentioned in the commit message. >> This time it's just for fbtft instead of shmobilefb. >> >>> If people want the fbtft, backlight support should be enabled too. >> >> As a user-visible option, it should not be auto-selected >> unnecessarily. > > Right, it should not be auto-selected. > Unless if fbtft really needs it enabled to function. > IMHO all fb/drm drivers have higher priority than some low-level > background backlight controller code. By that logic, we'd list always list all drivers and each driver would auso-select the subsystems it requires. So each fbdev driver would select CONFIG_FB. That's not how it works, of course. Instead, each subsystem is user-selected and Kconfig offers the drivers that have their dependencies met. The documentation for Kconfig clearly states that select should be used carefully. [1] [1] https://elixir.bootlin.com/linux/v6.12.4/source/Documentation/kbuild/kconfig-language.rst#L137 > >> The DRM panel drivers already depend on the backlight >> instead of selecting it. It's the correct approach. > > Sounds wrong IMHO. Generally, it's the right approach. I guess what could be done is to make backlight support optional in the driver code, and use the imply attribute [2] instead of depends. So the driver would indicate a preference for backlight support, but still work without. That could also be done for the fbdev drivers, of course. [2] https://elixir.bootlin.com/linux/v6.12.4/source/Documentation/kbuild/kconfig-language.rst#L163 Best regards Thomas > >> As I mentioned >> in the cover letter, the few remaining driver that select it should >> probably be updated. > > That dependency sounds weird, but maybe I simply misunderstand your > logic...? > > As a Linux end user I usually know which graphic cards are in my machine > and which ones I want to enable. > But as a normal user I think I shouldn't be expected to know > that I first need to enable the "backlight class device" > so that I'm then able to afterwards enable the fbtft (or any other > drm/fb driver). > > Am I wrong? > > Helge -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)