Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp400138rwd; Wed, 7 Jun 2023 01:14:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KLC67ZjiDwH+iNr6YjOSjYbAcNrfSst6xDmFW8K+WfNP8dUOxei0KIasa4PHo5cxzNyHw X-Received: by 2002:a05:6808:b1b:b0:39c:6a30:cc88 with SMTP id s27-20020a0568080b1b00b0039c6a30cc88mr795372oij.23.1686125688267; Wed, 07 Jun 2023 01:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686125688; cv=none; d=google.com; s=arc-20160816; b=rLIMp2tsNKqO8liixm9MzK+fYNfgZJ+C4mbFRiXG8qSrRS2DOsRwRaB10+gThRozFl iiJK/cFcxysIKAk7ePKTe1U7lAP5VUHvsO8+++UUubIdw0usewIGRNRZFb802UTCxRsu 5A0x0hWMrGFtfsKxnC4poVtvLEsIBYkMh1068vqe0U6EkwuV77Ew2fFguNnz3G4j8dWR Rx2xZQt/eVT3IeAQCW/J1CMxtp45o7y1SDcyoCCcgep5MdgvX/dNgKgP5rUU4b3ZnlAh mbrqXmM8kfo+m0e/xqoFABEFSaIR2/OE8azeobFQFKC40uiKUCLclB3Erv1RhdxeKKhh E8QA== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=EpmZTKaWWw13402NN6kMlDuj4fxukBdrJjpUbyXaRSE=; b=JMY5m+iaTri428SFpXLiUIi9YpZP2pRlCdX13rRXjaooYSK9tMaCUBJKpm1VMGsc1O ukddKtoN6HtFNeUB0OQGFnkbSdRdw8liFDbDeTEwVKjEJ4iS/nB4D1lSXSBCn+/qcGYZ 8E2pCjZ4ITFaL6JX+MMBH95WXeKEX7fm/CzTSf+zeyGmZ74L96rO6kWD+Am1DAKY27ng NDR/e/ElFqyeBzv4359WMqdAl3Pk8dxEEYWbYP4vpbwoUp2g6qaMTwMey34IofgrUIpQ 8unPv2Ailcid8vtYISh81M5lEqXhbEvdR+6lAdfwN37zbL4WSRqBmOJwSXKw0IWpOphz aqVA== 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 j22-20020a637a56000000b0053efcd20010si8702132pgn.423.2023.06.07.01.14.35; Wed, 07 Jun 2023 01:14:48 -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 S237510AbjFGHuD (ORCPT + 99 others); Wed, 7 Jun 2023 03:50:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239315AbjFGHtV (ORCPT ); Wed, 7 Jun 2023 03:49:21 -0400 X-Greylist: delayed 12360 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 07 Jun 2023 00:47:34 PDT Received: from cavan.codon.org.uk (cavan.codon.org.uk [176.126.240.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC8911712; Wed, 7 Jun 2023 00:47:33 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 897D242532; Wed, 7 Jun 2023 08:47:32 +0100 (BST) Date: Wed, 7 Jun 2023 08:47:32 +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: <20230607074732.GA31666@srcf.ucam.org> References: <20230607034331.576623-1-acelan.kao@canonical.com> <20230607042032.GA28835@srcf.ucam.org> <20230607052724.GA29834@srcf.ucam.org> <20230607062341.GA30618@srcf.ucam.org> <20230607065604.yaivqbbd3dkawxo4@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, 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 03:39:33PM +0800, AceLan Kao wrote: > What do you think if we unregister backlight devices if the backlight type > is larger than the current registered one. > Do this check in backlight_device_register() and unregister backlight > devices by the order raw(1) > platform(2) > firmware(3) > And maybe introduce a sticky bit into the backlight device if the backlight > driver doesn't want to be removed. Hans looked at doing this, but there were some awkward corner cases. When we first introduced this functionality, firmware was preferred to platform was preferred to raw - but on Intel, at least, this behaviour changed with later versions of Windows. I don't think there's a single static policy that works, I think you need to pay attention to the hints the platform gives you. How does Windows know which interface to use on this platform? The simplest solution may actually just be for dell-laptop to refuse to register a backlight if the platform claims to be Windows 8 or later.