All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 14:38 ` trix
  0 siblings, 0 replies; 15+ messages in thread
From: trix @ 2020-12-15 14:38 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: amd-gfx, dri-devel, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 7c5b60e53482..8b989670ed66 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 
 		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
 		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
-		DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
+		DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
 			version_major, version_minor, family_id);
 
 		/*
@@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 		dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
 		enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
 		enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
-		DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
+		DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
 			enc_major, enc_minor, dec_minor, family_id);
 
 		adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 4861f8ddc1b5..ea6a62f67e38 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
 	version_major = (ucode_version >> 20) & 0xfff;
 	version_minor = (ucode_version >> 8) & 0xfff;
 	binary_id = ucode_version & 0xff;
-	DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
+	DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
 		version_major, version_minor, binary_id);
 	adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
 				(binary_id << 8));
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 1e756186e3f8..99b82f3c2617 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		enc_major = fw_check;
 		dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
 		vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
-		DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
+		DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
 			enc_major, enc_minor, dec_ver, vep, fw_rev);
 	} else {
 		unsigned int version_major, version_minor, family_id;
@@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
 		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
 		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
-		DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
+		DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
 			version_major, version_minor, family_id);
 	}
 
-- 
2.27.0


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

* [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 14:38 ` trix
  0 siblings, 0 replies; 15+ messages in thread
From: trix @ 2020-12-15 14:38 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: Tom Rix, dri-devel, amd-gfx, linux-kernel

From: Tom Rix <trix@redhat.com>

See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 7c5b60e53482..8b989670ed66 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 
 		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
 		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
