All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/armada: Include current dir on CFLAGS for armada trace
@ 2017-01-16 20:13 Gustavo Padovan
  2017-01-16 20:37 ` Laurent Pinchart
  2017-01-23  8:21 ` Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Gustavo Padovan @ 2017-01-16 20:13 UTC (permalink / raw)
  To: dri-devel; +Cc: Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.com>

Otherwise compilation fails like this:

In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
                 from drivers/gpu/drm/armada/armada_trace.c:3:
./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h: No such file or directory
compilation terminated.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
---
 drivers/gpu/drm/armada/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/armada/Makefile b/drivers/gpu/drm/armada/Makefile
index a18f156..64c0b45 100644
--- a/drivers/gpu/drm/armada/Makefile
+++ b/drivers/gpu/drm/armada/Makefile
@@ -4,3 +4,5 @@ armada-y	+= armada_510.o
 armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
 
 obj-$(CONFIG_DRM_ARMADA) := armada.o
+
+CFLAGS_armada_trace.o := -I$(src)
-- 
2.5.5

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

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

* Re: [PATCH] drm/armada: Include current dir on CFLAGS for armada trace
  2017-01-16 20:13 [PATCH] drm/armada: Include current dir on CFLAGS for armada trace Gustavo Padovan
@ 2017-01-16 20:37 ` Laurent Pinchart
  2017-01-16 21:12   ` Gustavo Padovan
  2017-01-23  8:21 ` Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2017-01-16 20:37 UTC (permalink / raw)
  To: dri-devel; +Cc: Gustavo Padovan

Hi Gustavo,

Thank you for the patch.

On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.com>
> 
> Otherwise compilation fails like this:
> 
> In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
>                  from drivers/gpu/drm/armada/armada_trace.c:3:
> ./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h: No such
> file or directory compilation terminated.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>

How about a Fixes: line ?

> ---
>  drivers/gpu/drm/armada/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/armada/Makefile
> b/drivers/gpu/drm/armada/Makefile index a18f156..64c0b45 100644
> --- a/drivers/gpu/drm/armada/Makefile
> +++ b/drivers/gpu/drm/armada/Makefile
> @@ -4,3 +4,5 @@ armada-y	+= armada_510.o
>  armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
> 
>  obj-$(CONFIG_DRM_ARMADA) := armada.o
> +
> +CFLAGS_armada_trace.o := -I$(src)

-- 
Regards,

Laurent Pinchart

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

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

* Re: [PATCH] drm/armada: Include current dir on CFLAGS for armada trace
  2017-01-16 20:37 ` Laurent Pinchart
@ 2017-01-16 21:12   ` Gustavo Padovan
  2017-01-16 21:53     ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Gustavo Padovan @ 2017-01-16 21:12 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Gustavo Padovan, dri-devel

2017-01-16 Laurent Pinchart <laurent.pinchart@ideasonboard.com>:

> Hi Gustavo,
> 
> Thank you for the patch.
> 
> On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan@collabora.com>
> > 
> > Otherwise compilation fails like this:
> > 
> > In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
> >                  from drivers/gpu/drm/armada/armada_trace.c:3:
> > ./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h: No such
> > file or directory compilation terminated.
> > 
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> 
> How about a Fixes: line ?

Fixes: c8a220c686a5 ("drm/armada: add tracing support")

Gustavo

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

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

* Re: [PATCH] drm/armada: Include current dir on CFLAGS for armada trace
  2017-01-16 21:12   ` Gustavo Padovan
@ 2017-01-16 21:53     ` Laurent Pinchart
  2017-03-29  1:27       ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2017-01-16 21:53 UTC (permalink / raw)
  To: Gustavo Padovan; +Cc: Gustavo Padovan, Steven Rostedt, dri-devel

Hi Gustavo,

(CC'ing Steven)

On Monday 16 Jan 2017 19:12:58 Gustavo Padovan wrote:
> 2017-01-16 Laurent Pinchart <laurent.pinchart@ideasonboard.com>:
> > On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:
> >> From: Gustavo Padovan <gustavo.padovan@collabora.com>
> >> 
> >> Otherwise compilation fails like this:
> >> 
> >> In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
> >> 
> >>                  from drivers/gpu/drm/armada/armada_trace.c:3:
> >> ./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h: No
> >> such file or directory compilation terminated.
> >> 
> >> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> > 
> > How about a Fixes: line ?
> 
> Fixes: c8a220c686a5 ("drm/armada: add tracing support")

Thank you.

The approach taken here seems to be shared by a fair number of drivers, so

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

However, you could also set TRACE_INCLUDE_PATH to ../../drivers/gpu/drm/armada 
as done by drivers/dma-buf, drivers/ras and drivers/net/fjes. I'm not sure 
what's best, but if setting CFLAGS is preferred, I think we should get rid of 
TRACE_INCLUDE_PATH.

Steven, any opinion ? To avoid forcing you to dig the original e-mail up, the 
proposed fix is

> diff --git a/drivers/gpu/drm/armada/Makefile
> b/drivers/gpu/drm/armada/Makefile
> index a18f156..64c0b45 100644
> --- a/drivers/gpu/drm/armada/Makefile
> +++ b/drivers/gpu/drm/armada/Makefile
> @@ -4,3 +4,5 @@ armada-y        += armada_510.o
>  armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
>  
>  obj-$(CONFIG_DRM_ARMADA) := armada.o
> +
> +CFLAGS_armada_trace.o := -I$(src)

-- 
Regards,

Laurent Pinchart

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

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

* Re: [PATCH] drm/armada: Include current dir on CFLAGS for armada trace
  2017-01-16 20:13 [PATCH] drm/armada: Include current dir on CFLAGS for armada trace Gustavo Padovan
  2017-01-16 20:37 ` Laurent Pinchart
