[PATCH] Only detect virtualization capabilities on Fiji and Tonga.
Alex Deucher
alexdeucher at gmail.com
Wed Dec 27 07:45:57 UTC 2017
On Tue, Dec 26, 2017 at 9:26 AM, José Pekkarinen <koalinux at gmail.com> wrote:
> Signed-off-by: José Pekkarinen <koalinux at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list