mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damon Ding <damon.ding@rock-chips.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Laurent.pinchart@ideasonboard.com, airlied@gmail.com,
	andrzej.hajda@intel.com, dri-devel@lists.freedesktop.org,
	jernej.skrabec@gmail.com, jonas@kwiboo.se,
	linux-kernel@vger.kernel.org, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, neil.armstrong@linaro.org,
	quic_jesszhan@quicinc.com, rfoss@kernel.org, simona@ffwll.ch,
	tzimmermann@suse.de
Subject: Re: [PATCH 2/7] drm/bridge: analogix_dp: drop unused argument to analogix_dp_prepare_panel()
Date: Mon, 14 Apr 2025 09:38:14 +0800	[thread overview]
Message-ID: <d4d6d1a2-cfec-4913-a30e-26cf63a17fa2@rock-chips.com> (raw)
In-Reply-To: <20250401-panel-return-void-v1-2-93e1be33dc8d@oss.qualcomm.com>

Hi Dmitry,

On 2025/4/1 13:11, Dmitry Baryshkov wrote:
> After previous cleanup all calling sites pass true as is_modeset_prepare
> argument to analogix_dp_prepare_panel(). Drop dead code depending on
> that argument being false.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 19 +++++--------------
>   1 file changed, 5 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index ab1cfc340aa95bbf13fe021bd33227b565a5458d..82dc4b01806f9728dc882b0128171838e81f21b0 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -963,13 +963,13 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp)
>    * If @prepare is true, this function will prepare the panel. Conversely, if it
>    * is false, the panel will be unprepared.
>    *
> - * If @is_modeset_prepare is true, the function will disregard the current state
> + * The function will disregard the current state
>    * of the panel and either prepare/unprepare the panel based on @prepare. Once
>    * it finishes, it will update dp->panel_is_modeset to reflect the current state
>    * of the panel.
>    */
>   static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> -				     bool prepare, bool is_modeset_prepare)
> +				     bool prepare)
>   {
>   	int ret = 0;
>   
> @@ -978,13 +978,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
>   
>   	mutex_lock(&dp->panel_lock);
>   
> -	/*
> -	 * Exit early if this is a temporary prepare/unprepare and we're already
> -	 * modeset (since we neither want to prepare twice or unprepare early).
> -	 */
> -	if (dp->panel_is_modeset && !is_modeset_prepare)
> -		goto out;
> -
>   	if (prepare)
>   		ret = drm_panel_prepare(dp->plat_data->panel);
>   	else
> @@ -993,8 +986,7 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
>   	if (ret)
>   		goto out;
>   
> -	if (is_modeset_prepare)
> -		dp->panel_is_modeset = prepare;
> +	dp->panel_is_modeset = prepare;
>   
>   out:
>   	mutex_unlock(&dp->panel_lock);
> @@ -1072,7 +1064,6 @@ analogix_dp_detect(struct drm_connector *connector, bool force)
>   {
>   	struct analogix_dp_device *dp = to_dp(connector);
>   	enum drm_connector_status status = connector_status_disconnected;
> -	int ret;
>   
>   	if (dp->plat_data->panel)
>   		return connector_status_connected;
> @@ -1194,7 +1185,7 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge,
>   	if (old_crtc_state && old_crtc_state->self_refresh_active)
>   		return;
>   
> -	ret = analogix_dp_prepare_panel(dp, true, true);
> +	ret = analogix_dp_prepare_panel(dp, true);
>   	if (ret)
>   		DRM_ERROR("failed to setup the panel ret = %d\n", ret);
>   }
> @@ -1294,7 +1285,7 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
>   
>   	pm_runtime_put_sync(dp->dev);
>   
> -	ret = analogix_dp_prepare_panel(dp, false, true);
> +	ret = analogix_dp_prepare_panel(dp, false);
>   	if (ret)
>   		DRM_ERROR("failed to setup the panel ret = %d\n", ret);
>   
> 

The patch has been verified with the eDP panel "lg,lp079qx1-sp0v" in 
RK3588S EVB1 board.

Tested-by: Damon Ding <damon.ding@rock-chips.com>

Best regards,
Damon


  reply	other threads:[~2025-04-14  1:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  5:11 [PATCH 0/7] drm/panel: make prepare / enable / disable / unprepare return void Dmitry Baryshkov
2025-04-01  5:11 ` [PATCH 1/7] drm/bridge: analogix_dp: drop extra calls to analogix_dp_prepare_panel() Dmitry Baryshkov
2025-04-14  1:20   ` Damon Ding
2025-04-14  2:01     ` Damon Ding
2025-04-20 22:56       ` Dmitry Baryshkov
2025-04-17 15:46   ` Neil Armstrong
2025-04-01  5:11 ` [PATCH 2/7] drm/bridge: analogix_dp: drop unused argument " Dmitry Baryshkov
2025-04-14  1:38   ` Damon Ding [this message]
2025-04-17 15:46   ` Neil Armstrong
2025-04-01  5:11 ` [PATCH 3/7] drm/bridge: analogic_dp: drop panel_is_modeset Dmitry Baryshkov
2025-04-14  1:46   ` Damon Ding
2025-04-17 15:47   ` Neil Armstrong
2025-04-20 22:55     ` Dmitry Baryshkov
2025-04-22 13:42   ` Neil Armstrong
2025-04-01  5:11 ` [PATCH 4/7] drm/bridge: analogic_dp: drop panel_lock Dmitry Baryshkov
2025-04-14  1:50   ` Damon Ding
2025-04-17 15:47   ` Neil Armstrong
2025-04-01  5:11 ` [PATCH 5/7] drm/bridge: analogix_dp: inline analogix_dp_prepare_panel() Dmitry Baryshkov
2025-04-14  1:54   ` Damon Ding
2025-04-17 15:48   ` Neil Armstrong
2025-04-01  5:11 ` [PATCH 6/7] drm/bridge: analogix_dp: ignore return values of drm_panel_* calls Dmitry Baryshkov
2025-04-14  1:58   ` Damon Ding
2025-04-17 15:48   ` Neil Armstrong
2025-04-01  5:11 ` [PATCH 7/7] drm/panel: make prepare/enable and disable/unprepare calls return void Dmitry Baryshkov
2025-04-11  8:55   ` Neil Armstrong
2025-04-18 13:22 ` [PATCH 0/7] drm/panel: make prepare / enable / disable / unprepare " Neil Armstrong
2025-04-22 13:56 ` Dmitry Baryshkov

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=d4d6d1a2-cfec-4913-a30e-26cf63a17fa2@rock-chips.com \
    --to=damon.ding@rock-chips.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --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®