summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-03-28 14:43:01 +0200
committerMaxime Ripard <maxime@cerno.tech>2022-03-31 10:19:45 +0200
commit018ad18f6ab062a198627ec1bd5fd9d797c90238 (patch)
tree692e2e0f529ced2a40451396f7cd0201d59686ac /drivers/gpu/drm/drm_atomic.c
parentd049a24b15d8c1c90461933f0526b582a8cdf9b4 (diff)
downloadlinux-stable-018ad18f6ab062a198627ec1bd5fd9d797c90238.tar.gz
linux-stable-018ad18f6ab062a198627ec1bd5fd9d797c90238.tar.bz2
linux-stable-018ad18f6ab062a198627ec1bd5fd9d797c90238.zip
drm/atomic: Print the state every non-blocking commit
The DRM_UT_STATE controls whether we're calling drm_atomic_print_new_state() whenever a new state is committed. However, that call is made in the drm_mode_atomic_ioctl(), whereas we have multiple users of the drm_atomic_commit() function in the kernel (framebuffer emulation, drm_atomic_helper_dirtyfb, etc.). This leads to multiple states being committed but never actually displayed even though we asked to have verbose atomic state debugging. Let's move the call to drm_atomic_print_new_state() to drm_atomic_commit() to make sure we don't miss any. Non-blocking commits were never logged though, and it would create too much churn in the logs to do so, so leave them out for now. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20220328124304.2309418-2-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 88cd992df356..637df126c2d9 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1423,8 +1423,12 @@ EXPORT_SYMBOL(drm_atomic_check_only);
int drm_atomic_commit(struct drm_atomic_state *state)
{
struct drm_mode_config *config = &state->dev->mode_config;
+ struct drm_printer p = drm_info_printer(state->dev->dev);
int ret;
+ if (drm_debug_enabled(DRM_UT_STATE))
+ drm_atomic_print_new_state(state, &p);
+
ret = drm_atomic_check_only(state);
if (ret)
return ret;