Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7442552rwi; Mon, 24 Oct 2022 14:53:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4tLiWxcSZZH7CgZJ+eZjU6ijzxA1TOlrH6qHEai0bDKiiBVwhr8Hl4K6DVeQY4iQjkay69 X-Received: by 2002:a17:903:2c7:b0:186:9862:d16c with SMTP id s7-20020a17090302c700b001869862d16cmr11499927plk.133.1666648427847; Mon, 24 Oct 2022 14:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666648427; cv=none; d=google.com; s=arc-20160816; b=t5glkFG0OX45nDR//145btH4rVE0EF4FRNDcCPFm+nnBUCLnOa1UiXMnhwucW797kt 2VEMMrfGesal+k1obLdJ/4LSI626CMsa5moURI4aYcfGRIsKODvNphfoPMT7DVGnTTFt wMfR6596ZOAJob6Oc0N62pmeuJKZKW+8Xe9VQFsRryqsBUeKEdmu8J6T5kms+SrQQFge OGfORByxBvYpKf4lG5h7X2Mjg6eYjIbRbwEbiqgiK+GKIUBDWqEOhVRD0+glrjoHlZ/U Xme92WhV/6w3zCl+1v0S8z/KlYOuBz4RKZeON4UVSu1DSAMTpx/23EL3MUedX25OP3IB ifdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=LLng6C1VOPaKmGfnDAR23yy9IW4xWqG/nhRblDLerDI=; b=b7HsUVBY7hNJ9h6DhvA4Otyk+AMw7lSp+SLxhMNRhJg33ErOPc6YQrut9FwlSWcqgr JPdxqqb0B3g/EKPRBrxgvymUK1RglfCJt0nVAReH3UKHF3OBJzloLZh1YMUJ9YbDREtR GjLxOHe3VtzPtRIPZnbR4W6pBS9IDFZoFLdeYLz9DVpwfk+K+3QQlrgl6yB2DiNxb6Gq 69Femn/RZKpkoWo2t/SqMkW9n1p/IuP2jWOr7RJ7+NfgAe/9lOFaTNdGm+LsMEEePOLJ wsJTb1Zpe1kw9t18gP4GcYcxgAQ/jyRFITWuaVGFfFse/NVOaqHkVWNeqlRLx8ub/M4M 5U9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fOO3Md+m; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a170902e5cc00b0017a8a84a3b6si877610plf.106.2022.10.24.14.53.36; Mon, 24 Oct 2022 14:53:47 -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=@redhat.com header.s=mimecast20190719 header.b=fOO3Md+m; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232726AbiJXVci (ORCPT + 99 others); Mon, 24 Oct 2022 17:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231310AbiJXVcV (ORCPT ); Mon, 24 Oct 2022 17:32:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69BF6222B4 for ; Mon, 24 Oct 2022 12:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666640221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LLng6C1VOPaKmGfnDAR23yy9IW4xWqG/nhRblDLerDI=; b=fOO3Md+mXz7g6usNP8JWnCAKnv1prlE4wirexj5TBw4GO29mq6izyG6tIvDgLFb3Bl1BiN TTJ2RG0Nh4IvT+BreOHePbp86wzAarOUB1/1RLiGhckTw0MlJcRjrRyEWH1X06cgL/qpeV 6105gURbTI0wfgqG5voo8WLKualV78o= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-217-a_deUAYLOp-7fR2Cl2Kzzg-1; Mon, 24 Oct 2022 11:12:52 -0400 X-MC-Unique: a_deUAYLOp-7fR2Cl2Kzzg-1 Received: by mail-ed1-f70.google.com with SMTP id y14-20020a056402440e00b0044301c7ccd9so9966186eda.19 for ; Mon, 24 Oct 2022 08:12:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LLng6C1VOPaKmGfnDAR23yy9IW4xWqG/nhRblDLerDI=; b=RvXmw5D3enEC/gNauv89x3HBfjdM83pcLtNFqkQI5KyCSplbhkoZ8WLrrgCR9i6L3h itgyi7xq7aYtJCjmtE4TDTWqXrQ6ETMolk7ej3Sav6SVZOfamFDW0IOm61P6C1b5d++H Avd1qcWz6M2ioO0urYA/K+zr4OiUkXLdI1d5/vV+ZVES1EstVggUcensAMnjKP/E1yHC IrM9/4FrV9EHfRxS0RZxPxjEj9kQfVyLgjOhklFR25FI+/mus3DmZJl/Pz/yYN5vW66q aJjn/vibn+5jilop0ytXidIkzlzKwu7NsJwECmrnZxImgksSXSJb1rOBf+K2IdApa+4+ ZDag== X-Gm-Message-State: ACrzQf2MKcHb55cseF1GbPpxEbU1B9b6fTtnWNU8PkdkCddThSxNzROd TBLKA9ehLSPnRxPO3VPhPwTEa3yFTlOyj9jok3T5+xTH03MWfLqEOyNT6FXTEWigehvxvze5jhU cYS5NOY2vsFoF2Q/57h53N0Kd X-Received: by 2002:a17:907:7f05:b0:78d:e869:f2fe with SMTP id qf5-20020a1709077f0500b0078de869f2femr26654466ejc.684.1666624370478; Mon, 24 Oct 2022 08:12:50 -0700 (PDT) X-Received: by 2002:a17:907:7f05:b0:78d:e869:f2fe with SMTP id qf5-20020a1709077f0500b0078de869f2femr26654446ejc.684.1666624370217; Mon, 24 Oct 2022 08:12:50 -0700 (PDT) Received: from [10.40.98.142] ([78.108.130.194]) by smtp.gmail.com with ESMTPSA id 12-20020a170906318c00b00770812e2394sm15742436ejy.160.2022.10.24.08.12.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 08:12:49 -0700 (PDT) Message-ID: Date: Mon, 24 Oct 2022 17:12:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v2] ACPI: video: Fix missing native backlight on Chromebooks Content-Language: en-US To: "Rafael J. Wysocki" Cc: Dmitry Osipenko , 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 References: <20221024141210.67784-1-dmitry.osipenko@collabora.com> From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Hi, On 10/24/22 16:45, Rafael J. Wysocki wrote: > 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 Ok, I've merged this now and I'll send out fixes pull-req with this to Linus before coming Friday. Dmitry, Thank you for your patch, I've applied this patch to my fixes branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes Regards, Hans > > 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; >>> } >> >