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: 619335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05799ECAAA1 for ; Mon, 24 Oct 2022 11:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232318AbiJXL63 (ORCPT ); Mon, 24 Oct 2022 07:58:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232191AbiJXL47 (ORCPT ); Mon, 24 Oct 2022 07:56:59 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8EDF2A401 for ; Mon, 24 Oct 2022 04:47:07 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id z68so104032iof.10 for ; Mon, 24 Oct 2022 04:47: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=JeYPW60eDYHbjdUtONWmgZ5StH3dk3c0YvKfXPvLX0L+GERY1Utr2lc3K7kE04l5RY u40g3SctQuSPbmram/WSfKU0COVY18dgBNEwJ/I7PpkJPZYzmWIzJCUq6f5/DyVegK72 0pREnM2M7oX/B2QocF+PuWylD2sNoZv/OqZ9O0VPhfQLcxKaXrtnCn8nzop40jB9OFvx hDVZt3CoVJj51WVtoN0p6d48AG5Z38iPSjRHqj0jIpJfBlycHz6ZaSIdv51tQqgDmjkb Ec1vQTSAu9iBLUDpg37QD2Cn41jryITDm5VNt8ymHcK9+gndy6OGGhRH1kSgziGf/ign SskA== X-Gm-Message-State: ACrzQf0dRJmsr75u4StKYjFPpUEG9Sefg2XjG/peBXP/y0Yw2SxNNhKm uqkKFpSArqkLBQ6aZZ0b3ozH2V1ruxRZW2N2 X-Google-Smtp-Source: AMsMyM5stq/ljVzMueZdUgOUcwUqYp0qFBFo+CXciS0i44pLthcVHJASa5mVlU8sjRqgQycqku2BPA== 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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(-)