All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-02  2:27 ` Tiezhu Yang
  0 siblings, 0 replies; 12+ messages in thread
From: Tiezhu Yang @ 2020-07-02  2:27 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig; +Cc: amd-gfx, linux-kernel

When I update the latest kernel, I see the following "____ptrval____" boot
messages.

[    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
[    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu addr 0x0000000040056038 and cpu addr 0x(____ptrval____)

Both radeon_fence_driver_start_ring() and amdgpu_fence_driver_start_ring()
have the similar issue, there exists the following two methods to solve it:
(1) Use "%pK" instead of "%p" so that the CPU address can be printed when
the kptr_restrict sysctl is set to 1.
(2) Just completely drop the CPU address suggested by Christian, because
the CPU address was useful in the past, but isn't any more. We now have a
debugfs file to read the current fence values.

Since the CPU address is not much useful, just remove the debug info about
CPU address.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v2:
  - Just remove the debug info about CPU address suggested by Christian
  - Modify the patch subject and update the commit message

 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
 drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index d878fe7..a29f2f9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
 	ring->fence_drv.irq_type = irq_type;
 	ring->fence_drv.initialized = true;
 
-	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
-		      "0x%016llx, cpu addr 0x%p\n", ring->name,
-		      ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
+	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 0x%016llx\n",
+		      ring->name, ring->fence_drv.gpu_addr);
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 43f2f93..8735bf2 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring)
 	}
 	radeon_fence_write(rdev, atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
 	rdev->fence_drv[ring].initialized = true;
-	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx and cpu addr 0x%p\n",
-		 ring, rdev->fence_drv[ring].gpu_addr, rdev->fence_drv[ring].cpu_addr);
+	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx\n",
+		 ring, rdev->fence_drv[ring].gpu_addr);
 	return 0;
 }
 
-- 
2.1.0


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

* [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-02  2:27 ` Tiezhu Yang
  0 siblings, 0 replies; 12+ messages in thread
From: Tiezhu Yang @ 2020-07-02  2:27 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig; +Cc: linux-kernel, amd-gfx

When I update the latest kernel, I see the following "____ptrval____" boot
messages.

[    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
[    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu addr 0x0000000040056038 and cpu addr 0x(____ptrval____)

Both radeon_fence_driver_start_ring() and amdgpu_fence_driver_start_ring()
have the similar issue, there exists the following two methods to solve it:
(1) Use "%pK" instead of "%p" so that the CPU address can be printed when
the kptr_restrict sysctl is set to 1.
(2) Just completely drop the CPU address suggested by Christian, because
the CPU address was useful in the past, but isn't any more. We now have a
debugfs file to read the current fence values.

Since the CPU address is not much useful, just remove the debug info about
CPU address.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v2:
  - Just remove the debug info about CPU address suggested by Christian
  - Modify the patch subject and update the commit message

 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
 drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index d878fe7..a29f2f9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
 	ring->fence_drv.irq_type = irq_type;
 	ring->fence_drv.initialized = true;
 
-	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
-		      "0x%016llx, cpu addr 0x%p\n", ring->name,
-		      ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
+	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 0x%016llx\n",
+		      ring->name, ring->fence_drv.gpu_addr);
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 43f2f93..8735bf2 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring)
 	}
 	radeon_fence_write(rdev, atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
 	rdev->fence_drv[ring].initialized = true;
-	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx and cpu addr 0x%p\n",
-		 ring, rdev->fence_drv[ring].gpu_addr, rdev->fence_drv[ring].cpu_addr);
+	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx\n",
+		 ring, rdev->fence_drv[ring].gpu_addr);
 	return 0;
 }
 
-- 
2.1.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
  2020-07-02  2:27 ` Tiezhu Yang
@ 2020-07-02  8:27   ` Christian König
  -1 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2020-07-02  8:27 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher; +Cc: amd-gfx, linux-kernel

Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
> When I update the latest kernel, I see the following "____ptrval____" boot
> messages.
>
> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>
> Both radeon_fence_driver_start_ring() and amdgpu_fence_driver_start_ring()
> have the similar issue, there exists the following two methods to solve it:
> (1) Use "%pK" instead of "%p" so that the CPU address can be printed when
> the kptr_restrict sysctl is set to 1.
> (2) Just completely drop the CPU address suggested by Christian, because
> the CPU address was useful in the past, but isn't any more. We now have a
> debugfs file to read the current fence values.
>
> Since the CPU address is not much useful, just remove the debug info about
> CPU address.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