@ 2017-01-23  8:21 ` Daniel Vetter
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2017-01-23  8:21 UTC (permalink / raw)
  To: Gustavo Padovan; +Cc: Gustavo Padovan, dri-devel

On Mon, Jan 16, 2017 at 06:13:30PM -0200, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.com>
> 
> Otherwise compilation fails like this:
> 
> In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
>                  from drivers/gpu/drm/armada/armada_trace.c:3:
> ./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h: No such file or directory
> compilation terminated.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>

We have this already in

commit 7357f89954b6d005df6ab8929759e78d7d9a80f9
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Dec 30 17:38:52 2016 +0100

    drm/armada: Fix compile fail
> ---
>  drivers/gpu/drm/armada/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/armada/Makefile b/drivers/gpu/drm/armada/Makefile
> index a18f156..64c0b45 100644
> --- a/drivers/gpu/drm/armada/Makefile
> +++ b/drivers/gpu/drm/armada/Makefile
> @@ -4,3 +4,5 @@ armada-y	+= armada_510.o
>  armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
>  
>  obj-$(CONFIG_DRM_ARMADA) := armada.o
> +
> +CFLAGS_armada_trace.o := -I$(src)
> -- 
> 2.5.5
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/armada: Include current dir on CFLAGS for armada trace
  2017-01-16 21:53     ` Laurent Pinchart
@ 2017-03-29  1:27       ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2017-03-29  1:27 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: dri-devel, Gustavo Padovan

On Mon, 16 Jan 2017 23:53:53 +0200
Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:

> Hi Gustavo,
> 
> (CC'ing Steven)

Sorry for the very late reply. I somehow missed this email. But I
figured I would reply to it anyway. At least for knowledge for future
changes.

> 
> On Monday 16 Jan 2017 19:12:58 Gustavo Padovan wrote:
> > 2017-01-16 Laurent Pinchart <laurent.pinchart@ideasonboard.com>:  
> > > On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:  
> > >> From: Gustavo Padovan <gustavo.padovan@collabora.com>
> > >> 
> > >> Otherwise compilation fails like this:
> > >> 
> > >> In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
> > >> 
> > >>                  from drivers/gpu/drm/armada/armada_trace.c:3:
> > >> ./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h: No
> > >> such file or directory compilation terminated.
> > >> 
> > >> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>  
> > > 
> > > How about a Fixes: line ?  
> > 
> > Fixes: c8a220c686a5 ("drm/armada: add tracing support")  
> 
> Thank you.
> 
> The approach taken here seems to be shared by a fair number of drivers, so
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> However, you could also set TRACE_INCLUDE_PATH to ../../drivers/gpu/drm/armada 
> as done by drivers/dma-buf, drivers/ras and drivers/net/fjes. I'm not sure 
> what's best, but if setting CFLAGS is preferred, I think we should get rid of 
> TRACE_INCLUDE_PATH.

TRACE_INCLUDE_PATH is required either way. Because without it, it
defaults to include/trace.

> 
> Steven, any opinion ? To avoid forcing you to dig the original e-mail up, the 
> proposed fix is
> 
> > diff --git a/drivers/gpu/drm/armada/Makefile
> > b/drivers/gpu/drm/armada/Makefile
> > index a18f156..64c0b45 100644
> > --- a/drivers/gpu/drm/armada/Makefile
> > +++ b/drivers/gpu/drm/armada/Makefile
> > @@ -4,3 +4,5 @@ armada-y        += armada_510.o
> >  armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
> >  
> >  obj-$(CONFIG_DRM_ARMADA) := armada.o
> > +
> > +CFLAGS_armada_trace.o := -I$(src)  
> 

The safest way is to have the CFLAGS, but you still need to include

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .

Because the created file will use:

#include "TRACE_INCLUDE_PATH/TRACE_INCLUDE_FILE"

The default TRACE_INCLUDE_PATH is "trace/events"

-- Steve

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

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

end of thread, other threads:[~2017-03-29  1:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16 20:13 [PATCH] drm/armada: Include current dir on CFLAGS for armada trace Gustavo Padovan
2017-01-16 20:37 ` Laurent Pinchart
2017-01-16 21:12   ` Gustavo Padovan
2017-01-16 21:53     ` Laurent Pinchart
2017-03-29  1:27       ` Steven Rostedt
2017-01-23  8:21 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.