From patchwork Mon Oct 24 11:34:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617924 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 1C363C38A2D for ; Mon, 24 Oct 2022 11:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiJXLiY (ORCPT ); Mon, 24 Oct 2022 07:38:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbiJXLhp (ORCPT ); Mon, 24 Oct 2022 07:37:45 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C624813CDB for ; Mon, 24 Oct 2022 04:37:32 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id e4so4797032pfl.2 for ; Mon, 24 Oct 2022 04:37:32 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nh284RfbKTKjVZ53xc/BjYmJT2KbUvj6smXua/Y15lg=; b=wKxhR+PYREmRgVKkasTw0GfLrz2v/WYReVJQ30eu6x7i4eVQgdnhuAzGFkfXj43osX iAXkQ9aOTTvoovjS5IAKs+vGwyfg/3OtbGuKU/dCjSKPeCgfec8HUoDEQ74hMGKLlidw xopGpztVbn+H0pgQsRhyf7RQzg47xJ12vGdWkiLpV1wmLs/HSBYTp0CLCI3VpboZfYoK OVdGvVz64lio5FjIFDglJN+RSxy4l6GjXQ4rIatNLGAan07rIxYhnoljN8p8kyn4jRRy crr47iBoKn1Bk8Y506uKaUb06iRU9mYdDjzttWDNXRDmwZYfgtsJrKYIzOgRriRarrJF 6iww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nh284RfbKTKjVZ53xc/BjYmJT2KbUvj6smXua/Y15lg=; b=hC87GNHB+aqBtCXDAN1G0gqCmfub/8p5jENoJ2EGF0fHZnpUIhOKVriaVpeUYqclas 2SSQZkq+Ydf7qVdcCQChppivCS1jzfCPYij6onp370NvmoZtDbFDnunIbG6bfO7/AbSs nhO18xdTV3MpuOgNli7WtfVbmY2pKDmSs2c2c63JdnPEyPxLfnbi4I0/VDVyPBQtKe4g AVUVJaNJ8N+QJbkOe5+XFcFZGSGNRBywOcbGhq2RTs6MyORuLsTYoEl7RKNDDKrZMgct asElVt6kVkATRu/AmMEMIvi2nFODNwo97HO4biASwsKwPc6h1inXIVasJHDXuFHWA0PN 7Hxw== X-Gm-Message-State: ACrzQf1DaW+dOR6/jOemsfL5RxuKg7zGMyvlMnudS28zdRdxO3ibbDDr fBI2FHE2vjcf6TcMdyoCi4/tNw== X-Google-Smtp-Source: AMsMyM5qFqNKIQCrH6nqN3yVGbGf1IzcRlrs4UvsvzXwRIAC8cYkTRMstnrFzu4g/FRXgW5McIN7zw== X-Received: by 2002:a05:6a00:114c:b0:528:2c7a:6302 with SMTP id b12-20020a056a00114c00b005282c7a6302mr33351690pfm.37.1666611349588; Mon, 24 Oct 2022 04:35:49 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:35:49 -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 01/22] drm/i915/opregion: Improve backlight request condition Date: Mon, 24 Oct 2022 20:34:52 +0900 Message-Id: <20221024113513.5205-2-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org asle_set_backlight() needs to accept backlight request only if the firmware controls the backlight. It used the following expression for this purpose: acpi_video_get_backlight_type() == acpi_backlight_native This expression works well in practice, but has two semantic problems. One is that it actually determines if a backlight device which directly modifies hardware registers ("native backlight") exists. It is possible that a device which does not have backlight at all incorrectly triggers asle_set_backlight(), and the expression does not cover such a case. Another problem is that acpi_video_get_backlight_type() always return acpi_backlight_vendor in reality if CONFIG_ACPI_VIDEO is unset. It means even its ability to determine the existence of native backlight is somewhat limited. This change introduces a new function backlight_device_non_raw_exists(), which returns if the firmware is controlling the backlight, and is always available if backlight support is enabled. Signed-off-by: Akihiko Odaki --- drivers/gpu/drm/i915/display/intel_opregion.c | 3 ++- drivers/video/backlight/backlight.c | 18 ++++++++++++++++++ include/linux/backlight.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c index caa07ef34f21..82ea02ab94c2 100644 --- a/drivers/gpu/drm/i915/display/intel_opregion.c +++ b/drivers/gpu/drm/i915/display/intel_opregion.c @@ -26,6 +26,7 @@ */ #include +#include #include #include #include @@ -467,7 +468,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp) drm_dbg(&dev_priv->drm, "bclp = 0x%08x\n", bclp); - if (acpi_video_get_backlight_type() == acpi_backlight_native) { + if (!backlight_device_non_raw_exists()) { drm_dbg_kms(&dev_priv->drm, "opregion backlight request ignored\n"); return 0; diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index b788ff3d0f45..4f0ce463e250 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -516,6 +516,24 @@ struct backlight_device *backlight_device_get_by_name(const char *name) } EXPORT_SYMBOL(backlight_device_get_by_name); +bool backlight_device_non_raw_exists(void) +{ + bool found = false; + struct backlight_device *bd; + + mutex_lock(&backlight_dev_list_mutex); + list_for_each_entry(bd, &backlight_dev_list, entry) { + if (bd->props.type != BACKLIGHT_RAW) { + found = true; + break; + } + } + mutex_unlock(&backlight_dev_list_mutex); + + return found; +} +EXPORT_SYMBOL(backlight_device_non_raw_exists); + /* deprecated - use devm_backlight_device_unregister() */ void backlight_device_unregister(struct backlight_device *bd) { diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 614653e07e3a..364ef6f99a9e 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -444,6 +444,7 @@ int backlight_register_notifier(struct notifier_block *nb); int backlight_unregister_notifier(struct notifier_block *nb); struct backlight_device *backlight_device_get_by_name(const char *name); struct backlight_device *backlight_device_get_by_type(enum backlight_type type); +bool backlight_device_non_raw_exists(void); int backlight_device_set_brightness(struct backlight_device *bd, unsigned long brightness); From patchwork Mon Oct 24 11:34:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618180 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 32488FA3742 for ; Mon, 24 Oct 2022 12:00:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232096AbiJXMAE (ORCPT ); Mon, 24 Oct 2022 08:00:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232411AbiJXL6f (ORCPT ); Mon, 24 Oct 2022 07:58:35 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA47E7B1E0 for ; Mon, 24 Oct 2022 04:47:42 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id y13so4187438pfp.7 for ; Mon, 24 Oct 2022 04:47:42 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XqmnVvhO9UyNXVHf0JsSwhtfQtP7FaZ6t+IS8pLhYe4=; b=s196kKLMLpzulXUS4BLxdjP3PZud7xTpKqpKruF8CPkUOnlKaR/90Xeg2YiBo1lxHt 0phPGBaGv8xL/2sJqtVjolNPplrc2gMArMrd38Fp4QY7w8IhO1gtyxxMyGg93VGpm0MM j/H+7JqUU0uyU9EbCNWGW0hSXVYMoeFxaVahwQmC5a0ogDrEldzdfFhw1y5wfPbeoDyv hhwAFpQRAr0P5gUGNLn3NAYvFzK96KUpTxDG6A6mcGTvTgwIFrZjd1qq4rg87X1gcrgv qVb+qSNOeTlneVvekKPumnA2sWUZNn6pea2DrTamA/nt4dzQ8wvTNCAad1chJdFMPTZm 71eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XqmnVvhO9UyNXVHf0JsSwhtfQtP7FaZ6t+IS8pLhYe4=; b=XOhbA8MFIAPf5htKNO2QS2YTUGpHbGFw/Pqb55vwsp6LIAXmuWsoWXnwWEPdYIHrwZ zQFq6GWY5Uy6a4bIS9S4ga7SGeuz13vSNmkoUeNlBCf87bTbJZYCnJwEfGkCDIz56uvp nU6XcLUVgVui+dlmyAC0Vhw7657GoruM0JjYqNpJKPIeNHTe7cXoPAF+TqhJaOPlz/Ri FnLI73BW78L4JF72QN+syOEoYk1cVnAy7L+fmjPWf2ODkOMRhi0NICVaj4jq7d01YsdB cJqGebzkhC57lGB8iXBSJowZVD6/bOSIFV93VQ/SKMUY7X6hjLEhMfEZrBfsb3/IzfjZ 8FjQ== X-Gm-Message-State: ACrzQf2uDsRrQ2EDGnSSiOLqdRNR1gCPwl21MxRIj6jR6YHxtOQrRH9s 7a3poK1j41ymPX450fJEtzE7znPVTdOD8M2e X-Google-Smtp-Source: AMsMyM4bQCnNONbcQRCLJnNp3+V9paAm7JCDcLdkyq7fRJSwz3Z4S1McoGfU9dqTYLitGtEw6cnCGg== X-Received: by 2002:a17:903:2014:b0:186:8937:28a6 with SMTP id s20-20020a170903201400b00186893728a6mr11907681pla.39.1666611357909; Mon, 24 Oct 2022 04:35:57 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:35:57 -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 02/22] ACPI: video: Introduce acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:53 +0900 Message-Id: <20221024113513.5205-3-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This deprecates acpi_video_get_backlight_type(). Signed-off-by: Akihiko Odaki --- drivers/acpi/acpi_video.c | 2 +- drivers/acpi/video_detect.c | 6 +++--- include/acpi/video.h | 12 ++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 32953646caeb..63e41aac71bd 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -1823,7 +1823,7 @@ static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) if (video->backlight_registered) return 0; - if (acpi_video_get_backlight_type() != acpi_backlight_video) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VIDEO)) return 0; mutex_lock(&video->device_list_lock); diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 0d9064a9804c..9cb12e4f06f7 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -17,13 +17,13 @@ * Otherwise vendor specific drivers like thinkpad_acpi, asus-laptop, * sony_acpi,... can take care about backlight brightness. * - * Backlight drivers can use acpi_video_get_backlight_type() to determine which + * Backlight drivers can use acpi_video_get_backlight_types() to determine which * driver should handle the backlight. RAW/GPU-driver backlight drivers must * use the acpi_video_backlight_use_native() helper for this. * * If CONFIG_ACPI_VIDEO is neither set as "compiled in" (y) nor as a module (m) - * this file will not be compiled and acpi_video_get_backlight_type() will - * always return acpi_backlight_vendor. + * this file will not be compiled and acpi_video_get_backlight_types() will + * always return ACPI_BACKLIGHT_VENDOR. */ #include diff --git a/include/acpi/video.h b/include/acpi/video.h index a275c35e5249..a565ba27fae0 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -2,6 +2,7 @@ #ifndef __ACPI_VIDEO_H #define __ACPI_VIDEO_H +#include /* for BIT */ #include /* for ENODEV */ #include /* for bool */ @@ -52,6 +53,12 @@ enum acpi_backlight_type { acpi_backlight_apple_gmux, }; +#define ACPI_BACKLIGHT_VIDEO BIT(acpi_backlight_video) +#define ACPI_BACKLIGHT_VENDOR BIT(acpi_backlight_vendor) +#define ACPI_BACKLIGHT_NATIVE BIT(acpi_backlight_native) +#define ACPI_BACKLIGHT_NVIDIA_WMI_EC BIT(acpi_backlight_nvidia_wmi_ec) +#define ACPI_BACKLIGHT_APPLE_GMUX BIT(acpi_backlight_apple_gmux) + #if IS_ENABLED(CONFIG_ACPI_VIDEO) extern int acpi_video_register(void); extern void acpi_video_unregister(void); @@ -97,4 +104,9 @@ static inline int acpi_video_get_levels(struct acpi_device *device, } #endif +static inline int acpi_video_get_backlight_types(void) +{ + return BIT(acpi_video_get_backlight_type()); +} + #endif From patchwork Mon Oct 24 11:34:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618186 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 2C170C38A2D for ; Mon, 24 Oct 2022 11:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbiJXLjb (ORCPT ); Mon, 24 Oct 2022 07:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbiJXLjB (ORCPT ); Mon, 24 Oct 2022 07:39:01 -0400 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 920A56DAE4 for ; Mon, 24 Oct 2022 04:38:18 -0700 (PDT) Received: by mail-pj1-f44.google.com with SMTP id v4-20020a17090a088400b00212cb0ed97eso8637171pjc.5 for ; Mon, 24 Oct 2022 04:38:18 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jd6ACh5yshC3v+wpibDWDf3qgLlWAznCMtTQxn1zcTM=; b=BWB1bsRo1D1/5aG2HUlQshwnot5GiQEKVcgQhO+OxWk4Yv6RJGjGc0+BnbVcAU1ilB NhLxiTmmJgpEWvIeGzC5nj6mZ2YWuafNwN+o0OYaPM29MksvUZTfQAH1/K+UrZCFM6bR i7w9/In5jUCFaBvu+D1VTFv7mFYSrjvbVqaokCOIPR/VUAMFVxjnDdpJCpz7bMR/BSkg Jq+u8O9YrnPI/nP0nolD9ycK218e8OEhDyBgyhXa6WYV51n2uaBY0GhjjlonI341V0zm ZR6a6kMTVC2I54CmN/XhCqU+xMvNbG8LWMhVeF721NMtiIvmVm8HCmwl7f0mofuKqBvv T6qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jd6ACh5yshC3v+wpibDWDf3qgLlWAznCMtTQxn1zcTM=; b=AzxZlXSZMjneHNukLC3gjmrjV3m4gc4rBmn07wUX2JCitYn6kY0UMYEfYIfgGrNIsW dErTjA5QyfJ3V+l2kTXE1BbefGZ8NU5641PT14E/XBoVAuycSTJ68IzzyLwseKmFt3Yk JwzTabGJsbhpPlzFGj0iiaYGje0xfjatPDYgvRF888jO3HMxwu5w6HAK/9CONWHC/7sG MDjeR/bz3tkRoL4IU307M//SVFVayBMPBChuM9LN6HtsM8IZDBuyaxQv6uEJUKd8kmsI Vr1OIG21IXfZzAgD27yCYhJG43qmYq/9STSRZY2+nsZhaPqgYlE04iEOKxjF34SuggS8 kimg== X-Gm-Message-State: ACrzQf1d+d0GPO70unls9rZfk3mQ8JkM2igAMtD/QTl4NKXLGPYcaEby Sl3SOTPdCGG4xys+GzHwF3Lj+g== X-Google-Smtp-Source: AMsMyM73/rjifhWGMHa1zueK60XfZjEW5Vq3d/GPCr3Dh4GubkmNIV3imNkhOdeBYtsFWNdeZJSquQ== X-Received: by 2002:a17:902:da90:b0:185:5537:f388 with SMTP id j16-20020a170902da9000b001855537f388mr34408779plx.113.1666611366225; Mon, 24 Oct 2022 04:36:06 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:05 -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 03/22] LoongArch: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:54 +0900 Message-Id: <20221024113513.5205-4-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/loongarch/loongson-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c index f0166ad5d2c2..3b54b4cefedb 100644 --- a/drivers/platform/loongarch/loongson-laptop.c +++ b/drivers/platform/loongarch/loongson-laptop.c @@ -454,9 +454,9 @@ static int __init event_init(struct generic_sub_driver *sub_driver) /* * This hotkey driver handle backlight event when - * acpi_video_get_backlight_type() gets acpi_backlight_vendor + * acpi_video_get_backlight_types() gets ACPI_BACKLIGHT_VENDOR */ - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) hotkey_backlight_set(true); else hotkey_backlight_set(false); From patchwork Mon Oct 24 11:34:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618185 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 3658DC38A2D for ; Mon, 24 Oct 2022 11:39:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231137AbiJXLjd (ORCPT ); Mon, 24 Oct 2022 07:39:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbiJXLjB (ORCPT ); Mon, 24 Oct 2022 07:39:01 -0400 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FA5B6C950 for ; Mon, 24 Oct 2022 04:38:27 -0700 (PDT) Received: by mail-pg1-f171.google.com with SMTP id q71so8442965pgq.8 for ; Mon, 24 Oct 2022 04:38:26 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mHmQPHH9zZ+33MZuRep7mHnwYbLIC54t+fSNOg5Y268=; b=RqE7F5MvPhA2qPYcGDMg2WC36c/ya8S0CaGTkCLFCoNSy0LYw2pEJBOB/IKoaCEWaV b6+79fB4tTanoZBjY7Fo2X/0NYabUzhBlMuelQGTz957EVppUy7uLHG6QaZSla3B9yXQ 6OXhn032XHxg5QRkvk/FCqxh1nFf72KOtez39VVtVU2ZobrTkzAarpAdLc1MHIUicZ7x 9IrA8KyX2n1Wc8SGkUaFWVryKzby7j8MCVQOn4hgQjEY8G1/JwHmHTRLpbfS7RTYinzr NNc6x9W1fERMFC/C80tkaVI7MUT/2fXwRFpEdbUrqzdctaRtNeCvR6lKd2fKNhihIYhG 3RWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mHmQPHH9zZ+33MZuRep7mHnwYbLIC54t+fSNOg5Y268=; b=b27TswpcQnYoy3duBddHTAM1l7kBSe5MmNkWnkRSuZUfkFX91cGm3fwxzWRFwlMp/v Jgm8W/QtYFh2RtDR7Eia6mnqO9gPIqqMenbvZiUtEOJ38oXCT5JOSSDwRxSGzLj5T63o n9Dmc4Kzm2lL8Q2zDYmVf5XRoHVQ9zJn9S1Al7eXKaXZbR6KdeHDNe7/0ZRQ8AE9MS0v hGaYEpSPsU43Pdqt7FZZQSOvKXlFl09+WJBiwPncUJSVdmhxXK/uU1TFeIktE+YspyRM u3g/BK7NCUih+5fQcJqLXQ+D5rRpGvmQvvlC/Zwhtflf6/Vuz7MqomNOGMHBG19TWPBI tbHA== X-Gm-Message-State: ACrzQf02Amcc8okibLOdVxGz3mrhL4+slE1oLxts0/WlMyktRY6R26Dh +CSsZw7dIP6+tOWOkgdZ6pgd3rvKZS/18Dhl X-Google-Smtp-Source: AMsMyM6IswFjqEAoVVX0inb+Y9m4C23pNohtdcPX0MoJFcRCefFyK5dlJjEhoQdRFZzuZeVMFsM+Yw== X-Received: by 2002:a17:902:7c8c:b0:17f:7565:4a2d with SMTP id y12-20020a1709027c8c00b0017f75654a2dmr33857671pll.65.1666611374702; Mon, 24 Oct 2022 04:36:14 -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.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:14 -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 04/22] platform/x86: acer-wmi: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:55 +0900 Message-Id: <20221024113513.5205-5-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/acer-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 18224f9a5bc0..10d0819e48ff 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -2421,7 +2421,7 @@ static int __init acer_wmi_init(void) set_quirks(); - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) interface->capability &= ~ACER_CAP_BRIGHTNESS; if (wmi_has_guid(WMID_GUID3)) From patchwork Mon Oct 24 11:34:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617917 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 7FC6BFA373E for ; Mon, 24 Oct 2022 11:48:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231708AbiJXLsU (ORCPT ); Mon, 24 Oct 2022 07:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbiJXLrf (ORCPT ); Mon, 24 Oct 2022 07:47:35 -0400 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4576F76565 for ; Mon, 24 Oct 2022 04:43:08 -0700 (PDT) Received: by mail-pg1-f179.google.com with SMTP id 20so8457775pgc.5 for ; Mon, 24 Oct 2022 04:43: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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FzYckbVTu84cFuvQYLHBAleZORC/YQBRLh0kCNSwM7o=; b=iBmB5k8OKAjf/Xfxgs/hagECXPJWV1vTEOyWaHgXEXGGuvWdPS3TIcFuqN2vljOt/3 nNxtvkj18I0SllZUWw1t8qqvPmaaAP/Ih4C/z6eW1oEg/YHBwNE/UBrQc6mXtkTAyvYj FRBgnjpPaQlPvG+Y3I8gbe9DDVTlZH0hAaXfoiGfSlX3bhk3XTqmJy1s3Zn6Jxm7ASHo 5qpBijR2lRjm+mURr8kmnNH7SvMPVVmMWVtI9kd+jgDbk3k+yebqsm9WcqXOGkuW8EHo ONz+AiYuv6fxJZh8VBFUV+IvV75FH4hihqZWU8KhCWTYY3SL2W8//2gxAwO5cZ7vPvF7 RcQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FzYckbVTu84cFuvQYLHBAleZORC/YQBRLh0kCNSwM7o=; b=yVA3jLTvt/3YH6zai5DhhFPgZ++LoCZ7iK2EdLhWSSXDyLoFH6Wi5cC9IM9nAXMynz L12F3wf1eyoZQ+DwYTvGH2mmlQ8UmqHGmX9745zf/iM2M5FwbNcqG0BktLkld73ieAR4 +OdW8RUxW0L9gHYnX7FvIGdoCCZ4Ip2QBw15Y39uBJbz1IW2WmAPs3/KnSVBlyonrqVL Mm8Asv0asQ5KzuYC+irT57rsbCGkp19+s4DNTmL0XTPZItzuV5nHgewOOaoJOqd3yMOX 4RpMEcxyy2k8DpFjp5tcXDMllgBRDUK1icASGN8dtDvH+I5WGxAfFwsHN5ekroo6K96F vzuQ== X-Gm-Message-State: ACrzQf1ZKY/AX8O+A0n6+JTDIJU2IeiNp1O62fpQsO99IGa7PP7xefEz s8Yn/IaAGrR/urm/1vy19oRmcA== X-Google-Smtp-Source: AMsMyM7eq4O5TcwFPN0I0cjYrONCrFe9kecGGggyXcsgPXfbT+UNin9IKo2yeDqy+SAw/EfdKKa+7Q== X-Received: by 2002:a63:2a86:0:b0:46a:eaba:f1f3 with SMTP id q128-20020a632a86000000b0046aeabaf1f3mr27591150pgq.79.1666611383075; Mon, 24 Oct 2022 04:36:23 -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.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:22 -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 05/22] platform/x86: asus-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:56 +0900 Message-Id: <20221024113513.5205-6-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/asus-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 47b2f8bb6fb5..fb7f9e8ca6c4 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -1854,7 +1854,7 @@ static int asus_acpi_add(struct acpi_device *device) if (result) goto fail_platform; - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { result = asus_backlight_init(asus); if (result) goto fail_backlight; From patchwork Mon Oct 24 11:34:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618188 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 CD4E8FA373E for ; Mon, 24 Oct 2022 11:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbiJXLjZ (ORCPT ); Mon, 24 Oct 2022 07:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230320AbiJXLhx (ORCPT ); Mon, 24 Oct 2022 07:37:53 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF26110B56 for ; Mon, 24 Oct 2022 04:37:48 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so3135044pjc.3 for ; Mon, 24 Oct 2022 04:37:48 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gF1+dr0UmSLKg5C/+t+S2XzPWm1zDrjsbQX8+igR+aM=; b=TUaer4HdAj1V1/KvIiqeuDXfW6xDWwEMoGs5n4ogyUIGkys9QMhjDQ+bVY0ELC/Zv7 bWVD8iLyFzbkfcDLx8DVuEuAt6agWLfXnGroETWUA/WUAxEudlmKwVrZP9YEJ60SqpQO uEgVtlcZHMdUxEmxBez2o4LXL4xr7pLMNs2npVpTCCV+56sUo0X53wm7kZWeulN1UxgY mJboZRkxMVHWvPMsPje9/uDltkPOywQSfMmTJicM2HoXPo4wyYb1scm4m6G+r2+bzHd8 Sbxk521dG9VmXqWc9Od5r0OBVoSlAsHO2hUBuwny+NvTx3MjpnZ1sqjNKvam6yq5PSwk iKPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gF1+dr0UmSLKg5C/+t+S2XzPWm1zDrjsbQX8+igR+aM=; b=J8wyj/XlCb2z4vdGPAnk3h/GkEAK4tLN9+u9QlZy9QnJDK3KaHBWYtl7mMf46KKW7o Vq9KkkEO2nYIgi1K5M6ixip0kM5wKW01yR2lxV6p3WBCZ7MCDXKzSRv84CBF4iMxxu1e HYTyEcvO6uLtQeKMESNovoTyk6dZn6g/wRw3lgZJifPZsbuEDxPuLcpq8KD0d9/p32/l kJyHzYFwMGZ8S+FhbpbH3v0rkxAV6xTmlvto2gbC90GpTz6J3Ih6XcwLOW4/XL85UGD+ +tMirRjSu0HTF+YnktYjvKs80mipA1VWP126AnxyLSZkBq+Ja/koHrZwyAEJ+PVYiiIe oudA== X-Gm-Message-State: ACrzQf2a3rWDZuaVSZqdaferbQ68enx9+YEkLYX1I1QV/ecuboogS4us w2RxPlvdwhRB+sPyhtOV5OBofQ== X-Google-Smtp-Source: AMsMyM4Z73PEbmFjby7RYhtWBADc72izt8nSu6NGLKgrb37LXlsr13MXJ1blMej/gKuQKEFJb7DSAA== X-Received: by 2002:a17:90a:29e4:b0:20a:f9d5:c10e with SMTP id h91-20020a17090a29e400b0020af9d5c10emr75009289pjd.132.1666611391524; Mon, 24 Oct 2022 04:36:31 -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.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:30 -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 06/22] platform/x86: asus-wmi: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:57 +0900 Message-Id: <20221024113513.5205-7-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/asus-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 6e8e093f96b3..55cca068f783 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -3259,7 +3259,7 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus) code = ASUS_WMI_BRN_DOWN; if (code == ASUS_WMI_BRN_DOWN || code == ASUS_WMI_BRN_UP) { - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { asus_wmi_backlight_notify(asus, orig_code); return; } @@ -3802,7 +3802,7 @@ static int asus_wmi_add(struct platform_device *pdev) if (asus->driver->quirks->xusb2pr) asus_wmi_set_xusb2pr(asus); - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { err = asus_wmi_backlight_init(asus); if (err && err != -ENODEV) goto fail_backlight; From patchwork Mon Oct 24 11:34:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617922 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 C16C4FA3741 for ; Mon, 24 Oct 2022 11:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbiJXLj2 (ORCPT ); Mon, 24 Oct 2022 07:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbiJXLi6 (ORCPT ); Mon, 24 Oct 2022 07:38:58 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496216D872 for ; Mon, 24 Oct 2022 04:38:14 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id e129so8438379pgc.9 for ; Mon, 24 Oct 2022 04:38:13 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=28wDlqMofB1pExK+J7NJqLJ5sSPJ8IDYDWuGoZcg4WU=; b=zPrE3Z79yDGzLtfx2QawETgF1lUMugvN0C6qQ0CWIaiD5/kUtQIJww0VDJMrkYc3N9 elYuVucHc32XKow2YGLm3Vr08Z5vsbFCWlv4vq7Nx1QXhYg0jtjzlw0H9CXWI7Ta2vol 6FUMEN9tnwiBaSCwpYfKwo7U/Mq0MJA9eOTbkI8+uvO7eXR9gmEds/Sy3ur7LFminYR1 NVY1BZW0FhIWVkiQMHh5J542GVxkeRWv1QNvckPM+a6g8eqefXzkOAt0+7UqdUmERKZa J+mLK9mmXa4DfceGk2cEkxou1QrTtBSQu+UKjsPm36wMjvQrtPcLMKbyQMEJWea/JWpP WvvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=28wDlqMofB1pExK+J7NJqLJ5sSPJ8IDYDWuGoZcg4WU=; b=FeT4dSBx3qaPx0DsfTnLllxpjtcFBUnaPDfTVRE4V57UfKg1bZPRUDnPRbqyrjowLi hb/nogWMICxIDPoTGsdy5oC0ALgg0Gvg/BG3FDfqh4wm7yhTL2Ftsldshc2GjGwBTHLv +XgrhkW9ydAYQBU5UZ+sJbxxje1GcxLTXw1vUlu1NODn/sWUuR4E6XsduxdO2ZseCtRW qr24dKp7m6h+Jj2a7RK8dyLw1i1b0ietuU/agBlL0IF3m2eXSFJTW/KdXxglQVVJM3ii 2jUzBNvacBjDjRB3EESVOhv6RSWhjoI+P4kh6igyaQtxymPrMPagQmOFOhvlDgnVAt0V 9rdw== X-Gm-Message-State: ACrzQf3IEn3mFwthtsZ7IghbvvE3DYg77qR7a/bR8kGRnRpfKCAracZY dhAmun2q1AT2H/250ZVZN9O4Cg== X-Google-Smtp-Source: AMsMyM6SfjrakTfflVuQ8PwvI36ClP4mxWtm2JBvE32zMW6Lo2xtR9eBT667zzx11rUWR7R7KloyFA== X-Received: by 2002:a63:5702:0:b0:44b:290:f24f with SMTP id l2-20020a635702000000b0044b0290f24fmr27871108pgb.558.1666611399944; Mon, 24 Oct 2022 04:36:39 -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.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:39 -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 07/22] platform/x86: compal-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:58 +0900 Message-Id: <20221024113513.5205-8-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/compal-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c index e10d2f64dfad..16ced03fa1b7 100644 --- a/drivers/platform/x86/compal-laptop.c +++ b/drivers/platform/x86/compal-laptop.c @@ -1043,7 +1043,7 @@ static int __init compal_init(void) return -ENODEV; } - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { struct backlight_properties props; memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_PLATFORM; From patchwork Mon Oct 24 11:34:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618179 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 DD733C38A2D for ; Mon, 24 Oct 2022 12:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232445AbiJXMAu (ORCPT ); Mon, 24 Oct 2022 08:00:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232791AbiJXL7x (ORCPT ); Mon, 24 Oct 2022 07:59:53 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A12A33370 for ; Mon, 24 Oct 2022 04:49:06 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id x16so2509091ilm.5 for ; Mon, 24 Oct 2022 04:49:06 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aTWnIAAWrGsxFWyDKsfKu5xKbLpsLEHl3kQR801HKCo=; b=MRe/lYU3QcRg+eNbrdoMjeONSL07r0OuDkWzCVk6tpzA20LxxB9dtVNP6GAZVtqzIg /Ydi6DIu3Wy5fZXEZmacOcz+NqXiSg1SXC5+xE40BzARxzxxK4lzIbVbKWJmk00nhUWL J95wLECXE4yV76gl9zFLYhn0sUtCfGQd7MZ3fPt+5gVvmN0pleQRDgrqZg3vefZrijSa Yr0OxSWw7RuG0IesV0KfRF12UlNsEctSBC+ObKy3MmlA9Ekq0p3IRfhEG3FwtLPaqAOb tgPmTvcjcO2SHlUmacRidezoVVwplJ41JEut0A62tZuMt+eaVkdbww0tkfz+m4Yo8zhg FlhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aTWnIAAWrGsxFWyDKsfKu5xKbLpsLEHl3kQR801HKCo=; b=A9jATV+IPZtqnqit1z92AeG8kYWeefv40ke0CUH/2JgrZ06XNki/huNfY6gvLCc8zr eXgQ6n83iHbR/ZLiYIr2HRkNYOlZecTohI+xF+SA98jN8jWMAjiqIf3U6RNb9p7y9Mud 8lA12EzWu5XRNqM+lCEGVhCnB0a8myCqnzHOxPD0f6fGI6Kv2wWmJAo0nQXCIVDUCxCM IaVL39i+dtVoAJilj+1gKW/+bSOIDMvd+HHTqhNr1V7i9QM4Bb5ntQmeri36hpd5yMgB 5w+ObT5h8McTdNAXX/ULFpUgd3GcJhcF6AoUjyh48KFxGpS8gN/OAq4woeaV2wi7G++n YLLw== X-Gm-Message-State: ACrzQf3KMjEDVsLAstej5AiwICBMKtu6J5OcMXCV2LViJN4uQ9yNhiwO 4cMwJNQrcDcDYbeOuLJParSlhadtqFmLxiUZ X-Google-Smtp-Source: AMsMyM4YJ5urGf6JLjky27R9T5sFwrnmf9RBCYrtUNpAE3TI6fc6EtzOOV4rZk9R6ICHsHu1MQHt3A== X-Received: by 2002:a63:64d:0:b0:46b:158f:102e with SMTP id 74-20020a63064d000000b0046b158f102emr28740541pgg.150.1666611408492; Mon, 24 Oct 2022 04:36:48 -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.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:47 -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 08/22] platform/x86: eeepc-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:34:59 +0900 Message-Id: <20221024113513.5205-9-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/eeepc-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index a388a28b6f2a..91dea49f7c3d 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -1400,7 +1400,7 @@ static int eeepc_acpi_add(struct acpi_device *device) if (result) goto fail_platform; - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { result = eeepc_backlight_init(eeepc); if (result) goto fail_backlight; From patchwork Mon Oct 24 11:35:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617923 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 8E36FFA3741 for ; Mon, 24 Oct 2022 11:39:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230442AbiJXLj1 (ORCPT ); Mon, 24 Oct 2022 07:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbiJXLih (ORCPT ); Mon, 24 Oct 2022 07:38:37 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CCE967C9B for ; Mon, 24 Oct 2022 04:38:08 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id u6so8177980plq.12 for ; Mon, 24 Oct 2022 04:38: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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c3/qt1OzaBc9a5GsaEcxXWSHAm3X31gczykCRrhGnKw=; b=lOEcU4RGCEfGg+wnfVs0l7n30cTg9FbZcgkthaptWevuzG9Ssi+9oWFgfDpyitG3Tk OuLI1JcLxzeALUawRzgQ4OCHUQAGKneDBweTsEC2z2rv/dy7b2CVz85QxzVHNDeK3Mlb xsxvq1aCJ5rCSCJDSgTd1x0eL49i7F01FPf3bevhsJTjMKGOtn1fRwPcWjyhr7lR2spk XeIQqVeTz/3QdhnRwjU1wp6PSyaOIKZ5MzRhwmkzlX7C/eeOdJtAKw9fT8Pc1B5311gv y6ZojtRQW/tr/7t2nMkDZNTzuYYeLPsaTucm9GFd6bYXgmrWG6KMd06zb2097bHNbdj6 vLsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c3/qt1OzaBc9a5GsaEcxXWSHAm3X31gczykCRrhGnKw=; b=Xwo7iaGY+1kiGw3tYxjBFKP3KBJVDFY/4yFYu2wFXoah6aQ7LLBPxiJ7WHEmGnvsmE WifOVHOzDqrVU2ckAFIY6tKoPREKjgT/ThWmeMa5CKLS5yjUR5qeIyV9NPAcH07/um6P Kc92dFAnkhArA2StVTTpp/DeIDZ7nybmkLER0YrlbzS0gR80Oc7okiSmY8EPoMA2HcBn bzPX48G1hu/U6EYq+uVoMcU8HtUG5QZ5RkVOGa1lBlMJ9s4uc/74CKu/SKsA5wNoNcPr cgzz3ZC7DlVxikrqhpiEwys4Zy80YAKpbPcO/23kR/e77bMAVRprbXvrTBHIXgIW04gh rlsQ== X-Gm-Message-State: ACrzQf23MdhN9QEwlQ7DIxmHYzc7vRgNmZcF3HCn4xMuAFQyMkou9IK3 iuJw8DaJMbqL+FiOzdKiArlScw== X-Google-Smtp-Source: AMsMyM4VgcDLQ4Mdfbv6hIeokV3STzkHDHm8r2Jacxl6wRFbQoIXcyKQ22yPaEG8fZMahC4Fy+BnrA== X-Received: by 2002:a17:902:7281:b0:178:388d:6f50 with SMTP id d1-20020a170902728100b00178388d6f50mr33837351pll.127.1666611416833; Mon, 24 Oct 2022 04:36:56 -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.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:36:56 -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 09/22] platform/x86: fujitsu-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:00 +0900 Message-Id: <20221024113513.5205-10-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index b543d117b12c..e820de39cb68 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -387,7 +387,7 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device) struct fujitsu_bl *priv; int ret; - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) return -ENODEV; priv = devm_kzalloc(&device->dev, sizeof(*priv), GFP_KERNEL); @@ -819,7 +819,7 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device) /* Sync backlight power status */ if (fujitsu_bl && fujitsu_bl->bl_device && - acpi_video_get_backlight_type() == acpi_backlight_vendor) { + (acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { if (call_fext_func(fext, FUNC_BACKLIGHT, 0x2, BACKLIGHT_PARAM_POWER, 0x0) == BACKLIGHT_OFF) fujitsu_bl->bl_device->props.power = FB_BLANK_POWERDOWN; From patchwork Mon Oct 24 11:35:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618187 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 7C786ECAAA1 for ; Mon, 24 Oct 2022 11:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbiJXLj2 (ORCPT ); Mon, 24 Oct 2022 07:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231231AbiJXLin (ORCPT ); Mon, 24 Oct 2022 07:38:43 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B62F6C756 for ; Mon, 24 Oct 2022 04:38:06 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id b11so1811372pjp.2 for ; Mon, 24 Oct 2022 04:38:05 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YFFtfp5Yc7gM2NHS+gJ21jjQnawzT1tRkxQzo/jBQzs=; b=PgRxRL0VweaBpB4MPzFwmQEoLPmtBSUyoflWHPBA/i2qwPwwuqmuLCa/wFO3m2WOgm CG5asatEvhtKxzWCslE5iuXyE9qykeCF0sAXWDQWCpNnz1SKFD09I/9ECN3oqaq/n/qH 8rI5q6sFwwrbf+qrqO6sphSgXh8gDNDUjMeXekyPZD3F/TNfhF9NLgFtp4S/EV7wFVYr HIvJzo/gYypH0KtX5FbvkZtyhStclUobYg5s5+qLL1fUloXqGfaHi5da3VFSy44yWKIj FIzxJZjW4aIDCrHCB+/3DHZ36YkLWnsHC5PSQR+boNXax+UF0elBwxF4lI1dewR5AYRU r3Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YFFtfp5Yc7gM2NHS+gJ21jjQnawzT1tRkxQzo/jBQzs=; b=jt56SpH6SdwqFsKTZzhm0saQB2cxRYV87ELRIambIwVOCzUVuL+FWMx4+D0pc8IL2X lebfFtqu2TTXDkIVG+9eATCUUdJP+a5h3zbGVSmkJg0tY/RAqfE26QvNzmEOx0ZN9+VN CsctoRLhkho9YtqEgcgk6ATpr3fBTfwj2edHHwrM50RCkaCQL83gZxltix9NCBUypI3n G09iC/4tu6usrmEhi+b5vCzSPyQBhEhHSUBVYJPgBsnzP2CrWPvXF/nvO7xOviqa+n7R iB0Zo1OdNgmvs9vFy9bjqDRvXGjy0byb1WwFNTTAR7/mh8rsi9x7It9GqEkDRnz+4ug1 Aq1A== X-Gm-Message-State: ACrzQf2N1+9JpwdMo1grRwKTLtnJSdNnB0ux5nIBqv3mEpDMus2JaWVp 3dfSTPJkXvmYMSVxmgwG3gzjsg== X-Google-Smtp-Source: AMsMyM4JFQloaFqr1HCGBSMPdlEtI9GhtTJPxV54Rk0x44r+FJsDYcm4mRiVB5esproJCpQDWLufkw== X-Received: by 2002:a17:903:11c3:b0:178:aec1:189c with SMTP id q3-20020a17090311c300b00178aec1189cmr32705192plh.136.1666611425291; Mon, 24 Oct 2022 04:37:05 -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.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:04 -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 10/22] platform/x86: ideapad-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:01 +0900 Message-Id: <20221024113513.5205-11-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/ideapad-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index abd0c81d62c4..befd5dc24ed6 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1633,7 +1633,7 @@ static int ideapad_acpi_add(struct platform_device *pdev) dev_info(&pdev->dev, "DYTC interface is not available\n"); } - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { err = ideapad_backlight_init(priv); if (err && err != -ENODEV) goto backlight_failed; From patchwork Mon Oct 24 11:35:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617921 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 9C6FEFA3744 for ; Mon, 24 Oct 2022 11:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230517AbiJXLjc (ORCPT ); Mon, 24 Oct 2022 07:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231305AbiJXLjB (ORCPT ); Mon, 24 Oct 2022 07:39:01 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 335B56BD51 for ; Mon, 24 Oct 2022 04:38:15 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id c24so8190118pls.9 for ; Mon, 24 Oct 2022 04:38:15 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WXmq/hBcZYGs3Gnnq23+P2GdOlxPxnPnQ9tZiYxhvfM=; b=ePYd4xhaCLyNOikvZx9ObnR59VTQkSAk7bE/21UiNNJwiT7p8qaz2wxEDyrMa76ZiO iTv35XAqYOSWqXDvZUoUvgGmvOlC3hchnWKDqdc2UecEVAX9G/+zMZvtWhcPix3rL/Ze /AxIzkOWAuW0TYSGen1kls5ox9wM7QN637haLeOU+iriv1s6P76gXjgwpd8lXRWr5njq 0kb37LvYd9ImC/Je4pwta7WQUaUhAgxFwdWYk856M8Pz+6Ha/ONDf/yTiB0LbDLwz27I DYeq4gLGQYRTSFepUEIMtI9Duv1N/OsA8khwLOQvpXVWzE1RgBOE2QuDDdGxjTnuq5ox ChVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WXmq/hBcZYGs3Gnnq23+P2GdOlxPxnPnQ9tZiYxhvfM=; b=Ek0hAzDzN025RwQ8r2uw3JfRSHPc3IBKcI//w+L/B4d5j/rjkFO8TF5ziY0/v5uKtY IpQX7EeS1uz6cYDU2V15BPyLwWqngHG6Gs2BzEDLOReZwZlRzJ78eIdizyYeHPciCnmD L1a0V/2Yob46FrraVOadqe/N1nx6qPnZtDhKOi7Y5AjA186X+zHS8O8ZISmMReZKgp3y 2Hy3XZHHvVOASt//W4U2KZKEPl7K2PGmId3grB2qoNmXgkGobeD6Z4I1ReyG4h1PKRpI AA9f3QsGfA3tnFOi1b9FmuS/U1jphwxmLVYK4d2rCtuNdWKPhHXqk3GqRhJyJiB3QZNa waPg== X-Gm-Message-State: ACrzQf3g6+i/RCjQM89XNaeGiCLFfFbaTEE7AzQas76Zn0QkyDDIx1Yw Z200+yV8VZzGvpiArRHWq5b6Sw== X-Google-Smtp-Source: AMsMyM7vtFWcLRmhWO6df2stQtl+qol38s2TTZF/JGQZTKP8WsWjqXQ3dgWj46xKcZZohQd3w2Vh2A== X-Received: by 2002:a17:90b:1e0a:b0:212:c44b:fffb with SMTP id pg10-20020a17090b1e0a00b00212c44bfffbmr22703440pjb.113.1666611433791; Mon, 24 Oct 2022 04:37:13 -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.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:13 -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 11/22] platform/x86: msi-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:02 +0900 Message-Id: <20221024113513.5205-12-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/msi-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index 6b18ec543ac3..19e2f164181f 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c @@ -1048,7 +1048,7 @@ static int __init msi_init(void) /* Register backlight stuff */ if (quirks->old_ec_model && - acpi_video_get_backlight_type() == acpi_backlight_vendor) { + (acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { struct backlight_properties props; memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_PLATFORM; From patchwork Mon Oct 24 11:35:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617920 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 24844FA3740 for ; Mon, 24 Oct 2022 11:39:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbiJXLju (ORCPT ); Mon, 24 Oct 2022 07:39:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231390AbiJXLjJ (ORCPT ); Mon, 24 Oct 2022 07:39:09 -0400 Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D7F51C418 for ; Mon, 24 Oct 2022 04:38:31 -0700 (PDT) Received: by mail-vs1-xe36.google.com with SMTP id h3so7561038vsa.4 for ; Mon, 24 Oct 2022 04:38:31 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XAyFJiVGXrC/KZsleNIpi2nk4bcxYAI8Wjviz1KFor4=; b=ZPJNNmG2CfyinfqrhsHlV+g/2spcGsRR6OA3gQWYXOOaD6Gsxx/0ZTZ/2WSEOwyYxr EDCpJh40XMtG2OTdgXJL02/X5omijLCV9JB2NHXHkDrLv9wNx5a9fXGjfKUy3F0lhTEe hmnXBdrKvxVeJ2M5hNGsU2bRRaZU/yeF/d2yhPBZ/vbo5qMU7Pf/Zeu4xzQd/tILMGUf 9wVa7xUimRQsMhs8I2ooWhyIiW91jtGl8d73AU5DZCPbAW2aJV7S8knDGzccvSCFIAGK XYYnZNcK+zvSZs4S+oTEJp9GvLNjfNv3+EpEB1BBZw+e91dYFNlfBeXNg4N+ATQRyNH9 j2NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XAyFJiVGXrC/KZsleNIpi2nk4bcxYAI8Wjviz1KFor4=; b=wd6x4kMfBtaFfhJTgk4ajioQwW98ZE1Z6frmRr/VEGB8+Oc2Elg+ezpEOWV/d1gJ17 VVY/9n39+hDo8MZZTq9KgfnAxd6QgRne0Zdgq9O+iwBrN514GQhwR21iabc3eihy+d8m KcvfCsn0vzv7Qqpuf/H6G9Cek+kZptaO1okG0Wz8nDS8FudgdzzdEJhknLh5Uywej+n0 R3ouOj79iqKjvC6gOeyEOUkApu6zq6JFIQDJJ0HJIZJUXn6PjZod+CSUobdVcV2Feqyq BAA9YtXV+xjtWXTM3YOHAxRHE+YgwERIra1tJeRR3OxvzuEcrLzZdXejwBw61Yt6TYWx XbrA== X-Gm-Message-State: ACrzQf0/HLKgOyT5qT1Pm8FvgioOKuEP/yB8egk9+3WH3Aa0sewbBygU lGN9QGmjeZipKA/vVzQKnY0w3iZ20shb25wD X-Google-Smtp-Source: AMsMyM7j6rudLQ3oDGLiRJvO3ouLKzXkm11wgePZ/bzYxd0/dczcHVPABhvm+nv5ewjBPX37znVsPw== X-Received: by 2002:a17:903:1c6:b0:185:47ce:f4f0 with SMTP id e6-20020a17090301c600b0018547cef4f0mr33699248plh.132.1666611442110; Mon, 24 Oct 2022 04:37:22 -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.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:21 -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 12/22] platform/x86: msi-wmi: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:03 +0900 Message-Id: <20221024113513.5205-13-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/msi-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index fd318cdfe313..3a74f0135fae 100644 --- a/drivers/platform/x86/msi-wmi.c +++ b/drivers/platform/x86/msi-wmi.c @@ -309,7 +309,7 @@ static int __init msi_wmi_init(void) } if (wmi_has_guid(MSIWMI_BIOS_GUID) && - acpi_video_get_backlight_type() == acpi_backlight_vendor) { + (acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { err = msi_wmi_backlight_setup(); if (err) { pr_err("Unable to setup backlight device\n"); From patchwork Mon Oct 24 11:35:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618184 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 63FD9ECAAA1 for ; Mon, 24 Oct 2022 11:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231271AbiJXLjw (ORCPT ); Mon, 24 Oct 2022 07:39:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231389AbiJXLjJ (ORCPT ); Mon, 24 Oct 2022 07:39:09 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E51C6E2E7 for ; Mon, 24 Oct 2022 04:38:29 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id s22-20020a17090a075600b002130d2ad62aso2040058pje.2 for ; Mon, 24 Oct 2022 04:38:29 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zZ4fJ8ClD76WOV59defp1HNsujn8j/wysmVCUMoMFP0=; b=UR+PH3NVHkn0NXOqzrKguYWXOraM6vc+YMLhwexhonJG8F77DnrNQYz/9Oi32n6IZY hZlL47vjA7//LH91lqAnjQLn97I5Vo+uQOT2Mmd2Dn63q/EMVrrHlQ7z/zyp6JLWsxqs lxvzOwrP2RQb+dCGiNci0WZm/2NZcPqe1IwnSjthC31l/f7IFTIDv5x71IwBvf93+VC0 KH/KMjo1itzSNE11bqoR8Syfpkg0shlSYQXBydHoh4+awRZYdMObrO029QbuDisy7sll ElVT/CB4tnxnE4FbCm2I0ONWyIQVGy4aFDiuXCQlrYYt0qq7o8pOl51CC0lnDxCtkS9Y 1uNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zZ4fJ8ClD76WOV59defp1HNsujn8j/wysmVCUMoMFP0=; b=lc28rbDDBI8pdWLKOnp0ujyPD1J+Af+1q3A3Y8fSsfvl+DtVZIWNEeCFHnLF1gL0Fn WjVrSKNB8hHyV/pLSQkb6lRTpRMxqUxT3c0kzIRFMG9Pv8R4JObgCt2xRDg71ZnmqaRY dmNBHeWkl7j3QgJI1l5hCpuai0zvs6ikdv3uC4t2/4nxbBr0bWMx+mdvP9cvaIHEgREW tVVCn/CnPeiFkGft/q6mnKbl6WKAsHMnpjQgZ0Sga5EId4KOn7zEQCUjA+iuPEgf+qEG neXb7mhvc2TsZR9WJOUz9TA0/pC7B+SiV8ysd+LAVoAlC8veL7EYM65nxq9ZmjoXc/1J omIg== X-Gm-Message-State: ACrzQf23Oh6wXDAbf3FwJPci/dgZlk5pCJlXJWQf+d4YWM3QhpzIwiKi 9+93wQAxhPiFyZI2sWhr6pNEew== X-Google-Smtp-Source: AMsMyM4YfAwJenYaMcKn2Z30J0g5OpRvkV9SVYpt/sZWnDEmVOCLuqCwHN7ebOLB73LDTWz/IU7ezA== X-Received: by 2002:a17:90b:2317:b0:213:26a3:246f with SMTP id mt23-20020a17090b231700b0021326a3246fmr1763172pjb.148.1666611450483; Mon, 24 Oct 2022 04:37:30 -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.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:29 -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 13/22] platform/x86: nvidia-wmi-ec-backlight: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:04 +0900 Message-Id: <20221024113513.5205-14-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/nvidia-wmi-ec-backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/nvidia-wmi-ec-backlight.c b/drivers/platform/x86/nvidia-wmi-ec-backlight.c index baccdf658538..a42e3914c73d 100644 --- a/drivers/platform/x86/nvidia-wmi-ec-backlight.c +++ b/drivers/platform/x86/nvidia-wmi-ec-backlight.c @@ -91,7 +91,7 @@ static int nvidia_wmi_ec_backlight_probe(struct wmi_device *wdev, const void *ct int ret; /* drivers/acpi/video_detect.c also checks that SOURCE == EC */ - if (acpi_video_get_backlight_type() != acpi_backlight_nvidia_wmi_ec) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_NVIDIA_WMI_EC)) return -ENODEV; /* From patchwork Mon Oct 24 11:35:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618182 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 537DBECAAA1 for ; Mon, 24 Oct 2022 11:43:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231213AbiJXLn3 (ORCPT ); Mon, 24 Oct 2022 07:43:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231204AbiJXLnJ (ORCPT ); Mon, 24 Oct 2022 07:43:09 -0400 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AFC046616 for ; Mon, 24 Oct 2022 04:40:20 -0700 (PDT) Received: by mail-pj1-f53.google.com with SMTP id pb15so7912814pjb.5 for ; Mon, 24 Oct 2022 04:40:19 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H9DD2Qn9ukDVbti7MaHb2ytvRgr63Gh+pODc8Oxcvp0=; b=mRQRZRI1N0fXR6ZhdjhBkiy9z0C8EnLK6gYwGYjqDkMwRaxlGNaP5gg/S/OvakJsTG j3MIV/2byA9qIHOxO3TCYFuxurjFmMwHfitpAimtA/68MM/VooXLqLsYsaKwrvgYMTyB 6Z4pVEOBs5IqlX0BIZsa0XK+RYo2qG4L7wS6XkghOIRzy97bYyCuS6T2RVuWBkoNAZsp 5OAXJzzDB82KI6oAxhG3ADEUNMHcMWzihVTgmK2hw0ruNAkoMfJvZ4SJ61OJTiGkE4ET XCl94Jv3FdldMl8SzpJhvBf/CL22EaB8WxpQl53oozj1okCtaLCSvY5Rm5InOnDmci1D XpzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H9DD2Qn9ukDVbti7MaHb2ytvRgr63Gh+pODc8Oxcvp0=; b=X+CLULPc7Jt0gI66QCcWWhl6teUM8L8RwOESnvDHydxQrdvk+8tbYB+ANlkge4TCQd /s2c0NOruiwBDWH24ikESiciHnYzhuafMSZMNsOAsAEFZVh/TFoR85mm/MqZTJPlOTjK TwdSOgRttAWdMJxDy2jJm1Fn3xN11v54B7QrPKJOcyHUJRG49dji1VpChutl1ilXVmHS p56NZ8nlYG16RXxsqc92a5IUDL/u7DkFaLDekQVlDxNkSJZ4l9WwnOEXOQA8zTcnpEHf HDOJIDSFjXuNQTg0MTpjYnKKbbwjzgS6o1M19P5C+si1K9QjI6riqmZ3qRu0t5aPeBvJ 982w== X-Gm-Message-State: ACrzQf2YxiwaXQlidxLPutzmu9fHiYSKxMJNpKGEnT8xQCq4dAJKNHF4 g8lVzqO7MLgvUe6CbaUe96e5Gw== X-Google-Smtp-Source: AMsMyM4qEtYfk/brrspCDfsAk/ohN0i2+YSG3igNC8b1bqKv4WrKEdbaz330QILDZfX2MHi6JDfWfw== X-Received: by 2002:a17:90b:3912:b0:20d:4151:1b65 with SMTP id ob18-20020a17090b391200b0020d41511b65mr74871319pjb.233.1666611458874; Mon, 24 Oct 2022 04:37:38 -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.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:38 -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 14/22] platform/x86: panasonic-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:05 +0900 Message-Id: <20221024113513.5205-15-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/panasonic-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index ad3083f9946d..eaf9469fabb3 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -999,7 +999,7 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device) goto out_input; } - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { /* initialize backlight */ memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_PLATFORM; From patchwork Mon Oct 24 11:35:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617919 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 78C0DECAAA1 for ; Mon, 24 Oct 2022 11:42:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbiJXLmF (ORCPT ); Mon, 24 Oct 2022 07:42:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbiJXLlp (ORCPT ); Mon, 24 Oct 2022 07:41:45 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25EE8A474 for ; Mon, 24 Oct 2022 04:39:25 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id 3-20020a17090a0f8300b00212d5cd4e5eso7020851pjz.4 for ; Mon, 24 Oct 2022 04:39:24 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jiSdINSVFRYviECfxwDXkA1dnuYyyTGGZx7DJKOoYJs=; b=iGtXR8pxJeARtYM65YtWK/rMT1cGkHNCbn5om85YN4tLiOmmeq2/FBvx3pSpv/m1Sr Va9GHFdP0chf3eQTUSVDangVFZ/dqZDSfu19hibg9oS2kk/KlgfVT6JFeQ68GHunlhzC se1sWoi2z1fTcKdw8FOIcyCxwwKqRbZobTBVM7iGls36LCpZ3DZIX0Tfn7Kb0gOkShSW pNe8W3N4rMeldUr8oUAlIfVjHR6cNauEMm0EGdVKOdZI/PPmhyAtOJqcxE6jGzxL2wA6 7MgNHiUTVhnxOnZse4TBGZUhOboi/UB4XI8imIbLRZSiYGhvYc8SoFkFpIFpQvLUOsh+ Hp+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jiSdINSVFRYviECfxwDXkA1dnuYyyTGGZx7DJKOoYJs=; b=rB5tc5RXIFuLPQxJDCabhZZzHIkYvX4/KoqV0RRJrY5jE1rXqZv2XYSJOcSwrdxkKV LlfeEq+ZCofteKnWr8bbAW/Qy3j/Qt9dWvoLZzvglMGoRaHRYE1/SCbv2+DOvQmHFwEl BmYSpLEXdKoHitN3q0CvDQH+JXhEPi8H5FoiJ/eLSyRb46qkPrSeY0EH3gSid6xtSrtp oZRP6s7aeV+wiwWAOqIOih5MT6ErxM99RUSqr2hlIyhr2qlyLzIFAoC5ZsmHfBS8t8IJ DOiugggtbMcoOkdXsV3ogKhJiuZVZUrau8Vjf9cjBpW70kyujn3EBeEPPhavrUozWnqb dzfA== X-Gm-Message-State: ACrzQf20Kuh2s2lyAD+NmBQZ864DnWnpPIinIVZy7JjPE2Gtn8mLAsoQ WZHHfKQ7Lq4SDeULoDtnnl1Bw/hE/BEcoSMM X-Google-Smtp-Source: AMsMyM7XYF0/Ljt4MGKz/TruSqF/tNgb9whiXQXnKj0J8NH8HwiMDdKOolztUet8v/T3k84ugzg6BQ== X-Received: by 2002:a17:902:7297:b0:17f:93b5:5ecc with SMTP id d23-20020a170902729700b0017f93b55eccmr32624764pll.93.1666611467259; Mon, 24 Oct 2022 04:37:47 -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.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:46 -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 15/22] platform/x86: samsung-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:06 +0900 Message-Id: <20221024113513.5205-16-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/samsung-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index b4aa8ba35d2d..8ba377df73e8 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -1574,7 +1574,7 @@ static int __init samsung_init(void) samsung->handle_backlight = true; samsung->quirks = quirks; - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) samsung->handle_backlight = false; ret = samsung_platform_init(samsung); From patchwork Mon Oct 24 11:35:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617918 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 AF83CC38A2D for ; Mon, 24 Oct 2022 11:43:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231339AbiJXLnB (ORCPT ); Mon, 24 Oct 2022 07:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbiJXLm1 (ORCPT ); Mon, 24 Oct 2022 07:42:27 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AE94101EA for ; Mon, 24 Oct 2022 04:39:54 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id e129so8440545pgc.9 for ; Mon, 24 Oct 2022 04:39:53 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s3OBF2k1WWtiu/9/W0b3fBEExfrwFAb3nrGZKspwFWo=; b=ytZxwj2KO7mqmejMHz4K1suZIYKgKIzkLd7EE+hEIaFueculEZeXax0rPFi0rtL4lr 7+UX9MXWjbBbOQgBjauyeX2QMEOfr0yZCF6Yw3NwAEtLYr/AzMr4Ggz7FIpB/9yGq8Ci CeNajiFIEw4FF3iTA4CXFtGn9bA7DoprnQKeIA0r/AGyzUh0lUH+M9A0yNAdx4uOwaCJ 5pnLw55cfyxjSf2H2FfT7iT6gF3REqCaachB0bZ+Y5p8FvjdHYs2Vj4mZ7V1Pkvhp4jO 2xvAEzb4JSHAaQiHka7I4JxM52qtVtkqOhQWV7jRFiYQ4mE4otcRDd17QUh9/ZoY/MYV r1bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s3OBF2k1WWtiu/9/W0b3fBEExfrwFAb3nrGZKspwFWo=; b=DcGtYrHOma4VuDRxdVeCUPlAbs9kqyqxKmt++9paMXlo6UKGZ9uhtsc3sJmAwDygLk uqlrQ9CYrhYtTI+Jv/TUbeoh3vfeALDA/Y6RpnnxKflK7x7uD7HRUcWdAx/n35rRhsS0 KCqJKhajnxSodZdKtqMQ61Lk5BUKDEovy+Bn5nc2Y8590SQ16Nwi+poaudcq4hrmmQrI yX8B42xOMbW8PGERIE0jh1GrOBIZExwCOaOU+jvneUwUERfvZFUiQ/Yd0ayibnWs77e9 K3J5IXS1uWJYIVXbtXIv1u4O8CZEnHUZ+8mqpVECI/uwnrCSinL9SatWos0tRUwtTqNY oDPA== X-Gm-Message-State: ACrzQf2RKQ6qerD1m9vbiwG6lNXphdH7//7FW1qE48/u/HIKrf8e0DPG vLnBUz/m+6UccebumlwPtEB6Kg== X-Google-Smtp-Source: AMsMyM7gLd2Xh0sfa+tFaHscQUkpHnvkLJ1d0xqmrVl3HqwBIbYxynI67Kp0nGZCTrOWZta1N0QtUA== X-Received: by 2002:a05:6a00:2288:b0:56b:fe9d:b4b7 with SMTP id f8-20020a056a00228800b0056bfe9db4b7mr1191782pfe.79.1666611475639; Mon, 24 Oct 2022 04:37:55 -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.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:37:55 -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 16/22] platform/x86: sony-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:07 +0900 Message-Id: <20221024113513.5205-17-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/sony-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 765fcaba4d12..987942719ba6 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -3201,7 +3201,7 @@ static int sony_nc_add(struct acpi_device *device) sony_nc_function_setup(device, sony_pf_device); } - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) sony_nc_backlight_setup(); /* create sony_pf sysfs attributes related to the SNC device */ From patchwork Mon Oct 24 11:35:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618183 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 3AFEBECAAA1 for ; Mon, 24 Oct 2022 11:42:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231395AbiJXLms (ORCPT ); Mon, 24 Oct 2022 07:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231265AbiJXLmK (ORCPT ); Mon, 24 Oct 2022 07:42:10 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D0DE11152 for ; Mon, 24 Oct 2022 04:39:37 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13ba9a4430cso2777591fac.11 for ; Mon, 24 Oct 2022 04:39:37 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aZbgIVSQ8XgPbVH9Q8Dsp65eLaVcafrOLYAAqQNA3Ms=; b=svkp4e3b3SUT9ftxU+ZLPImVGkrLdjZmAyL4NTDy8zBkyhJo1e5stHvrAz9NnYp+CP AJCGi7A9ny35dbEocVhIsAphKsiD9jZ63/JsrAZueG69IuE95V0TJ6aCnZ+DlNNn13Lm 831reFgJM1LtLUpK9rtNkyvUYZDd26w6QRWfhKIvwmBIQcQJmYTS+V4i6U7+Z4Lpc4d3 s0vv4ZqyrCx4Ys2lKyq0BeBUhRZCS490rmEtluTEKpS152uos0ylqsE7d3kzUq0kQqND becInYrHn+JiAKLdk4p+qnOcD5r2SuDSv8VLrjEkovHL0yMYiNLipQex+iGsarVfust+ Uvsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aZbgIVSQ8XgPbVH9Q8Dsp65eLaVcafrOLYAAqQNA3Ms=; b=2PXrwPLvBsWgdxSqEiyW0yXzxa/L8PE1cuSH5FK/PxAMkNSYjfQLb6jMeTal+ASz8U lPZN8spshXVPVDhaLOkZhtDSJX+N6B3zpEDr4EwDHmegPT7CUt61cJ1oORxdwHqiKPOX jEK8REE0IGIY5kxBuOA1Fn3H29CCIYOOqDnDL+ycqnDEIxuztuST9q5A25LQhQm0h6qV 5+fPh8diDVNoqNbifovLrKLTq1p8V6tUD+Es+tYnzmBpLdBN3dZVHuN45MD1sqsgvxn6 tKuWHPbkMqJP7FP6HenKgZitbafgq6qXfKfeLujSKdytDj+WJWfH2ycQryyKAJmnQCqV JdTA== X-Gm-Message-State: ACrzQf3+r73botUiWbhBR0LOov8MWnBciS5hibKW3cSyidJzHhmvMopn O/k5VgQjYaOIDKkOr099qguQcYsdqvBfspAP X-Google-Smtp-Source: AMsMyM4RUBGzO3rLlIoesY9MV9xSVNvjZ7XRsAYwgRf2MzR+vsTZOlvX93IbLwXDaavbHv/ooxaUtA== X-Received: by 2002:a17:90a:6405:b0:203:6eaa:4999 with SMTP id g5-20020a17090a640500b002036eaa4999mr73460182pjj.8.1666611484014; Mon, 24 Oct 2022 04:38:04 -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.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:03 -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 17/22] platform/x86: thinkpad_acpi: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:08 +0900 Message-Id: <20221024113513.5205-18-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 6a823b850a77..d756d2ce54d1 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3547,7 +3547,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) /* Do not issue duplicate brightness change events to * userspace. tpacpi_detect_brightness_capabilities() must have * been called before this point */ - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) { + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { pr_info("This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver\n"); pr_notice("Disabling thinkpad-acpi brightness events by default...\n"); @@ -6983,7 +6983,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm) return -ENODEV; } - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) { + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { if (brightness_enable > 1) { pr_info("Standard ACPI backlight interface available, not loading native one\n"); return -ENODEV; From patchwork Mon Oct 24 11:35:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618176 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 AFDCFECAAA1 for ; Mon, 24 Oct 2022 14:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbiJXOyL (ORCPT ); Mon, 24 Oct 2022 10:54:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233968AbiJXOxv (ORCPT ); Mon, 24 Oct 2022 10:53:51 -0400 Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E21CAE21E for ; Mon, 24 Oct 2022 06:31:36 -0700 (PDT) Received: by mail-il1-f174.google.com with SMTP id i9so5149165ilv.9 for ; Mon, 24 Oct 2022 06:31:35 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ghtJtVJhPw81MXq6/J6quq2LuUHiKWw8lzS+pFTBsP0=; b=cZrJzXH//QTytM0WW2x60eVTJWmr4XlL39TbHpKK3q3WQCrSwZnjVPRWyiABmgouTe tcWaVYaRKc8hu79d1xDnlFcNITHqD8aagxIfdW/j33EuRzv9/LyBezR8gcIDeuDjMBdi Ipdx3WUUwYagpuujWId9VshSvfmg5KdxiBBTFEGB4woUWAXr+bNyz5W7lNqKncoZTj5V OtqnOJcGCmy/ESZHdgjapJ1vmW0D4ruK7a2seAn0eeRS8/38sQjcPxnlad2eAV61+hmK GkeCBWxM+dUrzuzssuopdvmaQwwmpmxNgwGhyMJjD/yNfawG/7R+9RDafwqQFOoJ0z9Q ANrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ghtJtVJhPw81MXq6/J6quq2LuUHiKWw8lzS+pFTBsP0=; b=EdwgelQ+J2hQQ8OweaHDG2/uxwXvDmB9qDpRCtoNvW1AWrL+FDtaqXO4FncM1reSyd etwHwQaPoiwaoJG6y+7c9sTE2Xr/AWGe7tejthp+iWOjvRiXDxomk2Wt/L0K18DrZ/3F 7xfIvmdy644ZQo2vOpCfsnRT9AwIdGck2zotuoSdk+pA48zdZz0Ej4T5JAQfunEYftzQ o6d/bJ9j1I5051dJ+QgpSsqLEGvgPzbCEdFIDDG0ZfZMu372g85rZc/1XNWuY6QKgYhA fqGwZTzrAzWNb5YgysL61bafbeVTSluuSYLJ+m7h4fsa7iQNITB13/awLwobvOzO2AEx fDEA== X-Gm-Message-State: ACrzQf1XqI6F76/gQ7VScBgacIRAXm9Nw0oeptoJwQwAXHXPK5fvK0Rz xEo07GWALp5I2ZHrkQN/xHYlYvra/kfuxiDe X-Google-Smtp-Source: AMsMyM7jVfOb4cdFC5JDiHJLWBD4KDzAtatMaD5/Pd8TR8fUHas2SHGFltiDcGGdPiW3YBak6k10IA== X-Received: by 2002:a63:dc54:0:b0:44c:ce26:fa35 with SMTP id f20-20020a63dc54000000b0044cce26fa35mr28698734pgj.374.1666611492363; Mon, 24 Oct 2022 04:38:12 -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.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:11 -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 18/22] platform/x86: toshiba_acpi: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:09 +0900 Message-Id: <20221024113513.5205-19-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 160abd3b3af8..3d747a901ad8 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -2978,7 +2978,7 @@ static int toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev) return 0; } - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) return 0; memset(&props, 0, sizeof(props)); From patchwork Mon Oct 24 11:35:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618178 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 625F0C38A2D for ; Mon, 24 Oct 2022 12:06:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232648AbiJXMGZ (ORCPT ); Mon, 24 Oct 2022 08:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233061AbiJXMFC (ORCPT ); Mon, 24 Oct 2022 08:05:02 -0400 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7566C7D78E for ; Mon, 24 Oct 2022 04:51:16 -0700 (PDT) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-13b23e29e36so10790087fac.8 for ; Mon, 24 Oct 2022 04:51:15 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UAzZQL5seIJutOYUjJgcTz5SIcJNiVaULVY/vxMxJ7M=; b=bWAkfym/IuAYQQDsk1OCfdE9w9yWPE3crZCufatlU3uyFhSD2FLPPyi4EZX0XKPNNN TsT1Mn93d8yM/JN1r6KstPaSr0v2lhHNLAttfYUvsrYDknwH7khxwfUrEhoUBDF6QNvT 2AoTMSr1l1S7qOR5wF4oY1dCDKpWYBJ8RPjoWCYtuPhEghyQHHePilHd/NADV54vZIGq 6rdvlz9HJM3z9wu+pJUiXEGORc6v7pwvQYHXmPP9HS48eXejuQAX3z/RDPWeO6o44bSX c9msf1NsRp6QE7dLwlbW0UvYtPhluL4+JoPCees4u24dLHSpN6Uh4AbxJOiXkAJfcDlq GsGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UAzZQL5seIJutOYUjJgcTz5SIcJNiVaULVY/vxMxJ7M=; b=bizhMcxC3eM0265LjQWMDsfJoMidPNRoTykiwcqLifH1QShQrJP0Bg3fJGet/86wQe QCaJtEQ6reQVih5e78D0L0g7RYdvouSeuDqvYZsqKd++orCdvDdrx4dj+tt+969fiyrV ctEq+XRuekfBFJIn8XLNXADwykm7f0iUGfh/qqNsWXV5fKywkfo7MmEe+EUeTeKyzmRs 73/tTc5eGJkJoF3iXO9cD30LPASY1HcJndJexBBkHu2MNP+ecDoRzztCXtjL/QAaplKp A8B+TMBdlX3FXEKbH9JbTEh3FCbfNr2eboXqz7nkpqnVcaMUREeHYvXpgcFCK3NFUnlQ ETiw== X-Gm-Message-State: ACrzQf0tmpNh/Cd1q40pXi+PX5xvqbtdbyS73Fe0zVxCGIso3sLyOPMe J/WP7aFVaevLxujzrD251Ydry1h0KEEW87rC X-Google-Smtp-Source: AMsMyM518/+LX9D2Z710rX+ZGWrNfx22tav+R9okHqn5RhyI0izm5Jqv1jyaCGbAfBxBtougO+lAKQ== X-Received: by 2002:a17:90b:4b8f:b0:213:95f:9515 with SMTP id lr15-20020a17090b4b8f00b00213095f9515mr6350162pjb.82.1666611500759; Mon, 24 Oct 2022 04:38:20 -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.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:20 -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 19/22] platform/x86: dell-laptop: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:10 +0900 Message-Id: <20221024113513.5205-20-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/dell/dell-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell/dell-laptop.c b/drivers/platform/x86/dell/dell-laptop.c index e92c3ad06d69..9cfffbe2bd95 100644 --- a/drivers/platform/x86/dell/dell-laptop.c +++ b/drivers/platform/x86/dell/dell-laptop.c @@ -2230,7 +2230,7 @@ static int __init dell_init(void) micmute_led_registered = true; } - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) return 0; token = dell_smbios_find_token(BRIGHTNESS_TOKEN); From patchwork Mon Oct 24 11:35:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618177 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 23DE9FA3740 for ; Mon, 24 Oct 2022 12:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234893AbiJXM6d (ORCPT ); Mon, 24 Oct 2022 08:58:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234758AbiJXM5m (ORCPT ); Mon, 24 Oct 2022 08:57:42 -0400 Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B79097EC1 for ; Mon, 24 Oct 2022 05:17:05 -0700 (PDT) Received: by mail-qv1-xf36.google.com with SMTP id x13so4872113qvn.6 for ; Mon, 24 Oct 2022 05:17:05 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3flgEAolZn9kn5oClvgduggco3LU3Kao58cYVj8GoE4=; b=LFNGam9y4Mzo/GmaRHBG21OM1uk0hOommk74KXR9Ca3TMfQryGTVdhVU5ltrLDq2eZ 02Sufh/O0mf9igu5dzzr9xfFTvUVJnusR47enfl8COOjleX5fwL6eAZaOwUFpStJHUJi hCLqEFuFEiStB87OEfhilZId7gmp5XPzc8feF2PYyJiV+KGbmtv9V+IgrRH+2aqz3DHV M+0XmnIQ2XPB2CwxIkAbGWu2tAx/w1WMTphoADzrca9LYFwO0Tc5zvTS7ycemczGbZdY uWICIlA0YHCEjqWRpSdtI+n8c9TyFLANwWLT4ZFSjfGAycLhmE5YxuD4ntG1ulSCg1AF sMBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3flgEAolZn9kn5oClvgduggco3LU3Kao58cYVj8GoE4=; b=XznEGAaXthJPWlFwNI+EW8NVjUjOPTSbuRfBqdFrD8z7MYRia4VtZsBzzDGNzh+oex lWVpEqAPMDAGF3k0Bwtp1jDi3iVOALkuyxwVTRH/CRff3iggNm/6/gsQy1NYCzcfdMLk FXGS5sCu3PoSabDJXOVLDehHR1b9sR64vBOdRFsF59BkfqI6C9tZisuvEdTKQ7eU+ASg wu+m+iCyDabQLhtafjqcExIbWEfivCN/RB/bj7aSQ/anB8DDF5AB6TccNQBS2iJFCwj7 OKsLBtDBDrJagKb+f4pRaa5tc3ook9EedzsiTH1QMymG9AEXbLV1GLAsQnf3Ooo8fNrF I73A== X-Gm-Message-State: ACrzQf0O6wkBVNIN6Chv+crW4X+8o28y1vLEhMyCWMFB35V8zb8j6Zhq ANx+PFBQGMFxsjzqhP5bu00OO2ZLcOSFVZO3 X-Google-Smtp-Source: AMsMyM5su6ApWtiy+J/kwO/a0HneChUBGcY0XEPNt6nciHQoDPKXFdF+gj0Vs4qmtnJ6gx8k4rNCKg== X-Received: by 2002:a17:902:ec8a:b0:185:5462:261a with SMTP id x10-20020a170902ec8a00b001855462261amr32981480plg.160.1666611509068; Mon, 24 Oct 2022 04:38:29 -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.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:28 -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 20/22] platform/x86: intel_oaktrail: Use acpi_video_get_backlight_types() Date: Mon, 24 Oct 2022 20:35:11 +0900 Message-Id: <20221024113513.5205-21-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/intel/oaktrail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/oaktrail.c b/drivers/platform/x86/intel/oaktrail.c index 7c5c623630c1..f44a51dad16a 100644 --- a/drivers/platform/x86/intel/oaktrail.c +++ b/drivers/platform/x86/intel/oaktrail.c @@ -330,7 +330,7 @@ static int __init oaktrail_init(void) goto err_device_add; } - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + if ((acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { ret = oaktrail_backlight_init(); if (ret) goto err_backlight; From patchwork Mon Oct 24 11:35:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 617915 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 42190ECAAA1 for ; Mon, 24 Oct 2022 12:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232440AbiJXMAs (ORCPT ); Mon, 24 Oct 2022 08:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232788AbiJXL7w (ORCPT ); Mon, 24 Oct 2022 07:59:52 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B54760C8 for ; Mon, 24 Oct 2022 04:49:05 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id p3so7275697pld.10 for ; Mon, 24 Oct 2022 04:49:05 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KbqonL6UPx/BgRTH41ccNpqLV1dBbzKless8fMVmEfU=; b=MHRUNtmu2bH7itJpyD63dUo0Q4dAeka1jBDdBQwUZ46L2hC+5C3pV19AGUh2yem6BA Aox5GrL2l4ZqarXcjL7UuZADrEnI+vX23xzpAk3ap+KEjjko3B1qwsiz3zwNkeq8wHvQ fajz9N6SRidlKuqi7F8UUPfGYGUnQLvBa+vPlzN1KGzSeulYFZ+p5TSnOa6m66VtgdXg p5QIR3d/Uqoe8wL8tF8u9h5RGFSalS4e8/GHkYA/e++G+454hg6bwulubJihe3MrArBF 3kAAPdSFP0h1ZDk44C89iP616NgBd/NPxYuDLqwxHKvVPr9IykzR6Ta+FQqWrt7TEJuf fViA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KbqonL6UPx/BgRTH41ccNpqLV1dBbzKless8fMVmEfU=; b=pLIRohFSHeIyyMhfyFpm3tObAC6d1QoFDhAOP29mww+RrC+w/8uBswq0VlDDM4fh9f AyvslS1kcJUz7z8RFGYS7QNxMwgvAbQBE02GYl5VGgUbRx0amPLoZ+GVvKuECpqfgh60 Bqq0HE7Ve2tZBl5GXiAq1YPGFW57+iqgB65Jdgd8jGAyS/0HwdkIOWS913NOpJZAF3M3 QcBdBGqpFcV8uotORdG8NNJqReEyk5NcugHljCyxqYrIhjD22OzXkP8HaLRxJgHu14/T sO7+BXQi33ucosM6lceWOHFzSy1hJMVdI1MJTeK0U6DINH8ArGz4QJ8U/xf5xar+a2g8 hbaw== X-Gm-Message-State: ACrzQf3gohDl3mliLk3PHIpESXvaTfrW4fIDKvNA49vClwiBqVISjh8M LomrfXDQBNpt+xED+/Td1LUrLgJGDnUZxb3M X-Google-Smtp-Source: AMsMyM7atKAS6Y/8LFmnWncoMM8zZUNzHVrglSR0fG3EM+hND7a88LYrk4FvnqEjUJwtq1jKX5wlaA== X-Received: by 2002:a17:902:8e84:b0:178:71f2:113c with SMTP id bg4-20020a1709028e8400b0017871f2113cmr32724371plb.79.1666611517605; Mon, 24 Oct 2022 04:38:37 -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.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:36 -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 21/22] ACPI: video: Remove acpi_video_get_backlight_type() Date: Mon, 24 Oct 2022 20:35:12 +0900 Message-Id: <20221024113513.5205-22-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_video_get_backlight_type() is deprecated and now there is no user of it. Signed-off-by: Akihiko Odaki --- Documentation/gpu/todo.rst | 8 +++---- drivers/acpi/video_detect.c | 46 +++++++++++++++++++------------------ include/acpi/video.h | 31 +++++++------------------ 3 files changed, 36 insertions(+), 49 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 393d218e4a0c..39e2ff2beb29 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -687,7 +687,7 @@ On x86/ACPI devices there can be multiple backlight firmware interfaces: register programming by the KMS driver. To deal with this backlight drivers used on x86/ACPI call -acpi_video_get_backlight_type() which has heuristics (+quirks) to select +acpi_video_get_backlight_types() which has heuristics (+quirks) to select which backlight interface to use; and backlight drivers which do not match the returned type will not register themselves, so that only one backlight device gets registered (in a single GPU setup, see below). @@ -696,7 +696,7 @@ At the moment this more or less assumes that there will only be 1 (internal) panel on a system. On systems with 2 panels this may be a problem, depending on -what interface acpi_video_get_backlight_type() selects: +what interface acpi_video_get_backlight_types() selects: 1. native: in this case the KMS driver is expected to know which backlight device belongs to which output so everything should just work. @@ -708,11 +708,11 @@ Things will break on systems with multiple panels where the 2 panels need a different type of control. E.g. one panel needs ACPI video backlight control, where as the other is using native backlight control. Currently in this case only one of the 2 required backlight devices will get registered, based on -the acpi_video_get_backlight_type() return value. +the acpi_video_get_backlight_types() return value. If this (theoretical) case ever shows up, then supporting this will need some work. A possible solution here would be to pass a device and connector-name -to acpi_video_get_backlight_type() so that it can deal with this. +to acpi_video_get_backlight_types() so that it can deal with this. Note in a way we already have a case where userspace sees 2 panels, in dual GPU laptop setups with a mux. On those systems we may see diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 9cb12e4f06f7..88462f2fb8cc 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -38,19 +38,21 @@ #include #include -static enum acpi_backlight_type acpi_backlight_cmdline = acpi_backlight_undef; -static enum acpi_backlight_type acpi_backlight_dmi = acpi_backlight_undef; +#define ACPI_BACKLIGHT_UNDEF (-1) + +static int acpi_backlight_cmdline = ACPI_BACKLIGHT_UNDEF; +static int acpi_backlight_dmi = ACPI_BACKLIGHT_UNDEF; static void acpi_video_parse_cmdline(void) { if (!strcmp("vendor", acpi_video_backlight_string)) - acpi_backlight_cmdline = acpi_backlight_vendor; + acpi_backlight_cmdline = ACPI_BACKLIGHT_VENDOR; if (!strcmp("video", acpi_video_backlight_string)) - acpi_backlight_cmdline = acpi_backlight_video; + acpi_backlight_cmdline = ACPI_BACKLIGHT_VIDEO; if (!strcmp("native", acpi_video_backlight_string)) - acpi_backlight_cmdline = acpi_backlight_native; + acpi_backlight_cmdline = ACPI_BACKLIGHT_NATIVE; if (!strcmp("none", acpi_video_backlight_string)) - acpi_backlight_cmdline = acpi_backlight_none; + acpi_backlight_cmdline = 0; } static acpi_status @@ -109,25 +111,25 @@ static bool nvidia_wmi_ec_supported(void) * buggy */ static int video_detect_force_vendor(const struct dmi_system_id *d) { - acpi_backlight_dmi = acpi_backlight_vendor; + acpi_backlight_dmi = ACPI_BACKLIGHT_VENDOR; return 0; } static int video_detect_force_video(const struct dmi_system_id *d) { - acpi_backlight_dmi = acpi_backlight_video; + acpi_backlight_dmi = ACPI_BACKLIGHT_VIDEO; return 0; } static int video_detect_force_native(const struct dmi_system_id *d) { - acpi_backlight_dmi = acpi_backlight_native; + acpi_backlight_dmi = ACPI_BACKLIGHT_NATIVE; return 0; } static int video_detect_force_none(const struct dmi_system_id *d) { - acpi_backlight_dmi = acpi_backlight_none; + acpi_backlight_dmi = 0; return 0; } @@ -672,7 +674,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = { * Determine which type of backlight interface to use on this system, * First check cmdline, then dmi quirks, then do autodetect. */ -static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native) +static int __acpi_video_get_backlight_types(bool native) { static DEFINE_MUTEX(init_mutex); static bool nvidia_wmi_ec_present; @@ -699,19 +701,19 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native) * The below heuristics / detection steps are in order of descending * presedence. The commandline takes presedence over anything else. */ - if (acpi_backlight_cmdline != acpi_backlight_undef) + if (acpi_backlight_cmdline != ACPI_BACKLIGHT_UNDEF) return acpi_backlight_cmdline; /* DMI quirks override any autodetection. */ - if (acpi_backlight_dmi != acpi_backlight_undef) + if (acpi_backlight_dmi != ACPI_BACKLIGHT_UNDEF) return acpi_backlight_dmi; /* Special cases such as nvidia_wmi_ec and apple gmux. */ if (nvidia_wmi_ec_present) - return acpi_backlight_nvidia_wmi_ec; + return ACPI_BACKLIGHT_NVIDIA_WMI_EC; if (apple_gmux_present()) - return acpi_backlight_apple_gmux; + return ACPI_BACKLIGHT_APPLE_GMUX; /* On systems with ACPI video use either native or ACPI video. */ if (video_caps & ACPI_VIDEO_BACKLIGHT) { @@ -725,23 +727,23 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native) * is usually not the best choice. */ if (acpi_osi_is_win8() && native_available) - return acpi_backlight_native; + return ACPI_BACKLIGHT_NATIVE; else - return acpi_backlight_video; + return ACPI_BACKLIGHT_VIDEO; } /* No ACPI video (old hw), use vendor specific fw methods. */ - return acpi_backlight_vendor; + return ACPI_BACKLIGHT_VENDOR; } -enum acpi_backlight_type acpi_video_get_backlight_type(void) +int acpi_video_get_backlight_types(void) { - return __acpi_video_get_backlight_type(false); + return __acpi_video_get_backlight_types(false); } -EXPORT_SYMBOL(acpi_video_get_backlight_type); +EXPORT_SYMBOL(acpi_video_get_backlight_types); bool acpi_video_backlight_use_native(void) { - return __acpi_video_get_backlight_type(true) == acpi_backlight_native; + return !!(__acpi_video_get_backlight_types(true) & ACPI_BACKLIGHT_NATIVE); } EXPORT_SYMBOL(acpi_video_backlight_use_native); diff --git a/include/acpi/video.h b/include/acpi/video.h index a565ba27fae0..5b748fdb606e 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -43,21 +43,11 @@ struct acpi_device; #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x88 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x89 -enum acpi_backlight_type { - acpi_backlight_undef = -1, - acpi_backlight_none = 0, - acpi_backlight_video, - acpi_backlight_vendor, - acpi_backlight_native, - acpi_backlight_nvidia_wmi_ec, - acpi_backlight_apple_gmux, -}; - -#define ACPI_BACKLIGHT_VIDEO BIT(acpi_backlight_video) -#define ACPI_BACKLIGHT_VENDOR BIT(acpi_backlight_vendor) -#define ACPI_BACKLIGHT_NATIVE BIT(acpi_backlight_native) -#define ACPI_BACKLIGHT_NVIDIA_WMI_EC BIT(acpi_backlight_nvidia_wmi_ec) -#define ACPI_BACKLIGHT_APPLE_GMUX BIT(acpi_backlight_apple_gmux) +#define ACPI_BACKLIGHT_VIDEO BIT(0) +#define ACPI_BACKLIGHT_VENDOR BIT(1) +#define ACPI_BACKLIGHT_NATIVE BIT(2) +#define ACPI_BACKLIGHT_NVIDIA_WMI_EC BIT(3) +#define ACPI_BACKLIGHT_APPLE_GMUX BIT(4) #if IS_ENABLED(CONFIG_ACPI_VIDEO) extern int acpi_video_register(void); @@ -65,7 +55,7 @@ extern void acpi_video_unregister(void); extern void acpi_video_register_backlight(void); extern int acpi_video_get_edid(struct acpi_device *device, int type, int device_id, void **edid); -extern enum acpi_backlight_type acpi_video_get_backlight_type(void); +extern int acpi_video_get_backlight_types(void); extern bool acpi_video_backlight_use_native(void); /* * Note: The value returned by acpi_video_handles_brightness_key_presses() @@ -84,9 +74,9 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type, { return -ENODEV; } -static inline enum acpi_backlight_type acpi_video_get_backlight_type(void) +static inline int acpi_video_get_backlight_types(void) { - return acpi_backlight_vendor; + return ACPI_BACKLIGHT_VENDOR; } static inline bool acpi_video_backlight_use_native(void) { @@ -104,9 +94,4 @@ static inline int acpi_video_get_levels(struct acpi_device *device, } #endif -static inline int acpi_video_get_backlight_types(void) -{ - return BIT(acpi_video_get_backlight_type()); -} - #endif From patchwork Mon Oct 24 11:35:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 618181 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 54FFEFA373E for ; Mon, 24 Oct 2022 11:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231726AbiJXLx1 (ORCPT ); Mon, 24 Oct 2022 07:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231723AbiJXLws (ORCPT ); Mon, 24 Oct 2022 07:52:48 -0400 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2A5E28709 for ; Mon, 24 Oct 2022 04:44:49 -0700 (PDT) Received: by mail-pg1-f175.google.com with SMTP id f193so8500466pgc.0 for ; Mon, 24 Oct 2022 04:44:49 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wpAa0dkS8XhA2GQ66lc5m8kkJugJVYjadMORUlQ0wPQ=; b=t0cdU8Gq6mNNYiksD6eEYKO8Asn+CT0EzR/trw2LnPyXm+rD6nqXsCYeQqjtM7gPYM czLtjzn9STZMwbg25oKJ+rchJIE1C3EbruYtUtL1fo+a90zdV4qc0tsyovLT5dJAiUGE qsy+4fAYnPcQVS0njH5jJLQI9FZmFytWkVQGNsnYWmnWaeNhpSPFlsctwJOWhSbiXeZ9 h7w4BZ8ZVIJgYAYNUV3nlz9q7wdjdRwS9ZZ0zjcSCMcue0JOz1szUQizwPn6jyvjKFGF cxNAlwAh76EuqilV01f5017ZpYLpbgRwKmZuX/eFx2jyV1b0J3gkxlk7wW3OSfaxul6v yo0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wpAa0dkS8XhA2GQ66lc5m8kkJugJVYjadMORUlQ0wPQ=; b=CgAWc9m6NSKaB7x0qb/uoIBj2dpZz3Qp6Nay60R4G9UUOSsFoqq0QNZho/cRL5zjpN ocMT7cABC0hL2BssUpw3BcQzE2ak548XpSqGxf7uIUG0r9VJ/3CKgWYcTLGdtIsMp9Oh ya/q3zhRtg/8KtPhNpKazt7ZfJ3BzVNi27+ApHCrQVBBgd3/FzBK7v7WchLPinFpQddr rice2+AbLZpE/DF76ENcNgev4vMpGCxtpZ24Og9KCDb7qSApcwJ6eGSbaSGKy19L59qJ rblbmm2S7uoKbSk99+QAOic1EpM9EPUNj9QQy2oism+Z0GtBopM5bIdvUoTJOM46OnvH qEVQ== X-Gm-Message-State: ACrzQf1nTCGdEi99WJPpVxcubumt2qyX9sNkBQBf8m8VVPruK+WO4or+ /AksrS1AcyOsTZfPBpq6Qdn0Jg== X-Google-Smtp-Source: AMsMyM6nms4lu3tkLOdZ9JNSQbhLjcWcRc9H/ekaTG+Ayy8xJMo8kAow4Lj5Qd758THxno/pN3RsVg== X-Received: by 2002:a65:68cb:0:b0:460:b552:fbf4 with SMTP id k11-20020a6568cb000000b00460b552fbf4mr28051732pgt.457.1666611526061; Mon, 24 Oct 2022 04:38:46 -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.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:45 -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 22/22] ACPI: video: Fallback to native backlight Date: Mon, 24 Oct 2022 20:35:13 +0900 Message-Id: <20221024113513.5205-23-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 --- drivers/acpi/video_detect.c | 4 ++-- include/acpi/video.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 88462f2fb8cc..36354241c740 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -732,8 +732,8 @@ static int __acpi_video_get_backlight_types(bool native) return ACPI_BACKLIGHT_VIDEO; } - /* No ACPI video (old hw), use vendor specific fw methods. */ - return ACPI_BACKLIGHT_VENDOR; + /* No ACPI video, use native or vendor specific fw methods. */ + return ACPI_BACKLIGHT_VENDOR | ACPI_BACKLIGHT_NATIVE; } int acpi_video_get_backlight_types(void) diff --git a/include/acpi/video.h b/include/acpi/video.h index 5b748fdb606e..656b59acfd1f 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -76,7 +76,7 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type, } static inline int acpi_video_get_backlight_types(void) { - return ACPI_BACKLIGHT_VENDOR; + return ACPI_BACKLIGHT_VENDOR | ACPI_BACKLIGHT_NATIVE; } static inline bool acpi_video_backlight_use_native(void) {