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: 13017604 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76440FA373E for ; Mon, 24 Oct 2022 13:23:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55BC910E6C8; Mon, 24 Oct 2022 13:23:33 +0000 (UTC) Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6448F10E399 for ; Mon, 24 Oct 2022 11:35:50 +0000 (UTC) Received: by mail-pf1-x431.google.com with SMTP id d10so8720190pfh.6 for ; Mon, 24 Oct 2022 04:35:50 -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=K//zNJ18ju/GtFtGTdxdJHvaBpQZbVdp1awwuD67OSKabFgHA04MD0CQ23gSMWHpaT T6slzJleS81EOvSRb9zLLNm6ERXao5bigwZeG7ilWT5/PxumDsT2jS/9VcCwwhf7rpeO JKHkiNb7mVrxR2WC9iyX0/zvUBmPI0vG6CcnzJKTVf1DHZCK/R6ITMTilIe6zgrrqdZT JqMja2iwE0ieOaTmmMqNXq0hcyjVTYICEzOLQqL6oe4S4JJpll5o5oK4FMFIUNFjDIHb hzPfzR9hJKHslC7gKytR+Bb+85F8PjGvDvwU6jfsiMxvktksr9SfGZBQLP5Jt5Q4Jtu/ fkBg== X-Gm-Message-State: ACrzQf06h/faajmtzWP83uIsQ8O5oz/A6CXPX49cMHouRKKVi41i1U76 I6KC4Kr0V1koD9dx1fZYP7nNAQ== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 01/22] drm/i915/opregion: Improve backlight request condition X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017618 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9372AC38A2D for ; Mon, 24 Oct 2022 13:24:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BCEB210E6F9; Mon, 24 Oct 2022 13:23:46 +0000 (UTC) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9BA110E399 for ; Mon, 24 Oct 2022 11:35:58 +0000 (UTC) Received: by mail-pj1-x102e.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so3133881pjc.3 for ; Mon, 24 Oct 2022 04:35:58 -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=JxLVYh/4jqBlKtzk0ONI8one9orY2npdAc4b2RKYmFwbmE/Q3RlPrVhxGEbkrGMDoy mdkeydw7kRZCkUtwaTjcft8628KbU2pRdbkvE9aBIN8TsJjEbUhN97IunlFUvV0GH6FQ On4oy5/8H9flZDgdU5dR4MGZVbtcTxd1RfOFXn72URcJBmC1XbopG+GtcavwWHpFgNDh LfAJV8mPeP1Sj+EjmKQJWB9oOb9gzvPjC6iqB8ipqNx0nN63FhfaIYYqOCdTlZZ0lUWG vKwFO7dJOC1VY6vN9YvMsSrVnIWE0GF44sGHGdvKPn9ORrGyOWoMcD43ENtEPYH7INpl qpkw== X-Gm-Message-State: ACrzQf3dRxXwdH41F3ektt+z2MXinyDYa0bvPZqJvJRZAoniOl0SZe3x yRKC/Jxk7n1ZpRsFNcsFnO7jgw== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 02/22] ACPI: video: Introduce acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017601 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95BC9FA373E for ; Mon, 24 Oct 2022 13:23:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6690D10E6A9; Mon, 24 Oct 2022 13:23:30 +0000 (UTC) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08FA110E3A9 for ; Mon, 24 Oct 2022 11:36:07 +0000 (UTC) Received: by mail-pj1-x102d.google.com with SMTP id q9-20020a17090a178900b00212fe7c6bbeso2862139pja.4 for ; Mon, 24 Oct 2022 04:36: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=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=qPA/0XueoC8L04ceAzzj2TA+bWzN2hEGJQeGOsbaBzqkAhmvkEeDpoSMk2H2xDRqYH RRHTQEVWpFlICOygSc+zxoj6KuR67WYU0whqyJqR5CxDLkbWd3O1SLQfluDekBdxK+Hy ryZpN434UCHnq0OfaTPtQe298hPs37gzj5bu2T7FslvijrUB0m5dYsEvoKTaroPwmNBZ 4fPOWLAaRcWR65YJqE53C9PNMUmHWcvocOVAxa9wdgNpwOOoUHSZTR+nlvc1dUHvlHf5 gor2tcx3WWptdXLQtSqcZRpPiLQbDTSk/X/+FDJOOXdEVYYxY/ATslcoKtJlA/9nadhn lYXA== X-Gm-Message-State: ACrzQf13YgKd1KkeIKgr4KqnJalypGjOLx9wzUkq+R10P8bDt7mpECb1 AiOO7/SxFz6Y/ZtfTLTDu47Qng== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 03/22] LoongArch: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017625 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E74CCECAAA1 for ; Mon, 24 Oct 2022 13:24:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C06310E6FC; Mon, 24 Oct 2022 13:23:47 +0000 (UTC) Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) by gabe.freedesktop.org (Postfix) with ESMTPS id E01B210E3A9 for ; Mon, 24 Oct 2022 11:36:25 +0000 (UTC) Received: by mail-vk1-xa32.google.com with SMTP id v81so4516085vkv.5 for ; Mon, 24 Oct 2022 04:36:25 -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=eg30e8FH7GExSdrobSLc4hdcjNkExZzfXU6MKYo9ulGKLVuKuBpNQmxIK9ynykNPsR ZjM1J790RjCtYCN3z+XGM5+5/ozDAeo1dQokpgYagwxPRVoJxv8lSrp8obhzWbLey6Nr ZKYHSQqMaE5NeR92d2BgJ+Uvz66UYCRnGJJUv2Ny67G/YnuD0saELersm2T8GgYLt5pI JyXfEKV9K5ItYaRXA1PDV+kBmacYsEpEO6ZN+QCIBqy5BYGm1KX02QtlIe0L/iVbq3vz 4AbiNAJT8OOqwnVmB87T575sue87Vrs1FiKO1yIdJYX+1qeUiSwE3eGVOdRmFHUIpdZt tmSQ== X-Gm-Message-State: ACrzQf1dWN6g4cyT04SkfqG/S4d0zIp4q7kxad3l68m1uuPz3V1+wknR kxRZWYnsF3PD9GTDI4rYNOJv4ynaMOCAe0OI 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 04/22] platform/x86: acer-wmi: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017605 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A603C38A2D for ; Mon, 24 Oct 2022 13:23:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63DA410E6CE; Mon, 24 Oct 2022 13:23:34 +0000 (UTC) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A78610E3A9 for ; Mon, 24 Oct 2022 11:36:23 +0000 (UTC) Received: by mail-pg1-x529.google.com with SMTP id e129so8437896pgc.9 for ; Mon, 24 Oct 2022 04:36:23 -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=3GM4b+5eTUlEUQrrXpBarbcrMUDRkhfzfuwiBRJcUmfmKzxEirMMQG9qFMOqoNp43U ILvHt9zlkXiX6xH5aUOMWbb/0QO0ECMpde4XnwhDVOz46vmIl17aBmfwqWQodpz+Mn+6 IWSG+pgzYVcOz2GLvSabV/lHBNMXIFdjppKg4atMvJbesqaXSnyJLC41WR8FZpxCijDT YqW8+vVNmZTBcW8/aIdxQrOCijyy1SfsWevfbzEI6sQgjatmO+lay+INAC0/X6bkLMxs UuzlwQVgZaktt9ot6hfg3362eA5epvyrHKWtHPJiiPquLq5hRdEB63yFcp9fG5hFW2Sn AksQ== X-Gm-Message-State: ACrzQf0Lu5GzyZyPyRfGCABc34hq3UkUBJy+NMreVK9YJaA3ZACZsTnm Evz2dAASJCDW38PU7bpvIBxgaw== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 05/22] platform/x86: asus-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017599 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03807FA373E for ; Mon, 24 Oct 2022 13:23:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D93110E6A1; Mon, 24 Oct 2022 13:23:30 +0000 (UTC) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by gabe.freedesktop.org (Postfix) with ESMTPS id E772710E3A9 for ; Mon, 24 Oct 2022 11:36:31 +0000 (UTC) Received: by mail-pj1-x1030.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so3135043pjc.3 for ; Mon, 24 Oct 2022 04:36: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=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=SLN8LwSW3ljjZq+TLti7bWMGeYvErHX4kqjYtogSlkSkMmuMGqVC7eE29KSHD0KUqu f+R0sB7CxXZvq2yoH10koj9n8t2p8fMce6l1basrsR8tAWFDYVNYHEB0O4C7wg9ViDfw R3mMycyedG6a9FGASvfhxUUwka89v4XAhS+wcUmQ5PSM6AFojUqSU2WfiIyYPftttkr/ QRY1Ab5jIpNyj4Sx6r8EDEztARwpbnqlUNZHnzBt9HbP+Ua04RTZyz4ZiYDQsh6+avzp Nf/APpX0remcEAthLz4sYyHTt7GwV1q0Kudox0U/VJXD9orIq1dsQT7pRSSd/tkIZ1qH u46w== X-Gm-Message-State: ACrzQf2gB6WkOsM+spRzLUD5m3EL2BdEL+sukhXETvEhO/et0WXf1vLc +1uKvoA5TbIxpfyhYm263gZxjg== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 06/22] platform/x86: asus-wmi: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017607 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFA77FA373E for ; Mon, 24 Oct 2022 13:24:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 603D210E6DC; Mon, 24 Oct 2022 13:23:42 +0000 (UTC) Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 70ED310E3AE for ; Mon, 24 Oct 2022 11:36:40 +0000 (UTC) Received: by mail-pg1-x52d.google.com with SMTP id g129so6818992pgc.7 for ; Mon, 24 Oct 2022 04:36:40 -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=KXE6Qcl/vIsJG78C2D6mYUL4/PioDG6teW/wt/+A9q7IX49z+KoGToPKCuK4eSF0/+ yhtTyf+vXP60mqgQOLKw9MtCtEUsyUK+DfC8BBtBZZOVGnV5dgimV2Ctz4d2La4WSa5N +iPlHTSWvPhENDPY0YXFBdplEjz8aULkwdl2Ij1DnczRrGK9rvMCAAl+N1l6bgTnvDUb hDzvhtCAHcf2wHRkYal6RaW602VZWMlmF/e0BWr2I+neeZ3wLEFSuGz0zXxOyF/Pte4y obQOfNsQEtYbxCwzDU5ziO8Tvez8mx7eAUVRWGWQ60s+wwJiPi3+CTtTU5Dr235gAbJW 0CRA== X-Gm-Message-State: ACrzQf22iCiQ6Rrpp7IcNYzUFcIOo0q6gPqyQgvim+bI5EBWnt3reGea p3iOhKbfs81Dar+DdySrpSUvxA== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 07/22] platform/x86: compal-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017623 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89CD5FA373E for ; Mon, 24 Oct 2022 13:24:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5829110E716; Mon, 24 Oct 2022 13:23:49 +0000 (UTC) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by gabe.freedesktop.org (Postfix) with ESMTPS id D567D10E399 for ; Mon, 24 Oct 2022 11:36:48 +0000 (UTC) Received: by mail-pg1-x52b.google.com with SMTP id s196so8466641pgs.3 for ; Mon, 24 Oct 2022 04:36: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=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=h3X8v2hgy+zg9W3D4Y2MTr4OZcAkPSomRjZzdrGDSOemYfJYfPEOadTT40P75BBDkP VM7fPcr4vK4xlW7EQGOQ0X6+YOhrj++DGrqp1Qqxue8QX5tWYvvbCCuYVsa4XWmUfdBg PWKfx2QiRc843vPLBzIbJDSgZVh1mb7/x1Y6xqjGjic6yHy472kJlSsyQvj+q/Ulvmse GwZg3oKqWLEc1OuDmTeaPKRe5fF/4AO6idkOuqxMN8c5NRlLEmtRLs4TR1GqBSeKZCRM IdYUxZSVP+15ncScNLQOyQQZzMVVtyJr8VdLVyK5M4QLHjKc3sutz2PPlhcj2A2Nxz3z 6jqg== X-Gm-Message-State: ACrzQf0rJVVg6oXPDevlliAhDRxqgpqPX84YHNHiFhB5rdgNISYmFKfC lYER+OXw14JnifHBSVAE9Y343A== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 08/22] platform/x86: eeepc-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017600 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98565ECAAA1 for ; Mon, 24 Oct 2022 13:23:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A7BE510E6AE; Mon, 24 Oct 2022 13:23:30 +0000 (UTC) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by gabe.freedesktop.org (Postfix) with ESMTPS id 36D7710E399 for ; Mon, 24 Oct 2022 11:36:57 +0000 (UTC) Received: by mail-pj1-x1029.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so1137701pjk.2 for ; Mon, 24 Oct 2022 04:36:57 -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=aZfDSMh4XugXKHdRpnKsNgDYCnFIW7cIcNPsSZ5bynL3VgB3kOYdID8TCDfpQPHr2b DR1jIfdrR273fSMyNyBpyV/e8+dcqXfqnPZgxW0MWAtNmTk0EFXIUFLBfUQkds0HKeYk /VegihPNAOWNfTUnOwS9DcWZtyd4M5gSiUsokTANdKdRWUsFpwPwvytK6GE2wjsABs3D hmM//dzbA2WogNTjUA5x7OEOTILeXkriy6a2MmNE4zHOeVpx8yly9Tq0YHC+yuCYJwg/ h8ke+QblkV1SMoCJuIqTNEZyALPx9zexh+k8lhHqtFHxq6VF8rfK4YzMh+GgP9xaz23U mveg== X-Gm-Message-State: ACrzQf1CjXfPJ/8mWRclvkgVET6Q7luT/aKOWsVHwgRzknlGQ7rU8Ub4 FZOK7HMvn9cWrGct92MdL3Jpig== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 09/22] platform/x86: fujitsu-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017620 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BF0FC38A2D for ; Mon, 24 Oct 2022 13:24:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C73110E6F3; Mon, 24 Oct 2022 13:23:46 +0000 (UTC) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF83910E3AE for ; Mon, 24 Oct 2022 11:37:05 +0000 (UTC) Received: by mail-pl1-x636.google.com with SMTP id u6so8177887plq.12 for ; Mon, 24 Oct 2022 04:37: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=Uksl4daCD3AtL6lgPj6KxRBhsCR1zwb/tyF9GNLsIFjstTLRlsEdTfXNQ+jZkaLcCP UHB4RMlb67S37KU4cQzjtwEkybGL5Nrh54+lySMDKdTYi+lCX7xnfJVjEg7By8CBtnu/ EEoABV6yDpLaMXz7hDu7CbCbCZ2gZsXa3jScuytM3xzIP8uR/nyI44JwTFawdjn1U+jF QVQ02hdvdOWeR/jbSg18KUzhn8ZZFfFkbucZaDfSl+X8MiO+0Dm3I88W4WZNfIJeJEXE RN+yZyx+SCnzjSAPz3Gya1REJ5QXzNig2UCsItZOsxFADMcj0OmKpSkV0jqHUoLuKFPB 3w7g== X-Gm-Message-State: ACrzQf0j96Q75JGteobnEAmB7+P2rAzo8iGAvozYboJ0UtHp2U9oPFjf XueaxAeyBdNnK7cLRzRN2S7cbg== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 10/22] platform/x86: ideapad-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017617 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 452BFECAAA1 for ; Mon, 24 Oct 2022 13:24:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79C6110E6ED; Mon, 24 Oct 2022 13:23:44 +0000 (UTC) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by gabe.freedesktop.org (Postfix) with ESMTPS id 236C610E3DD for ; Mon, 24 Oct 2022 11:37:14 +0000 (UTC) Received: by mail-pj1-x1030.google.com with SMTP id h14so7919107pjv.4 for ; Mon, 24 Oct 2022 04:37:14 -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=K7+QXN2MjpmNpNJ0ljZGK04PSxtrHQTq0PdiH5+LR2Z67Tu/npiV2hw6tdanAmSWOw Gfia9OuKcp3QH+SMrqik+K2w+pT+n9YQ6nXjrta+MW5RuTDxaKoCK1LGogh/GZpkh8oa mv6WOg+hPgOgGACRygdlDK9p7FJJfxk379FKaMhuz2XsA41oz4IqWL1ZCEBjOLO5Sx9c EOtgn5HeohGfx8BIFBEk6jA1h6V96xc9tDDpQPYwwNNeAdwQwTr3faKTV8AiGzbaThF/ sSrOt1fCKguYsnu7WXp6OymB2XRlHSZEFt68wDo8vheqCXZl0V04NtyZDJV8O6IB7M4m gL4w== X-Gm-Message-State: ACrzQf3rMMb+y021J5lczKkBXoH/djIJOXA9BMSCRq0+2PMfjdTFlqOn ibpB2maP7HLY/dDGpJdpBudfuw== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 11/22] platform/x86: msi-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017627 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3AB2FA3740 for ; Mon, 24 Oct 2022 13:24:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4CEC10E71E; Mon, 24 Oct 2022 13:23:50 +0000 (UTC) Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 722BC10E399 for ; Mon, 24 Oct 2022 11:37:33 +0000 (UTC) Received: by mail-vs1-xe2b.google.com with SMTP id 128so7567129vsz.12 for ; Mon, 24 Oct 2022 04:37:33 -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=JMJsniNvD1pMI1loGEJh/+2Rk5hbhRhkCinVET8b6JJWLG+YFSF+GHu6ZOK15gWAXq xkMKGYHnMrCl4PCCNFaXjkrjS9g3t+chT0eIbb2Hi4OCaEP4QCBPNH7Lga60iaHbds7G zPhwbRngxwp40/0baIFdrg+FY00e6A74QaGntIrfUT1AtEsTkijFPQXDiPyKCV+gTEst ZsN/L3pHIPZRWEhSzRq6SW9kgcDR6UP37/eiKhNibo33GjNUE7fefpjlc2DhBjKVR5HY EnoONmgmml92TLgQ02ypUGTZ/FEz1vXqphVTXtc3zhD7OiK9UJS/Arzz2bcEZvUJ4VPC SfgQ== X-Gm-Message-State: ACrzQf3Igg4jmvAuHCsXfpFBobJB+qogO0aBi15A78cPPWEVTluMcfFj xZGs5QknwqiGdWaI1TzaOUXOibyzvhgzwGOi 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 12/22] platform/x86: msi-wmi: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017602 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 001B9C38A2D for ; Mon, 24 Oct 2022 13:23:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1553910E6C6; Mon, 24 Oct 2022 13:23:32 +0000 (UTC) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by gabe.freedesktop.org (Postfix) with ESMTPS id D275810E399 for ; Mon, 24 Oct 2022 11:37:30 +0000 (UTC) Received: by mail-pj1-x102b.google.com with SMTP id pb15so7912572pjb.5 for ; Mon, 24 Oct 2022 04:37:30 -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=upiwskqoqptgEqc1As0BbiyAq+XmyYCsT3ZHlozyj+O5yugaKb5tWAZkTp9A2z2soP 1bZIuxDbNy2K+Foc2/xRfeVjV1trGxLpdIhcQLXIixza6ngAghBGCaWX2GDuo/vkiF9N BO2iCBCiGf70KrgKAj7f/NZ5AOS6BNEBziz9LAew5BP7+Cr7zED8Co7TWu0zUQS/M7pq /uV5J8cAfmqua6nvmeC5Vb7OkMYH6JM7Qtrh0gMfyoF/336UeLCJkK5d/cUfqa4L1pav NupsHTXRjIdK0lK0lInuf5Y7R5FTm8YfiGuzJPXuwSabcbuCqTixtKK4/bkNVWqV5ZVv mv1g== X-Gm-Message-State: ACrzQf2toZdv1X4AwjLPG8ykHUBkGdvNrGUFTFgGmbDPK/oJp/MALUn0 pDPaHGK950Bq56V82U3VS6GDnA== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 13/22] platform/x86: nvidia-wmi-ec-backlight: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017615 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2357ECAAA1 for ; Mon, 24 Oct 2022 13:24:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FBE510E6F0; Mon, 24 Oct 2022 13:23:45 +0000 (UTC) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E66E10E3DD for ; Mon, 24 Oct 2022 11:37:39 +0000 (UTC) Received: by mail-pj1-x1035.google.com with SMTP id b11so1812363pjp.2 for ; Mon, 24 Oct 2022 04:37:39 -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=miNz4TxAW0anNGm+lTxaTq4Ya3HwRhAHjrc/QOZGP3uI7YJkipECuOFXqR7ccz6Qcq vLc28H02y+qgGydizcnbvFtFGkUgDQWApHsGhOlY9gDF2644a3XXvlvZIx3mWF+iUU2P 20rpfyvzrDfj2rObpkY2KETv3ZDHe9h1EUvYK1CzvkvlpiDUDyPUv7iNj39iRrasxuIG mXD+0ceH4sgEc1emG7sSBwN4QBXnECUe3by8LuqSgx8GkGDKdTGIB9Bi/y0nJ3z3VL+t K5P2ZkupvtE/lSAI8hDPKh2Zb4rbQwd05h4V/8YOMm11BnYZTvaeqQXciqMqZvvkbsyr Lpbw== X-Gm-Message-State: ACrzQf2Pq/jiNInkEnCdbadT5r8RlVDAvy+/D6KhZBBj6iew11dV5Jwn N4WV9MkC8JY6fJ0ITBV840CT7w== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 14/22] platform/x86: panasonic-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017626 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0DC7FA373E for ; Mon, 24 Oct 2022 13:24:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20A1510E706; Mon, 24 Oct 2022 13:23:51 +0000 (UTC) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 908AD10E3FE for ; Mon, 24 Oct 2022 11:37:58 +0000 (UTC) Received: by mail-qv1-xf2c.google.com with SMTP id j6so1849208qvn.12 for ; Mon, 24 Oct 2022 04:37:58 -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=2Fws0wHCRv83yvOVhT3ZtlkOSX4AKb4MOJ7tUe/VU39Foo+Brq+uKqAt+XZ/PXwTWl IWIpqUpQA/oW2T4DfD7nTbBQy1yoCxroQf4JlMW3W7wXaZnnDskPw0Ie2QTnKDyk5tiu yQbwkdrahA31Q/tGCFnMfz+37CqfUpNmyne7RVJjvF7BRI3NosXRreldg5CPJczvRDZg oBT79oGXDzRfv4o7AHHaNcMACafiHjWRaG1tPNzZCyisHzT6HNxu5WyDr8tQrz4wIEX9 d8UfJg4ABf5VxD1XKJg1mDjfPbRURSgO2HgRtMeH0YJl3tl7sNvQE6yRp9IJp2bxkYBa mhcw== X-Gm-Message-State: ACrzQf1SzIFnNAjHhWh1zqgNW3V7NEUMAz5J81Ar8FB7P8ZcrOhT+r5f CCmJfy0E/Cj2+sZLDtqbFlry69G3KRTEz+ZH 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 15/22] platform/x86: samsung-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017616 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04F37FA373E for ; Mon, 24 Oct 2022 13:24:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D465510E6EF; Mon, 24 Oct 2022 13:23:44 +0000 (UTC) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1214510E3AE for ; Mon, 24 Oct 2022 11:37:56 +0000 (UTC) Received: by mail-pf1-x434.google.com with SMTP id g16so3287224pfr.12 for ; Mon, 24 Oct 2022 04:37:56 -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=2IIFuQ3MCzViwkikEtaIHtdxlmBfhdMMOMhxh72pyqE/Jw2Ut1M/ONDTGU6AXiFbJV yEYO1CGMMJIoil5Z0d+y7xprfjGnpTk3iE9994TXZt3OgbvMFEl4+Vamhc2G6v4w9K0Z rw5LiTIIuzEa3IZlaV1yKR+ygy9my5d/2YPAJurUvhz0hzYNFNtuLj5Obf+Dm8UAFtL2 d+6wcGLCrVbKIFWxjLh3pcRnAf0AWSSLYPDBhUfg4ApDsSes9YRgkG5xw/MsMayJERiM sG4YmIKtvzcWpGgLWoVU1MFp8PjMsuU+tbBb/bCWWwJMtc/R5wEeKMFcGPkKlpC8c7oE Jalg== X-Gm-Message-State: ACrzQf2+7VA2BhJVdZBWmjm3JkJTEav9mPMRSpz4yR3dWvdiELSkERSB 0esvblrzBEjHS78LVnksts+1cQ== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 16/22] platform/x86: sony-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017614 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A149BC38A2D for ; Mon, 24 Oct 2022 13:24:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2228210E6EC; Mon, 24 Oct 2022 13:23:44 +0000 (UTC) Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0839910E399 for ; Mon, 24 Oct 2022 11:39:42 +0000 (UTC) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-132fb4fd495so11443234fac.12 for ; Mon, 24 Oct 2022 04:39:41 -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=ACJNy/7s0+p4qYgky4IxKYVa/HRfG6ELH0sbpgNoS2rEKFCUtHAPWS27WKyXsLqN0N R1iFfPqVaUsedYdG44Eknoq0tf8x4CF+AvoZ2QdpTNcE3C0jNNeRdhqjd6HpNJdKcKnQ D+NbYdsyNUlOdgQl/2y5RgReaHijaJari3/oJ7RhQqv0182RoNCHOCVhOgH0rOamZ/KQ kBNjB52OT0EJhe4LwGLxmAqenmBvqJX5bHmM5/FQ9m+jQa3ZwVfdKshotm+VPykS8kNn 1qzqQ7qe1mZ4HIYVFZ25kpP25xAx6uE+fzznd5sgDqKUPRjP4WSUlZ1pXM0k2qvLQovG TpMw== X-Gm-Message-State: ACrzQf2jE9+KRz/0xDeY9UzkvbwdjpAkPnCD3oRMk9Uc+vjXaneFUfNN epR53rwAyVhA4sHipxdDVAuUEy8uMlsOo2bY 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 17/22] platform/x86: thinkpad_acpi: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017622 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56C9DECAAA1 for ; Mon, 24 Oct 2022 13:24:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27D5210E6E9; Mon, 24 Oct 2022 13:23:48 +0000 (UTC) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by gabe.freedesktop.org (Postfix) with ESMTPS id B16CE10E3E1 for ; Mon, 24 Oct 2022 11:38:12 +0000 (UTC) Received: by mail-pg1-x534.google.com with SMTP id e129so8441091pgc.9 for ; Mon, 24 Oct 2022 04:38:12 -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=aBIZQgTMO4YWP96ZbeH2cZbHH4xxbA7Q8A7ZlWrz8cJdYOb21UnbJFB3yR1Nk6F8vR ldaQ8d2oWnuBoicZvxZnysuQ9vLeNjEbjEaaIWwFnVNv4a6WONr/OogKgIa1mqZXBITy 9rKGiSJNYBQm7TheNs2s384T4qcCaQY7JaPO3ZOiAbP7L6gCJe46xCAitw4ljK/s2pH+ LCBar+L1rFdnFLYUQxA6TY5c3vdOoam/KKaRf7EuH7adb1M7SRjgh7bXOZV22AH2mjEU nHCrYD938KGKqULCcy8mE/F3aWDbohpMJ/GfteNkvWCGbZHdBdLQ0VHH8Qhku4tcXbwW 6S+A== X-Gm-Message-State: ACrzQf1oGPno9HIsbi4lFlr4VJu+YlRFGaMizUFkZ7lHnD55wIzi2WaF 15fju3U/1qsJ3HpSblWy4JIaNw== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 18/22] platform/x86: toshiba_acpi: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017613 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86FD1FA373E for ; Mon, 24 Oct 2022 13:24:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CD8F10E6EE; Mon, 24 Oct 2022 13:23:44 +0000 (UTC) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CD9210E3A9 for ; Mon, 24 Oct 2022 11:38:21 +0000 (UTC) Received: by mail-pl1-x62f.google.com with SMTP id jo13so4603824plb.13 for ; Mon, 24 Oct 2022 04:38:21 -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=z3oyUi9eKEM7muI1sUGvKAqMYl/T21bRCtaa1vwOGitaRtwdRIXNHeZ1pO+SulrsTA JJ7dEQBHUmIpktfIbybzcWfVbnhltUHTBku+JkiiCYjJUL1XdZSPUGO4Kt8lHzpKylUl Rba82ijuj+evauLi2pqXUC0gFbGMVLJwAu+tBVWKFnMkvSH0VZLLIyNq5iTDe1AyFGFC BOIB2ZXFVHRJ9sgkz44xuzjK8Trb0/NEHMWIqVCu7shl1vZ6NznX6NuATEpQG/0wHmgw rG+GwnTB0zpBYrx/U6lo1NewJgdyay77yc5ClE4MJQ3QolPqxkS+BNi+PlKlE58by4FN 04NA== X-Gm-Message-State: ACrzQf0O8q8YaHFWJ3Y5Qz8ou22461LngOxWAOdoef+qGmQJVM6CcKyg k96KrkfrM436RciE1gBwdrVC/Q== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 19/22] platform/x86: dell-laptop: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017598 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F7BCC38A2D for ; Mon, 24 Oct 2022 13:23:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C5A4910E653; Mon, 24 Oct 2022 13:23:29 +0000 (UTC) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74B9A10E3DD for ; Mon, 24 Oct 2022 11:38:29 +0000 (UTC) Received: by mail-pl1-x62e.google.com with SMTP id p3so7260259pld.10 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=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=CPamWilMAlAaOUwv5MFJHcF/ZPA0i3SneU3BFDyUm6LCgdlpAFavl5LhmagP6e23ZK 9HaOCuIAPX9y3OZl+fdLIXkmxZj6aC1x4cL7TnNJPsNPm1kA5do5WfgBqDpoyrc1ITCA N0YtZRGXsYRRPqBrwCb4dNh3YnGAgGaixYeV4WpxtHLNZ/J1t3zf2kDy4UbZydjUGg+p lbEQcNCEWzK+0YLbStvLnCJCKK0tzAqN1iIyir+2P/MI811GIiriZaioe0ZpqpAhsMdN /GYfZtdiQ++iSjiY9DWW0awtIr6szH9hhMdGNN6q5vY8hqtUQuJt/nR+OYe/lViShe1J sU1g== X-Gm-Message-State: ACrzQf2Wf8xaA4gA4eKrHhNvpZw9CsAyqJFRsTVKhVQHvSTJBwI+yJnM LT14i8l3VVlDp8jE7Y28++6zcQ== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 20/22] platform/x86: intel_oaktrail: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017628 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1037EECAAA1 for ; Mon, 24 Oct 2022 13:24:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AF9810E6FF; Mon, 24 Oct 2022 13:23:52 +0000 (UTC) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09FF310E399 for ; Mon, 24 Oct 2022 11:38:38 +0000 (UTC) Received: by mail-pj1-x102e.google.com with SMTP id z5-20020a17090a8b8500b00210a3a2364fso8868024pjn.0 for ; Mon, 24 Oct 2022 04:38:38 -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=M+CntsOXRXRdMBZdLrkJB5iWOZKziIpx6TPmJ9YCnd/tzzWlb0tK0WtbkzVNJMOKus 45/LU6DFoBS3OTjh5iRq1I1WB0nVZzyDp74EmurtjDP1SfapxqtXmsJyMCDk1PfZO3ic vTg7kGeUbhurbcLKsvnulOdX4O6sS9CMkb1iFwk102vIQWKz1Pfw1H8J+57GUrIXe70n TK5uPxnNDbpp7zk9amkZ0mIbsC/70Pp0AN6dJ6dDI2bQMFNBoxFClRZVpJma8tBv1Qby EdChTXiVF5VAWkhdc56xNCVup1Iv3u8THJ82D80dbqLLhgcpp2kr0ai854YiNr0D+jmS Y0kQ== X-Gm-Message-State: ACrzQf05pWplIoM3rRP9DAv2FNb4pgEaPhJoX10r+Hg3hx3xJVq14y4p BX22dpQPxVbHZzPEui8mJnqrcw== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 21/22] ACPI: video: Remove acpi_video_get_backlight_type() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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: 13017603 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD949C38A2D for ; Mon, 24 Oct 2022 13:23:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7701410E6CD; Mon, 24 Oct 2022 13:23:33 +0000 (UTC) Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 679FC10E3DD for ; Mon, 24 Oct 2022 11:38:46 +0000 (UTC) Received: by mail-pg1-x52a.google.com with SMTP id 78so8422183pgb.13 for ; Mon, 24 Oct 2022 04:38:46 -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=BirH8+IASLPUgCkKNrjItPHfPw0kEqPWX6DoZT4Beow/cgZoTQAb5cASg5wGMOjn+y g4dzNM4Kn5lY4d2HvjXwdVCoXh+YeQR4KMqlNQZXPPUfTfKVNX/gsxhIV0mZrL8PmomO /tiEqf6Bpjzz6FsjT+zrYQC3DqxMQT9JQKsYgUFdnFxLoIrzzhXJtGNIr8XdrAPWRDK8 UJyYiIDhHIo0wRh1misxrYL+YC5nci8PWKAK/Jurg0l1PfEscR2Gr3bcnmJtE4fytBob NQG8R0eu/dGGk8/2xb2KsrW2mbE45EeqeYDxkMGT9HkFPxplqZ9dH5wVIAW8Kmflkd3/ S1yg== X-Gm-Message-State: ACrzQf362m+gyRuir6T1rHUNBHh18GdZFlkF8t4UAolBdkoN+5imtF6u 4vIe2pJhY/iOuXy9w1pdq+AG3g== 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 To: 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 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 22/22] ACPI: video: Fallback to native backlight X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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) {