drm/msm/gpu: fix msm_gpu_crashstate_capture stub prototype
Subsystems (4)
PATCH 1/2 drm/msm/gpu: fix msm_gpu_crashstate_capture stub prototype
The function prototype recently changed, but the patch missed the second prototype that is used when CONFIG_DEV_COREDUMP is disabled:
drivers/gpu/drm/msm/msm_gpu.c: In function 'recover_worker':drivers/gpu/drm/msm/msm_gpu.c:461:34: error: passing argument 2 of 'msm_gpu_crashstate_capture' from incompatible pointer type [-Werror=incompatible-pointer-types]
msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
^~~~~~
drivers/gpu/drm/msm/msm_gpu.c:370:67: note: expected 'char *' but argument is of type 'struct msm_gem_submit *'
static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
~~~~~~^~~~drivers/gpu/drm/msm/msm_gpu.c:461:2: error: too many arguments to function 'msm_gpu_crashstate_capture'
msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/msm/msm_gpu.c:370:13: note: declared here
static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
Change the stub to match the normal function.
--- drivers/gpu/drm/msm/msm_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_gpu.c +2 -2
@@ -367,8 +367,8 @@ static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, msm_gpu_devcoredump_read, msm_gpu_devcoredump_free); }#else -static void msm_gpu_crashstate_capture (struct msm_gpu *gpu,char *comm, -char *cmd) +static void msm_gpu_crashstate_capture (struct msm_gpu *gpu, +struct msm_gem_submit *submit,char *comm,char *cmd) { }#endif
Signature · 1 line
2.18.0
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.
---
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(-)
drivers/gpu/drm/msm/msm_gpu.h +1 -1
@@ -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);
Signature · 6 lines
2.18.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
RE: [PATCH 2/2] drm/msm/gpu: fix building without debugfs
Quoted 28 lines
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: 'structmsm_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 (*)(structmsm_gpu*, structmsm_gem_submit*, structmsm_file_private*)' from incompatible pointer type 'void (*)(structmsm_gpu*, structmsm_gpu_state*, structdrm_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: 'structmsm_gpu_funcs' has no member named 'show'drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1460:4: error: 'structmsm_gpu_funcs' has no member named 'show'drivers/gpu/drm/msm/adreno/a6xx_gpu.c:769:4: error: 'structmsm_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 structmsm_gpu_funcs' has no member named 'show'
Quoted 1 line
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
Quoted 25 lines
Fixes c0fec7f562ec ("drm/msm/gpu: Capture the GPU state on a GPU hang")Signed-off-by Arnd Bergmann <[email protected]>---
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(-)drivers/gpu/drm/msm/msm_gpu.h +1
-2@@ -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
Re: [PATCH 2/2] drm/msm/gpu: fix building without debugfs
Quoted 29 lines · Ioana Ciornei
Quoted 29 lines
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: 'structmsm_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 (*)(structmsm_gpu*, structmsm_gem_submit*, structmsm_file_private*)' from incompatible pointer type 'void (*)(structmsm_gpu*, structmsm_gpu_state*, structdrm_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: 'structmsm_gpu_funcs' has no member named 'show'drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1460:4: error: 'structmsm_gpu_funcs' has no member named 'show'drivers/gpu/drm/msm/adreno/a6xx_gpu.c:769:4: error: 'structmsm_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 structmsm_gpu_funcs' has no member named 'show'
Quoted 3 lines
Quoted 1 line
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
Quoted 12 lines
Ioana
Quoted 9 lines
Fixes c0fec7f562ec ("drm/msm/gpu: Capture the GPU state on a GPU hang")Signed-off-by Arnd Bergmann <[email protected]>---
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(-)
Quoted 17 lines
Quoted 15 lines
drivers/gpu/drm/msm/msm_gpu.h +1
-2@@ -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); --Quoted 1 line
2.18.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel