diff mbox

[1/3] drm/radeon: add semaphore trace point

Message ID 1384257486-3420-1-git-send-email-deathsimple@vodafone.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christian König Nov. 12, 2013, 11:58 a.m. UTC
From: Christian König <christian.koenig@amd.com>

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/radeon_semaphore.c |  6 +++++-
 drivers/gpu/drm/radeon/radeon_trace.h     | 36 +++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)

Comments

Alex Deucher Nov. 14, 2013, 3:37 p.m. UTC | #1
Added the series to my queue for 3.13.

Thanks,

Alex

On Tue, Nov 12, 2013 at 6:58 AM, Christian König
<deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_semaphore.c |  6 +++++-
>  drivers/gpu/drm/radeon/radeon_trace.h     | 36 +++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_semaphore.c b/drivers/gpu/drm/radeon/radeon_semaphore.c
> index 8dcc20f..97d73bf 100644
> --- a/drivers/gpu/drm/radeon/radeon_semaphore.c
> +++ b/drivers/gpu/drm/radeon/radeon_semaphore.c
> @@ -29,7 +29,7 @@
>   */
>  #include <drm/drmP.h>
>  #include "radeon.h"
> -
> +#include "radeon_trace.h"
>
>  int radeon_semaphore_create(struct radeon_device *rdev,
>                             struct radeon_semaphore **semaphore)
> @@ -56,6 +56,8 @@ int radeon_semaphore_create(struct radeon_device *rdev,
>  void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
>                                   struct radeon_semaphore *semaphore)
>  {
> +       trace_radeon_semaphore_signale(ring, semaphore);
> +
>         --semaphore->waiters;
>         radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, false);
>  }
> @@ -63,6 +65,8 @@ void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
>  void radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
>                                 struct radeon_semaphore *semaphore)
>  {
> +       trace_radeon_semaphore_wait(ring, semaphore);
> +
>         ++semaphore->waiters;
>         radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, true);
>  }
> diff --git a/drivers/gpu/drm/radeon/radeon_trace.h b/drivers/gpu/drm/radeon/radeon_trace.h
> index 811bca6..9f0e181 100644
> --- a/drivers/gpu/drm/radeon/radeon_trace.h
> +++ b/drivers/gpu/drm/radeon/radeon_trace.h
> @@ -111,6 +111,42 @@ DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
>             TP_ARGS(dev, seqno)
>  );
>
> +DECLARE_EVENT_CLASS(radeon_semaphore_request,
> +
> +           TP_PROTO(int ring, struct radeon_semaphore *sem),
> +
> +           TP_ARGS(ring, sem),
> +
> +           TP_STRUCT__entry(
> +                            __field(int, ring)
> +                            __field(signed, waiters)
> +                            __field(uint64_t, gpu_addr)
> +                            ),
> +
> +           TP_fast_assign(
> +                          __entry->ring = ring;
> +                          __entry->waiters = sem->waiters;
> +                          __entry->gpu_addr = sem->gpu_addr;
> +                          ),
> +
> +           TP_printk("ring=%u, waiters=%d, addr=%010Lx", __entry->ring,
> +                     __entry->waiters, __entry->gpu_addr)
> +);
> +
> +DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_signale,
> +
> +           TP_PROTO(int ring, struct radeon_semaphore *sem),
> +
> +           TP_ARGS(ring, sem)
> +);
> +
> +DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
> +
> +           TP_PROTO(int ring, struct radeon_semaphore *sem),
> +
> +           TP_ARGS(ring, sem)
> +);
> +
>  #endif
>
>  /* This part must be outside protection */
> --
> 1.8.1.2
>
Christian König Nov. 14, 2013, 3:40 p.m. UTC | #2
Am 14.11.2013 16:37, schrieb Alex Deucher:
> Added the series to my queue for 3.13.

Please drop [PATCH 3/3] drm/radeon: disable CIK CP semaphores for now.

With the recent discovery that's an alignment issue that doesn't seems 
to be necessary any more.

Christian.

