There isn't ucode when executing INVOKE command, so current code can't
check the failure of INVOKE command.
Remove the ucode check.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
xGMI session id should get from response buffer, correct it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 8fab0d6..2f126ea7
PSP only support VMR ring for SRIOV vf since v45 and all commands will
be send to VMR ring for executing.
VMR ring use C2PMSG 101 ~ 103 instead of C2PMSG 64 ~ 71.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 18 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1
PSP ring need to be destroy before starting reinit for vf.
This patche move it from hypervisor driver into guest.
Signed-off-by: Xiangliang Yu
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu
If PSP FW is running already, driver will not load PSP FW again and skip
it. So psp fw version is not correct if reading it from FW binary file,
need to get right version from register.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 4 +++-
1 file changed, 3
From: Frank Min
Temporary disable UVD/VCE block if is virtual device
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/soc15.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
b/drivers/gpu/drm
From: Frank Min
Add sriov capability detection for vega20, then can check if device is
virtual device.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers
Do ring clear before ring test, otherwise compute ring test will
fail after gpu resetting.
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
b/drivers/gpu/drm/a
After starting VNC server or running CTS test, kernel will hang and
can see below call trace:
[961816] INFO: task khugepaged:42 blocked for more than 120 seconds.
[968581] Tainted: G OE 4.13.0 #1
[973495] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
this
SRIOV doesn't implement PMC capability of PCIe, so it can't update
power state by reading PMC register.
Currently, amdgpu driver doesn't disable pci device when removing
driver, the enable_cnt of pci device will not be decrease to 0.
When reloading driver, pci_enable_device will do nothing as
enab
For SRIOV, the clearance has been moved to firmware. So don't need
it any more.
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
b/drivers/gpu/drm/amd/amdgpu/vc
When hypervisor triggering FLR for one of VFs, need to enable sdma
wptr polling to avoid missing wptr update if enabling doorbell.
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers
Port it from sdma4 for wptr polling usage.
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index b7d69ab..728c0d8 100644
When fail to get needed page for pool, need to put allocated pages
into pool. But current code has a miscalculation of allocated pages,
correct it.
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gp
From: Frank Min
Now uvd doorbell is from 0xf8-0xfb and vce doorbell is from 0xfc-0xff
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 18 +-
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 6 --
drivers/gpu/drm/amd/amdgpu/vce_v4_0
From: Frank Min
Interrupt enable is contained in vce init table and this register could
not be accessed in secure ASICs, so just remove it.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 10 ++
1 file changed, 6 insertions(+), 4 delet
Vega10 also support virtual display, remove the error message.
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index 6487e40..5e6d6
From: Frank Min
While doing flr on VFs, there is possibility to lost the doorbell
writing for sdma, so enable poll mem for sdma, then sdma fw would
check the pollmem holding wptr.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 +++
driver
From: Frank Min
Since rptr would not be accessed on later secure asics in sriov, remove
the ring test.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 3 +++
2 files changed, 5 insertions(+),
From: Frank Min
1.Since in sriov there is no need of decoding, so skip the related code;
2.Vcpu boot up and umc enable need to take at the end of the init sequence;
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 58 +++
From: Frank Min
Optimize init table sequence for sriov.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
b/drivers/gpu/drm/amd/amdgpu/vce
From: Frank Min
Add uvd and vce re-init after gpu reset.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 3 +--
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 4 +---
3 files changed, 4 in
From: Frank Min
MMSCH FW need to get the wptr from 0 after it get the mailbox request
from driver, since every time kick the mailbox, mmsch thinks that it
is the first time engine start to initialize.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_
From: Xiangliang Yu
Change ioremap mode from noncache to write combine and it will
reduce the read vbios time from 188ms to 8ms.
Signed-off-by: Xiangliang Yu
Signed-off-by: Xiangliang.Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
rs. So use amdgpu default clk value for SRIOV
and non-dpm cases.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
ind
If psp version doesn't match asd version, asd loading will be
failed. Add workaround to bypass it for sriov.
Signed-off-by: Daniel Wang
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/a
From: Frank Min
According to HW design, need to clean doorbell after setup MMSCH
table.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers
Change message to debug level as VI does.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
index e967a7b..96139ec 100644
--- a
From: Pixel Ding
Fix NULL pointer reference.
Signed-off-by: Pixel Ding
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm/amd/amdgpu
From: Pixel Ding
The SRIOV host driver cleans framebuffer for each VF, guest driver
needn't this action which costs much time on some virtualization
platform, otherwise it might get timeout to initialize.
Signed-off-by: Pixel Ding
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/a
From: Pixel Ding
Reset GDW, GWS and OA when SRIOV do reset.
Signed-off-by: Pixel Ding
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b
From: Daniel Wang
Now GPU hypervisor will load SDMA and RLCG ucode, so skip it
in guest.
Signed-off-by: Daniel Wang
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
b
From: Frank Min
Add UVD hw init.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 92 ---
1 file changed, 54 insertions(+), 38 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
b/drivers/gpu/drm
From: Daniel Wang
Fixed PSP loading issue for sriov.
Signed-off-by: Daniel Wang
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
b/drivers/gpu
From: Frank Min
Add UVD doorbell for SRIOV.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
From: Frank Min
Enable UVD block for SRIOV.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
b/drivers/gpu/drm/amd/amdgpu/soc15.c
index
Used virt_alloc_mm_table function to allocate MM table memory.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 20 +++-
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
b/drivers/gpu/drm/amd/amdgpu
Add two functions to allocate & free MM table memory.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 46
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 ++
2 files changed, 48 insertions(+)
diff --git a/drivers/gpu/drm/amd/am
From: Frank Min
Add UVD initialization for SRIOV.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 246 ++
1 file changed, 246 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
b/drivers/gpu/drm
From: Frank Min
Move mm table construction functions into mmsch header file so that
UVD can reuse it.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/mmsch_v1_0.h | 57 +
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 57
/soc15: enable UVD code path for sriov
drm/amdgpu/uvd7: add sriov uvd initialization sequences
drm/amdgpu/uvd7: add uvd doorbell initialization for sriov
drm/amdgpu/uvd7: add UVD hw init sequences for sriov
Xiangliang Yu (4):
drm/amdgpu/virt: bypass cg and pg setting for SRIOV
drm/amdgpu
GPU hypervisor cover all settings of CG and PG, so guest doesn't
need to do anything. Bypass it.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt
Change place of virt_init_setting function so that can cover the
cg and pg flags configuration.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/soc15.c | 10 +-
drivers/gpu/drm/amd/amdgpu/vi.c| 10 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git
For SRIOV doesn't need CG, so bypass it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
index 6268451..dbfe48d 100644
--- a/dr
For SRIOV doesn't need clockgating, bypass it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index f6b2329..ca77e33 100644
--- a/dr
Add VCE ring test slow workaround for SRIOV.
Signed-off-by: Frank Min
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
b/drivers/gpu/drm/amd/amdgpu
Now VCE block can work for SRIOV, enable ring & ib test.
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index cdff938..6ccd244 10064
Update the initialization sequence of VCE to make VCE work.
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index 8dde83f
the series patch will enable VCE function for SRIOV.
Xiangliang Yu (5):
drm/amdgpu/vce4: update VCE initialization sequence for SRIOV
drm/amdgpu/gmc9: add separate vmhub flush function
drm/amdgpu/vce4: workaround multi vce engine encoding hang issue
drm/amdgpu/vce4: workaround VCE ring
Now VCE block can work for SRIOV, enable ring & ib test.
Signed-off-by: Xiangliang Yu
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
b/drivers/gpu/drm/amd/am
Add separate vmhub flush function so that other components can
reuse it.
Signed-off-by: Xiangliang Yu
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 77 +--
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h | 3 ++
2 files changed, 49 insertions
Update the initialization sequence of VCE to make VCE work.
Signed-off-by: Xiangliang Yu
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
b/drivers/gpu/drm/amd
For SRIOV, multi vce engine will hang when encoding. Add VMHUB
flush to workaround it, will continue to find the root cause later.
Signed-off-by: Xiangliang Yu
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a
Add VCE ring test slow workaround for SRIOV.
Signed-off-by: Xiangliang Yu
Signed-off-by: Frank Min
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
b/drivers/gpu/drm/amd/amdgpu
SRIOV can support for loading ucode with PSP block, enable it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 660b13b
Confirm if sys driver and sOS are already been loaded through sOS
sign register, skip loading sys driver and sOS if finding the sign.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a
Because different HWs have different definition for CE & DE meta
data, follow mqd design to move the structures to vi_structs.h.
And change the prefix from amdgpu to vi as the structures is only
for VI family.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c|
When send messages to hypervior, the messages format should be is
idh_request, not idh_event.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
b
Need to free mqd backup when destroying ring.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 2202f02..23cf6fa 100644
--- a/drivers
vi_mqd is only used by VI family but mqd_ptr is common for all
ASIC, so change the pointer to void.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 26 +-
2 files changed, 18 insertions(+), 10
If start all VFs at same time, the GPU hypervisor need more time
to handle mailbox access. Set it to five seconds according to
test experience.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu
Virtual display doesn't allocate amdgpu_encoder when initializing,
so will get invaild pointer if try to free amdgpu_encoder when
unloading driver.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --
Reboot process will call HW fini functions of IP blocks. For virt,
need to send event three before hw fini and send event four after
hw fini.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd
For virt, freed mailbox irq should be handled in hw fini, not hw
init. Correct it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/vi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index
Current amdgpu reset process only works on bare-metal and for
SRIOV many inside it need re-work to adapt to vf device.
This is a temporary workaround to skip gpu reset.
Signed-off-by: Monk Liu
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
1 file changed
Virtualization don't need the dc, disable it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 03d28a1..a6d828c 1
Virtual display is default setting for virtualization, enable it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 4e7df8e
For gpu vf device, first need to request full gpu access before
accessing gpu registers, and release full gpu access after the
access is done.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +
drivers/gpu/drm/amd/amdgpu
Call VI virtualization functions if device is Vf.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
---
drivers/gpu/drm/amd/amdgpu/vi.c | 34 --
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm
asic specific file to support specific asic;
3. not include KIQ patch as it has been merged into kernel;
4. not include CSA patch as monk will submit it;
Xiangliang Yu (11):
drm/amdgpu/ring: add two interfaces to support r/w registers with kiq
drm/amdgpu/gfx8: implement emit_rreg/wreg function
For virtualization, it is must for driver to use KIQ to access
registers when it is out of GPU full access mode.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
---
drivers/gpu/drm/amd/amdgpu/Makefile| 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++
drivers/gpu/drm/amd
Add new flag to define gpu runtime that is out of full gpu access.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
b/drivers/gpu/drm/amd/amdgpu
VI has asic specific virt support, which including mailbox and
golden registers init.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
Signed-off-by: shaoyunl
---
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 9 +-
drivers/gpu/drm/amd
During virtual runtime, need to send command to kiq ring to
read/write GPU registers. Add two interface to support the two
actions.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Linu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++
2
Add high level interfaces that is not relate to specific asic. So
asic files just need to implement the interfaces to support
virtualization.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 57
drivers/gpu/drm
Implement emit_rreg/wreg function for kiq ring.
Signed-off-by: Xiangliang Yu
Signed-off-by: Monk Liu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 ++-
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 37
2 files changed, 39 insertions(+), 1 deletion(-)
diff
Call VI virtualization functions if device is Vf.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/vi.c | 34 --
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index
Current job timeout setting is not fit for virtualization, so it
will cause job timeout sometimes. Add workaround for this when
timeout happen.
Signed-off-by: Monk Liu
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
1 file changed, 3 insertions(+)
diff
For virtualization, it is must for driver to use KIQ to access
registers when it is out of GPU full access mode.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/Makefile| 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
Virtualization don't need the dc, disable it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 03d28a1..a6d828c 1
Add new flag to define gpu runtime that is out of full gpu access.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index a6524bb
For gpu vf device, first need to request full gpu access before
accessing gpu registers, and release full gpu access after the
access is done.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 6 ++
2
Virtual display is default setting for virtualization, enable it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index f32a789
Implement emit_rreg/wreg function for kiq ring.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 ++-
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 37
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd
VI has asic specific virt support, which including mailbox and
golden registers init.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 +
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c| 592
During virtual runtime, need to send command to kiq ring to
read/write GPU registers. Add two interface to support the two
actions.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++
2 files changed, 4 insertions
as monk will submit it;
Xiangliang Yu (11):
drm/amdgpu/ring: add two interfaces to support r/w registers with kiq
drm/amdgpu/gfx8: implement emit_rreg/wreg function
drm/amdgpu/virt: add runtime flag
drm/amdgpu/virt: use kiq to access registers
drm/amdgpu/virt: add high level interfaces
Add high level interfaces that is not relate to specific asic. So
asic files just need to implement the interfaces to support
virtualization.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 57
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
Call detection function driectly, so remove the interface.
V2: ci and si also need to call the detec function.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 --
drivers/gpu/drm/amd/amdgpu/cik.c| 3 ++-
drivers/gpu/drm/amd/amdgpu/si.c | 3 ++-
3 files changed
Move the detection forward into vi_set_ip_blocks function, then
add ip blocks virtualization need if device is VF.
V2: add ip blocks according to asic type.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/vi.c | 24 +---
1 file changed, 13 insertions(+), 11
Don't use the interface anymore, remove it.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 --
drivers/gpu/drm/amd/amdgpu/cik.c| 7 ---
drivers/gpu/drm/amd/amdgpu/si.c | 7 ---
3 files changed, 16 deletions(-)
diff --git a/drivers/gpu/drm/amd/a
Move the detection forward into vi_set_ip_blocks function, then
add ip blocks virtualization need if device is VF.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/vi.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu
Use acronym to rename fields to make easy to spell out.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 14 +++---
drivers/gpu/drm/amd/amdgpu/cik.c
to allocate OB.
Signed-off-by: Monk Liu
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 13 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 607 +-
drivers/gpu/drm/amd/amdgpu/vid.h | 2 +
3 files changed, 620 insertions(+), 2 deletions
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: Monk Liu
Signed-off-by: Xiangliang
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
---
drivers/gpu/drm
Create a new ip block for virtualization, its main role is to make
virtual code independent and flexible, and also eary to maintainer
virtualization code.
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/include/amd_shared.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu
KFD also will access GPU registers when loading/unloading drivers,
so can't hide the mailbox in mxgpu. Right now, can't find any way
to put it into kfd interface, export it into amdgpu.
Signed-off-by: Xiangliang Yu
Signed-off-by: shaoyunl
---
drivers/gpu/drm/amd/amdgpu/amdgpu_k
Monk Liu
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 5 +
drivers/gpu/drm/amd/mxgpu/mxgpu_mb.c | 3 +++
3 files changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/dr
GPU virtualization has different sequence from normal, change it.
Signed-off-by: Frank Min
Signed-off-by: Monk Liu
Signed-off-by: Xiangliang Yu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +
drivers/gpu/drm/amd/amdgpu/vi.c | 6 +
drivers/gpu/drm/amd/mxgpu/mxgpu_vi.c
1 - 100 of 138 matches
Mail list logo