> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-boun...@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...@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to