Skip to contentSkip to conversation

drm/armada: Include current dir on CFLAGS for armada trace

PATCH In review Gustavo Padovan 4 participants 6 messages Jan 16, 2017 – Mar 29, 2017

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

PATCH 1/1 drm/armada: Include current dir on CFLAGS for armada trace

From: Gustavo Padovan <[email protected]>

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.

---
 drivers/gpu/drm/armada/Makefile | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/armada/Makefile +2 -0
index a18f156..64c0b45 100644
@@ -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)
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi Gustavo,

Thank you for the patch.

Quoted 10 lines · On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:

From: Gustavo Padovan <[email protected]>

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.

How about a Fixes: line ?

Quoted 14 lines
---
 drivers/gpu/drm/armada/Makefile | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/armada/Makefile index a18f156..64c0b45 100644

drivers/gpu/drm/armada/Makefile +2 -0
@@ -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)
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

2017-01-16 Laurent Pinchart <[email protected]>:

Quoted 9 lines

Hi Gustavo,

Thank you for the patch.

Quoted 4 lines · On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:

From: Gustavo Padovan <[email protected]>

Otherwise compilation fails like this:

Quoted 8 lines
Quoted 6 lines

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.

How about a Fixes: line ?

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

Gustavo

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

#3 lore raw

Hi Gustavo,

(CC'ing Steven)

Quoted 12 lines · On Monday 16 Jan 2017 19:12:58 Gustavo Padovan wrote:

2017-01-16 Laurent Pinchart <[email protected]>:

Quoted 11 lines · On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:
Quoted 10 lines

From: Gustavo Padovan <[email protected]>

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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

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

Quoted 11 lines
drivers/gpu/drm/armada/Makefile +2 -0
index a18f156..64c0b45 100644
@@ -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)
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 3 lines · On Mon, 16 Jan 2017 23:53:53 +0200 Laurent Pinchart…

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.

Quoted 22 lines · On Monday 16 Jan 2017 19:12:58 Gustavo Padovan wrote:
Quoted 12 lines

2017-01-16 Laurent Pinchart <[email protected]>:

Quoted 11 lines · On Monday 16 Jan 2017 18:13:30 Gustavo Padovan wrote:
Quoted 10 lines

From: Gustavo Padovan <[email protected]>

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

How about a Fixes: line ?

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

Thank you.

Quoted 8 lines

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

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.

Quoted 12 lines

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

Quoted 8 lines
drivers/gpu/drm/armada/Makefile +0 -0
index a18f156..64c0b45 100644
@@ -4,3 +4,5 @@ armada-y        += armada_510.o
 armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
 
Quoted 4 lines

drivers/gpu/drm/armada/Makefile armada-y += armada_510.o · line 8

Quoted 3 lines
drivers/gpu/drm/armada/Makefile +2 -0
 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to Gustavo Padovan
Quoted 10 lines · Gustavo Padovan

From: Gustavo Padovan <[email protected]>

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.

We have this already in

commit 7357f89954b6d005df6ab8929759e78d7d9a80f9

Author: Daniel Vetter <[email protected]>
Date:   Fri Dec 30 17:38:52 2016 +0100

drm/armada: Fix compile fail

Quoted 21 lines
---
 drivers/gpu/drm/armada/Makefile | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/armada/Makefile +2 -0
index a18f156..64c0b45 100644
@@ -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)
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel