All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
To: "Yu, Xiangliang" <Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>,
	Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "dl.SRDC_SW_GPUVirtualization"
	<dl.SRDC_SW_GPUVirtualization-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx list
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: RE: [PATCH 09/23] drm/amdgpu: enable virtualization feature for FIJI/TONGA
Date: Tue, 20 Dec 2016 15:53:18 +0000	[thread overview]
Message-ID: <BN6PR12MB1652A9F6AB1818BD6C7D3542F7900@BN6PR12MB1652.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CY4PR12MB170197EFF75F8AB758618A21EB900-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Yu, Xiangliang
> Sent: Tuesday, December 20, 2016 12:41 AM
> To: Alex Deucher
> Cc: dl.SRDC_SW_GPUVirtualization; amd-gfx list
> Subject: RE: [PATCH 09/23] drm/amdgpu: enable virtualization feature for
> FIJI/TONGA
> 
> 
> > -----Original Message-----
> > From: Alex Deucher [mailto:alexdeucher@gmail.com]
> > Sent: Tuesday, December 20, 2016 7:17 AM
> > To: Yu, Xiangliang <Xiangliang.Yu@amd.com>
> > Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>;
> > dl.SRDC_SW_GPUVirtualization
> <dl.SRDC_SW_GPUVirtualization@amd.com>
> > Subject: 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@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@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.
> 
> My idea is that all virtualization chip share one common interface as a special
> chip family.  It will bring some benefits:
> 1. Logic code is very clear;
> 2. Avoid to scatter virtualization code throughout all amdgpu components;
> 3. Easy to support next virtualization chip without change amdgpu code;
> 

I don't mind having a separate IP module for special VF related setup, but I think the differences in the list of IP modules is small enough that it doesn't warrant all of the redirection.  Basically just:

if (VF) {
    add_ip_module(A);
    add_ip_module(X);
    add_ip_module(C);
} else {
    add_ip_module(A);
    add_ip_module(B);
    add_ip_module(C);
    add_ip_module(D);
}

That way it's obvious in one place which modules are present in the VF and bare metal cases without having to trace through a bunch of indirection.  It also makes it easier to update the lists if we ever rework the ip module interface or add a new IP module or something like that.

Alex

> > 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@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2016-12-20 15:53 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 16:16 [PATCH 00/23] Add support AMD GPU virtualization soultion Xiangliang Yu
     [not found] ` <1481991405-30422-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-17 16:16   ` [PATCH 01/23] drm/amdgpu: add support kernel interface queue(KIQ) Xiangliang Yu
     [not found]     ` <1481991405-30422-2-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:11       ` Alex Deucher
     [not found]         ` <CADnq5_P1An3GF9CJAdw5-av7oT0VDAN1YTgni9Q2waT81yyBtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  5:32           ` Yu, Xiangliang
2016-12-17 16:16   ` [PATCH 02/23] drm/amdgpu: add kiq into compiling Xiangliang Yu
     [not found]     ` <CY4PR12MB170115ECFEEDEE2B92071FE7EB9E0@CY4PR12MB1701.namprd12.prod.outlook.com>
     [not found]       ` <CY4PR12MB170115ECFEEDEE2B92071FE7EB9E0-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-19  7:13         ` 转发: " Liu, Monk
     [not found]           ` <BY2PR12MB0054C15BB4903E12764EABF684910-K//h7OWB4q7GdVlgMuSljQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-19  7:51             ` Yu, Xiangliang
