* [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info
@ 2024-06-14 17:54 Alex Deucher
2024-06-18 22:07 ` Alex Deucher
2024-06-19 1:46 ` Zhang, Hawking
0 siblings, 2 replies; 3+ messages in thread
From: Alex Deucher @ 2024-06-14 17:54 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
v3.x changed the how vram width was encoded. The previous
implementation actually worked correctly for most boards.
Fix the implementation to work correctly everywhere.
This fixes the vram width reported in the kernel log on
some boards.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
index f932bec6e534..f873dd3cae16 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
@@ -433,7 +433,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
mem_channel_number = vram_info->v30.channel_num;
mem_channel_width = vram_info->v30.channel_width;
if (vram_width)
- *vram_width = mem_channel_number * (1 << mem_channel_width);
+ *vram_width = mem_channel_number * 16;
break;
default:
return -EINVAL;
--
2.45.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info
2024-06-14 17:54 [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info Alex Deucher
@ 2024-06-18 22:07 ` Alex Deucher
2024-06-19 1:46 ` Zhang, Hawking
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2024-06-18 22:07 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx
Ping?
Alex
On Fri, Jun 14, 2024 at 2:12 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> v3.x changed the how vram width was encoded. The previous
> implementation actually worked correctly for most boards.
> Fix the implementation to work correctly everywhere.
>
> This fixes the vram width reported in the kernel log on
> some boards.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> index f932bec6e534..f873dd3cae16 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> @@ -433,7 +433,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
> mem_channel_number = vram_info->v30.channel_num;
> mem_channel_width = vram_info->v30.channel_width;
> if (vram_width)
> - *vram_width = mem_channel_number * (1 << mem_channel_width);
> + *vram_width = mem_channel_number * 16;
> break;
> default:
> return -EINVAL;
> --
> 2.45.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info
2024-06-14 17:54 [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info Alex Deucher
2024-06-18 22:07 ` Alex Deucher
@ 2024-06-19 1:46 ` Zhang, Hawking
1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Hawking @ 2024-06-19 1:46 UTC (permalink / raw)
To: Deucher, Alexander, amd-gfx@lists.freedesktop.org; +Cc: Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Saturday, June 15, 2024 01:55
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info
v3.x changed the how vram width was encoded. The previous implementation actually worked correctly for most boards.
Fix the implementation to work correctly everywhere.
This fixes the vram width reported in the kernel log on some boards.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
index f932bec6e534..f873dd3cae16 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
@@ -433,7 +433,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
mem_channel_number = vram_info->v30.channel_num;
mem_channel_width = vram_info->v30.channel_width;
if (vram_width)
- *vram_width = mem_channel_number * (1 << mem_channel_width);
+ *vram_width = mem_channel_number * 16;
break;
default:
return -EINVAL;
--
2.45.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 1:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 17:54 [PATCH] drm/amdgpu/atomfirmware: fix parsing of vram_info Alex Deucher
2024-06-18 22:07 ` Alex Deucher
2024-06-19 1:46 ` Zhang, Hawking
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox