Message ID | 20231207141723.108004-5-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4814808vqy; Thu, 7 Dec 2023 06:22:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0ifzNosQv0uFqIVBn4kchOyBGOmIimNj7iCdDh/MbTtnZoa3KmNKZFRETOr9pNniVxeZw X-Received: by 2002:a05:6359:6c0b:b0:170:2f92:3edb with SMTP id tc11-20020a0563596c0b00b001702f923edbmr2105044rwb.57.1701958950750; Thu, 07 Dec 2023 06:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958950; cv=none; d=google.com; s=arc-20160816; b=uK9ej9/QkCW7mp/iQhNWp6pztx/lkueAFQVmmwtrES2q0MoJvyggNwe76c6WtX/cxV JJ1+J/VntTwoHD8X2HJtym/03Oc2+mBkatbWzNx3LlFVxqoim1ygvqdMX1qcZHXvTQlV rMLiOPuY4uwjk9MW6nkjgoEP2M3hfhpTxgS2+rC9cPe/7Ujm9NZKRAlpV5NNfWjxg2tq ZbXFlNkGUqVGxC8lpuLNv5eiBYEna+/koMLtOGE7IDpwq4ymI/Ko7G7vGnKOgAJxE6iN NuC0M9hAwFi6M/bHe/MQOXZhO1L7TeD5kFMQiFa/8aNMtsxo4B5eWWcaDYkch6tOBcNP ASag== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LRuU/Yf3+WOs2/s3BqHchrpBnPmBNhkaR5Vfu/UBGmU=; fh=m6aHy4GVWeiYcahcFfIzqNn3pzsQZUVlVWbThwuybpU=; b=rgeI2zNsyaH4o50cNBgA6hzmTRSFm8PDVcLpgVmorZWSoVJ3GP3fejeo1SMlhtfFES i1eAzc7mWLsTYv74Gkus7BH53JfF2l+7za6y3J+A4EJuuH+sH4yE62Zifjb2Jxt5+8S/ mnYriw6fTs8gU4WJs4qlowS75Ifpwpfq8pVzWgly7PUxOArRz27ZRnt+3m9Scv1zoCsz jgogOMz3h22VsAuS9//S8DI5KTI5KMQK/4HjcxvWRhXVcpqHCSe8ZUlwqEOaTkXkxDds 0N+TUEp9wWLhnV89V+dwHFilHMpjTT8cnTL27LjaWkLVWp+lvKyBVaKjhWetBnEq99/s NRtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eIgxP2Rv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y73-20020a638a4c000000b005c65758770bsi1230709pgd.421.2023.12.07.06.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:22:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eIgxP2Rv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A87D180C4DA2; Thu, 7 Dec 2023 06:22:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443251AbjLGOWH (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Thu, 7 Dec 2023 09:22:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443188AbjLGOVs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 7 Dec 2023 09:21:48 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE41319B9 for <linux-kernel@vger.kernel.org>; Thu, 7 Dec 2023 06:17:45 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54cff638658so1326632a12.1 for <linux-kernel@vger.kernel.org>; Thu, 07 Dec 2023 06:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958653; x=1702563453; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LRuU/Yf3+WOs2/s3BqHchrpBnPmBNhkaR5Vfu/UBGmU=; b=eIgxP2Rv9lsBhiVfoHBww21fMl3CDjqTWZk1fUXCQlmBP3xbjqEhlzcjtH7q6lEqfO NHOnOEDcUVjSgjTP3wo8Rsitl9Hwlfx8F3ob/SKzS0soZk3ozZfPv7N8aYMYCsn7wit5 WTnohP1M0buj/ed7tgh0PuAbWwLYA2Uc6yU6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958653; x=1702563453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LRuU/Yf3+WOs2/s3BqHchrpBnPmBNhkaR5Vfu/UBGmU=; b=HsAowq5in1o1i0tT8xdOpU/6nL336jcXlO/Aeuqeho/E8Kc6XxYonYFmtmdmNSiidC QTV2PrEbPY0fN/tgsmR9dIV8ck+qswc6WuX2/3KU0IdgTlRFFgIpdAq1NykhLr+INmSC oRWYcOhgPcjuYbFXXzLvTh20LqvYf8dQTqHP/2uRmfmuFXkfQzyvdnjqco9iZgCgLWtC u1cWv/XAVWVnRzlAcki2Td2/Qy5CBd8ithNA9RM1Bb0I/g21ff8L3iQH8ZUUDj3/kCSB 5TfaYq8go6GahOFOWBNodCIVmiRDM5Dn9iJW1t14lYNjftHDBHa/lLt3LwQwVu6hENB2 WGzA== X-Gm-Message-State: AOJu0YzWsgoVrSVqXTX/dQsZnMMN+4LTfwThy6WJ1dm5nflqXUuumlr/ xenz31n/SyHu7e9FKm6m7Ldg9x1QgvBi0poiXQg1hg== X-Received: by 2002:a17:906:b759:b0:a19:a19b:55f4 with SMTP id fx25-20020a170906b75900b00a19a19b55f4mr1531281ejb.132.1701958653107; Thu, 07 Dec 2023 06:17:33 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:32 -0800 (PST) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-kernel@vger.kernel.org Cc: Amarula patchwork <linux-amarula@amarulasolutions.com>, michael@amarulasolutions.com, Dario Binacchi <dario.binacchi@amarulasolutions.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Inki Dae <inki.dae@samsung.com>, Jagan Teki <jagan@amarulasolutions.com>, Jernej Skrabec <jernej.skrabec@gmail.com>, Jonas Karlman <jonas@kwiboo.se>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Maxime Ripard <mripard@kernel.org>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org Subject: [PATCH v5 04/10] drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting Date: Thu, 7 Dec 2023 15:16:33 +0100 Message-ID: <20231207141723.108004-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:22:22 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633308839724078 X-GMAIL-MSGID: 1784633308839724078 |
Series |
Add displays support for bsh-smm-s2/pro boards
|
|
Commit Message
Dario Binacchi
Dec. 7, 2023, 2:16 p.m. UTC
The patch completes the setting of CLKLANE_STOP for the imx8mn and imx8mp platforms (i. e. not exynos). Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- (no changes since v1) drivers/gpu/drm/bridge/samsung-dsim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Comments
On 07.12.23 15:16, Dario Binacchi wrote: > The patch completes the setting of CLKLANE_STOP for the imx8mn and imx8mp > platforms (i. e. not exynos). This also affects i.MX8MM, so better just mention i.MX in general in the commit message. > > Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > --- > > (no changes since v1) > > drivers/gpu/drm/bridge/samsung-dsim.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c > index 15bf05b2bbe4..13f181c99d7e 100644 > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > @@ -96,6 +96,7 @@ > #define DSIM_MFLUSH_VS BIT(29) > /* This flag is valid only for exynos3250/3472/5260/5430 */ > #define DSIM_CLKLANE_STOP BIT(30) > +#define DSIM_NON_CONTINUOUS_CLKLANE BIT(31) > > /* DSIM_ESCMODE */ > #define DSIM_TX_TRIGGER_RST BIT(4) > @@ -945,8 +946,12 @@ static int samsung_dsim_init_link(struct samsung_dsim *dsi) > * power consumption. > */ > if (driver_data->has_clklane_stop && > - dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) > + dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) { > + if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) > + reg |= DSIM_NON_CONTINUOUS_CLKLANE; > + > reg |= DSIM_CLKLANE_STOP; > + } I really wonder what the difference between DSIM_NON_CONTINUOUS_CLKLANE and DSIM_CLKLANE_STOP is. If Exynos only has the latter, it's pretty clear what to use. But as i.MX has both of these bits, should both be set? Or is setting DSIM_NON_CONTINUOUS_CLKLANE enough and we should leave DSIM_CLKLANE_STOP alone? Maybe someone has a clue here. The description of the bits in the RM is: DSIM_NON_CONTINUOUS_CLKLANE - Non-continuous clock mode DSIM_CLKLANE_STOP - PHY clock lane On/Off for ESD > samsung_dsim_write(dsi, DSIM_CONFIG_REG, reg); > > lanes_mask = BIT(dsi->lanes) - 1;
Hi Frieder On Thu, Dec 7, 2023 at 5:58 PM Frieder Schrempf <frieder.schrempf@kontron.de> wrote: > > On 07.12.23 15:16, Dario Binacchi wrote: > > The patch completes the setting of CLKLANE_STOP for the imx8mn and imx8mp > > platforms (i. e. not exynos). > > This also affects i.MX8MM, so better just mention i.MX in general in the > commit message. > > > > > Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> > > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > --- > > > > (no changes since v1) > > > > drivers/gpu/drm/bridge/samsung-dsim.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c > > index 15bf05b2bbe4..13f181c99d7e 100644 > > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > > @@ -96,6 +96,7 @@ > > #define DSIM_MFLUSH_VS BIT(29) > > /* This flag is valid only for exynos3250/3472/5260/5430 */ > > #define DSIM_CLKLANE_STOP BIT(30) > > +#define DSIM_NON_CONTINUOUS_CLKLANE BIT(31) > > > > /* DSIM_ESCMODE */ > > #define DSIM_TX_TRIGGER_RST BIT(4) > > @@ -945,8 +946,12 @@ static int samsung_dsim_init_link(struct samsung_dsim *dsi) > > * power consumption. > > */ > > if (driver_data->has_clklane_stop && > > - dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) > > + dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) { > > + if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) > > + reg |= DSIM_NON_CONTINUOUS_CLKLANE; > > + > > reg |= DSIM_CLKLANE_STOP; > > + } > > I really wonder what the difference between DSIM_NON_CONTINUOUS_CLKLANE > and DSIM_CLKLANE_STOP is. > > If Exynos only has the latter, it's pretty clear what to use. But as > i.MX has both of these bits, should both be set? Or is setting > DSIM_NON_CONTINUOUS_CLKLANE enough and we should leave DSIM_CLKLANE_STOP > alone? > We add the DSIM_NON_CONTINUOUS_CLKLANE because there was a similar commit in NXP bsp. Now according to the datasheet the DSIM_NON_CONTINUOUS_CLKLANE should be the right bit. NXP guys should clarify then a bit Michael > Maybe someone has a clue here. The description of the bits in the RM is: > > DSIM_NON_CONTINUOUS_CLKLANE - Non-continuous clock mode > DSIM_CLKLANE_STOP - PHY clock lane On/Off for ESD > > > samsung_dsim_write(dsi, DSIM_CONFIG_REG, reg); > > > > lanes_mask = BIT(dsi->lanes) - 1;
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 15bf05b2bbe4..13f181c99d7e 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -96,6 +96,7 @@ #define DSIM_MFLUSH_VS BIT(29) /* This flag is valid only for exynos3250/3472/5260/5430 */ #define DSIM_CLKLANE_STOP BIT(30) +#define DSIM_NON_CONTINUOUS_CLKLANE BIT(31) /* DSIM_ESCMODE */ #define DSIM_TX_TRIGGER_RST BIT(4) @@ -945,8 +946,12 @@ static int samsung_dsim_init_link(struct samsung_dsim *dsi) * power consumption. */ if (driver_data->has_clklane_stop && - dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) + dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) { + if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) + reg |= DSIM_NON_CONTINUOUS_CLKLANE; + reg |= DSIM_CLKLANE_STOP; + } samsung_dsim_write(dsi, DSIM_CONFIG_REG, reg); lanes_mask = BIT(dsi->lanes) - 1;