Splitting it into one patch for radeon and one for amdgpu might be nice 
to have.

But either way Reviewed-by: Christian König <christian.koenig@amd.com> 
for the patch.

Thanks,
Christian.

> ---
>
> v2:
>    - Just remove the debug info about CPU address suggested by Christian
>    - Modify the patch subject and update the commit message
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>   2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index d878fe7..a29f2f9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
>   	ring->fence_drv.irq_type = irq_type;
>   	ring->fence_drv.initialized = true;
>   
> -	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
> -		      "0x%016llx, cpu addr 0x%p\n", ring->name,
> -		      ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
> +	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 0x%016llx\n",
> +		      ring->name, ring->fence_drv.gpu_addr);
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
> index 43f2f93..8735bf2 100644
> --- a/drivers/gpu/drm/radeon/radeon_fence.c
> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring)
>   	}
>   	radeon_fence_write(rdev, atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>   	rdev->fence_drv[ring].initialized = true;
> -	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx and cpu addr 0x%p\n",
> -		 ring, rdev->fence_drv[ring].gpu_addr, rdev->fence_drv[ring].cpu_addr);
> +	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx\n",
> +		 ring, rdev->fence_drv[ring].gpu_addr);
>   	return 0;
>   }
>   


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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-02  8:27   ` Christian König
  0 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2020-07-02  8:27 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher; +Cc: linux-kernel, amd-gfx

Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
> When I update the latest kernel, I see the following "____ptrval____" boot
> messages.
>
> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>
> Both radeon_fence_driver_start_ring() and amdgpu_fence_driver_start_ring()
> have the similar issue, there exists the following two methods to solve it:
> (1) Use "%pK" instead of "%p" so that the CPU address can be printed when
> the kptr_restrict sysctl is set to 1.
> (2) Just completely drop the CPU address suggested by Christian, because
> the CPU address was useful in the past, but isn't any more. We now have a
> debugfs file to read the current fence values.
>
> Since the CPU address is not much useful, just remove the debug info about
> CPU address.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

Splitting it into one patch for radeon and one for amdgpu might be nice 
to have.

But either way Reviewed-by: Christian König <christian.koenig@amd.com> 
for the patch.

Thanks,
Christian.

> ---
>
> v2:
>    - Just remove the debug info about CPU address suggested by Christian
>    - Modify the patch subject and update the commit message
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>   2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index d878fe7..a29f2f9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
>   	ring->fence_drv.irq_type = irq_type;
>   	ring->fence_drv.initialized = true;
>   
> -	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
> -		      "0x%016llx, cpu addr 0x%p\n", ring->name,
> -		      ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
> +	DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 0x%016llx\n",
> +		      ring->name, ring->fence_drv.gpu_addr);
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
> index 43f2f93..8735bf2 100644
> --- a/drivers/gpu/drm/radeon/radeon_fence.c
> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring)
>   	}
>   	radeon_fence_write(rdev, atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>   	rdev->fence_drv[ring].initialized = true;
> -	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx and cpu addr 0x%p\n",
> -		 ring, rdev->fence_drv[ring].gpu_addr, rdev->fence_drv[ring].cpu_addr);
> +	dev_info(rdev->dev, "fence driver on ring %d use gpu addr 0x%016llx\n",
> +		 ring, rdev->fence_drv[ring].gpu_addr);
>   	return 0;
>   }
>   

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
  2020-07-02  8:27   ` Christian König
