From: Sam Ravnborg <sam@ravnborg.org>
To: Marek Vasut <marex@denx.de>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
dri-devel@lists.freedesktop.org,
Andrzej Hajda <andrzej.hajda@intel.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH 1/5] drm/bridge: tc358762: Split register programming from pre-enable to enable
Date: Fri, 16 Jun 2023 21:02:03 +0200 [thread overview]
Message-ID: <20230616190203.GF1697490@ravnborg.org> (raw)
In-Reply-To: <20230615201902.566182-1-marex@denx.de>
Hi Marek,
On Thu, Jun 15, 2023 at 10:18:58PM +0200, Marek Vasut wrote:
> Move the register programming part, which actually enables the bridge and
> makes it push data out of its DPI side, into the enable callback. The DSI
> host like DSIM may not be able to transmit commands in pre_enable, moving
> the register programming into enable assures it can transmit commands.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
I was about to complain that the use of .enable is deprecated, but the
following patch fixes this.
So:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
> Cc: Jonas Karlman <jonas@kwiboo.se>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Robert Foss <rfoss@kernel.org>
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/bridge/tc358762.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
> index 5641395fd310e..df9703eacab1f 100644
> --- a/drivers/gpu/drm/bridge/tc358762.c
> +++ b/drivers/gpu/drm/bridge/tc358762.c
> @@ -162,11 +162,17 @@ static void tc358762_pre_enable(struct drm_bridge *bridge)
> usleep_range(5000, 10000);
> }
>
> + ctx->pre_enabled = true;
> +}
> +
> +static void tc358762_enable(struct drm_bridge *bridge)
> +{
> + struct tc358762 *ctx = bridge_to_tc358762(bridge);
> + int ret;
> +
> ret = tc358762_init(ctx);
> if (ret < 0)
> dev_err(ctx->dev, "error initializing bridge (%d)\n", ret);
> -
> - ctx->pre_enabled = true;
> }
>
> static int tc358762_attach(struct drm_bridge *bridge,
> @@ -181,6 +187,7 @@ static int tc358762_attach(struct drm_bridge *bridge,
> static const struct drm_bridge_funcs tc358762_bridge_funcs = {
> .post_disable = tc358762_post_disable,
> .pre_enable = tc358762_pre_enable,
> + .enable = tc358762_enable,
> .attach = tc358762_attach,
> };
>
> --
> 2.39.2
next prev parent reply other threads:[~2023-06-16 19:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 20:18 [PATCH 1/5] drm/bridge: tc358762: Split register programming from pre-enable to enable Marek Vasut
2023-06-15 20:18 ` [PATCH 2/5] drm/bridge: tc358762: Switch to atomic ops Marek Vasut
2023-06-16 19:02 ` Sam Ravnborg
2023-06-15 20:19 ` [PATCH 3/5] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Marek Vasut
2023-06-16 19:03 ` Sam Ravnborg
2023-11-16 16:06 ` Marc Kleine-Budde
2023-11-16 18:17 ` Marek Vasut
2023-06-15 20:19 ` [PATCH 4/5] drm/bridge: tc358762: Guess the meaning of LCDCTRL bits Marek Vasut
2023-06-16 19:04 ` Sam Ravnborg
2023-06-15 20:19 ` [PATCH 5/5] drm/bridge: tc358762: Handle HS/VS polarity Marek Vasut
2023-06-16 19:04 ` Sam Ravnborg
2023-06-16 19:02 ` Sam Ravnborg [this message]
2023-08-18 9:11 ` [PATCH 1/5] drm/bridge: tc358762: Split register programming from pre-enable to enable Dmitry Baryshkov
2023-06-22 10:10 ` rfoss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230616190203.GF1697490@ravnborg.org \
--to=sam@ravnborg.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=marex@denx.de \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox