From patchwork Mon Oct 24 11:34:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 593 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp404849wru; Mon, 24 Oct 2022 04:55:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5swtzHt58w2ETruhP1XC7h9mreIHxgfbn6YNNTTe9Y09o/0M82X9QnRsa7hJZPqlNLnVK/ X-Received: by 2002:a17:90a:cc7:b0:200:3b3e:4e00 with SMTP id 7-20020a17090a0cc700b002003b3e4e00mr73048184pjt.201.1666612550464; Mon, 24 Oct 2022 04:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666612550; cv=none; d=google.com; s=arc-20160816; b=XCMPJ8am5tsRWhwaAX0xuMcKSMBIGzKHVoHz/JR9+uNL/xe14t+MHXRQRi+rkMjtUm embwYYvo3wcGj4QLp9reEMp9gPqobSocDart7Q5mANQdvMp+s9yMwbyg0bTxyLeebUV3 LbP6x8vfC7EKknDo4gryoklwkfQI4yOD21iyYFyv2hpQWMBmtrqUw+BFT3ymbFR4Hg/h pDl9UiVGEgCA1mAiMuRKtDZasjxy30H+0hYMphdXmqEqSReVQAabBTNnK0/7Iq4Y8e2D ieUvhEUfM/zNqSarbnvWkir5p7lcV4XXvCqz6bvBgjgNjoLcCJKrEK68OTW5YaGkUxKX 6fnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=zcdfaNsoIuuSNF9XByhbeUp3KpNdfCPWzGZ8aF5nLxA=; b=rBVr4eiwfEh1eWMLOBvrU4rFyQ78BKIV9DNmPBCDgPdpsZg3HOYq+C4FdJ+y0N9eD+ x254gMSNzjuVK5db5DDKelyBzu7/m5N7bpKbC6BSS4mchi3wCc2v86DPNFLz4p0GyNfG cwF6kWjn0PTL/ERC2wLDSpkNCRQd/+0IZuGoNDxesr+Hr3WQtt1I1sgAa7F1O8GMjNC4 UOY6HDecBgNNu1ZSecjvLDKTAQuHi2eB3b2rJ65XFc5XdHyYZHPX0Aeh0v/fybANGwxQ J1u5IKJdNmgZE/Ik9j6yhflraj7LnyFdycHi0pnzGpnjw1FKNXN+ktlSo1Eu+fCNeYw+ SFqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b="A/SaFlQi"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a170902900700b0017c887295fbsi30724451plp.420.2022.10.24.04.55.37; Mon, 24 Oct 2022 04:55:50 -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=fail header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b="A/SaFlQi"; 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 S232067AbiJXLz0 (ORCPT + 99 others); Mon, 24 Oct 2022 07:55:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232233AbiJXLyK (ORCPT ); Mon, 24 Oct 2022 07:54:10 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B95AB4C2C9 for ; Mon, 24 Oct 2022 04:45:08 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id e129so8452088pgc.9 for ; Mon, 24 Oct 2022 04:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zcdfaNsoIuuSNF9XByhbeUp3KpNdfCPWzGZ8aF5nLxA=; b=A/SaFlQiUebp/U4yUjESResGqrVwntBISSfqBzWDzKJibVbtIVr9UUfU6mxLj07U3t BF1P1ziYSaSoZu2hLeXkqtIzAlvAh0MFneC+wQBMWmi0FH1LXXFBqHadJUpo8KeJTncO UfWe0DIEAPCTW/sCTy15HwE2CBjAb+Rx1eEUSB+NNH260sZc5OtfAVjOXussqn3KA347 PpO/tyEscshRJ9N6nCBeacKW6fv3Tw1lcWUes4Zil4fK5WzarbbrLQTA4j7+JXjg1OB5 Nl7VXtFCfuFWoaeikVJ/SxvLnxREoubYa0ceNbAiLW7yzBhF70OMrb+09Y3IJKqA+AuT 576g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zcdfaNsoIuuSNF9XByhbeUp3KpNdfCPWzGZ8aF5nLxA=; b=UMwFockpIfsDFAoI37kkxrNKgQX93+luI2LNtPnCnQkpJFq5hHy6u0JxfZIMon/9SK m11Kf6Tk9dbaSPg57XpGMjKcAag//yhym80/5MZ62xkpRNi7VqfjeCwQVsb/PUzrpFUC lvD5VQn+jIOV4esiqBFkYdcp2Zpp1vPQ0q9vWIoCGgZ7S4EbNm4USQ6jYzIop+8za4R9 x8e+TdrSnDCR2N66yR0dE4yTkjD0WPZ5gK/f2oQenl4AV8k4oprNEolNlVsJ+HzZ21Oq 7SuH0pKrz+t0eMKt7Ben8S4TwJYynwpO8ftXe349tRLw3oExLCkYpzbS2e7alzwkuNMA 3DKw== X-Gm-Message-State: ACrzQf0MpbNyYGEdb7C6sGpz5TjLsAcEO7ASEWkHSOUiiP6JWo0MHz5z swfZJOV6MFCBH8ctM6BEpkl86XdhlsqEzzFq X-Received: by 2002:a63:2345:0:b0:463:7c74:73b with SMTP id u5-20020a632345000000b004637c74073bmr28176901pgm.39.1666611341111; Mon, 24 Oct 2022 04:35:41 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id b8-20020a170903228800b001830ed575c3sm19475075plh.117.2022.10.24.04.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:35:40 -0700 (PDT) From: Akihiko Odaki Cc: David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jonathan Corbet , "Rafael J. Wysocki" , Len Brown , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , "Lee, Chun-Yi" , Hans de Goede , Mark Gross , Corentin Chary , Cezary Jackiewicz , Matthew Garrett , =?utf-8?q?Pali_Roh=C3=A1r?= , Jonathan Woithe , Ike Panhc , Daniel Dadap , Kenneth Chan , Mattia Dongili , Henrique de Moraes Holschuh , Azael Avalos , Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , Robert Moore , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, intel-gfx@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, ibm-acpi-devel@lists.sourceforge.net, linux-fbdev@vger.kernel.org, devel@acpica.org, Akihiko Odaki Subject: [PATCH 00/22] Fallback to native backlight Date: Mon, 24 Oct 2022 20:34:51 +0900 Message-Id: <20221024113513.5205-1-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747569921639536039?= X-GMAIL-MSGID: =?utf-8?q?1747569921639536039?= Commit 2600bfa3df99 ("ACPI: video: Add acpi_video_backlight_use_native() helper") and following commits made native backlight unavailable if CONFIG_ACPI_VIDEO is set and the backlight feature of ACPI video is unavailable, which broke the backlight functionality on Lenovo ThinkPad C13 Yoga Chromebook. Allow to fall back to native backlight in such cases. Signed-off-by: Akihiko Odaki Akihiko Odaki (22): drm/i915/opregion: Improve backlight request condition ACPI: video: Introduce acpi_video_get_backlight_types() LoongArch: Use acpi_video_get_backlight_types() platform/x86: acer-wmi: Use acpi_video_get_backlight_types() platform/x86: asus-laptop: Use acpi_video_get_backlight_types() platform/x86: asus-wmi: Use acpi_video_get_backlight_types() platform/x86: compal-laptop: Use acpi_video_get_backlight_types() platform/x86: eeepc-laptop: Use acpi_video_get_backlight_types() platform/x86: fujitsu-laptop: Use acpi_video_get_backlight_types() platform/x86: ideapad-laptop: Use acpi_video_get_backlight_types() platform/x86: msi-laptop: Use acpi_video_get_backlight_types() platform/x86: msi-wmi: Use acpi_video_get_backlight_types() platform/x86: nvidia-wmi-ec-backlight: Use acpi_video_get_backlight_types() platform/x86: panasonic-laptop: Use acpi_video_get_backlight_types() platform/x86: samsung-laptop: Use acpi_video_get_backlight_types() platform/x86: sony-laptop: Use acpi_video_get_backlight_types() platform/x86: thinkpad_acpi: Use acpi_video_get_backlight_types() platform/x86: toshiba_acpi: Use acpi_video_get_backlight_types() platform/x86: dell-laptop: Use acpi_video_get_backlight_types() platform/x86: intel_oaktrail: Use acpi_video_get_backlight_types() ACPI: video: Remove acpi_video_get_backlight_type() ACPI: video: Fallback to native backlight Documentation/gpu/todo.rst | 8 +-- drivers/acpi/acpi_video.c | 2 +- drivers/acpi/video_detect.c | 54 ++++++++++--------- drivers/gpu/drm/i915/display/intel_opregion.c | 3 +- drivers/platform/loongarch/loongson-laptop.c | 4 +- drivers/platform/x86/acer-wmi.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/asus-wmi.c | 4 +- drivers/platform/x86/compal-laptop.c | 2 +- drivers/platform/x86/dell/dell-laptop.c | 2 +- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel/oaktrail.c | 2 +- drivers/platform/x86/msi-laptop.c | 2 +- drivers/platform/x86/msi-wmi.c | 2 +- .../platform/x86/nvidia-wmi-ec-backlight.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 2 +- drivers/platform/x86/samsung-laptop.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- drivers/platform/x86/thinkpad_acpi.c | 4 +- drivers/platform/x86/toshiba_acpi.c | 2 +- drivers/video/backlight/backlight.c | 18 +++++++ include/acpi/video.h | 21 ++++---- include/linux/backlight.h | 1 + 25 files changed, 85 insertions(+), 66 deletions(-)