Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7261520rwi; Mon, 24 Oct 2022 12:02:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ErpTSSQyc70u3Vve06qAAYbx+ok0uQOqS9cuveKLxe/jtd8Md5z4qabfxe/RvUGcLj466 X-Received: by 2002:a17:902:e886:b0:186:6eea:cd35 with SMTP id w6-20020a170902e88600b001866eeacd35mr22500193plg.116.1666638159919; Mon, 24 Oct 2022 12:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666638159; cv=none; d=google.com; s=arc-20160816; b=eevjzOmaTnv65WSpPo0ye6s8BPJilLVydJxo7fMY/+3aqRu2kcnmjR3XDHC6zzRpyi UP9GVj2MAXHCl1Wsj48S25LtcMkV1hCrpoHq8iQjnBkez9DSqBTGWHoc3iIKR+1nwAA3 Y+27QVl/zZGEYDxWe9lwFg9AwkweDt1mWTu9AiCN0LbPY5zHXgdkKhiOcRMPXRjhWFkH 5uDuvRQKlH/Qc22u6kpcdcdRSWwgINnSiqGJbcTD3+Y1v261oLzPPdlNLq1w3A6Ue4sv SqsWQV53ycjteKE1S9/6EGuCJqst6htytUptWqLR4WsSobBhRvTe9SGg9mygMv+hv2q5 cGWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+IzqDSOU2aJi4aKyvZGyP8u9UM3BXBifIM/ysO9RMHI=; b=UO+DPEcMu2dMRFUeZj/XESBW0yeT9qoy7lMkPGO+blcj2Oex2bKGU2+QiQpeqCWhuo rHO2G6fGR5Uw9y+m//Zi+IhlsZ7ld+Fe+k6PZZXE+hPloTU73QISaWjCynI70Y7W/A6j hNouRSHW8bsKA4bDaA+DGuJIQfXaBur7dIVAP6JS14KV+3zJNViWpktpxhu1puGCiUYP fQH4AzrLoLk3VT7ga0IFwwQCZcQHE40ksREM63BXXccR8M7e0FfBARx2ubWrEwkmbC35 vF5r0ztCDlD4SXLSttm9SOQgOoa5dFKV3n/Ai7iakfujoZuSR1aD4CtzsSEwakftjLgH ZkXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Gfl5BW51; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c19-20020a17090a8d1300b0021332d10601si585055pjo.183.2022.10.24.12.02.27; Mon, 24 Oct 2022 12:02:39 -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=@collabora.com header.s=mail header.b=Gfl5BW51; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233417AbiJXRqc (ORCPT + 99 others); Mon, 24 Oct 2022 13:46:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbiJXRqI (ORCPT ); Mon, 24 Oct 2022 13:46:08 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C91371402B; Mon, 24 Oct 2022 09:21:47 -0700 (PDT) Received: from dimapc.. (109-252-112-196.nat.spd-mgts.ru [109.252.112.196]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id B44C26602392; Mon, 24 Oct 2022 14:32:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666618362; bh=u87ew5WStQa1OcE49Cx4+qk9li4JUF1ysNYDmcXZvW8=; h=From:To:Cc:Subject:Date:From; b=Gfl5BW51TJWaPipe7us0VY0nkPs169wp2yrEQ6roCLJ9fciK0Cl35mQK2rQEAMIm7 g53nXlsVVwWLTuSjdY4Jxc6Q7tA0VcG1c+3tctEyit+jKgZ8tkbo7ZdQ1DFoMTMk5R nUDnk6LNdv0ZmsXrJFaDs9TC0kgR8h1kHQmxl33GJQqcfY6//V+pk2YKhGVQFaDjWH 85TeW2MQvl6zLyGJltO5TiHMyQV2Ni3cJWrvYBKSWRLH5Vvt5AXE2OxE7lz02IAp9y EyZrzyV4UWmkk7rY17smLOy1DO++qHTd7QgoaT4rapJohI/YIT+4h6WDQDJ2UTJngg W3traQREgX7Rw== From: Dmitry Osipenko To: "Rafael J. Wysocki" , Len Brown , Hans de Goede , Akihiko Odaki Cc: kernel@collabora.com, linux-acpi@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] ACPI: video: Fix missing native backlight on Chromebooks Date: Mon, 24 Oct 2022 16:32:01 +0300 Message-Id: <20221024133201.43753-1-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Chromebooks don't have backlight in ACPI table, they suppose to use native backlight in this case. Check presence of the CrOS embedded controller ACPI device and prefer the native backlight if EC found. Suggested-by: Hans de Goede Fixes: b1d36e73cc1c ("drm/i915: Don't register backlight when another backlight should be used (v2)") Signed-off-by: Dmitry Osipenko --- drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 0d9064a9804c..8ed5021de6fb 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -668,6 +668,11 @@ static const struct dmi_system_id video_detect_dmi_table[] = { { }, }; +static bool google_cros_ec_present(void) +{ + return acpi_dev_found("GOOG0004"); +} + /* * Determine which type of backlight interface to use on this system, * First check cmdline, then dmi quirks, then do autodetect. @@ -730,6 +735,9 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native) return acpi_backlight_video; } + if (google_cros_ec_present()) + return acpi_backlight_native; + /* No ACPI video (old hw), use vendor specific fw methods. */ return acpi_backlight_vendor; } -- 2.37.3