diff mbox series

[2/2] drm/msm/gpu: fix building without debugfs

Message ID 20180813212351.2555757-2-arnd@arndb.de (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/msm/gpu: fix msm_gpu_crashstate_capture stub prototype | expand

Commit Message

Arnd Bergmann Aug. 13, 2018, 9:23 p.m. UTC
When debugfs is disabled, but coredump is turned on, the adreno driver fails to build:

drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:4: error: 'struct msm_gpu_funcs' has no member named 'show'
   .show = adreno_show,
    ^~~~
drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: note: (near initialization for 'funcs.base')
drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: error: initialization of 'void (*)(struct msm_gpu *, struct msm_gem_submit *, struct msm_file_private *)' from incompatible pointer type 'void (*)(struct msm_gpu *, struct msm_gpu_state *, struct drm_printer *)' [-Werror=incompatible-pointer-types]
drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: note: (near initialization for 'funcs.base.submit')
drivers/gpu/drm/msm/adreno/a4xx_gpu.c:546:4: error: 'struct msm_gpu_funcs' has no member named 'show'
drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1460:4: error: 'struct msm_gpu_funcs' has no member named 'show'
drivers/gpu/drm/msm/adreno/a6xx_gpu.c:769:4: error: 'struct msm_gpu_funcs' has no member named 'show'
drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_devcoredump_read':
drivers/gpu/drm/msm/msm_gpu.c:289:12: error: 'const struct msm_gpu_funcs' has no member named 'show'

Adjust the #ifdef to make it build again.

Fixes: c0fec7f562ec ("drm/msm/gpu: Capture the GPU state on a GPU hang")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Not sure if this does the right thing, but it does fix the build regression
---
 drivers/gpu/drm/msm/msm_gpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ioana Ciornei Jan. 8, 2019, 2:16 p.m. UTC | #1
> Subject: [PATCH 2/2] drm/msm/gpu: fix building without debugfs
> 
> When debugfs is disabled, but coredump is turned on, the adreno driver fails to
> build:
> 
> drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:4: error: 'struct msm_gpu_funcs'
> has no member named 'show'
>    .show = adreno_show,
>     ^~~~
> drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: note: (near initialization for
> 'funcs.base')
> drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: error: initialization of 'void
> (*)(struct msm_gpu *, struct msm_gem_submit *, struct msm_file_private *)'
> from incompatible pointer type 'void (*)(struct msm_gpu *, struct
> msm_gpu_state *, struct drm_printer *)' [-Werror=incompatible-pointer-types]
> drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: note: (near initialization for
> 'funcs.base.submit')
> drivers/gpu/drm/msm/adreno/a4xx_gpu.c:546:4: error: 'struct msm_gpu_funcs'
> has no member named 'show'
> drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1460:4: error: 'struct
> msm_gpu_funcs' has no member named 'show'
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c:769:4: error: 'struct msm_gpu_funcs'
> has no member named 'show'
> drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_devcoredump_read':
> drivers/gpu/drm/msm/msm_gpu.c:289:12: error: 'const struct msm_gpu_funcs'
> has no member named 'show'
> 
> Adjust the #ifdef to make it build again.

Was this patch picked up by someone? I am asking this since the compile error can be still seen in 5.0-rc1.

Ioana

> 
> Fixes: c0fec7f562ec ("drm/msm/gpu: Capture the GPU state on a GPU hang")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Not sure if this does the right thing, but it does fix the build regression
> ---
>  drivers/gpu/drm/msm/msm_gpu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gpu.h
> b/drivers/gpu/drm/msm/msm_gpu.h
> index 9122ee6e55e4..1fe93920fb25 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.h
> +++ b/drivers/gpu/drm/msm/msm_gpu.h
> @@ -63,7 +63,7 @@ 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
> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
>  	/* show GPU status in debugfs: */
>  	void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
>  			struct drm_printer *p);
> --
> 2.18.0
Rob Clark Jan. 8, 2019, 5:42 p.m. UTC | #2
On Tue, Jan 8, 2019 at 9:16 AM Ioana Ciornei <ioana.ciornei@nxp.com> wrote:
>
>
> > Subject: [PATCH 2/2] drm/msm/gpu: fix building without debugfs
> >
> > When debugfs is disabled, but coredump is turned on, the adreno driver fails to
> > build:
> >
> > drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:4: error: 'struct msm_gpu_funcs'
> > has no member named 'show'
> >    .show = adreno_show,
> >     ^~~~
> > drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: note: (near initialization for
> > 'funcs.base')
> > drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: error: initialization of 'void
> > (*)(struct msm_gpu *, struct msm_gem_submit *, struct msm_file_private *)'
> > from incompatible pointer type 'void (*)(struct msm_gpu *, struct
> > msm_gpu_state *, struct drm_printer *)' [-Werror=incompatible-pointer-types]
> > drivers/gpu/drm/msm/adreno/a3xx_gpu.c:460:11: note: (near initialization for
> > 'funcs.base.submit')
> > drivers/gpu/drm/msm/adreno/a4xx_gpu.c:546:4: error: 'struct msm_gpu_funcs'
> > has no member named 'show'
> > drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1460:4: error: 'struct
> > msm_gpu_funcs' has no member named 'show'
> > drivers/gpu/drm/msm/adreno/a6xx_gpu.c:769:4: error: 'struct msm_gpu_funcs'
> > has no member named 'show'
> > drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_devcoredump_read':
> > drivers/gpu/drm/msm/msm_gpu.c:289:12: error: 'const struct msm_gpu_funcs'
> > has no member named 'show'
> >
> > Adjust the #ifdef to make it build again.
>
> Was this patch picked up by someone? I am asking this since the compile error can be still seen in 5.0-rc1.

Hmm, looks like I overlooked this thinking it was a resend of an
earlier patch from Arnd with (nearly) the same subject line.

Maybe we can pick this up via drm-misc?  I've pushed to msm-next
should fix should show up in linux-next in the near future.

BR,
-R


>
> Ioana
>
> >
> > Fixes: c0fec7f562ec ("drm/msm/gpu: Capture the GPU state on a GPU hang")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > Not sure if this does the right thing, but it does fix the build regression
> > ---
> >  drivers/gpu/drm/msm/msm_gpu.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/msm/msm_gpu.h
> > b/drivers/gpu/drm/msm/msm_gpu.h
> > index 9122ee6e55e4..1fe93920fb25 100644
> > --- a/drivers/gpu/drm/msm/msm_gpu.h
> > +++ b/drivers/gpu/drm/msm/msm_gpu.h
> > @@ -63,7 +63,7 @@ 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
> > +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
> >       /* show GPU status in debugfs: */
> >       void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
> >                       struct drm_printer *p);
> > --
> > 2.18.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
index 9122ee6e55e4..1fe93920fb25 100644
--- a/drivers/gpu/drm/msm/msm_gpu.h
+++ b/drivers/gpu/drm/msm/msm_gpu.h
@@ -63,7 +63,7 @@  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
+#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
 	/* show GPU status in debugfs: */
 	void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
 			struct drm_printer *p);