@ 2020-07-02  8:35     ` Tiezhu Yang
  -1 siblings, 0 replies; 12+ messages in thread
From: Tiezhu Yang @ 2020-07-02  8:35 UTC (permalink / raw)
  To: Christian König, alexander.deucher; +Cc: amd-gfx, linux-kernel

On 07/02/2020 04:27 PM, Christian König wrote:
> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
>> When I update the latest kernel, I see the following "____ptrval____" 
>> boot
>> messages.
>>
>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu 
>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu 
>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>>
>> Both radeon_fence_driver_start_ring() and 
>> amdgpu_fence_driver_start_ring()
>> have the similar issue, there exists the following two methods to 
>> solve it:
>> (1) Use "%pK" instead of "%p" so that the CPU address can be printed 
>> when
>> the kptr_restrict sysctl is set to 1.
>> (2) Just completely drop the CPU address suggested by Christian, because
>> the CPU address was useful in the past, but isn't any more. We now 
>> have a
>> debugfs file to read the current fence values.
>>
>> Since the CPU address is not much useful, just remove the debug info 
>> about
>> CPU address.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>
> Splitting it into one patch for radeon and one for amdgpu might be 
> nice to have.

Should I split this patch into two patches and then send v3?
If yes, I will do it soon.

>
> But either way Reviewed-by: Christian König <christian.koenig@amd.com> 
> for the patch.
>
> Thanks,
> Christian.
>
>> ---
>>
>> v2:
>>    - Just remove the debug info about CPU address suggested by Christian
>>    - Modify the patch subject and update the commit message
>>
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> index d878fe7..a29f2f9 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct 
>> amdgpu_ring *ring,
>>       ring->fence_drv.irq_type = irq_type;
>>       ring->fence_drv.initialized = true;
>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 
>> 0x%016llx\n",
>> +              ring->name, ring->fence_drv.gpu_addr);
>>       return 0;
>>   }
>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c 
>> b/drivers/gpu/drm/radeon/radeon_fence.c
>> index 43f2f93..8735bf2 100644
>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct 
>> radeon_device *rdev, int ring)
>>       }
>>       radeon_fence_write(rdev, 
>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>>       rdev->fence_drv[ring].initialized = true;
>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>> 0x%016llx and cpu addr 0x%p\n",
>> -         ring, rdev->fence_drv[ring].gpu_addr, 
>> rdev->fence_drv[ring].cpu_addr);
>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>> 0x%016llx\n",
>> +         ring, rdev->fence_drv[ring].gpu_addr);
>>       return 0;
>>   }


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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-02  8:35     ` Tiezhu Yang
  0 siblings, 0 replies; 12+ messages in thread
From: Tiezhu Yang @ 2020-07-02  8:35 UTC (permalink / raw)
  To: Christian König, alexander.deucher; +Cc: linux-kernel, amd-gfx

On 07/02/2020 04:27 PM, Christian König wrote:
> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
>> When I update the latest kernel, I see the following "____ptrval____" 
>> boot
>> messages.
>>
>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu 
>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu 
>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>>
>> Both radeon_fence_driver_start_ring() and 
>> amdgpu_fence_driver_start_ring()
>> have the similar issue, there exists the following two methods to 
>> solve it:
>> (1) Use "%pK" instead of "%p" so that the CPU address can be printed 
>> when
>> the kptr_restrict sysctl is set to 1.
>> (2) Just completely drop the CPU address suggested by Christian, because
>> the CPU address was useful in the past, but isn't any more. We now 
>> have a
>> debugfs file to read the current fence values.
>>
>> Since the CPU address is not much useful, just remove the debug info 
>> about
>> CPU address.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>
> Splitting it into one patch for radeon and one for amdgpu might be 
> nice to have.

Should I split this patch into two patches and then send v3?
If yes, I will do it soon.

>
> But either way Reviewed-by: Christian König <christian.koenig@amd.com> 
> for the patch.
>
> Thanks,
> Christian.
>
>> ---
>>
>> v2:
>>    - Just remove the debug info about CPU address suggested by Christian
>>    - Modify the patch subject and update the commit message
>>
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> index d878fe7..a29f2f9 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct 
>> amdgpu_ring *ring,
>>       ring->fence_drv.irq_type = irq_type;
>>       ring->fence_drv.initialized = true;
>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 
>> 0x%016llx\n",
>> +              ring->name, ring->fence_drv.gpu_addr);
>>       return 0;
>>   }
>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c 
>> b/drivers/gpu/drm/radeon/radeon_fence.c
>> index 43f2f93..8735bf2 100644
>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct 
>> radeon_device *rdev, int ring)
>>       }
>>       radeon_fence_write(rdev, 
>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>>       rdev->fence_drv[ring].initialized = true;
>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>> 0x%016llx and cpu addr 0x%p\n",
>> -         ring, rdev->fence_drv[ring].gpu_addr, 
>> rdev->fence_drv[ring].cpu_addr);
>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>> 0x%016llx\n",
>> +         ring, rdev->fence_drv[ring].gpu_addr);
>>       return 0;
>>   }

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
  2020-07-02  8:35     ` Tiezhu Yang
@ 2020-07-02  8:39       ` Christian König
  -1 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2020-07-02  8:39 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher; +Cc: amd-gfx, linux-kernel

Am 02.07.20 um 10:35 schrieb Tiezhu Yang:
> On 07/02/2020 04:27 PM, Christian König wrote:
>> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
>>> When I update the latest kernel, I see the following 
>>> "____ptrval____" boot
>>> messages.
>>>
>>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu 
>>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
>>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu 
>>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>>>
>>> Both radeon_fence_driver_start_ring() and 
>>> amdgpu_fence_driver_start_ring()
>>> have the similar issue, there exists the following two methods to 
>>> solve it:
>>> (1) Use "%pK" instead of "%p" so that the CPU address can be printed 
>>> when
>>> the kptr_restrict sysctl is set to 1.
>>> (2) Just completely drop the CPU address suggested by Christian, 
>>> because
>>> the CPU address was useful in the past, but isn't any more. We now 
>>> have a
>>> debugfs file to read the current fence values.
>>>
>>> Since the CPU address is not much useful, just remove the debug info 
>>> about
>>> CPU address.
>>>
>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>>
>> Splitting it into one patch for radeon and one for amdgpu might be 
>> nice to have.
>
> Should I split this patch into two patches and then send v3?
> If yes, I will do it soon.

For me it's ok to merge it like it is now.

Only Alex could insists to split the patches, but then he will probably 
do it himself.

Thanks for the help,
Christian.

>
>>
>> But either way Reviewed-by: Christian König 
>> <christian.koenig@amd.com> for the patch.
>>
>> Thanks,
>> Christian.
>>
>>> ---
>>>
>>> v2:
>>>    - Just remove the debug info about CPU address suggested by 
>>> Christian
>>>    - Modify the patch subject and update the commit message
>>>
>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>> index d878fe7..a29f2f9 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct 
>>> amdgpu_ring *ring,
>>>       ring->fence_drv.irq_type = irq_type;
>>>       ring->fence_drv.initialized = true;
>>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
>>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
>>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
>>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 
>>> 0x%016llx\n",
>>> +              ring->name, ring->fence_drv.gpu_addr);
>>>       return 0;
>>>   }
>>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c 
>>> b/drivers/gpu/drm/radeon/radeon_fence.c
>>> index 43f2f93..8735bf2 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
>>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct 
>>> radeon_device *rdev, int ring)
>>>       }
>>>       radeon_fence_write(rdev, 
>>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>>>       rdev->fence_drv[ring].initialized = true;
>>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>> 0x%016llx and cpu addr 0x%p\n",
>>> -         ring, rdev->fence_drv[ring].gpu_addr, 
>>> rdev->fence_drv[ring].cpu_addr);
>>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>> 0x%016llx\n",
>>> +         ring, rdev->fence_drv[ring].gpu_addr);
>>>       return 0;
>>>   }
>


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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-02  8:39       ` Christian König
  0 siblings, 0 replies; 12+ messages in thread
From: Christian König @ 2020-07-02  8:39 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher; +Cc: linux-kernel, amd-gfx

Am 02.07.20 um 10:35 schrieb Tiezhu Yang:
> On 07/02/2020 04:27 PM, Christian König wrote:
>> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
>>> When I update the latest kernel, I see the following 
>>> "____ptrval____" boot
>>> messages.
>>>
>>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu 
>>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
>>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu 
>>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>>>
>>> Both radeon_fence_driver_start_ring() and 
>>> amdgpu_fence_driver_start_ring()
>>> have the similar issue, there exists the following two methods to 
>>> solve it:
>>> (1) Use "%pK" instead of "%p" so that the CPU address can be printed 
>>> when
>>> the kptr_restrict sysctl is set to 1.
>>> (2) Just completely drop the CPU address suggested by Christian, 
>>> because
>>> the CPU address was useful in the past, but isn't any more. We now 
>>> have a
>>> debugfs file to read the current fence values.
>>>
>>> Since the CPU address is not much useful, just remove the debug info 
>>> about
>>> CPU address.
>>>
>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>>
>> Splitting it into one patch for radeon and one for amdgpu might be 
>> nice to have.
>
> Should I split this patch into two patches and then send v3?
> If yes, I will do it soon.

For me it's ok to merge it like it is now.

Only Alex could insists to split the patches, but then he will probably 
do it himself.

Thanks for the help,
Christian.

>
>>
>> But either way Reviewed-by: Christian König 
>> <christian.koenig@amd.com> for the patch.
>>
>> Thanks,
>> Christian.
>>
>>> ---
>>>
>>> v2:
>>>    - Just remove the debug info about CPU address suggested by 
>>> Christian
>>>    - Modify the patch subject and update the commit message
>>>
>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>> index d878fe7..a29f2f9 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct 
>>> amdgpu_ring *ring,
>>>       ring->fence_drv.irq_type = irq_type;
>>>       ring->fence_drv.initialized = true;
>>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr "
>>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
>>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
>>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 
>>> 0x%016llx\n",
>>> +              ring->name, ring->fence_drv.gpu_addr);
>>>       return 0;
>>>   }
>>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c 
>>> b/drivers/gpu/drm/radeon/radeon_fence.c
>>> index 43f2f93..8735bf2 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
>>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct 
>>> radeon_device *rdev, int ring)
>>>       }
>>>       radeon_fence_write(rdev, 
>>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>>>       rdev->fence_drv[ring].initialized = true;
>>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>> 0x%016llx and cpu addr 0x%p\n",
>>> -         ring, rdev->fence_drv[ring].gpu_addr, 
>>> rdev->fence_drv[ring].cpu_addr);
>>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>> 0x%016llx\n",
>>> +         ring, rdev->fence_drv[ring].gpu_addr);
>>>       return 0;
>>>   }
>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
  2020-07-02  8:39       ` Christian König