-		DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
+		DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
 			version_major, version_minor, family_id);
 
 		/*
@@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 		dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
 		enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
 		enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
-		DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
+		DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
 			enc_major, enc_minor, dec_minor, family_id);
 
 		adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 4861f8ddc1b5..ea6a62f67e38 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
 	version_major = (ucode_version >> 20) & 0xfff;
 	version_minor = (ucode_version >> 8) & 0xfff;
 	binary_id = ucode_version & 0xff;
-	DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
+	DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
 		version_major, version_minor, binary_id);
 	adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
 				(binary_id << 8));
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 1e756186e3f8..99b82f3c2617 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		enc_major = fw_check;
 		dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
 		vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
-		DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
+		DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
 			enc_major, enc_minor, dec_ver, vep, fw_rev);
 	} else {
 		unsigned int version_major, version_minor, family_id;
@@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
 		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
 		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
-		DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
+		DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
 			version_major, version_minor, family_id);
 	}
 
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 14:38 ` trix
  0 siblings, 0 replies; 15+ messages in thread
From: trix @ 2020-12-15 14:38 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: Tom Rix, dri-devel, amd-gfx, linux-kernel

From: Tom Rix <trix@redhat.com>

See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 7c5b60e53482..8b989670ed66 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 
 		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
 		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
-		DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
+		DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
 			version_major, version_minor, family_id);
 
 		/*
@@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 		dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
 		enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
 		enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
-		DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
+		DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
 			enc_major, enc_minor, dec_minor, family_id);
 
 		adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 4861f8ddc1b5..ea6a62f67e38 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
 	version_major = (ucode_version >> 20) & 0xfff;
 	version_minor = (ucode_version >> 8) & 0xfff;
 	binary_id = ucode_version & 0xff;
-	DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
+	DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
 		version_major, version_minor, binary_id);
 	adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
 				(binary_id << 8));
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 1e756186e3f8..99b82f3c2617 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		enc_major = fw_check;
 		dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
 		vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
-		DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
+		DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
 			enc_major, enc_minor, dec_ver, vep, fw_rev);
 	} else {
 		unsigned int version_major, version_minor, family_id;
@@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
 		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
 		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
-		DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
+		DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
 			version_major, version_minor, family_id);
 	}
 
-- 
2.27.0

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

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
  2020-12-15 14:38 ` trix
  (?)
@ 2020-12-15 14:47   ` Christian König
  -1 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-12-15 14:47 UTC (permalink / raw)
  To: trix, alexander.deucher, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: amd-gfx, dri-devel, linux-kernel

Am 15.12.20 um 15:38 schrieb trix@redhat.com:
> From: Tom Rix <trix@redhat.com>
>
> See Documentation/core-api/printk-formats.rst.
> h should no longer be used in the format specifier for printk.

In general looks valid to me, but my question is how does that work?

I mean we specify h here because it is a short int. Are ints always 
32bit on the stack?

Thanks,
Christian.

>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>   3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 7c5b60e53482..8b989670ed66 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>   
>   		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>   		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> -		DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
> +		DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>   			version_major, version_minor, family_id);
>   
>   		/*
> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>   		dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>   		enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>   		enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
> -		DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
> +		DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>   			enc_major, enc_minor, dec_minor, family_id);
>   
>   		adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index 4861f8ddc1b5..ea6a62f67e38 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>   	version_major = (ucode_version >> 20) & 0xfff;
>   	version_minor = (ucode_version >> 8) & 0xfff;
>   	binary_id = ucode_version & 0xff;
> -	DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
> +	DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>   		version_major, version_minor, binary_id);
>   	adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>   				(binary_id << 8));
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index 1e756186e3f8..99b82f3c2617 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>   		enc_major = fw_check;
>   		dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>   		vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
> -		DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
> +		DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>   			enc_major, enc_minor, dec_ver, vep, fw_rev);
>   	} else {
>   		unsigned int version_major, version_minor, family_id;
> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>   		family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>   		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>   		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> -		DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
> +		DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>   			version_major, version_minor, family_id);
>   	}
>   


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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 14:47   ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-12-15 14:47 UTC (permalink / raw)
  To: trix, alexander.deucher, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: dri-devel, amd-gfx, linux-kernel

Am 15.12.20 um 15:38 schrieb trix@redhat.com:
> From: Tom Rix <trix@redhat.com>
>
> See Documentation/core-api/printk-formats.rst.
> h should no longer be used in the format specifier for printk.

In general looks valid to me, but my question is how does that work?

I mean we specify h here because it is a short int. Are ints always 
32bit on the stack?

Thanks,
Christian.

>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>   3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 7c5b60e53482..8b989670ed66 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>   
>   		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>   		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> -		DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
> +		DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>   			version_major, version_minor, family_id);
>   
>   		/*
> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>   		dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>   		enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>   		enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
> -		DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
> +		DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>   			enc_major, enc_minor, dec_minor, family_id);
>   
>   		adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index 4861f8ddc1b5..ea6a62f67e38 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>   	version_major = (ucode_version >> 20) & 0xfff;
>   	version_minor = (ucode_version >> 8) & 0xfff;
>   	binary_id = ucode_version & 0xff;
> -	DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
> +	DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>   		version_major, version_minor, binary_id);
>   	adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>   				(binary_id << 8));
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index 1e756186e3f8..99b82f3c2617 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>   		enc_major = fw_check;
>   		dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>   		vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
> -		DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
> +		DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>   			enc_major, enc_minor, dec_ver, vep, fw_rev);
>   	} else {
>   		unsigned int version_major, version_minor, family_id;
> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>   		family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>   		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>   		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> -		DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
> +		DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>   			version_major, version_minor, family_id);
>   	}
>   

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 14:47   ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-12-15 14:47 UTC (permalink / raw)
  To: trix, alexander.deucher, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: dri-devel, amd-gfx, linux-kernel

Am 15.12.20 um 15:38 schrieb trix@redhat.com:
> From: Tom Rix <trix@redhat.com>
>
> See Documentation/core-api/printk-formats.rst.
> h should no longer be used in the format specifier for printk.

In general looks valid to me, but my question is how does that work?

I mean we specify h here because it is a short int. Are ints always 
32bit on the stack?

Thanks,
Christian.

>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>   3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 7c5b60e53482..8b989670ed66 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>   
>   		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>   		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> -		DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
> +		DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>   			version_major, version_minor, family_id);
>   
>   		/*
> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>   		dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>   		enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>   		enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
> -		DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
> +		DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>   			enc_major, enc_minor, dec_minor, family_id);
>   
>   		adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index 4861f8ddc1b5..ea6a62f67e38 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>   	version_major = (ucode_version >> 20) & 0xfff;
>   	version_minor = (ucode_version >> 8) & 0xfff;
>   	binary_id = ucode_version & 0xff;
> -	DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
> +	DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>   		version_major, version_minor, binary_id);
>   	adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>   				(binary_id << 8));
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index 1e756186e3f8..99b82f3c2617 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>   		enc_major = fw_check;
>   		dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>   		vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
> -		DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
> +		DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>   			enc_major, enc_minor, dec_ver, vep, fw_rev);
>   	} else {
>   		unsigned int version_major, version_minor, family_id;
> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>   		family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>   		version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>   		version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> -		DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
> +		DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>   			version_major, version_minor, family_id);
>   	}
>   

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

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
  2020-12-15 14:47   ` Christian König
  (?)
@ 2020-12-15 15:06     ` Tom Rix
  -1 siblings, 0 replies; 15+ messages in thread
From: Tom Rix @ 2020-12-15 15:06 UTC (permalink / raw)
  To: Christian König, alexander.deucher, airlied, daniel,
	lee.jones, Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan,
	colin.king, James.Zhu, leo.liu, thong.thai, vegopala,
	boyuan.zhang, Monk.Liu, mh12gx2825
  Cc: amd-gfx, dri-devel, linux-kernel


On 12/15/20 6:47 AM, Christian König wrote:
> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
>> From: Tom Rix <trix@redhat.com>
>>
>> See Documentation/core-api/printk-formats.rst.
>> h should no longer be used in the format specifier for printk.
>
> In general looks valid to me, but my question is how does that work?
>
> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?

The type of the argument is promoted to int.  This was discussed earlier here

https://lore.kernel.org/lkml/a68114afb134b8633905f5a25ae7c4e6799ce8f1.camel@perches.com/

Tom

>
> Thanks,
> Christian.
>
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>>   3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> index 7c5b60e53482..8b989670ed66 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>             version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>           version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>>               version_major, version_minor, family_id);
>>             /*
>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>           dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>           enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>>           enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>>               enc_major, enc_minor, dec_minor, family_id);
>>             adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> index 4861f8ddc1b5..ea6a62f67e38 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>>       version_major = (ucode_version >> 20) & 0xfff;
>>       version_minor = (ucode_version >> 8) & 0xfff;
>>       binary_id = ucode_version & 0xff;
>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>>           version_major, version_minor, binary_id);
>>       adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>>                   (binary_id << 8));
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> index 1e756186e3f8..99b82f3c2617 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>           enc_major = fw_check;
>>           dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>>           vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>>               enc_major, enc_minor, dec_ver, vep, fw_rev);
>>       } else {
>>           unsigned int version_major, version_minor, family_id;
>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>           family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>>           version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>           version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>>               version_major, version_minor, family_id);
>>       }
>>   
>


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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 15:06     ` Tom Rix
  0 siblings, 0 replies; 15+ messages in thread
From: Tom Rix @ 2020-12-15 15:06 UTC (permalink / raw)
  To: Christian König, alexander.deucher, airlied, daniel,
	lee.jones, Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan,
	colin.king, James.Zhu, leo.liu, thong.thai, vegopala,
	boyuan.zhang, Monk.Liu, mh12gx2825
  Cc: dri-devel, amd-gfx, linux-kernel


On 12/15/20 6:47 AM, Christian König wrote:
> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
>> From: Tom Rix <trix@redhat.com>
>>
>> See Documentation/core-api/printk-formats.rst.
>> h should no longer be used in the format specifier for printk.
>
> In general looks valid to me, but my question is how does that work?
>
> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?

The type of the argument is promoted to int.  This was discussed earlier here

https://lore.kernel.org/lkml/a68114afb134b8633905f5a25ae7c4e6799ce8f1.camel@perches.com/

Tom

>
> Thanks,
> Christian.
>
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>>   3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> index 7c5b60e53482..8b989670ed66 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>             version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>           version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>>               version_major, version_minor, family_id);
>>             /*
>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>           dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>           enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>>           enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>>               enc_major, enc_minor, dec_minor, family_id);
>>             adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> index 4861f8ddc1b5..ea6a62f67e38 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>>       version_major = (ucode_version >> 20) & 0xfff;
>>       version_minor = (ucode_version >> 8) & 0xfff;
>>       binary_id = ucode_version & 0xff;
>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>>           version_major, version_minor, binary_id);
>>       adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>>                   (binary_id << 8));
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> index 1e756186e3f8..99b82f3c2617 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>           enc_major = fw_check;
>>           dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>>           vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>>               enc_major, enc_minor, dec_ver, vep, fw_rev);
>>       } else {
>>           unsigned int version_major, version_minor, family_id;
>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>           family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>>           version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>           version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>>               version_major, version_minor, family_id);
>>       }
>>   
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 15:06     ` Tom Rix
  0 siblings, 0 replies; 15+ messages in thread
From: Tom Rix @ 2020-12-15 15:06 UTC (permalink / raw)
  To: Christian König, alexander.deucher, airlied, daniel,
	lee.jones, Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan,
	colin.king, James.Zhu, leo.liu, thong.thai, vegopala,
	boyuan.zhang, Monk.Liu, mh12gx2825
  Cc: dri-devel, amd-gfx, linux-kernel


On 12/15/20 6:47 AM, Christian König wrote:
> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
>> From: Tom Rix <trix@redhat.com>
>>
>> See Documentation/core-api/printk-formats.rst.
>> h should no longer be used in the format specifier for printk.
>
> In general looks valid to me, but my question is how does that work?
>
> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?

The type of the argument is promoted to int.  This was discussed earlier here

https://lore.kernel.org/lkml/a68114afb134b8633905f5a25ae7c4e6799ce8f1.camel@perches.com/

Tom

>
> Thanks,
> Christian.
>
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>>   3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> index 7c5b60e53482..8b989670ed66 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>             version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>           version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>>               version_major, version_minor, family_id);
>>             /*
>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>           dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>           enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>>           enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>>               enc_major, enc_minor, dec_minor, family_id);
>>             adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> index 4861f8ddc1b5..ea6a62f67e38 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>>       version_major = (ucode_version >> 20) & 0xfff;
>>       version_minor = (ucode_version >> 8) & 0xfff;
>>       binary_id = ucode_version & 0xff;
>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>>           version_major, version_minor, binary_id);
>>       adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>>                   (binary_id << 8));
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> index 1e756186e3f8..99b82f3c2617 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>           enc_major = fw_check;
>>           dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>>           vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>>               enc_major, enc_minor, dec_ver, vep, fw_rev);
>>       } else {
>>           unsigned int version_major, version_minor, family_id;
>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>           family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>>           version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>           version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>>               version_major, version_minor, family_id);
>>       }
>>   
>

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

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
  2020-12-15 15:06     ` Tom Rix
  (?)
@ 2020-12-15 15:11       ` Christian König
  -1 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-12-15 15:11 UTC (permalink / raw)
  To: Tom Rix, alexander.deucher, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: amd-gfx, dri-devel, linux-kernel

Am 15.12.20 um 16:06 schrieb Tom Rix:
> On 12/15/20 6:47 AM, Christian König wrote:
>> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
>>> From: Tom Rix <trix@redhat.com>
>>>
>>> See Documentation/core-api/printk-formats.rst.
>>> h should no longer be used in the format specifier for printk.
>> In general looks valid to me, but my question is how does that work?
>>
>> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?
> The type of the argument is promoted to int.  This was discussed earlier here
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2Fa68114afb134b8633905f5a25ae7c4e6799ce8f1.camel%40perches.com%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0dd6fe7c17304d4ea72a08d8a10af765%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436415772411133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ta8M5iN%2Bj2J6tio%2FMuUi2lG%2BiyEhkdsFfpXcEjGKNwE%3D&amp;reserved=0

Thanks, I expected this but just wanted to double check.

In this case this patch as well as the radeon one are Reviewed-by: 
Christian König <christian.koenig@amd.com>.

Regards,
Christian.

>
> Tom
>
>> Thanks,
>> Christian.
>>
>>> Signed-off-by: Tom Rix <trix@redhat.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>>>    3 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> index 7c5b60e53482..8b989670ed66 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>>              version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>>>                version_major, version_minor, family_id);
>>>              /*
>>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>>            dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>>            enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>>>            enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
>>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>>>                enc_major, enc_minor, dec_minor, family_id);
>>>              adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> index 4861f8ddc1b5..ea6a62f67e38 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>>>        version_major = (ucode_version >> 20) & 0xfff;
>>>        version_minor = (ucode_version >> 8) & 0xfff;
>>>        binary_id = ucode_version & 0xff;
>>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
>>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>>>            version_major, version_minor, binary_id);
>>>        adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>>>                    (binary_id << 8));
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> index 1e756186e3f8..99b82f3c2617 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>>            enc_major = fw_check;
>>>            dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>>>            vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
>>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
>>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>>>                enc_major, enc_minor, dec_ver, vep, fw_rev);
>>>        } else {
>>>            unsigned int version_major, version_minor, family_id;
>>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>>            family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>>>            version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>>>                version_major, version_minor, family_id);
>>>        }
>>>    


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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 15:11       ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-12-15 15:11 UTC (permalink / raw)
  To: Tom Rix, alexander.deucher, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: dri-devel, amd-gfx, linux-kernel

Am 15.12.20 um 16:06 schrieb Tom Rix:
> On 12/15/20 6:47 AM, Christian König wrote:
>> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
>>> From: Tom Rix <trix@redhat.com>
>>>
>>> See Documentation/core-api/printk-formats.rst.
>>> h should no longer be used in the format specifier for printk.
>> In general looks valid to me, but my question is how does that work?
>>
>> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?
> The type of the argument is promoted to int.  This was discussed earlier here
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2Fa68114afb134b8633905f5a25ae7c4e6799ce8f1.camel%40perches.com%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0dd6fe7c17304d4ea72a08d8a10af765%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436415772411133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ta8M5iN%2Bj2J6tio%2FMuUi2lG%2BiyEhkdsFfpXcEjGKNwE%3D&amp;reserved=0

Thanks, I expected this but just wanted to double check.

In this case this patch as well as the radeon one are Reviewed-by: 
Christian König <christian.koenig@amd.com>.

Regards,
Christian.

>
> Tom
>
>> Thanks,
>> Christian.
>>
>>> Signed-off-by: Tom Rix <trix@redhat.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>>>    3 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> index 7c5b60e53482..8b989670ed66 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>>              version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>>>                version_major, version_minor, family_id);
>>>              /*
>>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>>            dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>>            enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>>>            enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
>>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>>>                enc_major, enc_minor, dec_minor, family_id);
>>>              adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> index 4861f8ddc1b5..ea6a62f67e38 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>>>        version_major = (ucode_version >> 20) & 0xfff;
>>>        version_minor = (ucode_version >> 8) & 0xfff;
>>>        binary_id = ucode_version & 0xff;
>>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
>>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>>>            version_major, version_minor, binary_id);
>>>        adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>>>                    (binary_id << 8));
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> index 1e756186e3f8..99b82f3c2617 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>>            enc_major = fw_check;
>>>            dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>>>            vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
>>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
>>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>>>                enc_major, enc_minor, dec_ver, vep, fw_rev);
>>>        } else {
>>>            unsigned int version_major, version_minor, family_id;
>>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>>            family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>>>            version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>>>                version_major, version_minor, family_id);
>>>        }
>>>    

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 15:11       ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-12-15 15:11 UTC (permalink / raw)
  To: Tom Rix, alexander.deucher, airlied, daniel, lee.jones,
	Felix.Kuehling, nirmoy.das, sonny.jiang, xinhui.pan, colin.king,
	James.Zhu, leo.liu, thong.thai, vegopala, boyuan.zhang, Monk.Liu,
	mh12gx2825
  Cc: dri-devel, amd-gfx, linux-kernel

Am 15.12.20 um 16:06 schrieb Tom Rix:
> On 12/15/20 6:47 AM, Christian König wrote:
>> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
>>> From: Tom Rix <trix@redhat.com>
>>>
>>> See Documentation/core-api/printk-formats.rst.
>>> h should no longer be used in the format specifier for printk.
>> In general looks valid to me, but my question is how does that work?
>>
>> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?
> The type of the argument is promoted to int.  This was discussed earlier here
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2Fa68114afb134b8633905f5a25ae7c4e6799ce8f1.camel%40perches.com%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0dd6fe7c17304d4ea72a08d8a10af765%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436415772411133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ta8M5iN%2Bj2J6tio%2FMuUi2lG%2BiyEhkdsFfpXcEjGKNwE%3D&amp;reserved=0

Thanks, I expected this but just wanted to double check.

In this case this patch as well as the radeon one are Reviewed-by: 
Christian König <christian.koenig@amd.com>.

Regards,
Christian.

>
> Tom
>
>> Thanks,
>> Christian.
>>
>>> Signed-off-by: Tom Rix <trix@redhat.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
>>>    3 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> index 7c5b60e53482..8b989670ed66 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>>              version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
>>>                version_major, version_minor, family_id);
>>>              /*
>>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>>>            dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>>            enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
>>>            enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
>>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
>>>                enc_major, enc_minor, dec_minor, family_id);
>>>              adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> index 4861f8ddc1b5..ea6a62f67e38 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
>>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
>>>        version_major = (ucode_version >> 20) & 0xfff;
>>>        version_minor = (ucode_version >> 8) & 0xfff;
>>>        binary_id = ucode_version & 0xff;
>>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
>>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
>>>            version_major, version_minor, binary_id);
>>>        adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
>>>                    (binary_id << 8));
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> index 1e756186e3f8..99b82f3c2617 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
>>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>>            enc_major = fw_check;
>>>            dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
>>>            vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
>>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
>>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
>>>                enc_major, enc_minor, dec_ver, vep, fw_rev);
>>>        } else {
>>>            unsigned int version_major, version_minor, family_id;
>>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
>>>            family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
>>>            version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
>>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
>>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
>>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
>>>                version_major, version_minor, family_id);
>>>        }
>>>    

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

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
  2020-12-15 15:11       ` Christian König
  (?)
@ 2020-12-15 15:32         ` Alex Deucher
  -1 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2020-12-15 15:32 UTC (permalink / raw)
  To: Christian König
  Cc: Tom Rix, Deucher, Alexander, Dave Airlie, Daniel Vetter,
	Lee Jones, Kuehling, Felix, Nirmoy Das, Sonny Jiang, xinhui pan,
	Colin Ian King, James Zhu, Leo Liu, Thong Thai, Veerabadhran G,
	Boyuan Zhang, monk.liu, Deepak R Varma,
	Maling list - DRI developers, amd-gfx list, LKML

On Tue, Dec 15, 2020 at 10:11 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 15.12.20 um 16:06 schrieb Tom Rix:
> > On 12/15/20 6:47 AM, Christian König wrote:
> >> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
> >>> From: Tom Rix <trix@redhat.com>
> >>>
> >>> See Documentation/core-api/printk-formats.rst.
> >>> h should no longer be used in the format specifier for printk.
> >> In general looks valid to me, but my question is how does that work?
> >>
> >> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?
> > The type of the argument is promoted to int.  This was discussed earlier here
> >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2Fa68114afb134b8633905f5a25ae7c4e6799ce8f1.camel%40perches.com%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0dd6fe7c17304d4ea72a08d8a10af765%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436415772411133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ta8M5iN%2Bj2J6tio%2FMuUi2lG%2BiyEhkdsFfpXcEjGKNwE%3D&amp;reserved=0
>
> Thanks, I expected this but just wanted to double check.
>
> In this case this patch as well as the radeon one are Reviewed-by:
> Christian König <christian.koenig@amd.com>.
>

Applied this and the radeon one.  Thanks!

Alex

> Regards,
> Christian.
>
> >
> > Tom
> >
> >> Thanks,
> >> Christian.
> >>
> >>> Signed-off-by: Tom Rix <trix@redhat.com>
> >>> ---
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
> >>>    3 files changed, 5 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> index 7c5b60e53482..8b989670ed66 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> >>>              version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
> >>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
> >>>                version_major, version_minor, family_id);
> >>>              /*
> >>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> >>>            dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>>            enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
> >>>            enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
> >>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
> >>>                enc_major, enc_minor, dec_minor, family_id);
> >>>              adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> index 4861f8ddc1b5..ea6a62f67e38 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
> >>>        version_major = (ucode_version >> 20) & 0xfff;
> >>>        version_minor = (ucode_version >> 8) & 0xfff;
> >>>        binary_id = ucode_version & 0xff;
> >>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
> >>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
> >>>            version_major, version_minor, binary_id);
> >>>        adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
> >>>                    (binary_id << 8));
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> index 1e756186e3f8..99b82f3c2617 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
> >>>            enc_major = fw_check;
> >>>            dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
> >>>            vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
> >>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
> >>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
> >>>                enc_major, enc_minor, dec_ver, vep, fw_rev);
> >>>        } else {
> >>>            unsigned int version_major, version_minor, family_id;
> >>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
> >>>            family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
> >>>            version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
> >>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
> >>>                version_major, version_minor, family_id);
> >>>        }
> >>>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 15:32         ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2020-12-15 15:32 UTC (permalink / raw)
  To: Christian König
  Cc: amd-gfx list, Leo Liu, Thong Thai, Dave Airlie, Tom Rix,
	Kuehling, Felix, xinhui pan, LKML, Veerabadhran G, Sonny Jiang,
	Boyuan Zhang, Nirmoy Das, Maling list - DRI developers, Deucher,
	Alexander, Colin Ian King, James Zhu, Lee Jones, monk.liu,
	Deepak R Varma

On Tue, Dec 15, 2020 at 10:11 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 15.12.20 um 16:06 schrieb Tom Rix:
> > On 12/15/20 6:47 AM, Christian König wrote:
> >> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
> >>> From: Tom Rix <trix@redhat.com>
> >>>
> >>> See Documentation/core-api/printk-formats.rst.
> >>> h should no longer be used in the format specifier for printk.
> >> In general looks valid to me, but my question is how does that work?
> >>
> >> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?
> > The type of the argument is promoted to int.  This was discussed earlier here
> >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2Fa68114afb134b8633905f5a25ae7c4e6799ce8f1.camel%40perches.com%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0dd6fe7c17304d4ea72a08d8a10af765%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436415772411133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ta8M5iN%2Bj2J6tio%2FMuUi2lG%2BiyEhkdsFfpXcEjGKNwE%3D&amp;reserved=0
>
> Thanks, I expected this but just wanted to double check.
>
> In this case this patch as well as the radeon one are Reviewed-by:
> Christian König <christian.koenig@amd.com>.
>

Applied this and the radeon one.  Thanks!

Alex

> Regards,
> Christian.
>
> >
> > Tom
> >
> >> Thanks,
> >> Christian.
> >>
> >>> Signed-off-by: Tom Rix <trix@redhat.com>
> >>> ---
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
> >>>    3 files changed, 5 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> index 7c5b60e53482..8b989670ed66 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> >>>              version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
> >>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
> >>>                version_major, version_minor, family_id);
> >>>              /*
> >>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> >>>            dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>>            enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
> >>>            enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
> >>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
> >>>                enc_major, enc_minor, dec_minor, family_id);
> >>>              adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> index 4861f8ddc1b5..ea6a62f67e38 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
> >>>        version_major = (ucode_version >> 20) & 0xfff;
> >>>        version_minor = (ucode_version >> 8) & 0xfff;
> >>>        binary_id = ucode_version & 0xff;
> >>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
> >>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
> >>>            version_major, version_minor, binary_id);
> >>>        adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
> >>>                    (binary_id << 8));
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> index 1e756186e3f8..99b82f3c2617 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
> >>>            enc_major = fw_check;
> >>>            dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
> >>>            vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
> >>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
> >>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
> >>>                enc_major, enc_minor, dec_ver, vep, fw_rev);
> >>>        } else {
> >>>            unsigned int version_major, version_minor, family_id;
> >>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
> >>>            family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
> >>>            version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
> >>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
> >>>                version_major, version_minor, family_id);
> >>>        }
> >>>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amdgpu: remove h from printk format specifier
@ 2020-12-15 15:32         ` Alex Deucher
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2020-12-15 15:32 UTC (permalink / raw)
  To: Christian König
  Cc: amd-gfx list, Leo Liu, Thong Thai, Dave Airlie, Tom Rix,
	Kuehling, Felix, xinhui pan, LKML, Veerabadhran G, Sonny Jiang,
	Boyuan Zhang, Nirmoy Das, Maling list - DRI developers,
	Daniel Vetter, Deucher, Alexander, Colin Ian King, James Zhu,
	Lee Jones, monk.liu, Deepak R Varma

On Tue, Dec 15, 2020 at 10:11 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 15.12.20 um 16:06 schrieb Tom Rix:
> > On 12/15/20 6:47 AM, Christian König wrote:
> >> Am 15.12.20 um 15:38 schrieb trix@redhat.com:
> >>> From: Tom Rix <trix@redhat.com>
> >>>
> >>> See Documentation/core-api/printk-formats.rst.
> >>> h should no longer be used in the format specifier for printk.
> >> In general looks valid to me, but my question is how does that work?
> >>
> >> I mean we specify h here because it is a short int. Are ints always 32bit on the stack?
> > The type of the argument is promoted to int.  This was discussed earlier here
> >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2Fa68114afb134b8633905f5a25ae7c4e6799ce8f1.camel%40perches.com%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C0dd6fe7c17304d4ea72a08d8a10af765%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637436415772411133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ta8M5iN%2Bj2J6tio%2FMuUi2lG%2BiyEhkdsFfpXcEjGKNwE%3D&amp;reserved=0
>
> Thanks, I expected this but just wanted to double check.
>
> In this case this patch as well as the radeon one are Reviewed-by:
> Christian König <christian.koenig@amd.com>.
>

Applied this and the radeon one.  Thanks!

Alex

> Regards,
> Christian.
>
> >
> > Tom
> >
> >> Thanks,
> >> Christian.
> >>
> >>> Signed-off-by: Tom Rix <trix@redhat.com>
> >>> ---
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +-
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++--
> >>>    3 files changed, 5 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> index 7c5b60e53482..8b989670ed66 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> >>> @@ -240,7 +240,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> >>>              version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
> >>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>> -        DRM_INFO("Found UVD firmware Version: %hu.%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found UVD firmware Version: %u.%u Family ID: %u\n",
> >>>                version_major, version_minor, family_id);
> >>>              /*
> >>> @@ -267,7 +267,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
> >>>            dec_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>>            enc_minor = (le32_to_cpu(hdr->ucode_version) >> 24) & 0x3f;
> >>>            enc_major = (le32_to_cpu(hdr->ucode_version) >> 30) & 0x3;
> >>> -        DRM_INFO("Found UVD firmware ENC: %hu.%hu DEC: .%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found UVD firmware ENC: %u.%u DEC: .%u Family ID: %u\n",
> >>>                enc_major, enc_minor, dec_minor, family_id);
> >>>              adev->uvd.max_handles = AMDGPU_MAX_UVD_HANDLES;
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> index 4861f8ddc1b5..ea6a62f67e38 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> >>> @@ -179,7 +179,7 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
> >>>        version_major = (ucode_version >> 20) & 0xfff;
> >>>        version_minor = (ucode_version >> 8) & 0xfff;
> >>>        binary_id = ucode_version & 0xff;
> >>> -    DRM_INFO("Found VCE firmware Version: %hhd.%hhd Binary ID: %hhd\n",
> >>> +    DRM_INFO("Found VCE firmware Version: %d.%d Binary ID: %d\n",
> >>>            version_major, version_minor, binary_id);
> >>>        adev->vce.fw_version = ((version_major << 24) | (version_minor << 16) |
> >>>                    (binary_id << 8));
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> index 1e756186e3f8..99b82f3c2617 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> >>> @@ -181,7 +181,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
> >>>            enc_major = fw_check;
> >>>            dec_ver = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xf;
> >>>            vep = (le32_to_cpu(hdr->ucode_version) >> 28) & 0xf;
> >>> -        DRM_INFO("Found VCN firmware Version ENC: %hu.%hu DEC: %hu VEP: %hu Revision: %hu\n",
> >>> +        DRM_INFO("Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n",
> >>>                enc_major, enc_minor, dec_ver, vep, fw_rev);
> >>>        } else {
> >>>            unsigned int version_major, version_minor, family_id;
> >>> @@ -189,7 +189,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
> >>>            family_id = le32_to_cpu(hdr->ucode_version) & 0xff;
> >>>            version_major = (le32_to_cpu(hdr->ucode_version) >> 24) & 0xff;
> >>>            version_minor = (le32_to_cpu(hdr->ucode_version) >> 8) & 0xff;
> >>> -        DRM_INFO("Found VCN firmware Version: %hu.%hu Family ID: %hu\n",
> >>> +        DRM_INFO("Found VCN firmware Version: %u.%u Family ID: %u\n",
> >>>                version_major, version_minor, family_id);
> >>>        }
> >>>
>
> _______________________________________________
> 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] 15+ messages in thread

end of thread, other threads:[~2020-12-15 15:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 14:38 [PATCH] drm/amdgpu: remove h from printk format specifier trix
2020-12-15 14:38 ` trix
2020-12-15 14:38 ` trix
2020-12-15 14:47 ` Christian König
2020-12-15 14:47   ` Christian König
2020-12-15 14:47   ` Christian König
2020-12-15 15:06   ` Tom Rix
2020-12-15 15:06     ` Tom Rix
2020-12-15 15:06     ` Tom Rix
2020-12-15 15:11     ` Christian König
2020-12-15 15:11       ` Christian König
2020-12-15 15:11       ` Christian König
2020-12-15 15:32       ` Alex Deucher
2020-12-15 15:32         ` Alex Deucher
2020-12-15 15:32         ` 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.