From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16CB0C38A2D for ; Tue, 25 Oct 2022 00:17:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229629AbiJYARm (ORCPT ); Mon, 24 Oct 2022 20:17:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230381AbiJYARV (ORCPT ); Mon, 24 Oct 2022 20:17:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202D57B2B1 for ; Mon, 24 Oct 2022 15:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666651021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sa227/HWN+mg/M9GF8z0s+pXLCfMWbPNsK+iHgKq07I=; b=Z7Gf6TzS360Vt6zMCdlBjQzHR6NOazG3WnL5m7MU9aXfBpgn522/XiLHj9TdoLbwdvr0Dw ac2YHfdXWU9vcxkCUhbiYB2NtNMyFmuDazmblsc9V5JXS+XKB4/Yot4OZLZATnc8St8gxX +pzMHvIuUO8NkKqhUtcLdWFC+v/O7iA= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-650-qiaZyi9TN6u_MqxxsU9J2A-1; Mon, 24 Oct 2022 07:53:08 -0400 X-MC-Unique: qiaZyi9TN6u_MqxxsU9J2A-1 Received: by mail-ed1-f70.google.com with SMTP id f16-20020a056402355000b00461cf923fdcso2153268edd.13 for ; Mon, 24 Oct 2022 04:53:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Sa227/HWN+mg/M9GF8z0s+pXLCfMWbPNsK+iHgKq07I=; b=RFEI2GTxmYblp5Oxk9/o2VlQr71MDSLWoKXiKorDVzTHGbBuse4KbR6opLp2kiNtlg UXOaWsb4mSm8cBcUDdwLJVfeVpodEbPkMvXW6Wbk1/XqnR4pgX+hlExNvXvnjKQusygA 7f8bvuw6zwa925dt3V0HyV7uaF3fpsY6SU1X7Hz6PtXLjo8f6nvOrDzXHAI3mzMVqv7S wc+BeKwZ43qNGt5fmsl+UYlV1Jq2dDf+vz+dMmgiKXO7aqAPPh4V7ZgkDzdPEESOsVOF zERx0MdJZ/j+Dquw/Eo14NhRBZODUYWTKcU97+FQKPBRQ8cvE0VMmyFhdyJutRrptkWM 1f3w== X-Gm-Message-State: ACrzQf3aSHSdNgupgsAE/pO+ooxHR/HqvztpgEKFkQ++cOZ3du15K7/E 4G+0QALGZBMFr3JgFNbbFwVShsODmWcju5EVLSw15U3dkIPkvtynhupdVQ0pRTwW/o4VhFfTgKR UUG06+0GW8cggMtYJS+Cj+r0= X-Received: by 2002:a17:907:608f:b0:78e:1b60:60e2 with SMTP id ht15-20020a170907608f00b0078e1b6060e2mr27603510ejc.382.1666612387310; Mon, 24 Oct 2022 04:53:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rKjf9vFNIG71zIVFmhWoGUssYXpRCR0TKoudwiSS8QTCTafqY38Nm8/FfK1Fy5krk9VAMgg== X-Received: by 2002:a17:907:608f:b0:78e:1b60:60e2 with SMTP id ht15-20020a170907608f00b0078e1b6060e2mr27603473ejc.382.1666612387069; Mon, 24 Oct 2022 04:53:07 -0700 (PDT) Received: from [10.40.98.142] ([78.108.130.194]) by smtp.gmail.com with ESMTPSA id h3-20020a1709070b0300b007ab2d744801sm17394ejl.190.2022.10.24.04.53.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 04:53:06 -0700 (PDT) Message-ID: <746e5cc6-516f-8f69-9d4b-8fe237de8fd6@redhat.com> Date: Mon, 24 Oct 2022 13:53:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 00/22] Fallback to native backlight Content-Language: en-US To: Akihiko Odaki Cc: David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jonathan Corbet , "Rafael J. Wysocki" , Len Brown , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , "Lee, Chun-Yi" , Mark Gross , Corentin Chary , Cezary Jackiewicz , Matthew Garrett , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Jonathan Woithe , Ike Panhc , Daniel Dadap , Kenneth Chan , Mattia Dongili , Henrique de Moraes Holschuh , Azael Avalos , Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , Robert Moore , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, intel-gfx@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, ibm-acpi-devel@lists.sourceforge.net, linux-fbdev@vger.kernel.org, devel@acpica.org References: <20221024113513.5205-1-akihiko.odaki@daynix.com> From: Hans de Goede In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Hi Akihiko, On 10/24/22 13:34, Akihiko Odaki wrote: > 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. I appreciate your work on this, but what this in essence does is it allows 2 backlight drivers (vendor + native) to get registered for the same panel again. While the whole goal of the backlight refactor series landing in 6.1 was to make it so that there always is only *1* backlight device registered instead of (possibly) registering multiple and letting userspace figure it out. It is also important to only always have 1 backlight device per panel for further upcoming changes. So nack for this solution, sorry. I am aware that this breaks backlight control on some Chromebooks, this was already reported and I wrote a long reply explaining why things are done the way they are done now and also suggesting 2 possible (much simpler) fixes, see: https://lore.kernel.org/linux-acpi/42a5f2c9-a1dc-8fc0-7334-fe6c390ecfbb@redhat.com/ Unfortunately the reported has not followed-up on this and I don't have the hardware to test this myself. Can you please try implementing 1 of the fixes suggested there and then submit that upstream ? Regards, Hans > > Signed-off-by: Akihiko Odaki > > Akihiko Odaki (22): > drm/i915/opregion: Improve backlight request condition > ACPI: video: Introduce acpi_video_get_backlight_types() > LoongArch: Use acpi_video_get_backlight_types() > platform/x86: acer-wmi: Use acpi_video_get_backlight_types() > platform/x86: asus-laptop: Use acpi_video_get_backlight_types() > platform/x86: asus-wmi: Use acpi_video_get_backlight_types() > platform/x86: compal-laptop: Use acpi_video_get_backlight_types() > platform/x86: eeepc-laptop: Use acpi_video_get_backlight_types() > platform/x86: fujitsu-laptop: Use acpi_video_get_backlight_types() > platform/x86: ideapad-laptop: Use acpi_video_get_backlight_types() > platform/x86: msi-laptop: Use acpi_video_get_backlight_types() > platform/x86: msi-wmi: Use acpi_video_get_backlight_types() > platform/x86: nvidia-wmi-ec-backlight: Use > acpi_video_get_backlight_types() > platform/x86: panasonic-laptop: Use acpi_video_get_backlight_types() > platform/x86: samsung-laptop: Use acpi_video_get_backlight_types() > platform/x86: sony-laptop: Use acpi_video_get_backlight_types() > platform/x86: thinkpad_acpi: Use acpi_video_get_backlight_types() > platform/x86: toshiba_acpi: Use acpi_video_get_backlight_types() > platform/x86: dell-laptop: Use acpi_video_get_backlight_types() > platform/x86: intel_oaktrail: Use acpi_video_get_backlight_types() > ACPI: video: Remove acpi_video_get_backlight_type() > ACPI: video: Fallback to native backlight > > Documentation/gpu/todo.rst | 8 +-- > drivers/acpi/acpi_video.c | 2 +- > drivers/acpi/video_detect.c | 54 ++++++++++--------- > drivers/gpu/drm/i915/display/intel_opregion.c | 3 +- > drivers/platform/loongarch/loongson-laptop.c | 4 +- > drivers/platform/x86/acer-wmi.c | 2 +- > drivers/platform/x86/asus-laptop.c | 2 +- > drivers/platform/x86/asus-wmi.c | 4 +- > drivers/platform/x86/compal-laptop.c | 2 +- > drivers/platform/x86/dell/dell-laptop.c | 2 +- > drivers/platform/x86/eeepc-laptop.c | 2 +- > drivers/platform/x86/fujitsu-laptop.c | 4 +- > drivers/platform/x86/ideapad-laptop.c | 2 +- > drivers/platform/x86/intel/oaktrail.c | 2 +- > drivers/platform/x86/msi-laptop.c | 2 +- > drivers/platform/x86/msi-wmi.c | 2 +- > .../platform/x86/nvidia-wmi-ec-backlight.c | 2 +- > drivers/platform/x86/panasonic-laptop.c | 2 +- > drivers/platform/x86/samsung-laptop.c | 2 +- > drivers/platform/x86/sony-laptop.c | 2 +- > drivers/platform/x86/thinkpad_acpi.c | 4 +- > drivers/platform/x86/toshiba_acpi.c | 2 +- > drivers/video/backlight/backlight.c | 18 +++++++ > include/acpi/video.h | 21 ++++---- > include/linux/backlight.h | 1 + > 25 files changed, 85 insertions(+), 66 deletions(-) >