答复: [PATCH 09/23] drm/amdgpu: enable virtualization feature for FIJI/TONGA

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

 



agree with Alex on that, the patch looks overhead on the ip blocks cherry-picking logic, we could keep it as simple as original style,


as long as we know current device is a VF device, we shall know how many ip blocks need be cherry-picked and assembled together


BR Monk

________________________________
å??件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Alex Deucher <alexdeucher at gmail.com>
å??é??æ?¶é?´: 2016å¹´12æ??20æ?¥ 7:17:26
�件人: Yu, Xiangliang
æ??é??: dl.SRDC_SW_GPUVirtualization; amd-gfx list
主�: Re: [PATCH 09/23] drm/amdgpu: enable virtualization feature for FIJI/TONGA

On Sat, Dec 17, 2016 at 11:16 AM, Xiangliang Yu <Xiangliang.Yu at amd.com> wrote:
> According to chip device id to set VF flag, and call virtual
> interface to setup all realted IP blocks.
>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 4 ++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index c4075b7..ab8c8bb5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1285,7 +1285,10 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
>                 else
>                         adev->family = AMDGPU_FAMILY_VI;
>
> -               r = vi_set_ip_blocks(adev);
> +               if (adev->flags & AMD_IS_VF)
> +                       r = amd_xgpu_set_ip_blocks(adev);

As far as I can see there's no need for a special
amd_xgpu_set_ip_blocks() function.  Just handle the VF case directly
in vi_set_ip_blocks() and avoid all the extra indirection.

Alex

> +               else
> +                       r = vi_set_ip_blocks(adev);
>                 if (r)
>                         return r;
>                 break;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 93c4704..5a18111 100755
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -385,13 +385,13 @@ static const struct pci_device_id pciidlist[] = {
>         {0x1002, 0x6928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
>         {0x1002, 0x6929, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
>         {0x1002, 0x692B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
> -       {0x1002, 0x692F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
> +       {0x1002, 0x692F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA | AMD_IS_VF},
>         {0x1002, 0x6930, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
>         {0x1002, 0x6938, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
>         {0x1002, 0x6939, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TONGA},
>         /* fiji */
>         {0x1002, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_FIJI},
> -       {0x1002, 0x730F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_FIJI},
> +       {0x1002, 0x730F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_FIJI | AMD_IS_VF},
>         /* carrizo */
>         {0x1002, 0x9870, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CARRIZO|AMD_IS_APU},
>         {0x1002, 0x9874, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CARRIZO|AMD_IS_APU},
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20161220/ff9d7649/attachment.html>


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

  Powered by Linux