Re: [PATCH 4/7] drm/bridge: analogic_dp: drop panel_lock

Damon Ding
2025-04-14T01:55:59Z

Hi Dmitry,

On 2025/4/1 13:11, Dmitry Baryshkov wrote:
> The analogix_dp_prepare_panel() function is called from bridge's
> atomic_pre_enable() and atomic_post_disable() callbacks, which can not
> happen simultaneously. Drop the useless mutex.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 -----
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 --
> 2 files changed, 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 704c6169116eb2601d2ad02dc7294455ceff5460..1ec4d277fe6bb03ad9eb8451ae2af5ad5ada0978 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -974,14 +974,11 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> if (!dp->plat_data->panel)
> return 0;
>
> - mutex_lock(&dp->panel_lock);
> -
> if (prepare)
> ret = drm_panel_prepare(dp->plat_data->panel);
> else
> ret = drm_panel_unprepare(dp->plat_data->panel);
>
> - mutex_unlock(&dp->panel_lock);
> return ret;
> }
>
> @@ -1523,8 +1520,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
> dp->dev = &pdev->dev;
> dp->dpms_mode = DRM_MODE_DPMS_OFF;
>
> - mutex_init(&dp->panel_lock);
> -
> /*
> * platform dp driver need containor_of the plat_data to get
> * the driver private data, so we need to store the point of
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> index b679d5b71d276f458d905c936160f107225bc6c5..2b54120ba4a3ef55af518a0629a5c8469f275a0f 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> @@ -169,8 +169,6 @@ struct analogix_dp_device {
> bool fast_train_enable;
> bool psr_supported;
>
> - struct mutex panel_lock;
> -
> struct analogix_dp_plat_data *plat_data;
> };
>
>

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