@ 2020-07-02  9:51         ` Tiezhu Yang
  -1 siblings, 0 replies; 12+ messages in thread
From: Tiezhu Yang @ 2020-07-02  9:51 UTC (permalink / raw)
  To: Christian König, alexander.deucher; +Cc: amd-gfx, linux-kernel

On 07/02/2020 04:39 PM, Christian König wrote:
> Am 02.07.20 um 10:35 schrieb Tiezhu Yang:
>> On 07/02/2020 04:27 PM, Christian König wrote:
>>> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
>>>> When I update the latest kernel, I see the following 
>>>> "____ptrval____" boot
>>>> messages.
>>>>
>>>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu 
>>>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
>>>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu 
>>>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>>>>
>>>> Both radeon_fence_driver_start_ring() and 
>>>> amdgpu_fence_driver_start_ring()
>>>> have the similar issue, there exists the following two methods to 
>>>> solve it:
>>>> (1) Use "%pK" instead of "%p" so that the CPU address can be 
>>>> printed when
>>>> the kptr_restrict sysctl is set to 1.
>>>> (2) Just completely drop the CPU address suggested by Christian, 
>>>> because
>>>> the CPU address was useful in the past, but isn't any more. We now 
>>>> have a
>>>> debugfs file to read the current fence values.
>>>>
>>>> Since the CPU address is not much useful, just remove the debug 
>>>> info about
>>>> CPU address.
>>>>
>>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>>>
>>> Splitting it into one patch for radeon and one for amdgpu might be 
>>> nice to have.
>>
>> Should I split this patch into two patches and then send v3?
>> If yes, I will do it soon.
>
> For me it's ok to merge it like it is now.
>
> Only Alex could insists to split the patches, but then he will 
> probably do it himself.

OK, then I will not send v3.

>
> Thanks for the help,
> Christian.
>
>>
>>>
>>> But either way Reviewed-by: Christian König 
>>> <christian.koenig@amd.com> for the patch.
>>>
>>> Thanks,
>>> Christian.
>>>
>>>> ---
>>>>
>>>> v2:
>>>>    - Just remove the debug info about CPU address suggested by 
>>>> Christian
>>>>    - Modify the patch subject and update the commit message
>>>>
>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>>>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>>>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>>> index d878fe7..a29f2f9 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct 
>>>> amdgpu_ring *ring,
>>>>       ring->fence_drv.irq_type = irq_type;
>>>>       ring->fence_drv.initialized = true;
>>>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu 
>>>> addr "
>>>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
>>>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
>>>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 
>>>> 0x%016llx\n",
>>>> +              ring->name, ring->fence_drv.gpu_addr);
>>>>       return 0;
>>>>   }
>>>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c 
>>>> b/drivers/gpu/drm/radeon/radeon_fence.c
>>>> index 43f2f93..8735bf2 100644
>>>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
>>>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
>>>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct 
>>>> radeon_device *rdev, int ring)
>>>>       }
>>>>       radeon_fence_write(rdev, 
>>>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>>>>       rdev->fence_drv[ring].initialized = true;
>>>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>>> 0x%016llx and cpu addr 0x%p\n",
>>>> -         ring, rdev->fence_drv[ring].gpu_addr, 
>>>> rdev->fence_drv[ring].cpu_addr);
>>>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>>> 0x%016llx\n",
>>>> +         ring, rdev->fence_drv[ring].gpu_addr);
>>>>       return 0;
>>>>   }
>>


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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-02  9:51         ` Tiezhu Yang
  0 siblings, 0 replies; 12+ messages in thread
