Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7565449rwi; Mon, 24 Oct 2022 16:54:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60V8W3k9rVGSAlzcLoEf7Px4KrGLQkEICMX+ekTjJJfC5jOhB0j0OWC64FwL0X84uVvlsk X-Received: by 2002:a17:90b:4c12:b0:20d:7124:7c10 with SMTP id na18-20020a17090b4c1200b0020d71247c10mr74615713pjb.204.1666655668097; Mon, 24 Oct 2022 16:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666655668; cv=none; d=google.com; s=arc-20160816; b=ABdxp95YhkH8tZZe8nRoGkEihXFebf7NfUZzXsK4IBtdkFePbbv1DYxp2Zu5R5ZBF/ JyVKF6r59SIM1cHIvm75H96kJHOv/8nKSMCd2NIcuLYTICRLQqtA9VNqGD813X81EEXE uwDbB0w1f1uDB/8WKtr5DSYU1Ilk2vvEdYv1cPNPZA/s5NLl6m8JXTB7TaurfjC2KBqw lOVXKw32gQIO9wsCTdDd6+wKUxYhFyroWA/2Rbr5v5zII4wDn30Yn1nSgQOJVAoUPTpk d8LdEi/190Wgo+Id4otS0gIgZ6TWuhCaUjqYB4FFWXuEpu5n33P3S+eGkz7iqIgw0bg4 m7hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Sa227/HWN+mg/M9GF8z0s+pXLCfMWbPNsK+iHgKq07I=; b=TcWKme5zEOZnh9901ozzkwJ9ZnC5B5b3aSEdLg39Z1qTVbSDdbUe2OxuDQnRmmJ1tm EmxE5jOF0MW1OZJUhXa7CUZNTs9SEGNYZWaKgf6yIN6U5MlFOcUQ6GRtTRNsKU0jtyTk cjEoa6BkxeIny79Q7VCPkxZNwuw4Pwxw2sD54Fj2I83jWJD8udc3w2um7uHPel4/fIsM 7v4P02vTpSCjpOjRFn1qpSZ0t+30G6fYptKXIG4Z4AXcYBvNUMwPEr3D1THyhBQHZ/Kt NaSd6YpoZ4uippfS+G3tgog/ZbmLDuUEtRpq763yMCNOhGvFomEHpBDj2aTjs0QpWpRI HJ4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YHtggSEa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 65-20020a621544000000b0053b36138dc5si1080169pfv.222.2022.10.24.16.54.16; Mon, 24 Oct 2022 16:54:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YHtggSEa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbiJXXOr (ORCPT + 99 others); Mon, 24 Oct 2022 19:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231867AbiJXXOQ (ORCPT ); Mon, 24 Oct 2022 19:14:16 -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 D6B1A1FF87 for ; Mon, 24 Oct 2022 14:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666647273; 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=YHtggSEa2E4qZHwPeoK9ojjSR2VKNOoobeKZJV6sN9TX55zVJINo1vJknCBOjFoyx4J2i4 NzDSzKPNJ5QB3CFvFApeOE1DbLPcOxzTv7z7HTR9ZqpmGiaiiKj3QUEaQUk2OMJmJEVqS8 t94WNFb/zKX5T4YjsYosFOfgmKbXkuU= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-149-Z_ajM_2HNpaZCC2AxpbDPw-1; Mon, 24 Oct 2022 07:53:08 -0400 X-MC-Unique: Z_ajM_2HNpaZCC2AxpbDPw-1 Received: by mail-ed1-f69.google.com with SMTP id y10-20020a056402358a00b0045d5cf18d4cso9443410edc.17 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=IeXkN2pSha8Px9rVL5hvNKDfSs95vcfgCUZUBwTbbykiVzn2r/NrTZI4a6xo+mBWu3 NcyB1ciJmmxnpHSAgJzTlUgxWA3NPIE7x58Wec6FhYBVmyFx9LMLNI9uNWAJ8oqKW8US PbUuL60tq3FcpV9WvRlIhgzbdj+2zChNK5pYzdx4nSl8MjOJVCFoxu2CqGYLHqi66Byw FznJ1V3eSpP+tY6SCLFt0K8jYqWu1xwPWTZHS1B2aVrorpbz8wyFniMo7kc77s19CLc1 A4Y/HS5how5q0b/UBw+QN/czFA6cf7IGHOt/sGP2KAKGDT9wX285FmJRKwgdZnDY2VD+ wMnQ== X-Gm-Message-State: ACrzQf0HEpRuL7XC37Ip1uuDOWIkMPtwccRMVnl7rZ/7BIq07WcmZhPY KiaraFHK22Bl5E35w+hQp5FuGZ2fH3YVcT46V8hbEjputPGCQhyRb4Bzo+0LC7AXdL3LyFIkBvT HGALo5Pb4oGNC5GC+1CIiHLgu X-Received: by 2002:a17:907:608f:b0:78e:1b60:60e2 with SMTP id ht15-20020a170907608f00b0078e1b6060e2mr27603516ejc.382.1666612387319; Mon, 24 Oct 2022 04:53:07 -0700 (PDT) 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 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) >