Skip to contentSkip to conversation

drm/msm: fix link error without CONFIG_DEBUG_FS

PATCH In review Arnd Bergmann 3 participants 5 messages Apr 8, 2020 – Jun 9, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm: fix link error without CONFIG_DEBUG_FS

I ran into a randconfig link error with debugfs disabled:

arm-linux-gnueabi-ld:
drivers/gpu/drm/msm/msm_gpu.o: in function should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to rd_full'

Change the helper to only look at this variable if debugfs is present.

Fixes e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")
---
 drivers/gpu/drm/msm/msm_gem.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_gem.h +4 -1
index 30584eaf8cc8..eb4aeaf291ea 100644
@@ -167,7 +167,10 @@ static inline bool
 should_dump(struct msm_gem_submit *submit, int idx)
 {
 	extern bool rd_full;
-	return rd_full || (submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP);
+	if (IS_ENABLED(CONFIG_DEBUG_FS) && rd_full)
+		return true;
+
+	return submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP;
 }
 
 #endif /* __MSM_GEM_H__ */
Signature · 6 lines
2.26.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

I ran into a randconfig link error with debugfs disabled:

arm-linux-gnueabi-ld:
drivers/gpu/drm/msm/msm_gpu.o: in function should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to rd_full'

Change the helper to only look at this variable if debugfs is present.

Fixes e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")

This fixes a compilation error for me on the APQ8060.

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Arnd Bergmann

I ran into a randconfig link error with debugfs disabled:

arm-linux-gnueabi-ld:
drivers/gpu/drm/msm/msm_gpu.o: in function should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to rd_full'

Quoted 7 lines
Quoted 4 lines

Change the helper to only look at this variable if debugfs is present.

Fixes e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")

This fixes a compilation error for me on the APQ8060.

Could someone be so kind and apply this fix to the MSM DRM tree?

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 11 lines · Linus Walleij
Quoted 9 lines · Linus Walleij
Quoted 7 lines · Arnd Bergmann

I ran into a randconfig link error with debugfs disabled:

arm-linux-gnueabi-ld:
drivers/gpu/drm/msm/msm_gpu.o: in function should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to rd_full'

Change the helper to only look at this variable if debugfs is present.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Fixes e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")

This fixes a compilation error for me on the APQ8060.

Could someone be so kind and apply this fix to the MSM DRM tree?

This should be fixed by 20aebe83698feb107d5a66b6cfd1d54459ccdfcf in msm-next/drm-next, are you still seeing this issue?

BR,
-R

#4 lore raw
Quoted 14 lines · Rob Clark
Quoted 13 lines · Linus Walleij
Quoted 12 lines · Linus Walleij
Quoted 9 lines · Arnd Bergmann

I ran into a randconfig link error with debugfs disabled:

arm-linux-gnueabi-ld:
drivers/gpu/drm/msm/msm_gpu.o: in function should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to rd_full'

Change the helper to only look at this variable if debugfs is present.

Fixes e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers")
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This fixes a compilation error for me on the APQ8060.

Could someone be so kind and apply this fix to the MSM DRM tree?

This should be fixed by 20aebe83698feb107d5a66b6cfd1d54459ccdfcf in msm-next/drm-next, are you still seeing this issue?

Oh nice this works too, I was just rebasing my trees and the patch was still there, of course I didn't see that anothe patch fixed the same issue already.

Thanks Rob!

Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel