[PATCH 17/23] drm/amdgpu: export vi common ip block

2016-12-17 Thread Xiangliang Yu
GPU virtualization component need vim common ip block and the block was also public before. Export it again. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH 16/23] drm/amdgpu: add flag to indicate VF runtime state

2016-12-17 Thread Xiangliang Yu
Guest driver will select using KIQ to access gpu registers if runtime flas is set, or will use MMIO method to r/w registers directly. When VF's initialization is done, VF should use set runtime flag and use KIQ method. And clear runtime flag when starting to unload driver. Signed-off-by: Monk

[PATCH 00/23] Add support AMD GPU virtualization soultion

2016-12-17 Thread Xiangliang Yu
This patch series will enable AMD GPU virtualization and wires it into amdgpu modules. The code design is base on below ideas: 1. Make virtualization code independent; 2. Self-maintain related GPU virtualization codes; 3. Easy to maintain virtualization codes; 4. Reduce the influence on other

[PATCH 03/23] drm/amdgpu: export KIQ interfaces

2016-12-17 Thread Xiangliang Yu
Export KIQ interfaces so that others components can use the interfaces to setup queues. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 07/23] drm/amdgpu: create new directory for GPU virtualization

2016-12-17 Thread Xiangliang Yu
Create new directory for GPU virtualization and name it with marketing name, so it will easy to mantainer all realted virtual code and make it independent so that will not affect other parts. And create new pointer and interface to connect virtualization code with amdgpu core code.

[PATCH 01/23] drm/amdgpu: add support kernel interface queue(KIQ)

2016-12-17 Thread Xiangliang Yu
KIQ is queue-memory based initialization method: setup KIQ queue firstly, then send command to KIQ to setup other queues, without accessing registers. For virtualization, need KIQ to access virtual function registers when running on guest mode. Signed-off-by: Xiangliang Yu

[PATCH 05/23] drm/amdgpu/gfx8: add support KIQ for FIJI/TONGA chips

2016-12-17 Thread Xiangliang Yu
FIJI/TONGA chips must enable KIQ feature to support virtualization. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 237 +- 1 file changed, 236 insertions(+), 1 deletion(-)

[PATCH 04/23] drm/amdgpu: add new structure for KIQ memory allcation

2016-12-17 Thread Xiangliang Yu
KIQ need three memory spaces: interrupt, ring and buffer object. If want to setup KIQ, must to allocate related memory firstly. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 ++ 1 file changed, 10 insertions(+) diff --git

Re: [PATCH] drm/amdgpu: Don't save new cursor size before updating CUR_SIZE register.

2016-12-17 Thread 'Liviu Dudau'
On Fri, Dec 16, 2016 at 07:16:25PM +, Deucher, Alexander wrote: > > -Original Message- > > From: Liviu Dudau [mailto:li...@dudau.co.uk] > > Sent: Friday, December 16, 2016 2:11 PM > > To: Daenzer, Michel; Deucher, Alexander > > Cc: Koenig, Christian; David Airlie;

[PATCH 11/23] drm/amdgpu: implement context save area(CSA) feature

2016-12-17 Thread Xiangliang Yu
CSA is need by world switch. This patch implement CSA feature and bind it to each VM, so hardware can save the state into the area and restore it when running again. Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu ---