dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS
@ 2020-04-08 19:14 Arnd Bergmann
  2020-05-05  8:27 ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2020-04-08 19:14 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, Jordan Crouse
  Cc: Rob Clark, Arnd Bergmann, linux-arm-msm, Kristian H. Kristensen,
	linux-kernel, dri-devel, Bjorn Andersson, freedreno,
	Allison Randal

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/msm/msm_gem.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h
index 30584eaf8cc8..eb4aeaf291ea 100644
--- a/drivers/gpu/drm/msm/msm_gem.h
+++ b/drivers/gpu/drm/msm/msm_gem.h
@@ -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__ */
-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS
  2020-04-08 19:14 [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS Arnd Bergmann
@ 2020-05-05  8:27 ` Linus Walleij
  2020-06-09 12:48   ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2020-05-05  8:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rob Clark, freedreno, linux-kernel, David Airlie, MSM,
	Kristian H. Kristensen, open list:DRM PANEL DRIVERS,
	Bjorn Andersson, Sean Paul, Allison Randal

On Wed, Apr 8, 2020 at 9:15 PM Arnd Bergmann <arnd@arndb.de> wrote:

> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

This fixes a compilation error for me on the APQ8060.
Tested-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS
  2020-05-05  8:27 ` Linus Walleij
@ 2020-06-09 12:48   ` Linus Walleij
  2020-06-09 14:04     ` Rob Clark
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2020-06-09 12:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rob Clark, freedreno, linux-kernel, David Airlie, MSM,
	Kristian H. Kristensen, open list:DRM PANEL DRIVERS,
	Bjorn Andersson, Sean Paul, Allison Randal

On Tue, May 5, 2020 at 10:27 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Apr 8, 2020 at 9:15 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> > 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")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> This fixes a compilation error for me on the APQ8060.
> Tested-by: Linus Walleij <linus.walleij@linaro.org>

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

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS
  2020-06-09 12:48   ` Linus Walleij
@ 2020-06-09 14:04     ` Rob Clark
  2020-06-09 19:53       ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Clark @ 2020-06-09 14:04 UTC (permalink / raw)
  To: Linus Walleij
  Cc: freedreno, linux-kernel, Arnd Bergmann, David Airlie, MSM,
	Kristian H. Kristensen, open list:DRM PANEL DRIVERS,
	Bjorn Andersson, Sean Paul, Allison Randal

On Tue, Jun 9, 2020 at 5:48 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Tue, May 5, 2020 at 10:27 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Wed, Apr 8, 2020 at 9:15 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > > 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")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > This fixes a compilation error for me on the APQ8060.
> > Tested-by: Linus Walleij <linus.walleij@linaro.org>
>
> 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS
  2020-06-09 14:04     ` Rob Clark
@ 2020-06-09 19:53       ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2020-06-09 19:53 UTC (permalink / raw)
  To: Rob Clark
  Cc: freedreno, linux-kernel, Arnd Bergmann, David Airlie, MSM,
	Kristian H. Kristensen, open list:DRM PANEL DRIVERS,
	Bjorn Andersson, Sean Paul, Allison Randal

On Tue, Jun 9, 2020 at 4:04 PM Rob Clark <robdclark@chromium.org> wrote:
> On Tue, Jun 9, 2020 at 5:48 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Tue, May 5, 2020 at 10:27 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> > > On Wed, Apr 8, 2020 at 9:15 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > >
> > > > 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")
> > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > >
> > > This fixes a compilation error for me on the APQ8060.
> > > Tested-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > 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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-06-10  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 19:14 [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS Arnd Bergmann
2020-05-05  8:27 ` Linus Walleij
2020-06-09 12:48   ` Linus Walleij
2020-06-09 14:04     ` Rob Clark
2020-06-09 19:53       ` Linus Walleij

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