[PATCH v2 32/38] drm/msm: add support for non-blocking commits

From: Yongxing Mou
Date: Mon Jun 09 2025 - 08:31:25 EST


From: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>

Hook up the mst framework APIs with atomic_commit_setup() and
atomic_commit_tail() APIs to handle non-blocking commits.

Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
---
drivers/gpu/drm/msm/msm_atomic.c | 3 +++
drivers/gpu/drm/msm/msm_kms.c | 2 ++
2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c
index 87a91148a731dc911f30695add4c8f5002770220..655a5c90487d7176422c2be630aa029d2c64042e 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>

@@ -221,6 +222,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 35d5397e73b4c5cb90b1770e8570277e782be7ec..ec33afe27506892591e4c3e2671dab7a872b5525 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>
@@ -28,6 +29,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,
};

static irqreturn_t msm_irq(int irq, void *arg)

--
2.34.1