mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Jerome Brunet <jbrunet@baylibre.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	dri-devel@lists.freedesktop.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/9] drm/meson: dw-hdmi: split resets out of hw init.
Date: Mon, 19 Aug 2024 18:08:34 +0200	[thread overview]
Message-ID: <8d49f427-a0f8-44f4-bd46-86fbf385deab@linaro.org> (raw)
In-Reply-To: <20240730125023.710237-6-jbrunet@baylibre.com>

On 30/07/2024 14:50, Jerome Brunet wrote:
> This prepares the migration to regmap usage.
> 
> To properly setup regmap, the APB needs to be in working order.
> This is easier handled if the resets are not mixed with hw init.
> 
> More checks are required to determine if the resets are needed
> on resume or not. Add a note for this.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>   drivers/gpu/drm/meson/meson_dw_hdmi.c | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index 5cd3264ab874..47aa3e184e98 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -581,11 +581,6 @@ static void meson_dw_hdmi_init(struct meson_dw_hdmi *meson_dw_hdmi)
>   	/* Bring HDMITX MEM output of power down */
>   	regmap_update_bits(priv->hhi, HHI_MEM_PD_REG0, 0xff << 8, 0);
>   
> -	/* Reset HDMITX APB & TX & PHY */
> -	reset_control_reset(meson_dw_hdmi->hdmitx_apb);
> -	reset_control_reset(meson_dw_hdmi->hdmitx_ctrl);
> -	reset_control_reset(meson_dw_hdmi->hdmitx_phy);
> -
>   	/* Enable APB3 fail on error */
>   	if (!meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
>   		writel_bits_relaxed(BIT(15), BIT(15),
> @@ -675,6 +670,10 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
>   		return PTR_ERR(meson_dw_hdmi->hdmitx_phy);
>   	}
>   
> +	reset_control_reset(meson_dw_hdmi->hdmitx_apb);
> +	reset_control_reset(meson_dw_hdmi->hdmitx_ctrl);
> +	reset_control_reset(meson_dw_hdmi->hdmitx_phy);
> +
>   	meson_dw_hdmi->hdmitx = devm_platform_ioremap_resource(pdev, 0);
>   	if (IS_ERR(meson_dw_hdmi->hdmitx))
>   		return PTR_ERR(meson_dw_hdmi->hdmitx);
> @@ -765,6 +764,11 @@ static int __maybe_unused meson_dw_hdmi_pm_resume(struct device *dev)
>   	if (!meson_dw_hdmi)
>   		return 0;
>   
> +	/* TODO: Is this really necessary/desirable on resume ? */

Yes to reset the HDMI controller to it's default state, not sure if the note is important here.

> +	reset_control_reset(meson_dw_hdmi->hdmitx_apb);
> +	reset_control_reset(meson_dw_hdmi->hdmitx_ctrl);
> +	reset_control_reset(meson_dw_hdmi->hdmitx_phy);
> +
>   	meson_dw_hdmi_init(meson_dw_hdmi);
>   
>   	dw_hdmi_resume(meson_dw_hdmi->hdmi);


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2024-08-19 16:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 12:50 [PATCH 0/9] drm/meson: dw-hdmi: clean-up Jerome Brunet
2024-07-30 12:50 ` [PATCH 1/9] drm/meson: hdmi: move encoder settings out of phy driver Jerome Brunet
2024-08-19 16:01   ` Neil Armstrong
2024-07-30 12:50 ` [PATCH 2/9] drm/meson: vclk: drop hdmi system clock setup Jerome Brunet
2024-08-06 20:24   ` Martin Blumenstingl
2024-08-19 16:01   ` Neil Armstrong
2024-07-30 12:50 ` [PATCH 3/9] drm/meson: dw-hdmi: use generic clock helpers Jerome Brunet
2024-08-06 20:28   ` Martin Blumenstingl
2024-08-07  7:59     ` Jerome Brunet
2024-08-19 16:02   ` Neil Armstrong
2024-07-30 12:50 ` [PATCH 4/9] drm/meson: dw-hdmi: fix incorrect comment in suspend Jerome Brunet
2024-08-06 20:30   ` Martin Blumenstingl
2024-08-19 16:07   ` Neil Armstrong
2024-07-30 12:50 ` [PATCH 5/9] drm/meson: dw-hdmi: split resets out of hw init Jerome Brunet
2024-08-06 20:49   ` Martin Blumenstingl
2024-08-07  8:26     ` Jerome Brunet
2024-08-19 16:08   ` Neil Armstrong [this message]
2024-07-30 12:50 ` [PATCH 6/9] drm/meson: dw-hdmi: convert to regmap Jerome Brunet
2024-08-19 16:22   ` Neil Armstrong
2024-08-19 17:20     ` Jerome Brunet
2024-07-30 12:50 ` [PATCH 7/9] drm/meson: dw-hdmi: use matched data Jerome Brunet
2024-08-06 21:03   ` Martin Blumenstingl
2024-08-07  9:12     ` Jerome Brunet
2024-08-19 16:25   ` Neil Armstrong
2024-07-30 12:50 ` [PATCH LATER 8/9] drm/meson: dw-hdmi: don't write power controller registers Jerome Brunet
2024-08-19 16:27   ` Neil Armstrong
2024-07-30 12:50 ` [PATCH LATER 9/9] drm/meson: dw-hdmi: drop hdmi system clock setup Jerome Brunet

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=8d49f427-a0f8-44f4-bd46-86fbf385deab@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®