[PATCH v2] drm/amdgpu: Need to set the baco cap before baco reset

2019-05-22 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 16 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 1

[PATCH] Revert "drm/amdgpu: Need to set the baco cap before baco reset"

2019-05-22 Thread Emily Deng
This reverts commit 13f2a375b58918873833cf6859332f960c6cf922. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 - drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 16

[PATCH] drm/amdgpu: Need to set the baco cap before baco reset

2019-05-23 Thread Emily Deng
abled. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 16 +++ driver

[PATCH] drm/amdgpu: fix unload driver fail

2019-05-24 Thread Emily Deng
dc_destroy should be called amdgpu_cgs_destroy_device, as it will use cgs context to read or write registers. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display

[PATCH] drm/amdgpu: Don't need to call csb_vram_unpin

2019-05-24 Thread Emily Deng
As it will destory clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call csb_vram unpin in gfx_v9_0_hw_fini, or it will have unpin warning. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 1 file changed, 16 dele

[PATCH] drm/amdgpu: Need to set the baco cap before baco reset

2019-05-27 Thread Emily Deng
abled. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++ drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 .../amd/powerplay/hwmgr/vega10_processpptables.c

[PATCH] drm/amdgpu: Don't need to call csb_vram_unpin

2019-05-27 Thread Emily Deng
As it will destroy clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call csb_vram unpin in gfx_v9_0_hw_fini, or it will have unpin warning. v2: For suspend, still need to do unpin Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +

[PATCH] drm/amdgpu:Fix the unpin warning about csb buffer

