Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7156991rwi; Mon, 24 Oct 2022 10:30:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7PbIG7qLjnTxcFSXXnIBXvia31VVjWwDtGTkMtBNNxkq8EqahsA6PEJJ1oXGF6AsNySnVI X-Received: by 2002:a17:907:2d2c:b0:78d:d289:7efd with SMTP id gs44-20020a1709072d2c00b0078dd2897efdmr28570497ejc.166.1666632644434; Mon, 24 Oct 2022 10:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666632644; cv=none; d=google.com; s=arc-20160816; b=s3G3dAamsrS6M4MPoUdJSn6jh8d9WV23vlyVPx2L62Yc8+/Uheqk6IeFGDr6qgOPsM HAuZqzduytvbjtQsUvpPBt8F1dwwdQQag4v8VDzSCm7Pomp6T6T5IKjl75Q6XIIQc9Oc D9t70oQi+bEsyCr5SOH/dpGbflSZ+EodEhqRDirbOsk47DMeHFcgMVVcTuZy2x+frS3X cx/vXQWqY4h6emqE6lsu2hdppxfyxCsBUzTDtivK3GyZByYzEhqIyJoyF6v5zYUv3uno JqjKv3IhV+MZB+sn34YLAyg+VRAwLdsGfIQzbuk//BVqPaosAwsfGUwfrCvKVENUB11/ n8yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=/9JNURUXQEdoailh8cSWsW1gqRLK/OiiBgpx3G6yCs4=; b=Up7xqwbEqqSfk9ppQlfwCQFVfTt8SdVEYtRB9C1qhv5tM/XF15MzebZ8ZxEZa7sXoI dIumrkZAx0cyO/xnNXhxm5kG4Ho7HPlz2y0NSkKgYizBnbHR4lLr/ercIvtO6Rsmufvd Muh/xTTFD2VIqWcZSA3Ti7opRE0zsCqEztLLBeJfLRdh17tLf+tZGhuvqnFlCp3rjQ/P Kq6QwkBuhJjZVZQ9qP4lAtBKVc6VyVM40eqg9nLZFhgM/3PUNYRMZDa9p3embnrEqzxS Rn65MEg+VCxg1M7ug7G69m6/tWuKL09a/GnUnB3Ic4c+exI2YZCElt1fspYRsrTkhPCp ZA/w== 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; 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 z13-20020a056402274d00b0045cfa0b1f46si425265edd.11.2022.10.24.10.30.17; Mon, 24 Oct 2022 10:30:44 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230474AbiJXRVF (ORCPT + 99 others); Mon, 24 Oct 2022 13:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230423AbiJXRUg (ORCPT ); Mon, 24 Oct 2022 13:20:36 -0400 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF618E09A8; Mon, 24 Oct 2022 08:55:29 -0700 (PDT) Received: by mail-qk1-f180.google.com with SMTP id s17so6286319qkj.12; Mon, 24 Oct 2022 08:55:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/9JNURUXQEdoailh8cSWsW1gqRLK/OiiBgpx3G6yCs4=; b=ESqwTw8fL4Z+rrOKFuq9eK/iFx0KQ0htWC7PLF2FyMCyTL7E8HqT41/aSRpawiM4fA ey06v2mJWG3I+17QoSrK3r1D2+eFYEcg9A0GZbJO7VSXBMzLd8fGs0XDZG9xatDtf2KS 6AoR6F4nkwW4LCNg0Q9VbSX/lQgL41BzOFsH0pL17IEpA1R1zrll/IxICi3m7gY/KzXF tNjwtrLMHCjufQOQDAH96B/nRqoJcALCujw/dPQEPTljjCatWX0DfvkynREUjqaVf2+J gxMXhLKfzKv0xX+DV7EDm/e/p8Ya3GSiRV8w1aJIdxUI5VsukSH0zaAVuusKbNMPRSh4 mmWQ== X-Gm-Message-State: ACrzQf0Wj+F3qTv44aDa7Y5FYI3Iy871hgJN4ch6wH321t3HXnZe41rM BQW5t0TFxlm+UbQmjJFF9LbvHEut5PJTrEA4TmQRetFx X-Received: by 2002:a05:620a:d89:b0:6cf:c98b:744c with SMTP id q9-20020a05620a0d8900b006cfc98b744cmr23009768qkl.443.1666622720212; Mon, 24 Oct 2022 07:45:20 -0700 (PDT) MIME-Version: 1.0 References: <20221024141210.67784-1-dmitry.osipenko@collabora.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Mon, 24 Oct 2022 16:45:09 +0200 Message-ID: Subject: Re: [PATCH v2] ACPI: video: Fix missing native backlight on Chromebooks To: Hans de Goede Cc: Dmitry Osipenko , "Rafael J. Wysocki" , Len Brown , Akihiko Odaki , Dmitry Torokhov , Sean Paul , kernel@collabora.com, linux-acpi@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 Mon, Oct 24, 2022 at 4:32 PM Hans de Goede wrote: > > Hi, > > On 10/24/22 16:12, Dmitry Osipenko wrote: > > Chromebooks don't have backlight in ACPI table, they suppose to use > > native backlight in this case. Check presence of the CrOS embedded > > controller ACPI device and prefer the native backlight if EC found. > > > > Suggested-by: Hans de Goede > > Fixes: 2600bfa3df99 ("ACPI: video: Add acpi_video_backlight_use_native() helper") > > Signed-off-by: Dmitry Osipenko > > --- > > > > Changelog: > > > > v2: - Added explanatory comment to the code and added check for the > > native backlight presence, like was requested by Hans de Goede. > > Thanks this version looks good to me: > > Reviewed-by: Hans de Goede > > Rafael, can you pick this up and send it in a fixes pull-req > for 6.1 to Linus? Or shall I pick this one up and include it > in my next pull-req? It would be better if you could pick this up IMV, so please free to add Acled-by: Rafael J. Wysocki to it. Thanks! > > > > drivers/acpi/video_detect.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c > > index 0d9064a9804c..9cd8797d12bb 100644 > > --- a/drivers/acpi/video_detect.c > > +++ b/drivers/acpi/video_detect.c > > @@ -668,6 +668,11 @@ static const struct dmi_system_id video_detect_dmi_table[] = { > > { }, > > }; > > > > +static bool google_cros_ec_present(void) > > +{ > > + return acpi_dev_found("GOOG0004"); > > +} > > + > > /* > > * Determine which type of backlight interface to use on this system, > > * First check cmdline, then dmi quirks, then do autodetect. > > @@ -730,6 +735,13 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native) > > return acpi_backlight_video; > > } > > > > + /* > > + * Chromebooks that don't have backlight handle in ACPI table > > + * are supposed to use native backlight if it's available. > > + */ > > + if (google_cros_ec_present() && native_available) > > + return acpi_backlight_native; > > + > > /* No ACPI video (old hw), use vendor specific fw methods. */ > > return acpi_backlight_vendor; > > } >