All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org
Cc: Jyri Sarha <jsarha@ti.com>,
	tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com
Subject: [PATCH] drm/atomic: debugfs atomic state should be removed too
Date: Tue, 29 Nov 2016 22:19:10 +0200	[thread overview]
Message-ID: <1480450750-13398-1-git-send-email-jsarha@ti.com> (raw)

If atomic state file is not removed from debugfs it will prevent
atomic driver modules from reloading after unload when debugfs is
enabled.

Fixes commit 6559c901cb484 ("drm/atomic: add debugfs file to dump out
atomic state")

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/gpu/drm/drm_atomic.c  | 6 ++++++
 drivers/gpu/drm/drm_debugfs.c | 2 ++
 include/drm/drm_atomic.h      | 1 +
 3 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index b476ec5..0db642a 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1686,6 +1686,12 @@ int drm_atomic_debugfs_init(struct drm_minor *minor)
 			ARRAY_SIZE(drm_atomic_debugfs_list),
 			minor->debugfs_root, minor);
 }
+
+void drm_atomic_debugfs_fini(struct drm_minor *minor)
+{
+	drm_debugfs_remove_files(drm_atomic_debugfs_list,
+			ARRAY_SIZE(drm_atomic_debugfs_list), minor);
+}
 #endif
 
 /*
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 206a4fe..68be42c 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -237,6 +237,8 @@ int drm_debugfs_cleanup(struct drm_minor *minor)
 
 	drm_debugfs_remove_files(drm_debugfs_list, DRM_DEBUGFS_ENTRIES, minor);
 
+	drm_atomic_debugfs_fini(minor);
+
 	debugfs_remove(minor->debugfs_root);
 	minor->debugfs_root = NULL;
 
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index c0eaec7..c8cec34 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -372,6 +372,7 @@ void drm_atomic_set_fence_for_plane(struct drm_plane_state *plane_state,
 #ifdef CONFIG_DEBUG_FS
 struct drm_minor;
 int drm_atomic_debugfs_init(struct drm_minor *minor);
+void drm_atomic_debugfs_fini(struct drm_minor *minor);
 #endif
 
 #define for_each_connector_in_state(__state, connector, connector_state, __i) \
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2016-11-29 20:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 20:19 Jyri Sarha [this message]
2016-11-29 20:43 ` [PATCH] drm/atomic: debugfs atomic state should be removed too Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480450750-13398-1-git-send-email-jsarha@ti.com \
    --to=jsarha@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.