linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm: fix building with DEBUG_FS=n
@ 2019-01-15 15:46 Rasmus Villemoes
  2019-01-29  8:28 ` Rasmus Villemoes
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus Villemoes @ 2019-01-15 15:46 UTC (permalink / raw)
  To: Jordan Crouse, Daniel Vetter
  Cc: linux-arm-msm, linux-kernel, Rasmus Villemoes, stable

With CONFIG_DEV_COREDUMP=y and CONFIG_DEBUG_FS=n, building fails:

drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:4: error: ‘struct msm_gpu_funcs’ has no member named ‘show’
   .show = adreno_show,
    ^~~~
drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   .show = adreno_show,
           ^~~~~~~~~~~
drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: note: (near initialization for ‘funcs.base.gpu_busy’)
cc1: some warnings being treated as errors

Fixes: c0fec7f562ec7 (drm/msm/gpu: Capture the GPU state on a GPU hang)
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/gpu/drm/msm/msm_gpu.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
index efb49bb64191..4cb41db7f9e8 100644
--- a/drivers/gpu/drm/msm/msm_gpu.h
+++ b/drivers/gpu/drm/msm/msm_gpu.h
@@ -63,10 +63,12 @@ struct msm_gpu_funcs {
 	struct msm_ringbuffer *(*active_ring)(struct msm_gpu *gpu);
 	void (*recover)(struct msm_gpu *gpu);
 	void (*destroy)(struct msm_gpu *gpu);
-#ifdef CONFIG_DEBUG_FS
-	/* show GPU status in debugfs: */
+#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
+	/* show GPU status in debugfs or device coredump: */
 	void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
 			struct drm_printer *p);
+#endif
+#ifdef CONFIG_DEBUG_FS
 	/* for generation specific debugfs: */
 	int (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor);
 #endif
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/msm: fix building with DEBUG_FS=n
  2019-01-15 15:46 [PATCH] drm/msm: fix building with DEBUG_FS=n Rasmus Villemoes
@ 2019-01-29  8:28 ` Rasmus Villemoes
  2019-01-29 15:04   ` Rob Clark
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus Villemoes @ 2019-01-29  8:28 UTC (permalink / raw)
  To: Jordan Crouse, Daniel Vetter; +Cc: linux-arm-msm, linux-kernel, stable

ping

On 15/01/2019 16.46, Rasmus Villemoes wrote:
> With CONFIG_DEV_COREDUMP=y and CONFIG_DEBUG_FS=n, building fails:
> 
> drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:4: error: ‘struct msm_gpu_funcs’ has no member named ‘show’
>    .show = adreno_show,
>     ^~~~
> drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>    .show = adreno_show,
>            ^~~~~~~~~~~
> drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: note: (near initialization for ‘funcs.base.gpu_busy’)
> cc1: some warnings being treated as errors
> 
> Fixes: c0fec7f562ec7 (drm/msm/gpu: Capture the GPU state on a GPU hang)
> Cc: stable@vger.kernel.org # v4.19+
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  drivers/gpu/drm/msm/msm_gpu.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
> index efb49bb64191..4cb41db7f9e8 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.h
> +++ b/drivers/gpu/drm/msm/msm_gpu.h
> @@ -63,10 +63,12 @@ struct msm_gpu_funcs {
>  	struct msm_ringbuffer *(*active_ring)(struct msm_gpu *gpu);
>  	void (*recover)(struct msm_gpu *gpu);
>  	void (*destroy)(struct msm_gpu *gpu);
> -#ifdef CONFIG_DEBUG_FS
> -	/* show GPU status in debugfs: */
> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
> +	/* show GPU status in debugfs or device coredump: */
>  	void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
>  			struct drm_printer *p);
> +#endif
> +#ifdef CONFIG_DEBUG_FS
>  	/* for generation specific debugfs: */
>  	int (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor);
>  #endif
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/msm: fix building with DEBUG_FS=n
  2019-01-29  8:28 ` Rasmus Villemoes
@ 2019-01-29 15:04   ` Rob Clark
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Clark @ 2019-01-29 15:04 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: Jordan Crouse, Daniel Vetter, linux-arm-msm, linux-kernel, stable

This should be fixed by c878a628e0c483ec36fa70f4590e4a58e34a6e49

BR,
-R

On Tue, Jan 29, 2019 at 3:29 AM Rasmus Villemoes
<Rasmus.Villemoes@prevas.se> wrote:
>
> ping
>
> On 15/01/2019 16.46, Rasmus Villemoes wrote:
> > With CONFIG_DEV_COREDUMP=y and CONFIG_DEBUG_FS=n, building fails:
> >
> > drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:4: error: ‘struct msm_gpu_funcs’ has no member named ‘show’
> >    .show = adreno_show,
> >     ^~~~
> > drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
> >    .show = adreno_show,
> >            ^~~~~~~~~~~
> > drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: note: (near initialization for ‘funcs.base.gpu_busy’)
> > cc1: some warnings being treated as errors
> >
> > Fixes: c0fec7f562ec7 (drm/msm/gpu: Capture the GPU state on a GPU hang)
> > Cc: stable@vger.kernel.org # v4.19+
> > Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> > ---
> >  drivers/gpu/drm/msm/msm_gpu.h | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
> > index efb49bb64191..4cb41db7f9e8 100644
> > --- a/drivers/gpu/drm/msm/msm_gpu.h
> > +++ b/drivers/gpu/drm/msm/msm_gpu.h
> > @@ -63,10 +63,12 @@ struct msm_gpu_funcs {
> >       struct msm_ringbuffer *(*active_ring)(struct msm_gpu *gpu);
> >       void (*recover)(struct msm_gpu *gpu);
> >       void (*destroy)(struct msm_gpu *gpu);
> > -#ifdef CONFIG_DEBUG_FS
> > -     /* show GPU status in debugfs: */
> > +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
> > +     /* show GPU status in debugfs or device coredump: */
> >       void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
> >                       struct drm_printer *p);
> > +#endif
> > +#ifdef CONFIG_DEBUG_FS
> >       /* for generation specific debugfs: */
> >       int (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor);
> >  #endif
> >
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-29 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 15:46 [PATCH] drm/msm: fix building with DEBUG_FS=n Rasmus Villemoes
2019-01-29  8:28 ` Rasmus Villemoes
2019-01-29 15:04   ` Rob Clark

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).