From: Tiezhu Yang @ 2020-07-02  9:51 UTC (permalink / raw)
  To: Christian König, alexander.deucher; +Cc: linux-kernel, amd-gfx

On 07/02/2020 04:39 PM, Christian König wrote:
> Am 02.07.20 um 10:35 schrieb Tiezhu Yang:
>> On 07/02/2020 04:27 PM, Christian König wrote:
>>> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
>>>> When I update the latest kernel, I see the following 
>>>> "____ptrval____" boot
>>>> messages.
>>>>
>>>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu 
>>>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
>>>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu 
>>>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
>>>>
>>>> Both radeon_fence_driver_start_ring() and 
>>>> amdgpu_fence_driver_start_ring()
>>>> have the similar issue, there exists the following two methods to 
>>>> solve it:
>>>> (1) Use "%pK" instead of "%p" so that the CPU address can be 
>>>> printed when
>>>> the kptr_restrict sysctl is set to 1.
>>>> (2) Just completely drop the CPU address suggested by Christian, 
>>>> because
>>>> the CPU address was useful in the past, but isn't any more. We now 
>>>> have a
>>>> debugfs file to read the current fence values.
>>>>
>>>> Since the CPU address is not much useful, just remove the debug 
>>>> info about
>>>> CPU address.
>>>>
>>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>>>
>>> Splitting it into one patch for radeon and one for amdgpu might be 
>>> nice to have.
>>
>> Should I split this patch into two patches and then send v3?
>> If yes, I will do it soon.
>
> For me it's ok to merge it like it is now.
>
> Only Alex could insists to split the patches, but then he will 
> probably do it himself.

OK, then I will not send v3.

>
> Thanks for the help,
> Christian.
>
>>
>>>
>>> But either way Reviewed-by: Christian König 
>>> <christian.koenig@amd.com> for the patch.
>>>
>>> Thanks,
>>> Christian.
>>>
>>>> ---
>>>>
>>>> v2:
>>>>    - Just remove the debug info about CPU address suggested by 
>>>> Christian
>>>>    - Modify the patch subject and update the commit message
>>>>
>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
>>>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
>>>>   2 files changed, 4 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>>> index d878fe7..a29f2f9 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>>>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct 
>>>> amdgpu_ring *ring,
>>>>       ring->fence_drv.irq_type = irq_type;
>>>>       ring->fence_drv.initialized = true;
>>>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu 
>>>> addr "
>>>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
>>>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
>>>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr 
>>>> 0x%016llx\n",
>>>> +              ring->name, ring->fence_drv.gpu_addr);
>>>>       return 0;
>>>>   }
>>>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c 
>>>> b/drivers/gpu/drm/radeon/radeon_fence.c
>>>> index 43f2f93..8735bf2 100644
>>>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
>>>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
>>>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct 
>>>> radeon_device *rdev, int ring)
>>>>       }
>>>>       radeon_fence_write(rdev, 
>>>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
>>>>       rdev->fence_drv[ring].initialized = true;
>>>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>>> 0x%016llx and cpu addr 0x%p\n",
>>>> -         ring, rdev->fence_drv[ring].gpu_addr, 
>>>> rdev->fence_drv[ring].cpu_addr);
>>>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr 
>>>> 0x%016llx\n",
>>>> +         ring, rdev->fence_drv[ring].gpu_addr);
>>>>       return 0;
>>>>   }
>>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
  2020-07-02  9:51         ` Tiezhu Yang
@ 2020-07-06 16:16           ` Alex Deucher
  -1 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2020-07-06 16:16 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Christian König, Deucher, Alexander, LKML, amd-gfx list

Applied.  Thanks!

Alex

On Thu, Jul 2, 2020 at 11:54 AM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
> On 07/02/2020 04:39 PM, Christian König wrote:
> > Am 02.07.20 um 10:35 schrieb Tiezhu Yang:
> >> On 07/02/2020 04:27 PM, Christian König wrote:
> >>> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
> >>>> When I update the latest kernel, I see the following
> >>>> "____ptrval____" boot
> >>>> messages.
> >>>>
> >>>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu
> >>>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
> >>>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu
> >>>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
> >>>>
> >>>> Both radeon_fence_driver_start_ring() and
> >>>> amdgpu_fence_driver_start_ring()
> >>>> have the similar issue, there exists the following two methods to
> >>>> solve it:
> >>>> (1) Use "%pK" instead of "%p" so that the CPU address can be
> >>>> printed when
> >>>> the kptr_restrict sysctl is set to 1.
> >>>> (2) Just completely drop the CPU address suggested by Christian,
> >>>> because
> >>>> the CPU address was useful in the past, but isn't any more. We now
> >>>> have a
> >>>> debugfs file to read the current fence values.
> >>>>
> >>>> Since the CPU address is not much useful, just remove the debug
> >>>> info about
> >>>> CPU address.
> >>>>
> >>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> >>>
> >>> Splitting it into one patch for radeon and one for amdgpu might be
> >>> nice to have.
> >>
> >> Should I split this patch into two patches and then send v3?
> >> If yes, I will do it soon.
> >
> > For me it's ok to merge it like it is now.
> >
> > Only Alex could insists to split the patches, but then he will
> > probably do it himself.
>
> OK, then I will not send v3.
>
> >
> > Thanks for the help,
> > Christian.
> >
> >>
> >>>
> >>> But either way Reviewed-by: Christian König
> >>> <christian.koenig@amd.com> for the patch.
> >>>
> >>> Thanks,
> >>> Christian.
> >>>
> >>>> ---
> >>>>
> >>>> v2:
> >>>>    - Just remove the debug info about CPU address suggested by
> >>>> Christian
> >>>>    - Modify the patch subject and update the commit message
> >>>>
> >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
> >>>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
> >>>>   2 files changed, 4 insertions(+), 5 deletions(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> index d878fe7..a29f2f9 100644
> >>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct
> >>>> amdgpu_ring *ring,
> >>>>       ring->fence_drv.irq_type = irq_type;
> >>>>       ring->fence_drv.initialized = true;
> >>>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu
> >>>> addr "
> >>>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
> >>>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
> >>>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr
> >>>> 0x%016llx\n",
> >>>> +              ring->name, ring->fence_drv.gpu_addr);
> >>>>       return 0;
> >>>>   }
> >>>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> b/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> index 43f2f93..8735bf2 100644
> >>>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct
> >>>> radeon_device *rdev, int ring)
> >>>>       }
> >>>>       radeon_fence_write(rdev,
> >>>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
> >>>>       rdev->fence_drv[ring].initialized = true;
> >>>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr
> >>>> 0x%016llx and cpu addr 0x%p\n",
> >>>> -         ring, rdev->fence_drv[ring].gpu_addr,
> >>>> rdev->fence_drv[ring].cpu_addr);
> >>>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr
> >>>> 0x%016llx\n",
> >>>> +         ring, rdev->fence_drv[ring].gpu_addr);
> >>>>       return 0;
> >>>>   }
> >>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH v2] gpu/drm: Remove debug info about CPU address
@ 2020-07-06 16:16           ` Alex Deucher
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2020-07-06 16:16 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Deucher, Alexander, Christian König, amd-gfx list, LKML

Applied.  Thanks!

Alex

On Thu, Jul 2, 2020 at 11:54 AM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
> On 07/02/2020 04:39 PM, Christian König wrote:
> > Am 02.07.20 um 10:35 schrieb Tiezhu Yang:
> >> On 07/02/2020 04:27 PM, Christian König wrote:
> >>> Am 02.07.20 um 04:27 schrieb Tiezhu Yang:
> >>>> When I update the latest kernel, I see the following
> >>>> "____ptrval____" boot
> >>>> messages.
> >>>>
> >>>> [    1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu
> >>>> addr 0x0000000048000c00 and cpu addr 0x(____ptrval____)
> >>>> [    1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu
> >>>> addr 0x0000000040056038 and cpu addr 0x(____ptrval____)
> >>>>
> >>>> Both radeon_fence_driver_start_ring() and
> >>>> amdgpu_fence_driver_start_ring()
> >>>> have the similar issue, there exists the following two methods to
> >>>> solve it:
> >>>> (1) Use "%pK" instead of "%p" so that the CPU address can be
> >>>> printed when
> >>>> the kptr_restrict sysctl is set to 1.
> >>>> (2) Just completely drop the CPU address suggested by Christian,
> >>>> because
> >>>> the CPU address was useful in the past, but isn't any more. We now
> >>>> have a
> >>>> debugfs file to read the current fence values.
> >>>>
> >>>> Since the CPU address is not much useful, just remove the debug
> >>>> info about
> >>>> CPU address.
> >>>>
> >>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> >>>
> >>> Splitting it into one patch for radeon and one for amdgpu might be
> >>> nice to have.
> >>
> >> Should I split this patch into two patches and then send v3?
> >> If yes, I will do it soon.
> >
> > For me it's ok to merge it like it is now.
> >
> > Only Alex could insists to split the patches, but then he will
> > probably do it himself.
>
> OK, then I will not send v3.
>
> >
> > Thanks for the help,
> > Christian.
> >
> >>
> >>>
> >>> But either way Reviewed-by: Christian König
> >>> <christian.koenig@amd.com> for the patch.
> >>>
> >>> Thanks,
> >>> Christian.
> >>>
> >>>> ---
> >>>>
> >>>> v2:
> >>>>    - Just remove the debug info about CPU address suggested by
> >>>> Christian
> >>>>    - Modify the patch subject and update the commit message
> >>>>
> >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 ++---
> >>>>   drivers/gpu/drm/radeon/radeon_fence.c     | 4 ++--
> >>>>   2 files changed, 4 insertions(+), 5 deletions(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> index d878fe7..a29f2f9 100644
> >>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> >>>> @@ -422,9 +422,8 @@ int amdgpu_fence_driver_start_ring(struct
> >>>> amdgpu_ring *ring,
> >>>>       ring->fence_drv.irq_type = irq_type;
> >>>>       ring->fence_drv.initialized = true;
> >>>>   -    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu
> >>>> addr "
> >>>> -              "0x%016llx, cpu addr 0x%p\n", ring->name,
> >>>> -              ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr);
> >>>> +    DRM_DEV_DEBUG(adev->dev, "fence driver on ring %s use gpu addr
> >>>> 0x%016llx\n",
> >>>> +              ring->name, ring->fence_drv.gpu_addr);
> >>>>       return 0;
> >>>>   }
> >>>>   diff --git a/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> b/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> index 43f2f93..8735bf2 100644
> >>>> --- a/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
> >>>> @@ -865,8 +865,8 @@ int radeon_fence_driver_start_ring(struct
> >>>> radeon_device *rdev, int ring)
> >>>>       }
> >>>>       radeon_fence_write(rdev,
> >>>> atomic64_read(&rdev->fence_drv[ring].last_seq), ring);
> >>>>       rdev->fence_drv[ring].initialized = true;
> >>>> -    dev_info(rdev->dev, "fence driver on ring %d use gpu addr
> >>>> 0x%016llx and cpu addr 0x%p\n",
> >>>> -         ring, rdev->fence_drv[ring].gpu_addr,
> >>>> rdev->fence_drv[ring].cpu_addr);
> >>>> +    dev_info(rdev->dev, "fence driver on ring %d use gpu addr
> >>>> 0x%016llx\n",
> >>>> +         ring, rdev->fence_drv[ring].gpu_addr);
> >>>>       return 0;
> >>>>   }
> >>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2020-07-06 16:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  2:27 [PATCH v2] gpu/drm: Remove debug info about CPU address Tiezhu Yang
2020-07-02  2:27 ` Tiezhu Yang
2020-07-02  8:27 ` Christian König
2020-07-02  8:27   ` Christian König
2020-07-02  8:35   ` Tiezhu Yang
2020-07-02  8:35     ` Tiezhu Yang
2020-07-02  8:39     ` Christian König
2020-07-02  8:39       ` Christian König
2020-07-02  9:51       ` Tiezhu Yang
2020-07-02  9:51         ` Tiezhu Yang
2020-07-06 16:16         ` Alex Deucher
2020-07-06 16:16           ` Alex Deucher

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.