* [PATCH] Only detect virtualization capabilities on Fiji and Tonga.
@ 2017-12-26 14:26 José Pekkarinen
[not found] ` <20171226142610.27402-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: José Pekkarinen @ 2017-12-26 14:26 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: José Pekkarinen
Signed-off-by: José Pekkarinen <koalinux@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
index 045988b18bc3..1a043a50d22f 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
@@ -245,16 +245,19 @@ void nbio_v6_1_detect_hw_virt(struct amdgpu_device *adev)
{
uint32_t reg;
- reg = RREG32_SOC15(NBIO, 0, mmRCC_PF_0_0_RCC_IOV_FUNC_IDENTIFIER);
- if (reg & 1)
- adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
-
- if (reg & 0x80000000)
- adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
-
- if (!reg) {
- if (is_virtual_machine()) /* passthrough mode exclus sriov mod */
- adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
+ if (adev->asic_type == CHIP_TONGA ||
+ adev->asic_type == CHIP_FIJI) {
+ reg = RREG32_SOC15(NBIO, 0, mmRCC_PF_0_0_RCC_IOV_FUNC_IDENTIFIER);
+ if (reg & 1)
+ adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
+
+ if (reg & 0x80000000)
+ adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
+
+ if (!reg) {
+ if (is_virtual_machine()) /* passthrough mode exclus sriov mod */
+ adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
+ }
}
}
--
2.13.6
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Only detect virtualization capabilities on Fiji and Tonga.
[not found] ` <20171226142610.27402-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-12-27 7:45 ` Alex Deucher
[not found] ` <CADnq5_NM+BLiKUhAoQ1a6Dx=fXGeYNHrPjXzp8Ao+UHCxv4GzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2017-12-27 7:45 UTC (permalink / raw)
To: José Pekkarinen; +Cc: amd-gfx list
On Tue, Dec 26, 2017 at 9:26 AM, José Pekkarinen <koalinux@gmail.com> wrote:
> Signed-off-by: José Pekkarinen <koalinux@gmail.com>
NACK. This would break vega10 and this code path is only called on
vega10 asics.
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 23 +++++++++++++----------
> 1 file changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
> index 045988b18bc3..1a043a50d22f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
> @@ -245,16 +245,19 @@ void nbio_v6_1_detect_hw_virt(struct amdgpu_device *adev)
> {
> uint32_t reg;
>
> - reg = RREG32_SOC15(NBIO, 0, mmRCC_PF_0_0_RCC_IOV_FUNC_IDENTIFIER);
> - if (reg & 1)
> - adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
> -
> - if (reg & 0x80000000)
> - adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
> -
> - if (!reg) {
> - if (is_virtual_machine()) /* passthrough mode exclus sriov mod */
> - adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
> + if (adev->asic_type == CHIP_TONGA ||
> + adev->asic_type == CHIP_FIJI) {
> + reg = RREG32_SOC15(NBIO, 0, mmRCC_PF_0_0_RCC_IOV_FUNC_IDENTIFIER);
> + if (reg & 1)
> + adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
> +
> + if (reg & 0x80000000)
> + adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
> +
> + if (!reg) {
> + if (is_virtual_machine()) /* passthrough mode exclus sriov mod */
> + adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
> + }
> }
> }
>
> --
> 2.13.6
>
> _______________________________________________
> 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] 3+ messages in thread
* Re: [PATCH] Only detect virtualization capabilities on Fiji and Tonga.
[not found] ` <CADnq5_NM+BLiKUhAoQ1a6Dx=fXGeYNHrPjXzp8Ao+UHCxv4GzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-12-27 14:28 ` José Ramón Muñoz Pekkarinen
0 siblings, 0 replies; 3+ messages in thread
From: José Ramón Muñoz Pekkarinen @ 2017-12-27 14:28 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx list
On Wednesday, 27 December 2017 09:45:57 EET Alex Deucher wrote:
> On Tue, Dec 26, 2017 at 9:26 AM, José Pekkarinen <koalinux@gmail.com> wrote:
> > Signed-off-by: José Pekkarinen <koalinux@gmail.com>
>
> NACK. This would break vega10 and this code path is only called on
> vega10 asics.
>
> Alex
True, this may not be harmful. Thanks Alex!
José.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-27 14:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26 14:26 [PATCH] Only detect virtualization capabilities on Fiji and Tonga José Pekkarinen
[not found] ` <20171226142610.27402-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-27 7:45 ` Alex Deucher
[not found] ` <CADnq5_NM+BLiKUhAoQ1a6Dx=fXGeYNHrPjXzp8Ao+UHCxv4GzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-27 14:28 ` José Ramón Muñoz Pekkarinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox