From patchwork Wed Sep 13 10:03:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1833461 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RlwyR60QYz1yhg for ; Wed, 13 Sep 2023 20:03:43 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qgMiS-0002Cv-Qc; Wed, 13 Sep 2023 10:03:24 +0000 Received: from mail-pj1-f52.google.com ([209.85.216.52]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qgMiP-0002CV-3D for kernel-team@lists.ubuntu.com; Wed, 13 Sep 2023 10:03:21 +0000 Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-273527a8fdeso4535900a91.2 for ; Wed, 13 Sep 2023 03:03:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694599399; x=1695204199; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2ODodroIuXUbSCD1UEgPpNMerBacldKvlNVmqMv0Xe0=; b=BBoymTxYBLD1b01bB36fBH9VNL05LC+s9IA1Xu4AmFccWBH768VsCW1vYAQkDf5Omc YWqqPwXZ/en7FPY/lAOI6H55C1eKUfs3hoauqxmHfZJiytnAGf6JNbF5GT1WqcvNAL1f iIGuV0gbK+3hl4aPkyleBo1kGcLCHo5ynDxP514/smyXzoAobmX42jTY/yAHg/CCCGkY HEE8G6oveKy8Qih7ThJ2AvdYs4GHvYYYCP+yz2/Fkh70tYS392eXY82MhlD09T4fPqgu KRqzOQGenlVfVzFqpts1uucBVxQm75l1oiY/C6lQFZ+dsuXTq3aCleCxzcmZPLKPjMJ4 TKjA== X-Gm-Message-State: AOJu0YxQyQJ59jUh/Vw7E2YR9QpPekXvefeJXmcKlo5Ew09cx3RGtKRA cregnIuzc2ivXPr0v0gea1t27z9K0E2k4A== X-Google-Smtp-Source: AGHT+IG0bpVjCLyCG9jlkYyhZJ6rNfljp/s0SQCAJpjY3tQqm2EsPtWN7XR5tzmaf+Z+F7ZbYOFj3A== X-Received: by 2002:a17:90b:374e:b0:267:f758:15d4 with SMTP id ne14-20020a17090b374e00b00267f75815d4mr1450102pjb.48.1694599398988; Wed, 13 Sep 2023 03:03:18 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id t14-20020a17090ae50e00b002676e961261sm2083474pjy.1.2023.09.13.03.03.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 03:03:18 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][M] UBUNTU: SAUCE: ACPI: video: Dell AIO UART backlight detection Date: Wed, 13 Sep 2023 18:03:13 +0800 Message-Id: <20230913100313.200336-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230913100313.200336-1-acelan.kao@canonical.com> References: <20230913100313.200336-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.52; envelope-from=acelan@gmail.com; helo=mail-pj1-f52.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Chia-Lin Kao (AceLan)" BugLink: https://launchpad.net/bugs/2008882 The similar functionality has been reverted by below commit as the function acpi_video_set_dmi_backlight_type() has been removed from upstream. 2a773621f3495 ("UBUNTU: SAUCE: platform/x86: dell-uart-backlight: remove acpi_video_set_dmi_backlight_type()") Now, we use new way to auto detect the Dell AIO platforms which contains "DELL0501" HID. Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/acpi/video_detect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 18cc08c858cf2..7351d87e962c7 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -799,6 +799,7 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto static DEFINE_MUTEX(init_mutex); static bool nvidia_wmi_ec_present; static bool apple_gmux_present; + static bool dell_uart_backlight_present; static bool native_available; static bool init_done; static long video_caps; @@ -813,6 +814,7 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto &video_caps, NULL); nvidia_wmi_ec_present = nvidia_wmi_ec_supported(); apple_gmux_present = apple_gmux_detect(NULL, NULL); + dell_uart_backlight_present = acpi_dev_found("DELL0501"); init_done = true; } if (native) @@ -843,6 +845,9 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto if (apple_gmux_present) return acpi_backlight_apple_gmux; + if (dell_uart_backlight_present) + return acpi_backlight_vendor; + /* Use ACPI video if available, except when native should be preferred. */ if ((video_caps & ACPI_VIDEO_BACKLIGHT) && !(native_available && prefer_native_over_acpi_video()))