drm/amdgpu: set correct vram_width for vega10 under sriov
Subsystems (2)
PATCH 1/1 drm/amdgpu: set correct vram_width for vega10 under sriov
For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correct vram_width
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7 -0
@@ -848,6 +848,13 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.vram_width = numchan * chansize; } +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width */ +if (amdgpu_sriov_vf (adev) && (adev->asic_type ==CHIP_VEGA10 )) { + adev->gmc.vram_width =2048 ; + } +/* size in MB on si */ adev->gmc.mc_vram_size = adev->nbio_funcs->get_memsize (adev) *1024ULL *1024ULL ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1558008150-20674-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org
Ping...
Hi Christian and Alex
Can you help review this? Thanks in advance.
Best Regards
Yintian Tao
-----Original Message-----
From: Yintian Tao <[email protected]>
Sent: Thursday, May 16, 2019 8:03 PM
To: [email protected]
Cc: Tao, Yintian <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correct vram_width
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7 -0
@@ -848,6 +848,13 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.vram_width = numchan * chansize; } +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width */ +if (amdgpu_sriov_vf (adev) && (adev->asic_type ==CHIP_VEGA10 )) { + adev->gmc.vram_width =2048 ; + } +/* size in MB on si */ adev->gmc.mc_vram_size = adev->nbio_funcs->get_memsize (adev) *1024ULL *1024ULL ;
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB3039BD8CF5208A1667D34B29E50B0-rweVpJHSKTr/[email protected]
How about combining these two patches into one? This seems cleaner.
Alex
Quoted 48 lines · Yintian
Ping...
Hi Christian and Alex
Can you help review this? Thanks in advance.
Best Regards
Yintian Tao-----Original Message-----
From: Yintian Tao <[email protected]>
Sent: Thursday, May 16, 2019 8:03 PM
To: [email protected]
Cc: Tao, Yintian <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: set correctvram_widthfor vega10 under sriovFor Vega10 SR-IOV,
vram_widthcan't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correctvram_widthSigned-off-by Trigger Huang <[email protected]>Signed-off-by Yintian Tao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-1@@ -848,6 +848,13 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.vram_width = numchan * chansize; } +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width */ +if (amdgpu_sriov_vf (adev) && (adev->asic_type ==CHIP_VEGA10 )) { + adev->gmc.vram_width =2048 ; + } +/* size in MB on si */ adev->gmc.mc_vram_size = adev->nbio_funcs->get_memsize (adev) *1024ULL *1024ULL ; --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
From 28cff589e564087d22e9be35ba8f90e0a30409e9 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Fri, 17 May 2019 09:31:43 -0500
Subject: [PATCH] drm/amdgpu/gmc9: set vram_width properly for SR-IOV
For SR-IOV, vram_width can't be read from ATOM as RAVEN, and DF related registers is not readable, so hardcord is the only way to set the correct vram_width.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +9 -1
@@ -835,8 +835,16 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)int chansize, numchan;int r; -if (amdgpu_emu_mode !=1 ) +if (amdgpu_sriov_vf (adev)) { +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width +*/ + adev->gmc.vram_width =2048 ; + }else if (amdgpu_emu_mode !=1 ) { adev->gmc.vram_width =amdgpu_atomfirmware_get_vram_width (adev); + } +if (!adev->gmc.vram_width) {/* hbm memory channel size */ if (adev->flags &AMD_IS_APU )
Signature · 1 line
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_O00Ts0RA+ntfC8Sqfb3WGCi+xE6SwReOXUfJzJji7nTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Alex
Many thanks for your review. I will merge these two patches into one and submit again.
Best Regards
Yintian Tao
________________________________
发件人: Alex Deucher <[email protected]>
发送时间: 2019年5月17日 22:34:30
收件人: Tao, Yintian
抄送: [email protected]; Koenig, Christian; Deucher, Alexander; Huang, Trigger 主题: Re: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
[CAUTION: External Email]
How about combining these two patches into one? This seems cleaner.
Alex
Quoted 48 lines · Yintian
Ping...
Hi Christian and Alex
Can you help review this? Thanks in advance.
Best Regards
Yintian Tao-----Original Message-----
From: Yintian Tao <[email protected]>
Sent: Thursday, May 16, 2019 8:03 PM
To: [email protected]
Cc: Tao, Yintian <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: set correctvram_widthfor vega10 under sriovFor Vega10 SR-IOV,
vram_widthcan't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correctvram_widthSigned-off-by Trigger Huang <[email protected]>Signed-off-by Yintian Tao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-1@@ -848,6 +848,13 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.vram_width = numchan * chansize; } +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width */ +if (amdgpu_sriov_vf (adev) && (adev->asic_type ==CHIP_VEGA10 )) { + adev->gmc.vram_width =2048 ; + } +/* size in MB on si */ adev->gmc.mc_vram_size = adev->nbio_funcs->get_memsize (adev) *1024ULL *1024ULL ; --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB3039CE4D284123D037FEDAF9E50B0-rweVpJHSKTr/[email protected]
Did you see the patch I attached?
Alex
________________________________
From: Tao, Yintian
Sent: Friday, May 17, 2019 10:51 AM
To: Alex Deucher
Cc: [email protected]; Koenig, Christian; Deucher, Alexander; Huang, Trigger
Subject: 答复: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
Hi Alex
Many thanks for your review. I will merge these two patches into one and submit again.
Best Regards
Yintian Tao
________________________________
发件人: Alex Deucher <[email protected]>
发送时间: 2019年5月17日 22:34:30
收件人: Tao, Yintian
抄送: [email protected]; Koenig, Christian; Deucher, Alexander; Huang, Trigger 主题: Re: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
[CAUTION: External Email]
How about combining these two patches into one? This seems cleaner.
Alex
Quoted 48 lines · Yintian
Ping...
Hi Christian and Alex
Can you help review this? Thanks in advance.
Best Regards
Yintian Tao-----Original Message-----
From: Yintian Tao <[email protected]>
Sent: Thursday, May 16, 2019 8:03 PM
To: [email protected]
Cc: Tao, Yintian <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: set correctvram_widthfor vega10 under sriovFor Vega10 SR-IOV,
vram_widthcan't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correctvram_widthSigned-off-by Trigger Huang <[email protected]>Signed-off-by Yintian Tao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-1@@ -848,6 +848,13 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.vram_width = numchan * chansize; } +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width */ +if (amdgpu_sriov_vf (adev) && (adev->asic_type ==CHIP_VEGA10 )) { + adev->gmc.vram_width =2048 ; + } +/* size in MB on si */ adev->gmc.mc_vram_size = adev->nbio_funcs->get_memsize (adev) *1024ULL *1024ULL ; --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB180947BE593ECB3FC8A660A7F70B0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Tao, Yintian
Reviewed-by Yintian TaoHi Alex
So sorry for my missing of you patch because the outlook on website didn’t show it.
Your patch seems cleaner and better. Can you help submit it ? Thanks in advance.
Can
From: Deucher, Alexander <[email protected]>
Sent: Saturday, May 18, 2019 1:07 AM
To: Tao, Yintian <[email protected]>; Alex Deucher <[email protected]>
Cc: [email protected]; Koenig, Christian <[email protected]>; Huang, Trigger <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
Did you see the patch I attached?
Alex
________________________________
From: Tao, Yintian
Sent: Friday, May 17, 2019 10:51 AM
To: Alex Deucher
Cc: [email protected]<mailto:[email protected]>; Koenig, Christian; Deucher, Alexander; Huang, Trigger
Subject: 答复: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
Hi Alex
Many thanks for your review. I will merge these two patches into one and submit again.
Best Regards
Yintian Tao
________________________________
发件人: Alex Deucher <[email protected]<mailto:[email protected]>>
发送时间: 2019年5月17日 22:34:30
收件人: Tao, Yintian
抄送: [email protected]<mailto:[email protected]>; Koenig, Christian; Deucher, Alexander; Huang, Trigger 主题: Re: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov
[CAUTION: External Email]
How about combining these two patches into one? This seems cleaner.
Alex
Quoted 48 lines · On Thu, May 16, 2019 at 10:39 PM Tao, Yintian…
Ping...
Hi Christian and Alex
Can you help review this? Thanks in advance.
Best Regards
Yintian Tao-----Original Message-----
From: Yintian Tao <[email protected]<mailto:[email protected]>>
Sent: Thursday, May 16, 2019 8:03 PM
To: [email protected]<mailto:[email protected]>
Cc: Tao, Yintian <[email protected]<mailto:[email protected]>>; Huang, Trigger <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: set correctvram_widthfor vega10 under sriovFor Vega10 SR-IOV,
vram_widthcan't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correctvram_width--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-1@@ -848,6 +848,13 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.vram_width = numchan * chansize; } +/* For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, +* and DF related registers is not readable, seems hardcord is the +* only way to set the correct vram_width */ +if (amdgpu_sriov_vf (adev) && (adev->asic_type ==CHIP_VEGA10 )) { + adev->gmc.vram_width =2048 ; + } +/* size in MB on si */ adev->gmc.mc_vram_size = adev->nbio_funcs->get_memsize (adev) *1024ULL *1024ULL ; --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx