[20/23] drm/amdgpu/mxgpu: enable VI virtualization

Submitted by Yu, Xiangliang on Dec. 17, 2016, 4:16 p.m.

Details

Message ID 1481991405-30422-21-git-send-email-Xiangliang.Yu@amd.com
State New
Headers show
Series "转发: [PATCH 07/23] drm/amdgpu: create new directory for GPU virtualization" ( rev: 3 2 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Dec. 17, 2016, 4:16 p.m.
Call vi ip block setup function to enable vi virtualization.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
 drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c b/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c
index 72469e2..7cacab7 100644
--- a/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c
+++ b/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c
@@ -62,6 +62,7 @@  static int amd_xgpu_init_ip_blocks(struct amdgpu_device *adev)
 	case CHIP_TONGA:
 	case CHIP_FIJI:
 		/* add IP blocks*/
+		xgpu_vi_add_ip_blocks(adev);
 		break;
 	default:
 		DRM_ERROR("Does not support this chip.\n");

Comments

> -----Original Message-----

> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Xiangliang Yu

> Sent: Saturday, December 17, 2016 11:17 AM

> To: amd-gfx@lists.freedesktop.org; dl.SRDC_SW_GPUVirtualization

> Cc: Yu, Xiangliang

> Subject: [PATCH 20/23] drm/amdgpu/mxgpu: enable VI virtualization

> 

> Call vi ip block setup function to enable vi virtualization.

> 

> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

> ---

>  drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> b/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> index 72469e2..7cacab7 100644

> --- a/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> +++ b/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> @@ -62,6 +62,7 @@ static int amd_xgpu_init_ip_blocks(struct

> amdgpu_device *adev)

>  	case CHIP_TONGA:

>  	case CHIP_FIJI:

>  		/* add IP blocks*/

> +		xgpu_vi_add_ip_blocks(adev);


Rather than going through all this indirection, just check for the VF flag in vi.c and add the appropriate IP blocks for the bare metal vs VF cases there.  It would also allow you to keep the vi_common functions static.

Alex

>  		break;

>  	default:

>  		DRM_ERROR("Does not support this chip.\n");

> --

> 2.7.4

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> -----Original Message-----

> From: Deucher, Alexander

> Sent: Tuesday, December 20, 2016 7:08 AM

> To: Yu, Xiangliang <Xiangliang.Yu@amd.com>; amd-

> gfx@lists.freedesktop.org; dl.SRDC_SW_GPUVirtualization

> <dl.SRDC_SW_GPUVirtualization@amd.com>

> Cc: Yu, Xiangliang <Xiangliang.Yu@amd.com>

> Subject: RE: [PATCH 20/23] drm/amdgpu/mxgpu: enable VI virtualization

> 

> > -----Original Message-----

> > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> > Of Xiangliang Yu

> > Sent: Saturday, December 17, 2016 11:17 AM

> > To: amd-gfx@lists.freedesktop.org; dl.SRDC_SW_GPUVirtualization

> > Cc: Yu, Xiangliang

> > Subject: [PATCH 20/23] drm/amdgpu/mxgpu: enable VI virtualization

> >

> > Call vi ip block setup function to enable vi virtualization.

> >

> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

> > ---

> >  drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> > b/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> > index 72469e2..7cacab7 100644

> > --- a/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> > +++ b/drivers/gpu/drm/amd/mxgpu/amd_mxgpu.c

> > @@ -62,6 +62,7 @@ static int amd_xgpu_init_ip_blocks(struct

> > amdgpu_device *adev)

> >  	case CHIP_TONGA:

> >  	case CHIP_FIJI:

> >  		/* add IP blocks*/

> > +		xgpu_vi_add_ip_blocks(adev);

> 

> Rather than going through all this indirection, just check for the VF flag in vi.c

> and add the appropriate IP blocks for the bare metal vs VF cases there.  It

> would also allow you to keep the vi_common functions static.


The method let us easy to put all virtualization implementation together, just export one interface to amdgpu. That is also the main aim of Re-org monk's sriov patches, don't want to mix virtualization into amdgpu. 

I don't why you keep vi_common function as static, I remember it is public before.

> 

> Alex

> 

> >  		break;

> >  	default:

> >  		DRM_ERROR("Does not support this chip.\n");

> > --

> > 2.7.4

> >

> > _______________________________________________

> > amd-gfx mailing list

> > amd-gfx@lists.freedesktop.org

> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx