dri-devel Archive mirror
 help / color / mirror / Atom feed
From: Robert Foss <rfoss@kernel.org>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"Andy Yan" <andy.yan@rock-chips.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	dri-devel@lists.freedesktop.org, kernel@pengutronix.de,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH 08/14] drm/bridge: analogix_dp: move basic controller init into runtime PM
Date: Tue, 7 May 2024 15:05:44 +0200	[thread overview]
Message-ID: <CAN6tsi4SSpfsQRWgzn5VFdVO+v6YePfXWuK=7C3NzWzLyTh-Jg@mail.gmail.com> (raw)
In-Reply-To: <20240503151129.3901815-9-l.stach@pengutronix.de>

On Fri, May 3, 2024 at 5:12 PM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Make sure the controller is in a basic working state after runtime
> resume. Keep the analog function enable in the mode set path as this
> enables parts of the PHY that are only required to be powered when
> there is a data stream being sent out.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 3281c00a39cd..fdb2c2a2b69a 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -41,10 +41,8 @@ struct bridge_init {
>         struct device_node *node;
>  };
>
> -static int analogix_dp_init_dp(struct analogix_dp_device *dp)
> +static void analogix_dp_init_dp(struct analogix_dp_device *dp)
>  {
> -       int ret;
> -
>         analogix_dp_reset(dp);
>
>         analogix_dp_swreset(dp);
> @@ -56,13 +54,9 @@ static int analogix_dp_init_dp(struct analogix_dp_device *dp)
>         analogix_dp_enable_sw_function(dp);
>
>         analogix_dp_config_interrupt(dp);
> -       ret = analogix_dp_init_analog_func(dp);
> -       if (ret)
> -               return ret;
>
>         analogix_dp_init_hpd(dp);
>         analogix_dp_init_aux(dp);
> -       return 0;
>  }
>
>  static int analogix_dp_detect_hpd(struct analogix_dp_device *dp)
> @@ -1258,9 +1252,9 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp)
>
>         pm_runtime_get_sync(dp->dev);
>
> -       ret = analogix_dp_init_dp(dp);
> +       ret = analogix_dp_init_analog_func(dp);
>         if (ret)
> -               goto out_dp_init;
> +               return ret;
>
>         /*
>          * According to DP spec v1.3 chap 3.5.1.2 Link Training,
> @@ -1726,6 +1720,8 @@ int analogix_dp_resume(struct analogix_dp_device *dp)
>
>         phy_power_on(dp->phy);
>
> +       analogix_dp_init_dp(dp);
> +
>         return 0;
>  }
>  EXPORT_SYMBOL_GPL(analogix_dp_resume);
> --
> 2.39.2
>

Reviewed-by: Robert Foss <rfoss@kernel.org>

  reply	other threads:[~2024-05-07 13:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 15:11 [PATCH 00/14] improve Analogix DP AUX channel handling Lucas Stach
2024-05-03 15:11 ` [PATCH 01/14] drm/bridge: analogix_dp: remove unused platform power_on_end callback Lucas Stach
2024-05-07 12:02   ` Robert Foss
2024-05-03 15:11 ` [PATCH 02/14] drm/rockchip: analogix_dp: add runtime PM handling Lucas Stach
2024-05-07 12:15   ` Robert Foss
2024-06-10 12:45   ` Heiko Stübner
2024-05-03 15:11 ` [PATCH 03/14] drm/bridge: analogix_dp: register AUX bus after enabling runtime PM Lucas Stach
2024-05-07 12:49   ` Robert Foss
2024-05-03 15:11 ` [PATCH 04/14] drm/bridge: analogix_dp: handle clock via " Lucas Stach
2024-05-07 12:57   ` Robert Foss
2024-05-03 15:11 ` [PATCH 05/14] drm/bridge: analogix_dp: remove unused analogix_dp_remove Lucas Stach
2024-05-07 12:58   ` Robert Foss
2024-05-03 15:11 ` [PATCH 06/14] drm/bridge: analogix_dp: remove clk handling from analogix_dp_set_bridge Lucas Stach
2024-05-07 13:00   ` Robert Foss
2024-05-03 15:11 ` [PATCH 07/14] drm/bridge: analogix_dp: move platform and PHY power handling into runtime PM Lucas Stach
2024-05-07 13:01   ` Robert Foss
2024-05-03 15:11 ` [PATCH 08/14] drm/bridge: analogix_dp: move basic controller init " Lucas Stach
2024-05-07 13:05   ` Robert Foss [this message]
2024-05-03 15:11 ` [PATCH 09/14] drm/bridge: analogix_dp: remove PLL lock check from analogix_dp_config_video Lucas Stach
2024-05-07 13:06   ` Robert Foss
2024-05-03 15:11 ` [PATCH 10/14] drm/bridge: analogix_dp: move macro reset after link bandwidth setting Lucas Stach
2024-05-07 13:07   ` Robert Foss
2024-06-10 11:45     ` Robert Foss
2024-05-03 15:11 ` [PATCH 11/14] drm/bridge: analogix_dp: don't wait for PLL lock too early Lucas Stach
2024-06-10 11:48   ` Robert Foss
2024-05-03 15:11 ` [PATCH 12/14] drm/bridge: analogix_dp: simplify and correct PLL lock checks Lucas Stach
2024-06-10 11:55   ` Robert Foss
2024-05-03 15:11 ` [PATCH 13/14] drm/bridge: analogix_dp: only read AUX status when an error occured Lucas Stach
2024-06-10 11:56   ` Robert Foss
2024-05-03 15:11 ` [PATCH 14/14] drm/bridge: analogix_dp: handle AUX transfer timeouts Lucas Stach
2024-06-10 11:57   ` Robert Foss
2024-05-07 13:10 ` [PATCH 00/14] improve Analogix DP AUX channel handling Robert Foss
2024-05-15 10:31   ` Lucas Stach
2024-06-10 12:47 ` Heiko Stübner

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='CAN6tsi4SSpfsQRWgzn5VFdVO+v6YePfXWuK=7C3NzWzLyTh-Jg@mail.gmail.com' \
    --to=rfoss@kernel.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=andrzej.hajda@intel.com \
    --cc=andy.yan@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=inki.dae@samsung.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@pengutronix.de \
    --cc=kyungmin.park@samsung.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=patchwork-lst@pengutronix.de \
    --cc=sw0312.kim@samsung.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).