From patchwork Wed Mar 9 15:11:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 12775192 X-Patchwork-Delegate: kieran@bingham.xyz 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 6B479C433EF for ; Wed, 9 Mar 2022 15:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232616AbiCIPMQ (ORCPT ); Wed, 9 Mar 2022 10:12:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233762AbiCIPMQ (ORCPT ); Wed, 9 Mar 2022 10:12:16 -0500 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 759C7158EBA; Wed, 9 Mar 2022 07:11:16 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.90,167,1643641200"; d="scan'208";a="113853367" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 10 Mar 2022 00:11:15 +0900 Received: from localhost.localdomain (unknown [10.226.92.170]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8429E400D0EB; Thu, 10 Mar 2022 00:11:12 +0900 (JST) From: Biju Das To: David Airlie , Daniel Vetter , Rob Herring Cc: Biju Das , =?utf-8?q?Ricardo_Ca=C3=B1uelo?= , Laurent Pinchart , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Geert Uytterhoeven , Chris Paterson , Biju Das , Prabhakar Mahadev Lad , linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: drm: bridge: adi,adv7533: Document adi,disable-lanes-override property Date: Wed, 9 Mar 2022 15:11:08 +0000 Message-Id: <20220309151109.20957-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Renesas RZ/{G2L,V2L} platforms changing the lanes from 4 to 3 at lower frequencies causes display instability. On such platforms, it is better to avoid switching lanes from 4 to 3 as it needs different set of PLL parameter constraints to make the display stable with 3 lanes. This patch introduces 'adi,disable-lanes-override' property to disable lane switching at lower frequencies. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar --- .../devicetree/bindings/display/bridge/adi,adv7533.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7533.yaml b/Documentation/devicetree/bindings/display/bridge/adi,adv7533.yaml index f36209137c8a..2dc378039d21 100644 --- a/Documentation/devicetree/bindings/display/bridge/adi,adv7533.yaml +++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7533.yaml @@ -84,6 +84,11 @@ properties: timings for HDMI output. type: boolean + adi,disable-lanes-override: + description: + Disables the overriding lanes at lower frequencies. + type: boolean + adi,dsi-lanes: description: Number of DSI data lanes connected to the DSI host. $ref: /schemas/types.yaml#/definitions/uint32 From patchwork Wed Mar 9 15:11:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 12775193 X-Patchwork-Delegate: kieran@bingham.xyz 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 5B312C433F5 for ; Wed, 9 Mar 2022 15:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233774AbiCIPMT (ORCPT ); Wed, 9 Mar 2022 10:12:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233609AbiCIPMT (ORCPT ); Wed, 9 Mar 2022 10:12:19 -0500 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 25CD817DB98 for ; Wed, 9 Mar 2022 07:11:20 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.90,167,1643641200"; d="scan'208";a="113853373" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 10 Mar 2022 00:11:19 +0900 Received: from localhost.localdomain (unknown [10.226.92.170]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id B7B1B400D0E2; Thu, 10 Mar 2022 00:11:15 +0900 (JST) From: Biju Das To: Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter Cc: Biju Das , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maxime Ripard , Sam Ravnborg , Sia Jee Heng , Abhinav Kumar , Nicolas Boichat , dri-devel@lists.freedesktop.org, Geert Uytterhoeven , Chris Paterson , Biju Das , Prabhakar Mahadev Lad , linux-renesas-soc@vger.kernel.org Subject: [PATCH 2/2] drm/bridge: adv7533: Add option to disable lane switching Date: Wed, 9 Mar 2022 15:11:09 +0000 Message-Id: <20220309151109.20957-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220309151109.20957-1-biju.das.jz@bp.renesas.com> References: <20220309151109.20957-1-biju.das.jz@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Renesas RZ/{G2L,V2L} platforms changing the lanes from 4 to 3 at lower frequencies causes display instability. On such platforms, it is better to avoid switching lanes from 4 to 3 as it needs different set of PLL parameter constraints to make the display stable with 3 lanes. This patch adds an option to disable lane switching if 'adi,disable-lanes-override' property is present in DT. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar --- drivers/gpu/drm/bridge/adv7511/adv7511.h | 1 + drivers/gpu/drm/bridge/adv7511/adv7533.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 592ecfcf00ca..7505601f10fb 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h @@ -368,6 +368,7 @@ struct adv7511 { struct mipi_dsi_device *dsi; u8 num_dsi_lanes; bool use_timing_gen; + bool override_lanes; enum adv7511_type type; struct platform_device *audio_pdev; diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c b/drivers/gpu/drm/bridge/adv7511/adv7533.c index eb7579dec40a..7f6a8e95d70e 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7533.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c @@ -108,7 +108,7 @@ void adv7533_mode_set(struct adv7511 *adv, const struct drm_display_mode *mode) if (adv->num_dsi_lanes != 4) return; - if (mode->clock > 80000) + if (!adv->override_lanes || mode->clock > 80000) lanes = 4; else lanes = 3; @@ -195,6 +195,9 @@ int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv) adv->use_timing_gen = !of_property_read_bool(np, "adi,disable-timing-generator"); + adv->override_lanes = !of_property_read_bool(np, + "adi,disable-lanes-override"); + /* TODO: Check if these need to be parsed by DT or not */ adv->rgb = true; adv->embedded_sync = false;