Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp302355rwd; Tue, 6 Jun 2023 23:33:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QmYDz8qDndPoX0QcL29b6pzi7p7JWm4hLzoUUwDFzpm9doDk4UCIlifyHvqHtxp69VFhC X-Received: by 2002:a17:90a:1996:b0:255:c061:9e5b with SMTP id 22-20020a17090a199600b00255c0619e5bmr4005303pji.37.1686119595488; Tue, 06 Jun 2023 23:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686119595; cv=none; d=google.com; s=arc-20160816; b=uLXHWGWkj9MLP8cix02q2hteRgwUarRagnREH2gRs9X/yGm+LJOToV67lcGc6YjoLn w8jS+nnuK6eANROsFYDoPC4ubrnyPFzw+paDcnnefVdWgrO3+G7r9Znl2J4o20eW1qrL U0QSRXVPY7k28prBcWoCMUAGm1H3w/bxmVsMsqEJylvrmiZafHOcH7Wn4spZAlDINJis rWrCaVCeYyvf06dLo5QMuSktHG5UWT0RayvoR6zjWO9FBWO+SudExmFWJkCfrmYlYK43 eH4dovYgs4nGUrxzCQvqeY2vBsTXa1TcQyMnsXRrvK1AtcG4kcBSsAJ1CeBWbMbAZ4dB sq4g== 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; bh=3CLSuPY0TJZrDT2oTjLdTWq5Uo2sY7z3PO8UzCt7fAE=; b=iQ48AgcJTv5XYd7qQW/KEW5WzNpLsiS+xhJQQAD/ghTIYu7u2YGnkRIzPjvtNU03wW cbp3MXgudsuGiEBzxrwx1Fp/ErvMjRhqqXWkrUflgyBGF2jlz2tTlylW+5EyMPclSBdO 9fsvA+eKNbAL5EZIUEUxNF2K8+afro8rjT8E7RQYG2lsBCcD8gss3Lklxuv3PTE6utb+ hNnua3VWZTCD0bAYLrGiqlACYyUVpsd9FPtowkmdezllh/ytZIZKyViDmKpQtgh2jbYD 8oMdH2Ju81cekIXdYC/UJaehcmo7GnIstgXWkZmHJjaO+7tUeQQ0JM9BTxW5GD+Fd12Y 3q2w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m26-20020a638c1a000000b0053ef061096esi8515015pgd.438.2023.06.06.23.33.01; Tue, 06 Jun 2023 23:33:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234729AbjFGGXq (ORCPT + 99 others); Wed, 7 Jun 2023 02:23:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbjFGGXo (ORCPT ); Wed, 7 Jun 2023 02:23:44 -0400 Received: from cavan.codon.org.uk (irc.codon.org.uk [IPv6:2a00:1098:84:22e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CE5AA; Tue, 6 Jun 2023 23:23:42 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 9167742455; Wed, 7 Jun 2023 07:23:41 +0100 (BST) Date: Wed, 7 Jun 2023 07:23:41 +0100 From: Matthew Garrett To: AceLan Kao Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , 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: <20230607062341.GA30618@srcf.ucam.org> References: <20230607034331.576623-1-acelan.kao@canonical.com> <20230607042032.GA28835@srcf.ucam.org> <20230607052724.GA29834@srcf.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,KHOP_HELO_FCRDNS,SPF_HELO_NEUTRAL, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no 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 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.