From patchwork Fri Sep 15 21:29:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 723214 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 A2E2FCD37AA for ; Fri, 15 Sep 2023 21:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232662AbjIOVaP (ORCPT ); Fri, 15 Sep 2023 17:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237617AbjIOVaE (ORCPT ); Fri, 15 Sep 2023 17:30:04 -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 ESMTP id C4B8AB8 for ; Fri, 15 Sep 2023 14:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694813352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VtyMfYzD7xcby6o2/dzP0eRV0+P8SHlRHIxsw7xO7Vo=; b=dyZWzDY8+CYHJykmuChXLveq5pfONoiZIoooqtv/YgSCdEIfqmPW+gRyhk8Q3Wv/zCdeI2 u2JfJYr/DdxZDe07R6R5E+nLL/3t1YkZSzsYskV9KmuBLceyTCViHAo721H9DA+53pfzdv C+npa72Bk6E0r9GkLxW4N+KBeYMaMIU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-675-UQKuRmAHPniNH6oCrDMz4Q-1; Fri, 15 Sep 2023 17:29:08 -0400 X-MC-Unique: UQKuRmAHPniNH6oCrDMz4Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 56EC182A620; Fri, 15 Sep 2023 21:29:08 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id C01EE2026D4B; Fri, 15 Sep 2023 21:29:07 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" Cc: Hans de Goede , linux-acpi@vger.kernel.org Subject: [PATCH 1/2] ACPI: video: Move Xiaomi Mi Pad 2 quirk to its own section Date: Fri, 15 Sep 2023 23:29:01 +0200 Message-ID: <20230915212902.59586-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The Xiaomi Mi Pad 2 is currently listed under the: "Models which should use the vendor backlight interface, because of broken ACPI video backlight control." section. But this is not 100% correct. The Xiaomi Mi Pad 2 is one of a set of x86 tablets which shipped with Android as factory OS. These tablets have a TI LP8557 backlight controller with its PWM input _not_ connected to the PMIC or chipset (LPSS) PWM output. Instead the backlight can be controlled by configuring the LP8557 for direct control through its brightness I2C register and then using the lp855x driver. This setup means that neither i915's native or acpi_video backlight control works, so a "vendor" quirk is added for these tablets to disable both the native and acpi_video backlight devices, but these devices do not use vendor control in the typical meaning of vendor specific SMBIOS or ACPI calls being used. This patch is a preparation patch for adding "vendor" quirks for a couple more such tablet models. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 442396f6ed1f..889902a4fdfe 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -229,14 +229,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"), }, }, - { - .callback = video_detect_force_vendor, - /* Xiaomi Mi Pad 2 */ - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"), - DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"), - }, - }, /* * Models which should use the vendor backlight interface, @@ -799,6 +791,24 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"), }, }, + + /* + * x86 android tablets which directly control the backlight through + * an external backlight controller, typically TI's LP8557. + * The backlight is directly controlled by the lp855x driver on these. + * This setup means that neither i915's native nor acpi_video backlight + * control works. Add a "vendor" quirk to disable both. Note these + * devices do not use vendor control in the typical meaning of + * vendor specific SMBIOS or ACPI calls being used. + */ + { + .callback = video_detect_force_vendor, + /* Xiaomi Mi Pad 2 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"), + DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"), + }, + }, { }, };