* [PATCH] drm/tegra: fix non-debugfs builds
@ 2017-12-18 13:44 Arnd Bergmann
[not found] ` <20171218134519.3042726-1-arnd-r2nGTMty4D4@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-12-18 13:44 UTC (permalink / raw)
To: Thierry Reding, David Airlie, Jonathan Hunter
Cc: Arnd Bergmann, Daniel Vetter,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
The new debugfs registration fails to build when CONFIG_DEBUGFS is
disabled, because the drm_crtc structure is lacking a member in that
configuration:
drivers/gpu/drm/tegra/dc.c: In function 'tegra_dc_late_register':
drivers/gpu/drm/tegra/dc.c:1204:28: error: 'struct drm_crtc' has no member named 'debugfs_entry'
Without CONFIG_DEBUGFS, the rest of the function already degrades
into nothing, so we just avoid the one assignment.
Fixes: b95800eeef09 ("drm/tegra: dc: Register debugfs in ->late_register()")
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
drivers/gpu/drm/tegra/dc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index e963e40d8a25..e8a0cad5899c 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1201,10 +1201,16 @@ static int tegra_dc_late_register(struct drm_crtc *crtc)
{
unsigned int i, count = ARRAY_SIZE(debugfs_files);
struct drm_minor *minor = crtc->dev->primary;
- struct dentry *root = crtc->debugfs_entry;
+ struct dentry *root;
struct tegra_dc *dc = to_tegra_dc(crtc);
int err;
+#ifdef CONFIG_DEBUG_FS
+ root = crtc->debugfs_entry;
+#else
+ root = NULL;
+#endif
+
dc->debugfs_files = kmemdup(debugfs_files, sizeof(debugfs_files),
GFP_KERNEL);
if (!dc->debugfs_files)
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/tegra: fix non-debugfs builds
[not found] ` <20171218134519.3042726-1-arnd-r2nGTMty4D4@public.gmane.org>
@ 2017-12-20 18:59 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2017-12-20 18:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: David Airlie, Jonathan Hunter, Daniel Vetter,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 897 bytes --]
On Mon, Dec 18, 2017 at 02:44:46PM +0100, Arnd Bergmann wrote:
> The new debugfs registration fails to build when CONFIG_DEBUGFS is
> disabled, because the drm_crtc structure is lacking a member in that
> configuration:
>
> drivers/gpu/drm/tegra/dc.c: In function 'tegra_dc_late_register':
> drivers/gpu/drm/tegra/dc.c:1204:28: error: 'struct drm_crtc' has no member named 'debugfs_entry'
>
> Without CONFIG_DEBUGFS, the rest of the function already degrades
> into nothing, so we just avoid the one assignment.
>
> Fixes: b95800eeef09 ("drm/tegra: dc: Register debugfs in ->late_register()")
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/dc.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
I don't think I replied, but I had applied this yesterday, so this
should be fixed in linux-next today.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-20 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 13:44 [PATCH] drm/tegra: fix non-debugfs builds Arnd Bergmann
[not found] ` <20171218134519.3042726-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-12-20 18:59 ` Thierry Reding
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).