2019-05-28 Thread Emily Deng
As it will destroy clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call amdgpu_bo_free_kernel in gfx_v9_0_sw_fini, or it will have unpin warning. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +--- 1 file changed, 1 insertion(

[PATCH] drm/amdgpu/display: Fix reload driver error

2019-05-28 Thread Emily Deng
h the same name in the same directory. Reproduce sequences: 1.modprobe amdgpu 2.modprobe -r amdgpu 3.modprobe amdgpu Root cause: When unload driver, it don't unregister aux. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + drivers/gpu/drm/a

[PATCH v2] drm/amdgpu/display: Fix reload driver error

2019-05-28 Thread Emily Deng
h the same name in the same directory. Reproduce sequences: 1.modprobe amdgpu 2.modprobe -r amdgpu 3.modprobe amdgpu Root cause: When unload driver, it doesn't unregister aux. v2: Don't use has_aux Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1

[PATCH] drm/amdgpu/sriov: Correct some register program method

2019-05-30 Thread Emily Deng
For the VF, some registers only could be programmed with RLC. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 10 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 8 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu/sriov: give 8s for recover vram under RUNTIME

2018-08-07 Thread Emily Deng
Under runtime, the wait fence time could be quite long when other VFs are in exclusive mode. SWDEV-161490 Change-Id: Ifc32d56ca7fde01b1f4fe2b0db6959b51909008a Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion

[PATCH] drm/amdgpu/sriov: give 8s for recover vram under RUNTIME

2018-08-07 Thread Emily Deng
k Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1d933db..ef82ad1 100644 --- a/drivers/gpu/drm/amd/a

[PATCH 1/2] drm/amdgpu/uvd: UVD entity initialization relys on ring initialization

2018-08-12 Thread Emily Deng
Entity init should after ring init, as the entity's sched_rq's initialization is in ring init. SWDEV-161495 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 32 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + drivers/gpu/drm/

[PATCH 2/2] drm/amdgpu/vce: VCE entity initialization relies on ring initializtion

2018-08-12 Thread Emily Deng
Entity init should after ring init, as the entity's sched_rq's initialization is in ring init. SWDEV-161495 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 33 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 1 + drivers/gpu/drm/

[PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-13 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 50 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 ++ drivers/gpu/drm/amd

[PATCH v2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-14 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Add firmware version checking. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 63 drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-15 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Add firmware version checking. v3: Refine the code, and move the firmware checking into gfx_v9_0_ring_emit_reg_write_reg_wait. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm

[PATCH] drm/amdgpu: MC_VM_FB_OFFSET is pf only register.

2018-08-15 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index b60ed28..52b13e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

[PATCH 1/2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-15 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Add firmware version checking. v3: Refine the code, and move the firmware checking into gfx_v9_0_ring_emit_reg_write_reg_wait. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm

[PATCH 2/2] drm/amdgpu: For bare metal, use kiq to do invalidate tlb

2018-08-15 Thread Emily Deng
Remove the amdgpu_sriov_vf checking. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: For bare metal, use kiq to do invalidate tlb

2018-08-15 Thread Emily Deng
Remove the amdgpu_sriov_vf checking. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu/sriov: For sriov runtime, use kiq to do invalidate tlb

2018-08-15 Thread Emily Deng
amdgpu_kiq_reg_write_reg_wait. Remove the in_interrupt. Refine code. SWDEV-161497 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 -- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 15 +++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

[PATCH 2/2] drm/amdgpu: use kiq to do invalidate tlb

2018-08-16 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 -- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c| 60

[PATCH 1/2] drm/amdgpu: Remove the sriov checking and add firmware checking

2018-08-16 Thread Emily Deng
Unify bare metal and sriov, and add firmware checking for reg write and reg wait unify command. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 47 - 2 files changed, 48 insertions(+), 1

[PATCH v2 2/2] drm/amdgpu: use kiq to do invalidate tlb

2018-08-16 Thread Emily Deng
To avoid the tlb flush not interrupted by world switch, use kiq and one command to do tlb invalidate. v2: Refine the invalidate lock position. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 -- drivers/gpu/drm/amd

[PATCH v2 1/2] drm/amdgpu: Remove the sriov checking and add firmware checking

2018-08-16 Thread Emily Deng
Refine the patch 1, and the lock about invalidate_lock. Unify bare metal and sriov, and add firmware checking for reg write and reg wait unify command. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 59

[PATCH] amdgpu: fix multi-process hang issue

2018-08-20 Thread Emily Deng
From: Monk Liu SWDEV-146499: hang during multi vulkan process testing cause: the second frame's PREAMBLE_IB have clear-state and LOAD actions, those actions ruin the pipeline that is still doing process in the previous frame's work-load IB. fix: need insert pipeline sync if have context switch

[PATCH] amdgpu: fix multi-process hang issue

2018-08-20 Thread Emily Deng
From: Monk Liu SWDEV-146499: hang during multi vulkan process testing cause: the second frame's PREAMBLE_IB have clear-state and LOAD actions, those actions ruin the pipeline that is still doing process in the previous frame's work-load IB. fix: need insert pipeline sync if have context switch

[PATCH] drm/amdgpu/sriov: Only sriov runtime support use kiq

2018-08-20 Thread Emily Deng
For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/

[PATCH v2] drm/amdgpu/sriov: Only sriov runtime support use kiq

2018-08-20 Thread Emily Deng
Refine the code style, add brackets. For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v3] drm/amdgpu/sriov: Only sriov runtime support use kiq

2018-08-21 Thread Emily Deng
Move the check into the caller instead of returning an error code here For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v

[PATCH v4] drm/amdgpu/sriov: Only sriov runtime support use kiq

2018-08-21 Thread Emily Deng
Use adev->gfx.kiq.ring.ready directly. For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 --- 1 file changed, 8 ins

[PATCH 1/3] drm/amdgpu: Don't use kiq in gpu reset

2018-08-21 Thread Emily Deng
When in gpu reset, don't use kiq, it will generate more TDR. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v

[PATCH 2/3] drm/amdgpu: Don't use kiq in interrupt

2018-08-21 Thread Emily Deng
Don't use kiq interrupt, as it might sleep. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index fcdbacb..f4

[PATCH 3/3] drm/amdgpu: Use warn to replace error report

2018-08-21 Thread Emily Deng
When kiq flush fail, it could fallback to mmio flush, so don't report an error, just a warning. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/dr

[PATCH] amdgpu: fix multi-process hang issue

2018-08-22 Thread Emily Deng
for SRIOV (because only SRIOV will report PREEMPTION flag to UMD) Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/a

[PATCH] drm/amdgpu: Need to set moved to true when evict bo

2018-08-28 Thread Emily Deng
sert_map will call list_move(&bo_va->base.vm_status, &vm->moved) 5.amdgpu_cs_ioctl won't validate the swapout bo, as it is only in the moved list, not in the evict list. So VMC page fault occurs. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + 1 file c

[PATCH libdrm] amdgpu: When couldn't find bo, need to return error.

2018-08-31 Thread Emily Deng
The startx will have segmant fault if return success. SWDEV-163962 Change-Id: I56b189fa26efdcd1d96e5100af3f3e0b1208b0c3 Signed-off-by: Emily Deng --- amdgpu/amdgpu_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index f25cacc

[PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-09 Thread Emily Deng
bo's resv lock. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index de990bd..c75447d 100644 ---

[PATCH] drm/amdgpu: move PSP init prior to IH in gpu reset

2018-09-09 Thread Emily Deng
since we use PSP to program IH regs now Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 93476b8..acfc63e 10064

[PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Emily Deng
bo's resv lock. v2: Make a local copy of the list Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Emily Deng
bo's resv lock. v2: Make a local copy of the list Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/

[PATCH] drm/amdgpu/sriov: Use kiq to copy the gpu clock

2020-02-25 Thread Emily Deng
For vega10 sriov, the register is blocked, use copy data command to fix the issue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 68 +-- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH v2] drm/amdgpu/sriov: Use kiq to copy the gpu clock

2020-02-26 Thread Emily Deng
For vega10 sriov, the register is blocked, use copy data command to fix the issue. v2: Rename amdgpu_kiq_read_clock to gfx_v9_0_kiq_read_clock. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 68 +-- 1 file changed, 58 insertions(+), 10

[PATCH] SWDEV-197284 - drm/amdgpu: Only use the peek function in productor side is not correct

2019-08-12 Thread Emily Deng
: Emily Deng --- drivers/gpu/drm/scheduler/sched_entity.c | 4 ++-- include/drm/spsc_queue.h | 7 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 35ddbec..e74894f 100644

[PATCH] SWDEV-206718 drm/amdgpu: Fix tdr3 could hang with slow compute issue

2019-10-09 Thread Emily Deng
When index is 1, need to set compute ring timeout for sriov and passthrough. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] drm/amdgpu: Fix the null pointer about get vbios

2019-06-17 Thread Emily Deng
Move the get vbios only before SDMA block early init to fix null pointer about get vbios. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/ttm: Fix the memory delay free issue

2019-07-10 Thread Emily Deng
which are use the same resv object. Signed-off-by: Emily Deng --- drivers/gpu/drm/ttm/ttm_bo.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index f9a3d4c..57ec59b 100644 --- a/driver

[PATCH] drm/amd/amdgpu: For virtual display, enable multi crtcs.

2016-09-29 Thread Emily Deng
Enable multi crtcs for virtual display, user can set the number of crtcs by amdgpu module parameter virtual_display. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/ObjectID.h | 25 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 +-- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd/amdgpu: For virtual display, enable multi crtcs.

2016-09-29 Thread Emily Deng
Enable multi crtcs for virtual display, user can set the number of crtcs by amdgpu module parameter virtual_display. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/ObjectID.h | 25 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 +-- drivers/gpu/drm/amd/amdgpu

[PATCH v2] drm/amd/amdgpu: For virtual display, enable multi crtcs.

2016-09-30 Thread Emily Deng
Enable multi crtcs for virtual display, user can set the number of crtcs by amdgpu module parameter virtual_display. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/ObjectID.h | 25 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 +- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: Fix null pointer issue in amdgpu_cs_wait_any_fence

2017-11-09 Thread Emily Deng
The array[first] may be null when the fence has already been signaled. BUG: SWDEV-136239 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd

[PATCH] drm/amdgpu/gmc8: SRIOV need to program fb location

2017-07-14 Thread Emily Deng
SRIOV won't do vbios post in guest OS, and the mmMC_VM_FB_LOCATION is pf and vf copy, so still need to program fb location for SRIOV. BUG: SWDEV-126629 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 17 + 1 file changed, 17 insertions(+) diff --

[PATCH v2] drm/amdgpu/gmc8: SRIOV need to program fb location

2017-07-18 Thread Emily Deng
SRIOV won't do vbios post in guest OS, and the mmMC_VM_FB_LOCATION is pf and vf copy, so still need to program fb location for SRIOV. v2: No need to stop mc, and update gmc_v8_0_vram_gtt_location as well. BUG: SWDEV-126629 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v

[PATCH v3] drm/amdgpu/gmc8: SRIOV need to program fb location

2017-07-19 Thread Emily Deng
SRIOV won't do vbios post in guest OS, and the mmMC_VM_FB_LOCATION is pf and vf copy, so still need to program fb location for SRIOV. v2: No need to stop mc, and update gmc_v8_0_vram_gtt_location as well. v3: New line after the stack variables BUG: SWDEV-126629 Signed-off-by: Emily

[PATCH] drm/amdgpu/virtual_dce: Remove the rmmod error message

2017-07-24 Thread Emily Deng
ill disable all interrupts, it will return error when the type of crtc irq interrupt is AMDGPU_CRTC_IRQ_VLINE1 - AMDGPU_CRTC_IRQ_VLINE6. BUG: SWDEV-121607 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH] drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately

2017-08-17 Thread Emily Deng
For virtual display, it uses software timer to emulate the vsync interrupt, it doesn't have high precision, so doesn't support disable vblank immediately. BUG: SWDEV-129274 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +--- 1 file changed, 5 insert

[PATCH] Revert "drm/amdgpu: use polling mem to set SDMA3 wptr for VF"

2018-03-01 Thread Emily Deng
This reverts commit 2ffe31deb27579e2f2c9444e01f4d8abf385d145. The sdma wptr poll memomy doesn't have the same efficiency as doorbell, and it will make sdma hang when running tests. Change-Id: I6e334430b309b0c21aa18a08764320c7ff51e353 Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/a

[PATCH] drm/amdgpu: Disable sdma wptr polling memory for sriov

2018-03-05 Thread Emily Deng
The sdma wptr polling memory will introduce serious issue sdma hang for sriov environment on sdma v3. And the sdma wptr polling memory is only to fix the FLR cornner case, the issue's probabity is very low. Change-Id: I2c447533aac6b16d541f58644d141228dd75dfb3 Signed-off-by: Emily

[PATCH] drm/amdgpu: Clean sdma wptr register when only enable wptr polling

2018-03-06 Thread Emily Deng
The sdma wptr polling memory is not fast enough, then the sdma wptr register will be random, and not equal to sdma rptr, which will cause sdma engine hang when load driver, so clean up the sdma wptr directly to fix this issue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

[PATCH] drm/amdgpu: Clean sdma wptr register when only enable wptr polling

2018-03-06 Thread Emily Deng
The sdma wptr polling memory is not fast enough, then the sdma wptr register will be random, and not equal to sdma rptr, which will cause sdma engine hang when load driver, so clean up the sdma wptr directly to fix this issue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

[PATCH v2] drm/amdgpu: Clean sdma wptr register when only enable wptr polling

2018-03-06 Thread Emily Deng
: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index 521978c..89ec17c 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +++ b/drivers

[PATCH] drm/amdgpu: Correct the place of amdgpu_pm_sysfs_fini

2018-03-07 Thread Emily Deng
The amdgpu_pm_sysfs_fini should call before amdgpu_device_ip_fini, or the adev->pm.dpm_enabled would be set to 0, then the device files related to pp won't be removed by amdgpu_pm_sysfs_fini when unload driver. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |

[PATCH] drm/amdgpu: Correct the amdgpu_ucode_fini_bo place for Tonga

2018-03-07 Thread Emily Deng
. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index

[PATCH] drm/amdgpu: give more chance for tlb flush if failed

2018-03-19 Thread Emily Deng
under SR-IOV sometimes CPU based tlb flush would timeout within the given 100ms period, instead let it fail and continue we can give it more chance to repeat the tlb flush on the failed VMHUB this could fix the massive "Timeout waiting for VM flush ACK" error during vk_encoder test. Signed-off-by

[PATCH] drm/amdgpu: fix a kcq hang issue for SRIOV

2018-03-19 Thread Emily Deng
x and compute ring, and use the new format command in compute's vm flush which use only one package so no preemption could allowed Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++ drivers/g

[PATCH] drm/amdgpu: fix a kcq hang issue for SRIOV

2018-03-26 Thread Emily Deng
x and compute ring, and use the new format command in compute's vm flush which use only one package so no preemption could allowed Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++ drivers/g

[PATCH] drm/gpu-sched: fix force APP kill hang

2018-03-28 Thread Emily Deng
issue: there are VMC page fault occured if force APP kill during 3dmark test, the cause is in entity_fini we manually signal all those jobs in entity's queue which confuse the sync/dep mechanism: 1)page fault occured in sdma's clear job which operate on shadow buffer, and shadow buffer's Gart tabl

[PATCH] drm/amdgpu/sdma4:fix sdma engine hang

2018-03-30 Thread Emily Deng
The sdma doesn't support register write and wait in one command. Use this will make sdma engine hang. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0

[PATCH] drm/amdgpu/gfx9: correct the emit_frame_size

2018-04-02 Thread Emily Deng
As the tlb flush commands are combined to one command now, so need to modify the emit frame size. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu

[PATCH 0/8] The vega10 sriov still need those patches

2018-04-03 Thread Emily Deng
For vega10 sriov, still need to use one package for invalidate tlb flush Emily Deng (8): Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback"" Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring callback""

[PATCH 1/8] Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback""

2018-04-03 Thread Emily Deng
This reverts commit cd1f3f010b9ab5f06612cf775b32bdba599f59d7. The vega10 sriov still need these patches --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 20 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7 +++ 3 files changed,

[PATCH 2/8] Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring callback""

2018-04-03 Thread Emily Deng
This reverts commit eede70ab868f9a3803ad304a5ab61adfa76e669b. The vega10 sriov still need these patches. --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 2c6

[PATCH 3/8] Revert "Revert "drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring callback""

2018-04-03 Thread Emily Deng
This reverts commit 162499bed04e4c51dd0fcbfa1515f9b044f8925e. The vega10 sriov still need these patches. --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c index eddc57f..280c0

[PATCH 5/8] Revert "Revert "drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring callback""

2018-04-03 Thread Emily Deng
This reverts commit bb85e01404ab39c01786d64312a602d5540a9944. The vega10 sriov still need these patches. --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index 8c13267..d9a15

[PATCH 4/8] Revert "Revert "drm/amdgpu/vce4: add emit_reg_write_reg_wait ring callback""

2018-04-03 Thread Emily Deng
This reverts commit afb1f304302f797ff686b6250e34b2244c4a17a4. The vega10 sriov still need these patches. --- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c index 73fd48d..8fd1b

[PATCH 6/8] Revert "Revert "drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush""

2018-04-03 Thread Emily Deng
This reverts commit c41ed7ebba8eb6df266783f54a4d3d643252ea75. The vega10 sriov still need these patches. --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_

[PATCH 7/8] Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang""

2018-04-03 Thread Emily Deng
This reverts commit 5044a9e3253d089cf195fc3d52da5b5234f950ec. The vega10 sriov still need these patches. --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_

[PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback

2018-04-03 Thread Emily Deng
This adds support for writing and reading back in a single oneshot packet. This is needed to send a tlb invalidation and wait for ack in a single operation. Signed-off-by: Emily Deng Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++ 1 file changed, 15

[PATCH v2 2/7] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback (v2)

2018-04-03 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 9d39fd5..303ff43 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b

[PATCH v2 3/7] drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring callback (v2)

2018-04-03 Thread Emily Deng
Deucher Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 2c618a1..03a36cb 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers

[PATCH v2 1/7] drm/amdgpu: add emit_reg_write_reg_wait ring callback

2018-04-03 Thread Emily Deng
From: Alex Deucher This callback writes a value to a register and then reads back another register and waits for a value in a single operation. Provide a helper function using two operations for engines that don't support this opertion. Reviewed-by: Huang Rui Reviewed-by: Christian König Sign

[PATCH v2 4/7] drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring callback

2018-04-03 Thread Emily Deng
From: Alex Deucher This adds support for writing and reading back using the helper since the engines doesn't have a oneshot packet. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 + 1 file changed, 1 insertion(+)

[PATCH v2 5/7] drm/amdgpu/vce4: add emit_reg_write_reg_wait ring callback

2018-04-03 Thread Emily Deng
From: Alex Deucher This adds support for writing and reading back using the helper since the engines doesn't have a oneshot packet. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 1 file changed, 1 insertion(+)

[PATCH v2 6/7] drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring callback

2018-04-03 Thread Emily Deng
From: Alex Deucher This adds support for writing and reading back using the helper since the engines doesn't have a oneshot packet. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + 1 file changed, 1 insertion(+)

[PATCH v2 7/7] drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush

2018-04-03 Thread Emily Deng
From: Alex Deucher Use amdgpu_ring_emit_reg_write_reg_wait. On engines that support it, it provides a write and wait in a single packet which avoids a missed ack if a world switch happens between the request and waiting for the ack. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-o

[PATCH] drm/amdgpu/gmc9: give more chance for tlb flush if failed(v2)

2018-04-03 Thread Emily Deng
v2:refine the code Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 50 --- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9

[PATCH] drm/gpu-sched: fix force APP kill hang(v2)

2018-04-04 Thread Emily Deng
second one then goes over the entity, install it as completion signal for the remaining jobs and signals all jobs with an error code. Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 13 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 +- d

[PATCH] drm/gpu-sched: fix force APP kill hang(v3)

2018-04-12 Thread Emily Deng
he VM teardown 3)Keep the original function drm_sched_entity_fini to refine the code. Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 64 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.

[PATCH] drm/gpu-sched: fix force APP kill hang(v4)

2018-04-13 Thread Emily Deng
tity->fini_status with "int"; 5)Remove the check about entity->finished. Signed-off-by: Monk Liu Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 64 drivers/gpu/drm/amd/

[PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode

2018-04-24 Thread Emily Deng
read or write register will fail, which will result the IB test fail. So move the Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd

[PATCH 1/2] drm/amdgpu/sriov: Need to set in_gpu_reset flag to back after gpu reset

2018-04-24 Thread Emily Deng
After host os reset gpu reset, need to set flag in_gpu_reset to zero. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c index

[PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

2018-04-24 Thread Emily Deng
Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 6d55cae..adeca71 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/g

[PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode

2018-04-25 Thread Emily Deng
read or write register will fail, which will result the IB test fail. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-16 Thread Emily Deng
-> dma_fence_put(fence->parent) -> amdgpu_fence_release -> call_rcu(&f->rcu, amdgpu_fence_free) -> kmem_cache_free(amdgpu_fence_slab, fence); Change-Id: I8dcadd3372f97e72461bf46b41cc26d90f09b8df Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + 1 file chang

[PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-17 Thread Emily Deng
-> dma_fence_put(fence->parent) -> amdgpu_fence_release -> call_rcu(&f->rcu, amdgpu_fence_free) -> kmem_cache_free(amdgpu_fence_slab, fence); v2:put the barrier before the kmem_cache_destroy Change-Id: I8dcadd3372f97e72461bf46b41cc26d90f09b8df Signed-off-by: Emily Deng --- dri

[PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-21 Thread Emily Deng
d Change-Id: I8dcadd3372f97e72461bf46b41cc26d90f09b8df Signed-off-by: Emily Deng --- drivers/gpu/drm/scheduler/sched_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/sched_fence.c b/drivers/gpu/drm/scheduler/sched_fence.c index 786b47f..df446

[PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds.

2018-05-29 Thread Emily Deng
As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 44 ---

<    1   2   3   >