>
> Thanks,
>
> Alex
>
> On Tue, Nov 12, 2013 at 6:58 AM, Christian König
> <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> ---
>>   drivers/gpu/drm/radeon/radeon_semaphore.c |  6 +++++-
>>   drivers/gpu/drm/radeon/radeon_trace.h     | 36 +++++++++++++++++++++++++++++++
>>   2 files changed, 41 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_semaphore.c b/drivers/gpu/drm/radeon/radeon_semaphore.c
>> index 8dcc20f..97d73bf 100644
>> --- a/drivers/gpu/drm/radeon/radeon_semaphore.c
>> +++ b/drivers/gpu/drm/radeon/radeon_semaphore.c
>> @@ -29,7 +29,7 @@
>>    */
>>   #include <drm/drmP.h>
>>   #include "radeon.h"
>> -
>> +#include "radeon_trace.h"
>>
>>   int radeon_semaphore_create(struct radeon_device *rdev,
>>                              struct radeon_semaphore **semaphore)
>> @@ -56,6 +56,8 @@ int radeon_semaphore_create(struct radeon_device *rdev,
>>   void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
>>                                    struct radeon_semaphore *semaphore)
>>   {
>> +       trace_radeon_semaphore_signale(ring, semaphore);
>> +
>>          --semaphore->waiters;
>>          radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, false);
>>   }
>> @@ -63,6 +65,8 @@ void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
>>   void radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
>>                                  struct radeon_semaphore *semaphore)
>>   {
>> +       trace_radeon_semaphore_wait(ring, semaphore);
>> +
>>          ++semaphore->waiters;
>>          radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, true);
>>   }
>> diff --git a/drivers/gpu/drm/radeon/radeon_trace.h b/drivers/gpu/drm/radeon/radeon_trace.h
>> index 811bca6..9f0e181 100644
>> --- a/drivers/gpu/drm/radeon/radeon_trace.h
>> +++ b/drivers/gpu/drm/radeon/radeon_trace.h
>> @@ -111,6 +111,42 @@ DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
>>              TP_ARGS(dev, seqno)
>>   );
>>
>> +DECLARE_EVENT_CLASS(radeon_semaphore_request,
>> +
>> +           TP_PROTO(int ring, struct radeon_semaphore *sem),
>> +
>> +           TP_ARGS(ring, sem),
>> +
>> +           TP_STRUCT__entry(
>> +                            __field(int, ring)
>> +                            __field(signed, waiters)
>> +                            __field(uint64_t, gpu_addr)
>> +                            ),
>> +
>> +           TP_fast_assign(
>> +                          __entry->ring = ring;
>> +                          __entry->waiters = sem->waiters;
>> +                          __entry->gpu_addr = sem->gpu_addr;
>> +                          ),
>> +
>> +           TP_printk("ring=%u, waiters=%d, addr=%010Lx", __entry->ring,
>> +                     __entry->waiters, __entry->gpu_addr)
>> +);
>> +
>> +DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_signale,
>> +
>> +           TP_PROTO(int ring, struct radeon_semaphore *sem),
>> +
>> +           TP_ARGS(ring, sem)
>> +);
>> +
>> +DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
>> +
>> +           TP_PROTO(int ring, struct radeon_semaphore *sem),
>> +
>> +           TP_ARGS(ring, sem)
>> +);
>> +
>>   #endif
>>
>>   /* This part must be outside protection */
>> --
>> 1.8.1.2
>>
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_semaphore.c b/drivers/gpu/drm/radeon/radeon_semaphore.c
index 8dcc20f..97d73bf 100644
--- a/drivers/gpu/drm/radeon/radeon_semaphore.c
+++ b/drivers/gpu/drm/radeon/radeon_semaphore.c
@@ -29,7 +29,7 @@ 
  */
 #include <drm/drmP.h>
 #include "radeon.h"
-
+#include "radeon_trace.h"
 
 int radeon_semaphore_create(struct radeon_device *rdev,
 			    struct radeon_semaphore **semaphore)
@@ -56,6 +56,8 @@  int radeon_semaphore_create(struct radeon_device *rdev,
 void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
 			          struct radeon_semaphore *semaphore)
 {
+	trace_radeon_semaphore_signale(ring, semaphore);
+
 	--semaphore->waiters;
 	radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, false);
 }
@@ -63,6 +65,8 @@  void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
 void radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
 			        struct radeon_semaphore *semaphore)
 {
+	trace_radeon_semaphore_wait(ring, semaphore);
+
 	++semaphore->waiters;
 	radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, true);
 }
diff --git a/drivers/gpu/drm/radeon/radeon_trace.h b/drivers/gpu/drm/radeon/radeon_trace.h
index 811bca6..9f0e181 100644
--- a/drivers/gpu/drm/radeon/radeon_trace.h
+++ b/drivers/gpu/drm/radeon/radeon_trace.h
@@ -111,6 +111,42 @@  DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
 	    TP_ARGS(dev, seqno)
 );
 
+DECLARE_EVENT_CLASS(radeon_semaphore_request,
+
+	    TP_PROTO(int ring, struct radeon_semaphore *sem),
+
+	    TP_ARGS(ring, sem),
+
+	    TP_STRUCT__entry(
+			     __field(int, ring)
+			     __field(signed, waiters)
+			     __field(uint64_t, gpu_addr)
+			     ),
+
+	    TP_fast_assign(
+			   __entry->ring = ring;
+			   __entry->waiters = sem->waiters;
+			   __entry->gpu_addr = sem->gpu_addr;
+			   ),
+
+	    TP_printk("ring=%u, waiters=%d, addr=%010Lx", __entry->ring,
+		      __entry->waiters, __entry->gpu_addr)
+);
+
+DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_signale,
+
+	    TP_PROTO(int ring, struct radeon_semaphore *sem),
+
+	    TP_ARGS(ring, sem)
+);
+
+DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
+
+	    TP_PROTO(int ring, struct radeon_semaphore *sem),
+
+	    TP_ARGS(ring, sem)
+);
+
 #endif
 
 /* This part must be outside protection */