The CRTC, plane and bridge state readout hooks of the tidss driver are
only called by the KMS core if the device opts in to the state readout
infrastructure.

Set drm_mode_config_funcs.atomic_sro_readout_state to
drm_atomic_helper_sro_readout_state(), and
drm_mode_config_helper_funcs.atomic_sro_build_state and
drm_mode_config_helper_funcs.atomic_sro_install_state to
drm_atomic_helper_sro_build_state() and
drm_atomic_helper_sro_install_state() respectively, which implement the
standard readout sequence on top of the per-object hooks.

Signed-off-by: Maxime Ripard <[email protected]>
---
 drivers/gpu/drm/tidss/tidss_kms.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tidss/tidss_kms.c 
b/drivers/gpu/drm/tidss/tidss_kms.c
index 9d9cd1990630..77294fe34df0 100644
--- a/drivers/gpu/drm/tidss/tidss_kms.c
+++ b/drivers/gpu/drm/tidss/tidss_kms.c
@@ -4,10 +4,12 @@
  * Author: Tomi Valkeinen <[email protected]>
  */
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_atomic_state_readout.h>
+#include <drm/drm_atomic_state_readout_helper.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_of.h>
 #include <drm/drm_panel.h>
 #include <drm/drm_print.h>
@@ -62,11 +64,13 @@ static void tidss_atomic_commit_tail(struct 
drm_atomic_commit *old_state)
 
        tidss_runtime_put(tidss);
 }
 
 static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
-       .atomic_commit_tail = tidss_atomic_commit_tail,
+       .atomic_commit_tail     = tidss_atomic_commit_tail,
+       .atomic_sro_build_state = drm_atomic_helper_sro_build_state,
+       .atomic_sro_install_state = drm_atomic_helper_sro_install_state,
 };
 
 static int tidss_atomic_check(struct drm_device *ddev,
                              struct drm_atomic_commit *state)
 {
@@ -131,10 +135,11 @@ static void tidss_hw_reset(struct drm_device *dev)
 
 static const struct drm_mode_config_funcs mode_config_funcs = {
        .fb_create = drm_gem_fb_create,
        .atomic_check = tidss_atomic_check,
        .atomic_commit = drm_atomic_helper_commit,
+       .atomic_sro_readout_state = drm_atomic_helper_sro_readout_state,
        .hw_reset = tidss_hw_reset,
 };
 
 static const char * const tidss_internal_bridge_compatibles[] = {
        "ti,j721e-dsi",

-- 
2.56.1

Reply via email to