2016-12-19 11:17             ` 转发: " Christian König
     [not found]               ` <beb83cf9-2683-569e-ea68-df3894e11dc0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-12-19 23:38                 ` Alex Deucher
     [not found]                   ` <CADnq5_MDTdnOcarCkDFdb5d=nJxDpt4ATkvmDG+BFG5thLa-eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  3:43                     ` 答复: " Liu, Monk
2016-12-20  5:26                 ` Liu, Monk
2016-12-20  3:48             ` Mike Lothian
     [not found]               ` <CAHbf0-EqT1YHuxButQkfb8s3mGT4WjVdcjCWMFetiqwjEME8pA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  4:07                 ` Bridgman, John
     [not found]                   ` <BN6PR12MB13487A20F8218E81FB87B846E8900-/b2+HYfkarQX0pEhCR5T8QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-23 10:47                     ` Mike Lothian
2016-12-17 16:16   ` [PATCH 03/23] drm/amdgpu: export KIQ interfaces Xiangliang Yu
2016-12-17 16:16   ` [PATCH 04/23] drm/amdgpu: add new structure for KIQ memory allcation Xiangliang Yu
2016-12-17 16:16   ` [PATCH 05/23] drm/amdgpu/gfx8: add support KIQ for FIJI/TONGA chips Xiangliang Yu
2016-12-17 16:16   ` [PATCH 06/23] drm/amdgpu/gfx8: correct KIQ hdp flush Xiangliang Yu
     [not found]     ` <1481991405-30422-7-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:13       ` Alex Deucher
2016-12-20  5:34         ` Yu, Xiangliang
2016-12-17 16:16   ` [PATCH 07/23] drm/amdgpu: create new directory for GPU virtualization Xiangliang Yu
     [not found]     ` <CY4PR12MB1701171F8B54171FCF66B30EEB9E0@CY4PR12MB1701.namprd12.prod.outlook.com>
     [not found]       ` <BY2PR12MB005475C762077C442361FBD284910@BY2PR12MB0054.namprd12.prod.outlook.com>
     [not found]         ` <CY4PR12MB1701DB3B08413BBDA717E73FEB910@CY4PR12MB1701.namprd12.prod.outlook.com>
     [not found]           ` <CY4PR12MB1701DB3B08413BBDA717E73FEB910-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-19  7:09             ` 转发: " Liu, Monk
2016-12-17 16:16   ` [PATCH 08/23] drm/amdgpu: add new flag for virtual function Xiangliang Yu
2016-12-17 16:16   ` [PATCH 09/23] drm/amdgpu: enable virtualization feature for FIJI/TONGA Xiangliang Yu
     [not found]     ` <1481991405-30422-10-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19  6:27       ` 答复: " Liu, Monk
2016-12-19 23:17       ` Alex Deucher
     [not found]         ` <CADnq5_PC6oukr7dzoi=wpWthUd9A-zx+-WDW8P0wm1zbRdnz1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  3:49           ` 答复: " Liu, Monk
2016-12-20  5:41           ` Yu, Xiangliang
     [not found]             ` <CY4PR12MB170197EFF75F8AB758618A21EB900-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-20 15:53               ` Deucher, Alexander [this message]
     [not found]                 ` <BN6PR12MB1652A9F6AB1818BD6C7D3542F7900-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-21  1:59                   ` Yu, Xiangliang
     [not found]                     ` <CY4PR12MB1701ACAA1FD55685C05F0B73EB930-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-22  9:48                       ` Christian König
2016-12-17 16:16   ` [PATCH 10/23] drm/amdgpu: export gem va update interface Xiangliang Yu
2016-12-17 16:16   ` [PATCH 11/23] drm/amdgpu: implement context save area(CSA) feature Xiangliang Yu
     [not found]     ` <1481991405-30422-12-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:20       ` Alex Deucher
     [not found]         ` <CADnq5_P1hOrd7Vk1G01Gj7aM1RjkyhgLGWV6CnTu9mvrGhtxsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  3:57           ` 答复: " Liu, Monk
     [not found]             ` <BY2PR12MB00547F38C7E612AE3A4D027184900-K//h7OWB4q7GdVlgMuSljQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-20  5:43               ` Yu, Xiangliang
     [not found]                 ` <CY4PR12MB1701351D6DCEA18714735B3DEB900-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-03 14:30                   ` Christian König
