Re: [PATCH v4 35/39] drm/msm/dp: wire MST helpers into atomic check and commit paths
From: Dmitry Baryshkov
Date: Sat Apr 11 2026 - 19:55:54 EST
On Fri, Apr 10, 2026 at 05:34:10PM +0800, Yongxing Mou wrote:
> Call drm_dp_mst_atomic_check() from msm_atomic_check() so MST-specific
> state, such as connector and topology changes, is validated as part of
> the atomic check.
>
> Hook the MST helpers into atomic_commit_setup() and
> atomic_commit_tail() to support non-blocking atomic commits for
> DisplayPort MST, and ensure MST commits properly wait for dependencies.
>
> For SST, non-blocking commits are already handled via commit_tail(),
> which waits for dependencies in the DRM core.
>
> Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
> Signed-off-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/msm/msm_atomic.c | 9 ++++++++-
> drivers/gpu/drm/msm/msm_kms.c | 2 ++
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c
> index 87a91148a731..ea064aa6d8fc 100644
> --- a/drivers/gpu/drm/msm/msm_atomic.c
> +++ b/drivers/gpu/drm/msm/msm_atomic.c
> @@ -4,6 +4,7 @@
> * Author: Rob Clark <robdclark@xxxxxxxxx>
> */
>
> +#include <drm/display/drm_dp_mst_helper.h>
> #include <drm/drm_atomic_uapi.h>
> #include <drm/drm_vblank.h>
>
> @@ -207,7 +208,11 @@ int msm_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
> if (ret)
> return ret;
>
> - return drm_atomic_helper_check(dev, state);
> + ret = drm_atomic_helper_check(dev, state);
> + if (ret)
> + return ret;
> +
> + return drm_dp_mst_atomic_check(state);
> }
>
> void msm_atomic_commit_tail(struct drm_atomic_state *state)
> @@ -221,6 +226,8 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
>
> trace_msm_atomic_commit_tail_start(async, crtc_mask);
>
> + drm_dp_mst_atomic_wait_for_dependencies(state);
> +
> kms->funcs->enable_commit(kms);
>
> /*
> diff --git a/drivers/gpu/drm/msm/msm_kms.c b/drivers/gpu/drm/msm/msm_kms.c
> index e5d0ea629448..a8f5fbb3239d 100644
> --- a/drivers/gpu/drm/msm/msm_kms.c
> +++ b/drivers/gpu/drm/msm/msm_kms.c
> @@ -10,6 +10,7 @@
> #include <linux/sched/mm.h>
> #include <uapi/linux/sched/types.h>
>
> +#include <drm/display/drm_dp_mst_helper.h>
> #include <drm/drm_drv.h>
> #include <drm/drm_mode_config.h>
> #include <drm/drm_vblank.h>
> @@ -29,6 +30,7 @@ static const struct drm_mode_config_funcs mode_config_funcs = {
>
> static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
> .atomic_commit_tail = msm_atomic_commit_tail,
> + .atomic_commit_setup = drm_dp_mst_atomic_setup_commit,
I usually hate one-liners, but here I'd prefer to see this call as a
part of the msm_atomic.c
> };
>
> static irqreturn_t msm_irq(int irq, void *arg)
>
> --
> 2.43.0
>
--
With best wishes
Dmitry