From patchwork Sat Sep 16 12:54:52 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: 13388364 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8AD79CD37BB for ; Sat, 16 Sep 2023 12:55:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C480210E0F2; Sat, 16 Sep 2023 12:55:03 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1992E10E0EE for ; Sat, 16 Sep 2023 12:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694868901; 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=xLeNALjUh/JmabhYFvjomc7Vv0HFotHbYwVbd/rgd5Y=; b=X8rl9E+fh2USG70oerpgDluRiZ4UzTDYFI1py8vjnCFhQOPXxUG4iuq/ZblujioXLmqPEW J9ZdQ2m7gtgd0hPaRUjgN7epLnEzcGgATztZYXD7V6QpLmojWb6f/dT5ptwUmxRQ16k8bk 9gc0bB7nypLdfLaTPwlW3TD0aCmT14s= 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-30-a19735HtP4qnH3hhy5w9Ng-1; Sat, 16 Sep 2023 08:54:59 -0400 X-MC-Unique: a19735HtP4qnH3hhy5w9Ng-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 A8C7E945921; Sat, 16 Sep 2023 12:54:58 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8393F40C6EA8; Sat, 16 Sep 2023 12:54:57 +0000 (UTC) From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Subject: [PATCH 1/4] drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C (v2) Date: Sat, 16 Sep 2023 14:54:52 +0200 Message-ID: <20230916125455.237325-2-hdegoede@redhat.com> In-Reply-To: <20230916125455.237325-1-hdegoede@redhat.com> References: <20230916125455.237325-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , Javier Martinez Canillas , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Vtotal is wrong in the BIOS supplied modeline for the DSI panel on the Asus TF103C leading to the last line of the display being shown as the first line. Original: "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 820 0x8 0xa Fixed: "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 816 0x8 0xa The factory installed Android has a hardcoded modeline in its kernel, causing it to not suffer from this BIOS bug; and the Android boot-splash which uses the EFI FB which does have this bug has the last line all black causing the bug to not be visible. This commit introduces a generic DMI based quirk mechanism to vlv_dsi for doing various fixups, and uses this to correct the modeline. v2: - s/mode_fixup/dmi_quirk/ to make the new DMI quirk mechanism more generic - Add a comment with the old and new modelines to the patch and commit msg Reviewed-by: Javier Martinez Canillas Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/vlv_dsi.c | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index a96e7d028c5c..51c4b1491fa2 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -23,6 +23,7 @@ * Author: Jani Nikula */ +#include #include #include @@ -1744,6 +1745,38 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi) intel_dsi_log_params(intel_dsi); } +typedef void (*vlv_dsi_dmi_quirk_func)(struct intel_dsi *intel_dsi); + +/* + * Vtotal is wrong on the Asus TF103C leading to the last line of the display + * being shown as the first line. The factory installed Android has a hardcoded + * modeline, causing it to not suffer from this BIOS bug. + * + * Original mode: "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 820 0x8 0xa + * Fixed mode: "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 816 0x8 0xa + */ +static void vlv_dsi_asus_tf103c_mode_fixup(struct intel_dsi *intel_dsi) +{ + /* Cast away the const as we want to fixup the mode */ + struct drm_display_mode *fixed_mode = (struct drm_display_mode *) + intel_panel_preferred_fixed_mode(intel_dsi->attached_connector); + + if (fixed_mode->vtotal == 820) + fixed_mode->vtotal -= 4; +} + +static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = { + { + /* Asus Transformer Pad TF103C */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "TF103C"), + }, + .driver_data = (void *)vlv_dsi_asus_tf103c_mode_fixup, + }, + { } +}; + void vlv_dsi_init(struct drm_i915_private *dev_priv) { struct intel_dsi *intel_dsi; @@ -1752,6 +1785,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) struct intel_connector *intel_connector; struct drm_connector *connector; struct drm_display_mode *current_mode; + const struct dmi_system_id *dmi_id; enum port port; enum pipe pipe; @@ -1883,6 +1917,14 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) goto err_cleanup_connector; } + dmi_id = dmi_first_match(vlv_dsi_dmi_quirk_table); + if (dmi_id) { + vlv_dsi_dmi_quirk_func quirk_func = + (vlv_dsi_dmi_quirk_func)dmi_id->driver_data; + + quirk_func(intel_dsi); + } + intel_panel_init(intel_connector, NULL); intel_backlight_setup(intel_connector, INVALID_PIPE); From patchwork Sat Sep 16 12:54:53 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: 13388367 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41DF7CD37BB for ; Sat, 16 Sep 2023 12:55:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A94DD10E0EE; Sat, 16 Sep 2023 12:55:07 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D5D810E096 for ; Sat, 16 Sep 2023 12:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694868904; 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=st0/GOv/1n9h+RKpJKbftaFWxfnAXXF+ybWpC31xPnU=; b=e2BSNf1uUWRPRXImroo26/wIpo/m5yssMu+iXQ+Vvk7ukV7rfcY92mT8+tpYaqLMMZ+vPb A/PDu6ZsqQX+azkZL9DCePygHGX8YUcM3XTu5SFs0khW3TyI8tpYFkslxiFXJ4tCPZ/Apg fJ8donDk99MrrKPQyW9wp8XM9GIyzkU= 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-610-qtwnKG1mNx6FhCEA5rp7jQ-1; Sat, 16 Sep 2023 08:55:00 -0400 X-MC-Unique: qtwnKG1mNx6FhCEA5rp7jQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 024E6811E7B; Sat, 16 Sep 2023 12:55:00 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id D91BA40C6EA8; Sat, 16 Sep 2023 12:54:58 +0000 (UTC) From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Subject: [PATCH 2/4] drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on Lenovo Yoga Tablet 2 series (v2) Date: Sat, 16 Sep 2023 14:54:53 +0200 Message-ID: <20230916125455.237325-3-hdegoede@redhat.com> In-Reply-To: <20230916125455.237325-1-hdegoede@redhat.com> References: <20230916125455.237325-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , Javier Martinez Canillas , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On the Lenovo Yoga Tablet 2 830 / 1050 there are 2 problems: 1. The I2C MIPI sequence elements reference bus 3. ACPI has I2C1 - I2C7 which under Linux become bus 0 - 6. And the MIPI sequence reference to bus 3 is indented for I2C3 which is bus 2 under Linux. This leads to errors like these: [ 178.244049] i2c_designware 80860F41:03: controller timed out [ 178.245703] i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (169) There are 3 timeouts when the panel is on, delaying waking up the screen on a key press by 3 seconds. Note mipi_exec_i2c() cannot just subtract 1 from the bus given in the I2C MIPI sequence element. Since on other devices the I2C bus-numbers used in the MIPI sequences do actually start at 0. 2. width_/height_mm contain a bogus 192mm x 120mm size. This is especially a problem on the 8" 830 version which uses a 10:16 portrait screen where as the bogus size is 16:10. Add a DMI quirk to override the I2C bus and the panel size with the correct values. Note both the 10" 1050 models as well as the 8" 830 models use the same mainboard and thus the same DMI strings. The 10" 1050 uses a 1920x1200 landscape screen, where as the 8" 830 uses a 1200x1920 portrait screen, so the quirk handling uses the display resolution to detect the model. Changes in v2: - Also override i2c_bus_num to fix mipi_exec_i2c() timeouts Reviewed-by: Javier Martinez Canillas Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/vlv_dsi.c | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index 51c4b1491fa2..e247e3413d90 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -1765,6 +1765,42 @@ static void vlv_dsi_asus_tf103c_mode_fixup(struct intel_dsi *intel_dsi) fixed_mode->vtotal -= 4; } +/* + * On the Lenovo Yoga Tablet 2 830 / 1050 there are 2 problems: + * 1. The I2C MIPI sequence elements reference bus 3. ACPI has I2C1 - I2C7 + * which under Linux become bus 0 - 6. And the MIPI sequence reference + * to bus 3 is indented for I2C3 which is bus 2 under Linux. + * + * Note mipi_exec_i2c() cannot just subtract 1 from the bus + * given in the I2C MIPI sequence element. Since on other + * devices the I2C bus-numbers used in the MIPI sequences do + * actually start at 0. + * + * 2. width_/height_mm contain a bogus 192mm x 120mm size. This is + * especially a problem on the 8" 830 version which uses a 10:16 + * portrait screen where as the bogus size is 16:10. + */ +static void vlv_dsi_lenovo_yoga_tab2_size_fixup(struct intel_dsi *intel_dsi) +{ + const struct drm_display_mode *fixed_mode = + intel_panel_preferred_fixed_mode(intel_dsi->attached_connector); + struct drm_display_info *info = &intel_dsi->attached_connector->base.display_info; + + intel_dsi->i2c_bus_num = 2; + + /* + * The 10" 1050 uses a 1920x1200 landscape screen, where as the 8" 830 + * uses a 1200x1920 portrait screen. + */ + if (fixed_mode->hdisplay == 1920) { + info->width_mm = 216; + info->height_mm = 135; + } else { + info->width_mm = 107; + info->height_mm = 171; + } +} + static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = { { /* Asus Transformer Pad TF103C */ @@ -1774,6 +1810,20 @@ static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = { }, .driver_data = (void *)vlv_dsi_asus_tf103c_mode_fixup, }, + { + /* + * Lenovo Yoga Tablet 2 830F/L or 1050F/L (The 8" and 10" + * Lenovo Yoga Tablet 2 use the same mainboard) + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."), + DMI_MATCH(DMI_PRODUCT_NAME, "VALLEYVIEW C0 PLATFORM"), + DMI_MATCH(DMI_BOARD_NAME, "BYT-T FFD8"), + /* Partial match on beginning of BIOS version */ + DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"), + }, + .driver_data = (void *)vlv_dsi_lenovo_yoga_tab2_size_fixup, + }, { } }; From patchwork Sat Sep 16 12:54:54 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: 13388366 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D23FBCD37BC for ; Sat, 16 Sep 2023 12:55:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3EF710E115; Sat, 16 Sep 2023 12:55:07 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 184CB10E0EF for ; Sat, 16 Sep 2023 12:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694868903; 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=XKZ8TXxOECK4Jw8KFjq37vZ/IV2Xailavbw5Y3ZqwEE=; b=dJ9WbC8pRu5LNxrWeLA20+N4di4wEu2baKmso7RYl6r1Hlj31E2lynwYSWhbaNtGSk1UNn 7flzBGyewcbIwdw7BtAOHsphQHa8xTMhIaAgzZbbz4w8u8u4dgBhTIczHY2GwcXNszGyfA pZ/PVRwFcFIUKRq0MBLBo2MBFSrZ57w= 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-100-iAhlhsHkPCSoGNCpJ0qA2Q-1; Sat, 16 Sep 2023 08:55:01 -0400 X-MC-Unique: iAhlhsHkPCSoGNCpJ0qA2Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 2F87C8039D2; Sat, 16 Sep 2023 12:55:01 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3272D40C6EA8; Sat, 16 Sep 2023 12:55:00 +0000 (UTC) From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Subject: [PATCH 3/4] drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo Yoga Tab 3 Date: Sat, 16 Sep 2023 14:54:54 +0200 Message-ID: <20230916125455.237325-4-hdegoede@redhat.com> In-Reply-To: <20230916125455.237325-1-hdegoede@redhat.com> References: <20230916125455.237325-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On the Lenovo Yoga Tab 3 Pro YT3-X90F there are 2 issues with the backlight on/off MIPI sequences: 1. The backlight on sequence has an I2C MIPI sequence element which uses bus 0, but there is a bogus I2cSerialBus resource under the GPU in the DSDT which causes i2c_acpi_find_adapter() to pick the wrong bus. 2. There is no backlight off sequence, causing the backlight to stay on. Add a DMI quirk fixing both issues. Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/vlv_dsi.c | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index e247e3413d90..db519cfc243b 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -1801,6 +1801,29 @@ static void vlv_dsi_lenovo_yoga_tab2_size_fixup(struct intel_dsi *intel_dsi) } } +/* + * On the Lenovo Yoga Tab 3 Pro YT3-X90F there are 2 problems: + * 1. i2c_acpi_find_adapter() picks the wrong adapter causing mipi_exec_i2c() + * to not work. Fix this by setting i2c_bus_num. + * 2. There is no backlight off MIPI sequence, causing the backlight to stay on. + * Add a backlight off sequence mirroring the existing backlight on sequence. + */ +static void vlv_dsi_lenovo_yoga_tab3_backlight_fixup(struct intel_dsi *intel_dsi) +{ + static const u8 backlight_off_sequence[16] = { + /* Header Seq-id 7, length after header 11 bytes */ + 0x07, 0x0b, 0x00, 0x00, 0x00, + /* MIPI_SEQ_ELEM_I2C bus 0 addr 0x2c reg 0x00 data-len 1 data 0x00 */ + 0x04, 0x08, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x01, 0x00, + /* MIPI_SEQ_ELEM_END */ + 0x00 + }; + struct intel_connector *connector = intel_dsi->attached_connector; + + intel_dsi->i2c_bus_num = 0; + connector->panel.vbt.dsi.sequence[MIPI_SEQ_BACKLIGHT_OFF] = backlight_off_sequence; +} + static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = { { /* Asus Transformer Pad TF103C */ @@ -1824,6 +1847,15 @@ static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = { }, .driver_data = (void *)vlv_dsi_lenovo_yoga_tab2_size_fixup, }, + { + /* Lenovo Yoga Tab 3 Pro YT3-X90F */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"), + }, + .driver_data = (void *)vlv_dsi_lenovo_yoga_tab3_backlight_fixup, + }, { } }; From patchwork Sat Sep 16 12:54:55 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: 13388368 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37FA5CD37BB for ; Sat, 16 Sep 2023 12:55:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 899DB10E135; Sat, 16 Sep 2023 12:55:13 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0381910E11D for ; Sat, 16 Sep 2023 12:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694868907; 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=+Rq9GdzW7qpKAo7cMQxn05kBZciHWxCHanmCW0wI+W4=; b=IrW3VU8pNzadCHMVwNuIXp/tw3erzniqJDi2CAu9TwBoAeTPwguZ6UvA4L+EjI6iQz6XEW m+V4NJ1Xcb48IbJsVVHEQ3omT8e59xoKvEF6auq5T3nP6iH6fPGYlSvrEzqcRT7V/MJL5C yumSAAGqgnkvDLBuMs+dNxCcEefbtz0= 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-86-nwAITQ-UOgaORPGTvZw7dw-1; Sat, 16 Sep 2023 08:55:02 -0400 X-MC-Unique: nwAITQ-UOgaORPGTvZw7dw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 81C47101A590; Sat, 16 Sep 2023 12:55:02 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60BB340C6EA8; Sat, 16 Sep 2023 12:55:01 +0000 (UTC) From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Subject: [PATCH 4/4] drm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2) Date: Sat, 16 Sep 2023 14:54:55 +0200 Message-ID: <20230916125455.237325-5-hdegoede@redhat.com> In-Reply-To: <20230916125455.237325-1-hdegoede@redhat.com> References: <20230916125455.237325-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , Javier Martinez Canillas , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add some debug logging to mipi_exec_i2c, to make debugging various issues seen with it easier. Changes in v2: - Drop unnecessary __func__ drm_dbg_kms() argument Reviewed-by: Javier Martinez Canillas Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c index e56ec3f2d84a..24b2cbcfc1ef 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c @@ -565,6 +565,9 @@ static const u8 *mipi_exec_i2c(struct intel_dsi *intel_dsi, const u8 *data) u8 payload_size = *(data + 6); u8 *payload_data; + drm_dbg_kms(&i915->drm, "bus %d client-addr 0x%02x reg 0x%02x data %*ph\n", + vbt_i2c_bus_num, slave_addr, reg_offset, payload_size, data + 7); + if (intel_dsi->i2c_bus_num < 0) { intel_dsi->i2c_bus_num = vbt_i2c_bus_num; i2c_acpi_find_adapter(intel_dsi, slave_addr);