2016-12-17 16:16   ` [PATCH 12/23] drm/amdgpu: Insert meta data during submitting IB Xiangliang Yu
     [not found]     ` <1481991405-30422-13-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:23       ` Alex Deucher
     [not found]         ` <CADnq5_M++bzSVb-58Mesk1eAyK7Phwfgnx-XGCtEGygAomP-iQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  5:53           ` Yu, Xiangliang
2016-12-17 16:16   ` [PATCH 13/23] drm/amdgpu/mxgpu: add support for mailbox communication Xiangliang Yu
     [not found]     ` <1481991405-30422-14-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:24       ` Alex Deucher
     [not found]         ` <CADnq5_MZVK4c_eiYqoxxKSSPCtazki=0uB4bOAX8OjVKDnZCBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  6:05           ` Yu, Xiangliang
     [not found]             ` <CY4PR12MB1701DEB3053096F2E9CD1416EB900-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-03 17:02               ` Liu, Shaoyun
2016-12-17 16:16   ` [PATCH 14/23] drm/amdgpu: export two mailbox interface to amdgpu Xiangliang Yu
2016-12-17 16:16   ` [PATCH 15/23] drm/amdgpu/mxgpu: implement register access function with KIQ Xiangliang Yu
     [not found]     ` <1481991405-30422-16-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:26       ` Alex Deucher
     [not found]         ` <CADnq5_M2Mh-=wo0Aa-pS4P-59uLv6My0-LNn_Zuxy913MwhLbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  6:08           ` Yu, Xiangliang
     [not found]             ` <CY4PR12MB170162420FF46FECF0D783B4EB900-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-20 13:59               ` Deucher, Alexander
2016-12-17 16:16   ` [PATCH 16/23] drm/amdgpu: add flag to indicate VF runtime state Xiangliang Yu
2016-12-17 16:16   ` [PATCH 17/23] drm/amdgpu: export vi common ip block Xiangliang Yu
     [not found]     ` <1481991405-30422-18-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:27       ` Alex Deucher
2016-12-17 16:16   ` [PATCH 18/23] drm/amdgpu: add new maroc to identify virtualization " Xiangliang Yu
2016-12-17 16:16   ` [PATCH 19/23] drm/amdgpu/mxgpu: add implementation of GPU virtualization of VI Xiangliang Yu
     [not found]     ` <1481991405-30422-20-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:34       ` Alex Deucher
     [not found]         ` <CADnq5_Oeoqx_MhuVODGz5ukU6qKWMU=v=VB9cV_jBd4V9HBKeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  6:18           ` Yu, Xiangliang
2016-12-17 16:16   ` [PATCH 20/23] drm/amdgpu/mxgpu: enable VI virtualization Xiangliang Yu
     [not found]     ` <1481991405-30422-21-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:08       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1652B3D6D0409C00F89F4493F7910-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-20  5:29           ` Yu, Xiangliang
2016-12-17 16:16   ` [PATCH 21/23] drm/amdgpu: change golden register program sequence of virtualization Xiangliang Yu
     [not found]     ` <1481991405-30422-22-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-19 23:37       ` Alex Deucher
     [not found]         ` <CADnq5_PqscSCAOGn+suNGkoUQdF5Z7O69wrL_CvH27hfKE4b0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  4:09           ` 答复: " Liu, Monk
     [not found]             ` <BY2PR12MB005449FC3CC2D91B41B3487884900-K//h7OWB4q7GdVlgMuSljQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-20  6:09               ` Yu, Xiangliang
2016-12-20 13:50               ` Deucher, Alexander
2016-12-17 16:16   ` [PATCH 22/23] drm/amdgpu: do not reset gpu for virtualization Xiangliang Yu
2016-12-17 16:16   ` [PATCH 23/23] drm/amdgpu/mxgpu: add Makefie and Kconfig for GPU virtualization Xiangliang Yu
2016-12-19  5:15   ` 答复: [PATCH 00/23] Add support AMD GPU virtualization soultion Liu, Monk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR12MB1652A9F6AB1818BD6C7D3542F7900@BN6PR12MB1652.namprd12.prod.outlook.com \
    --to=alexander.deucher-5c7gfcevmho@public.gmane.org \
    --cc=Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dl.SRDC_SW_GPUVirtualization-5C7GfCeVMHo@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.