* [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc
@ 2021-12-21 19:37 Ville Syrjala
2021-12-21 19:37 ` [PATCH 2/2] drm/dbi: Use a static inline stub for mipi_dbi_debugfs_init() Ville Syrjala
2021-12-22 8:11 ` [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Jani Nikula
0 siblings, 2 replies; 3+ messages in thread
From: Ville Syrjala @ 2021-12-21 19:37 UTC (permalink / raw)
To: dri-devel; +Cc: Jani Nikula, Nathan Chancellor, intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Remove the counterproductive CONFIG_DEBUG_FS ifdef and just include
the debugfs dentry in drm_crtc always. This way we don't need
annoying ifdefs in the actual code with DEBUGFS=n. Also we don't
have these ifdefs around any of the other debugfs dentries either
so can't see why drm_crtc should be special.
This fixes the i915 DEBUGFS=n build because I assumed the dentry
would always be there.
Cc: Jani Nikula <jani.nikula@intel.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Fixes: e74c6aa955ca ("drm/i915/fbc: Register per-crtc debugfs files")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
include/drm/drm_crtc.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 13eeba2a750a..4d01b4d89775 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1135,14 +1135,12 @@ struct drm_crtc {
*/
spinlock_t commit_lock;
-#ifdef CONFIG_DEBUG_FS
/**
* @debugfs_entry:
*
* Debugfs directory for this CRTC.
*/
struct dentry *debugfs_entry;
-#endif
/**
* @crc:
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm/dbi: Use a static inline stub for mipi_dbi_debugfs_init()
2021-12-21 19:37 [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Ville Syrjala
@ 2021-12-21 19:37 ` Ville Syrjala
2021-12-22 8:11 ` [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Jani Nikula
1 sibling, 0 replies; 3+ messages in thread
From: Ville Syrjala @ 2021-12-21 19:37 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, Noralf Trønnes, Sam Ravnborg
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Replace the slightly odd "#define <function> NULL" thing with
a standard static inline stub.
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
include/drm/drm_mipi_dbi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h
index 05e194958265..6fe13cce2670 100644
--- a/include/drm/drm_mipi_dbi.h
+++ b/include/drm/drm_mipi_dbi.h
@@ -194,7 +194,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb,
#ifdef CONFIG_DEBUG_FS
void mipi_dbi_debugfs_init(struct drm_minor *minor);
#else
-#define mipi_dbi_debugfs_init NULL
+static inline void mipi_dbi_debugfs_init(struct drm_minor *minor) {}
#endif
#endif /* __LINUX_MIPI_DBI_H */
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc
2021-12-21 19:37 [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Ville Syrjala
2021-12-21 19:37 ` [PATCH 2/2] drm/dbi: Use a static inline stub for mipi_dbi_debugfs_init() Ville Syrjala
@ 2021-12-22 8:11 ` Jani Nikula
1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2021-12-22 8:11 UTC (permalink / raw)
To: Ville Syrjala, dri-devel; +Cc: Nathan Chancellor, intel-gfx
On Tue, 21 Dec 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Remove the counterproductive CONFIG_DEBUG_FS ifdef and just include
> the debugfs dentry in drm_crtc always. This way we don't need
> annoying ifdefs in the actual code with DEBUGFS=n. Also we don't
> have these ifdefs around any of the other debugfs dentries either
> so can't see why drm_crtc should be special.
>
> This fixes the i915 DEBUGFS=n build because I assumed the dentry
> would always be there.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
on both
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Tested-by: Nathan Chancellor <nathan@kernel.org>
> Fixes: e74c6aa955ca ("drm/i915/fbc: Register per-crtc debugfs files")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> include/drm/drm_crtc.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 13eeba2a750a..4d01b4d89775 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -1135,14 +1135,12 @@ struct drm_crtc {
> */
> spinlock_t commit_lock;
>
> -#ifdef CONFIG_DEBUG_FS
> /**
> * @debugfs_entry:
> *
> * Debugfs directory for this CRTC.
> */
> struct dentry *debugfs_entry;
> -#endif
>
> /**
> * @crc:
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-22 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 19:37 [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Ville Syrjala
2021-12-21 19:37 ` [PATCH 2/2] drm/dbi: Use a static inline stub for mipi_dbi_debugfs_init() Ville Syrjala
2021-12-22 8:11 ` [PATCH 1/2] drm: Always include the debugfs dentry in drm_crtc Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).