[PATCH 2/8] drm/amdgpu: Enable uvd and vce gpu re-init for SRIOV gpu reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 25, 2017 at 5:16 AM, Xiangliang.Yu <Xiangliang.Yu at amd.com> wrote:
> From: Frank Min <Frank.Min at amd.com>
>
> Add uvd and vce re-init after gpu reset.
>
> Signed-off-by: Frank Min <Frank.Min at amd.com>
> Signed-off-by: Xiangliang.Yu <Xiangliang.Yu at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c      | 3 +--
>  drivers/gpu/drm/amd/amdgpu/vce_v4_0.c      | 4 +---
>  3 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 9c0f4cc..fe6783e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1953,7 +1953,8 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
>                 AMD_IP_BLOCK_TYPE_DCE,
>                 AMD_IP_BLOCK_TYPE_GFX,
>                 AMD_IP_BLOCK_TYPE_SDMA,
> -               AMD_IP_BLOCK_TYPE_VCE,
> +               AMD_IP_BLOCK_TYPE_UVD,
> +               AMD_IP_BLOCK_TYPE_VCE
>         };
>
>         for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> index e2b17cb..fbf7b412 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> @@ -894,9 +894,8 @@ static int uvd_v7_0_sriov_start(struct amdgpu_device *adev)
>                 table_size += sizeof(struct mmsch_v1_0_cmd_end) / 4;
>                 header->uvd_table_size = table_size;
>
> -               return uvd_v7_0_mmsch_start(adev, &adev->virt.mm_table);
>         }
> -       return -EINVAL; /* already initializaed ? */
> +       return uvd_v7_0_mmsch_start(adev, &adev->virt.mm_table);
>  }
>
>  /**
> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
> index 9b1de6b..28532e3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
> @@ -300,11 +300,9 @@ static int vce_v4_0_sriov_start(struct amdgpu_device *adev)
>                 memcpy((void *)init_table, &end, sizeof(struct mmsch_v1_0_cmd_end));
>                 table_size += sizeof(struct mmsch_v1_0_cmd_end) / 4;
>                 header->vce_table_size = table_size;
> -
> -               return vce_v4_0_mmsch_start(adev, &adev->virt.mm_table);
>         }
>
> -       return -EINVAL; /* already initializaed ? */
> +       return vce_v4_0_mmsch_start(adev, &adev->virt.mm_table);
>  }
>
>  /**
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux