diff mbox

[4/5] drm/amdgpu: fix printing the doorbell BAR info

Message ID 1488800428-2854-4-git-send-email-deathsimple@vodafone.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christian König March 6, 2017, 11:40 a.m. UTC
From: Christian König <christian.koenig@amd.com>

The address is 64bit, not 32bit.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko March 6, 2017, noon UTC | #1
On Mon, Mar 6, 2017 at 1:40 PM, Christian König <deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> The address is 64bit, not 32bit.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index bf31aaf..a470869 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -385,7 +385,7 @@ static int amdgpu_doorbell_init(struct amdgpu_device *adev)
>         if (adev->doorbell.ptr == NULL) {
>                 return -ENOMEM;
>         }


> -       DRM_INFO("doorbell mmio base: 0x%08X\n", (uint32_t)adev->doorbell.base);
> +       DRM_INFO("doorbell mmio base: 0x%llX\n", (uint64_t)adev->doorbell.base);
>         DRM_INFO("doorbell mmio size: %u\n", (unsigned)adev->doorbell.size);

It seems I sent patch to remove those at all, but if you wish to leave
them, please convert to %pap and remove explicit casting.
Christian König March 6, 2017, 12:09 p.m. UTC | #2
Am 06.03.2017 um 13:00 schrieb Andy Shevchenko:
> On Mon, Mar 6, 2017 at 1:40 PM, Christian König <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> The address is 64bit, not 32bit.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index bf31aaf..a470869 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -385,7 +385,7 @@ static int amdgpu_doorbell_init(struct amdgpu_device *adev)
>>          if (adev->doorbell.ptr == NULL) {
>>                  return -ENOMEM;
>>          }
>
>> -       DRM_INFO("doorbell mmio base: 0x%08X\n", (uint32_t)adev->doorbell.base);
>> +       DRM_INFO("doorbell mmio base: 0x%llX\n", (uint64_t)adev->doorbell.base);
>>          DRM_INFO("doorbell mmio size: %u\n", (unsigned)adev->doorbell.size);
> It seems I sent patch to remove those at all, but if you wish to leave
> them, please convert to %pap and remove explicit casting.
Sorry, looked like both Alex and I missed your patch. But yes that the 
PCI subsystem prints that info anyway is a good argument.

Going to put my rb on your patch and push it into our internal repo, 
Alex should then pick it up for the next drm-next pull request.

Thanks,
Christian.
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index bf31aaf..a470869 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -385,7 +385,7 @@  static int amdgpu_doorbell_init(struct amdgpu_device *adev)
 	if (adev->doorbell.ptr == NULL) {
 		return -ENOMEM;
 	}
-	DRM_INFO("doorbell mmio base: 0x%08X\n", (uint32_t)adev->doorbell.base);
+	DRM_INFO("doorbell mmio base: 0x%llX\n", (uint64_t)adev->doorbell.base);
 	DRM_INFO("doorbell mmio size: %u\n", (unsigned)adev->doorbell.size);
 
 	return 0;