Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp352608rwd; Wed, 7 Jun 2023 00:25:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CnxWOAYGRiMI2sANZ3Yl1zjPpgTEjQsJd6Mi/QHO4ZxDD3q+AG+5Bk39b11DzFhm7xp4P X-Received: by 2002:ad4:5e8b:0:b0:626:24aa:87ef with SMTP id jl11-20020ad45e8b000000b0062624aa87efmr2445292qvb.62.1686122736062; Wed, 07 Jun 2023 00:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686122736; cv=none; d=google.com; s=arc-20160816; b=pOeOc84KiEmTXABJ5G1bFg2+PfK6R7NbiGSoOfCqW5Z+Ujzp7J9dW4l2bqpR39jV/2 eAwbbAN4n3pDGVNmgKTuSIBL89U4YHP+8bLd4utbcovw4/guRUB2RS8njD8x3GMAtG79 k0+JbBvv4q5DYjCWfdEfwh2MoP3018AmMpXAKPdHmp+t9pj4sGolFEsCJMSlQ9r3dHWM LsuBMyMxoNVkAPLpRjQCrE7tycejFoTa7E3/tpWRCIB4/kqE9p0ICZX3HpPq0A2w+Men NdYQGKW1t5fLA6J4odBu0cbOn6vshMySd3Dsh8AN0uyhzcqqy7zimPIMAgYHSEIy4cnC dbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=e1fl/mDRS6D0R77hB8AkKeI25tSGpIEU8dQOt59izLI=; b=F0hit6AnJvnviVRHNTj91VY6cfuVRZzT6CVN4d7iHUi9TX8quTjDS+q1J3BZKqN1aM x+eCYIsmwud/Uq4dvJuDXcrTHbYKJ4xabOmUrDXhYLPI1yq5vUbDLHCX6R9QCFFvIbfr nyaHewBnib87XKyfZAF5z3W0jARvwDp3CMya2rYfVj6+xVwzK6oQjtHFk/ivC8DQv9kZ mjdPTJyKN0lbcuLyrPpBa6pLeiZbJkOAXIS1ftqY1At6CqudwcIKDlKLlULCZ1PJNaNF ab17Lq5EBiU5iEHo44C/nTFK99KadJTHlYTSjW0Fi8raipe753IuWeRFtV83MnGVepZJ TVZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BDEk6rrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ju4-20020a170903428400b001b241f8a865si1564867plb.117.2023.06.07.00.25.20; Wed, 07 Jun 2023 00:25:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BDEk6rrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235322AbjFGG4U (ORCPT + 99 others); Wed, 7 Jun 2023 02:56:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237478AbjFGG4T (ORCPT ); Wed, 7 Jun 2023 02:56:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D5C1BC3; Tue, 6 Jun 2023 23:56:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7176D63B19; Wed, 7 Jun 2023 06:56:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A50E0C433EF; Wed, 7 Jun 2023 06:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686120967; bh=kxTWU5cvbYPXD97OfkZe5ZmWUKr+C21Zw9jRkJYbsMY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BDEk6rrM+92tjnJUIo7PJ6PVQsXMHm1goz4upfVYo17T9b4OBgbYwWBKZ8MpADWpS k34PbyoX2LXa5/BTSYCNa6XjLggLCYt9BFWVwkyXIr9DoEBug2nz7vGKcGgA3TII9w D64O22jrrQGHK02YQphKJdoMXRS9fvr7fkheX4XtQG+P1gortbckgLeUyVSg34AcGe V17l7nwTuMnhS6/GHMnKDb5oSHFQlHuNrGyJEvWkkFJZ2Q4KcWg491YMpxtykiXsGM AcM5AktF0GA+mm1dL12KMYjfkgnSA5WMSqsCIdJTiKd+rrRAQ8yfgvzPKUsw47vYyR +M58T5kpKH1Iw== Received: by pali.im (Postfix) id A1989759; Wed, 7 Jun 2023 08:56:04 +0200 (CEST) Date: Wed, 7 Jun 2023 08:56:04 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Matthew Garrett Cc: AceLan Kao , Hans de Goede , Mark Gross , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: Re: [PATCH] platform/x86: dell-laptop: Add drm module soft dependency Message-ID: <20230607065604.yaivqbbd3dkawxo4@pali> References: <20230607034331.576623-1-acelan.kao@canonical.com> <20230607042032.GA28835@srcf.ucam.org> <20230607052724.GA29834@srcf.ucam.org> <20230607062341.GA30618@srcf.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230607062341.GA30618@srcf.ucam.org> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 07 June 2023 07:23:41 Matthew Garrett wrote: > On Wed, Jun 07, 2023 at 02:13:31PM +0800, AceLan Kao wrote: > > Matthew Garrett 於 2023年6月7日 週三 下午1:27寫道: > > > > > > On Wed, Jun 07, 2023 at 01:19:40PM +0800, AceLan Kao wrote: > > > > Gfx drivers(i915/amdgpu/nvidia) depend on the drm driver, so delaying > > > > the loading of dell_laptop after drm can ease the issue the most. > > > > Right, it's still possible to encounter the issue, unfortunately, we > > > > do not have a better solution for it at the moment. > > > > > > We could unregister inappropriate backlight drivers when a more > > > appropriate one is loaded, or the policy decision around which driver to > > > use could be made in userland? > > It's hard to decide which backlight driver is redundant, and it's kind of ugly > > to unregister the backlight driver which is registered by other driver and maybe > > problematic. > > But you're relying on registering the working backlight first, which is > an inherently racy thing? We shouldn't be relying on order of > initialisation to make this work, either we should only export a working > interface or we should expose enough information for whatever is using > the interfaces to make an appropriate policy decision itself. IIRC, drm drivers unregister redundant fbcon drivers (vesafb), so cannot drm drivers use similar strategy also for backlight drivers and unregister the redundant? If every backlight driver would have some "flag" which say if it should be unregistered by drm then maybe it could work? Or are there some other pitfalls?