From 6559c901cb4840e46893d587d8af435aac9c4c3f Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 5 Nov 2016 11:08:10 -0400 Subject: drm/atomic: add debugfs file to dump out atomic state Useful to dump current state from debugfs, if turning on the drm.debug bit is too much overhead. The drm_state_dump() can also be used by drivers, for example to implement a module param that dumps state on error irqs. Signed-off-by: Rob Clark Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-6-git-send-email-robdclark@gmail.com --- include/drm/drm_atomic.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/drm/drm_atomic.h') diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 2d1e9c9..331bb10 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -366,6 +366,13 @@ int __must_check drm_atomic_check_only(struct drm_atomic_state *state); int __must_check drm_atomic_commit(struct drm_atomic_state *state); int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state); +void drm_state_dump(struct drm_device *dev, struct drm_printer *p); + +#ifdef CONFIG_DEBUG_FS +struct drm_minor; +int drm_atomic_debugfs_init(struct drm_minor *minor); +#endif + #define for_each_connector_in_state(__state, connector, connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \ -- cgit v1.1