Skip to contentSkip to conversation

drm: Use correct path to trace include

PATCH Applied Thierry Reding 5 participants 10 messages Sep 1, 2017 – Sep 4, 2017

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

PATCH 1/6 drm: Use correct path to trace include

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

---
 drivers/gpu/drm/Makefile    | 2 --
 drivers/gpu/drm/drm_trace.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/Makefile +0 -2
index a8acc197dec3..f82d0faad690 100644
@@ -44,8 +44,6 @@ drm_kms_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o
 obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
 obj-$(CONFIG_DRM_DEBUG_MM_SELFTEST) += selftests/
 
-CFLAGS_drm_trace_points.o := -I$(src)
-
 obj-$(CONFIG_DRM)	+= drm.o
 obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
 obj-$(CONFIG_DRM_ARM)	+= arm/
drivers/gpu/drm/drm_trace.h +1 -1
index 14c5a777682e..16c64d067e67 100644
@@ -61,5 +61,5 @@ TRACE_EVENT(drm_vblank_event_delivered,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm
 #include <trace/define_trace.h>
Signature · 6 lines
2.13.3

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

PATCH 2/6 drm/amdgpu: Use correct path to trace include

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

---
 drivers/gpu/drm/amd/amdgpu/Makefile       | 2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/Makefile +0 -2
index 658bac0cdc5e..25a95c95df14 100644
@@ -133,5 +133,3 @@ include $(FULL_AMD_PATH)/powerplay/Makefile
 amdgpu-y += $(AMD_POWERPLAY_FILES)
 
 obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
-
-CFLAGS_amdgpu_trace_points.o := -I$(src)
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +1 -1
index 1c88bd5e29ad..0ee2c97ae79e 100644
@@ -473,5 +473,5 @@ TRACE_EVENT(amdgpu_ttm_bo_move,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/amd/amdgpu
 #include <trace/define_trace.h>
Signature · 6 lines
2.13.3

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

PATCH 3/6 drm/armada: Use correct path to trace include

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

---
 drivers/gpu/drm/armada/Makefile       | 2 --
 drivers/gpu/drm/armada/armada_trace.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/armada/Makefile +0 -2
index 64c0b4546fb2..a18f156c8b66 100644
@@ -4,5 +4,3 @@ armada-y	+= armada_510.o
 armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
 
 obj-$(CONFIG_DRM_ARMADA) := armada.o
-
-CFLAGS_armada_trace.o := -I$(src)
drivers/gpu/drm/armada/armada_trace.h +1 -1
index dc0cba70fd1a..be245a24610f 100644
@@ -62,5 +62,5 @@ TRACE_EVENT(armada_ovl_plane_work,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/armada
 #include <trace/define_trace.h>
Signature · 6 lines
2.13.3

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

PATCH 4/6 drm/i915: Use correct path to trace include

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

---
 drivers/gpu/drm/i915/Makefile     | 2 --
 drivers/gpu/drm/i915/i915_trace.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/i915/Makefile +0 -2
index 892f52b53060..1cb8059a3a16 100644
@@ -150,5 +150,3 @@ endif
 i915-y += intel_lpe_audio.o
 
 obj-$(CONFIG_DRM_I915) += i915.o
-
-CFLAGS_i915_trace_points.o := -I$(src)
drivers/gpu/drm/i915/i915_trace.h +1 -1
index b24a83d43559..8794c198f877 100644
@@ -1031,5 +1031,5 @@ TRACE_EVENT(switch_mm,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/i915
 #include <trace/define_trace.h>
Signature · 6 lines
2.13.3

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

PATCH 5/6 drm/radeon: Use correct path to trace include

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

---
 drivers/gpu/drm/radeon/Makefile       | 2 --
 drivers/gpu/drm/radeon/radeon_trace.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/radeon/Makefile +0 -2
index 4acbb944bcd2..be16c6390216 100644
@@ -109,5 +109,3 @@ radeon-$(CONFIG_VGA_SWITCHEROO) += radeon_atpx_handler.o
 radeon-$(CONFIG_ACPI) += radeon_acpi.o
 
 obj-$(CONFIG_DRM_RADEON)+= radeon.o
-
-CFLAGS_radeon_trace_points.o := -I$(src)
drivers/gpu/drm/radeon/radeon_trace.h +1 -1
index fdce4062901f..815eaa8c394b 100644
@@ -204,5 +204,5 @@ DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/radeon
 #include <trace/define_trace.h>
Signature · 6 lines
2.13.3

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

PATCH 6/6 drm/vc4: Use correct path to trace include

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

---
 drivers/gpu/drm/vc4/Makefile    | 2 --
 drivers/gpu/drm/vc4/vc4_trace.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/vc4/Makefile +0 -2
index 25bd5d30415d..719a771f3d5c 100644
@@ -24,5 +24,3 @@ vc4-y := \
 vc4-$(CONFIG_DEBUG_FS) += vc4_debugfs.o
 
 obj-$(CONFIG_DRM_VC4)  += vc4.o
-
-CFLAGS_vc4_trace_points.o := -I$(src)
drivers/gpu/drm/vc4/vc4_trace.h +1 -1
index ad7b1ea720c2..deafb32923e1 100644
@@ -59,5 +59,5 @@ TRACE_EVENT(vc4_wait_for_seqno_end,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/vc4
 #include <trace/define_trace.h>
Signature · 6 lines
2.13.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
maintainer
#6 lore raw
In reply to Thierry Reding

Am 01.09.2017 um 16:49 schrieb Thierry Reding:

Quoted 11 lines

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

Actually I've recently wondered how to correctly do this since we send out a TTM patch for 4.13 which most likely gets this wrong as well.

Thanks for pointing this out, patch #2 and #5 are Reviewed-by: Christian König <[email protected]>

The rest is Acked-by: Christian König <[email protected]>.

Tom please check our TTM patch and if necessary provide a fix as well.

Thanks,
Christian.

Quoted 23 lines
---
  drivers/gpu/drm/Makefile    | 2 --
  drivers/gpu/drm/drm_trace.h | 2 +-
  2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/Makefile +0 -2
index a8acc197dec3..f82d0faad690 100644
@@ -44,8 +44,6 @@ drm_kms_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o
  obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
  obj-$(CONFIG_DRM_DEBUG_MM_SELFTEST) += selftests/
 
-CFLAGS_drm_trace_points.o := -I$(src)
-
  obj-$(CONFIG_DRM)	+= drm.o
  obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
  obj-$(CONFIG_DRM_ARM)	+= arm/
drivers/gpu/drm/drm_trace.h +0 -0
index 14c5a777682e..16c64d067e67 100644

drivers/gpu/drm/drm_trace.h TRACE_EVENT(drm_vblank_event_delivered, · line 65

Quoted 6 lines
drivers/gpu/drm/drm_trace.h +1 -1
@@ -61,5 +61,5 @@ TRACE_EVENT(drm_vblank_event_delivered,
 
  /* This part must be outside protection */
  #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm
  #include <trace/define_trace.h>

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

#7 lore raw
Quoted 13 lines · Christian König

Am 01.09.2017 um 16:49 schrieb Thierry Reding:

Quoted 11 lines

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

Quoted 7 lines

Actually I've recently wondered how to correctly do this since we send out a TTM patch for 4.13 which most likely gets this wrong as well.

Thanks for pointing this out, patch #2 and #5 are Reviewed-by: Christian König <[email protected]>

The rest is Acked-by: Christian König <[email protected]>.

Tom please check our TTM patch and if necessary provide a fix as well.

Hi Christian,

I'm sure we have it wrong and since I copied the TTM trace from the AMDGPU one I think that's wrong too.

I'll submit the necessary patch(es) shortly.

Cheers,
Tom

Quoted 24 lines

Thanks,
Christian.

Quoted 20 lines

---
  drivers/gpu/drm/Makefile    | 2 --
  drivers/gpu/drm/drm_trace.h | 2 +-

  2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/Makefile +0 -0
index a8acc197dec3..f82d0faad690 100644
@@ -44,8 +44,6 @@ drm_kms_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += 

drm_dp_aux_dev.o obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o obj-$(CONFIG_DRM_DEBUG_MM_SELFTEST) += selftests/

drivers/gpu/drm/Makefile +0 -2
-CFLAGS_drm_trace_points.o := -I$(src)
-

  obj-$(CONFIG_DRM)    += drm.o
  obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
  obj-$(CONFIG_DRM_ARM)    += arm/

drivers/gpu/drm/drm_trace.h +0 -0
index 14c5a777682e..16c64d067e67 100644
Quoted 10 lines

drivers/gpu/drm/drm_trace.h TRACE_EVENT(drm_vblank_event_delivered, · line 64

Quoted 8 lines
drivers/gpu/drm/drm_trace.h +1 -1
@@ -61,5 +61,5 @@ TRACE_EVENT(drm_vblank_event_delivered,
   /* This part must be outside protection */
   #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm
   #include <trace/define_trace.h>

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

Applied
#8 lore raw
In reply to Christian König
Quoted 12 lines · Christian König

Am 01.09.2017 um 16:49 schrieb Thierry Reding:

Quoted 11 lines

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

Quoted 8 lines
Quoted 1 line

Actually I've recently wondered how to correctly do this since we send out a TTM patch for 4.13 which most likely gets this wrong as well.

Thanks for pointing this out, patch #2 and #5 are Reviewed-by: Christian König <[email protected]>

Applied patches 2 and 5 to my tree.

Thanks!

Alex

Quoted 36 lines

The rest is Acked-by: Christian König <[email protected]>.

Tom please check our TTM patch and if necessary provide a fix as well.

Thanks,
Christian.

Quoted 27 lines
---
  drivers/gpu/drm/Makefile    | 2 --
  drivers/gpu/drm/drm_trace.h | 2 +-
  2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/Makefile +0 -0
index a8acc197dec3..f82d0faad690 100644
@@ -44,8 +44,6 @@ drm_kms_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) +=

drm_dp_aux_dev.o
obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o obj-$(CONFIG_DRM_DEBUG_MM_SELFTEST) += selftests/ -CFLAGS_drm_trace_points.o := -I$(src)

drivers/gpu/drm/Makefile +0 -1
-
  obj-$(CONFIG_DRM)     += drm.o
  obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
  obj-$(CONFIG_DRM_ARM) += arm/
drivers/gpu/drm/drm_trace.h +1 -1
index 14c5a777682e..16c64d067e67 100644
@@ -61,5 +61,5 @@ TRACE_EVENT(drm_vblank_event_delivered,
    /* This part must be outside protection */
  #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm
Quoted 8 lines

drivers/gpu/drm/drm_trace.h TRACE_EVENT(drm_vblank_event_delivered, · line 65

Quoted 1 line
drivers/gpu/drm/drm_trace.h +0 -0
  #include <trace/define_trace.h>

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

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

#9 lore raw
Quoted 17 lines · Alex Deucher
Quoted 15 lines · Christian König

Am 01.09.2017 um 16:49 schrieb Thierry Reding:

Quoted 12 lines

From: Thierry Reding <[email protected]>

The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path.

While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround.

Quoted 7 lines
Quoted 5 lines

Actually I've recently wondered how to correctly do this since we send out a TTM patch for 4.13 which most likely gets this wrong as well.

Thanks for pointing this out, patch #2 and #5 are Reviewed-by: Christian König <[email protected]>

Applied patches 2 and 5 to my tree.

i915 one pushed to drm-intel, pls push the others through drm-misc. fwiw
a-b: me on those too.

Thanks, Daniel

Quoted 53 lines

Thanks!

Alex

Quoted 36 lines

The rest is Acked-by: Christian König <[email protected]>.

Tom please check our TTM patch and if necessary provide a fix as well.

Thanks,
Christian.

Quoted 27 lines
---
  drivers/gpu/drm/Makefile    | 2 --
  drivers/gpu/drm/drm_trace.h | 2 +-
  2 files changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/Makefile +0 -0
index a8acc197dec3..f82d0faad690 100644
@@ -44,8 +44,6 @@ drm_kms_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) +=

drm_dp_aux_dev.o
obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o obj-$(CONFIG_DRM_DEBUG_MM_SELFTEST) += selftests/ -CFLAGS_drm_trace_points.o := -I$(src)

drivers/gpu/drm/Makefile +0 -1
-
  obj-$(CONFIG_DRM)     += drm.o
  obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
  obj-$(CONFIG_DRM_ARM) += arm/
drivers/gpu/drm/drm_trace.h +1 -1
index 14c5a777682e..16c64d067e67 100644
@@ -61,5 +61,5 @@ TRACE_EVENT(drm_vblank_event_delivered,
    /* This part must be outside protection */
  #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm
Quoted 8 lines

drivers/gpu/drm/drm_trace.h TRACE_EVENT(drm_vblank_event_delivered, · line 65

Quoted 1 line
drivers/gpu/drm/drm_trace.h +0 -0
  #include <trace/define_trace.h>

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

_______________________________________________
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