[PATCH] drm/amdgpu: Add back ring lock

2018-12-26 Thread Rex Zhu
lock ring from alloc to commit. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd

[PATCH 3/4] drm/amdgpu: Use dynamical reserved vm size

2018-12-09 Thread Rex Zhu
-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++ drivers/gpu/drm/amd/amdgpu

[PATCH 2/4] drm/amdgpu: Refine function amdgpu_csa_vaddr

2018-12-09 Thread Rex Zhu
on baremetal, driver create csa per ctx. So add a function argument: ctx_id to get csa gpu addr. v2: add SRIOV handling Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4

[PATCH 1/4] drm/amdgpu: Add defines for CSA buffer

2018-12-09 Thread Rex Zhu
divide the reserve 128k CSA into four parts 1. first 4k for gfx CE/DE metadata 2. next 64K for GDS backup storage 3. next 28K reserved 4. last 32K for SDMA Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 11 +++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2

[PATCH 4/4] drm/amdgpu: Delay map sriov csa addr to ctx init

2018-12-09 Thread Rex Zhu
1. meet kfd request 2. align with baremetal, in baremetal, driver map csa when ctx init. v2: Add csa_va test when rmv do not need to free virt.csa_obj when map failed update comments about function amdgpu_map_static_csa Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu

[PATCH 2/9] drm/amdgpu: Refine function amdgpu_csa_vaddr

2018-12-06 Thread Rex Zhu
on baremetal, driver create csa per ctx. So add a function argument: ctx_id to get csa gpu addr. In Sriov, driver create csa per process, so ctx id always 1. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 2 +- drivers/gpu

[PATCH 2/9] drm/amdgpu: Refine function amdgpu_csa_vaddr

2018-12-06 Thread Rex Zhu
on baremetal, driver create csa per ctx. So add a function argument: ctx_id to get csa gpu addr. In Sriov, driver create csa per process, so ctx id always 1. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 2 +- drivers/gpu

[PATCH 6/9] drm/amdgpu: Create csa per ctx

2018-12-06 Thread Rex Zhu
create and map csa for gfx/sdma engine to save the middle command buffer when gpu preemption triggered. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 55 - drivers/gpu/drm/amd/amdgpu

[PATCH 8/9] drm/amdgpu: Add a argument in emit_cntxcntl interface

2018-12-06 Thread Rex Zhu
add a point of struct amdgpu_job in emit_cntxcntl interface in order to get the csa mc address per ctx when emit ce metadata in baremetal. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 ++-- drivers/gpu/drm/amd/amdgpu

[PATCH 3/9] drm/amdgpu: Use dynamical reserved vm size

2018-12-06 Thread Rex Zhu
at the top. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + drivers

[PATCH 1/9] drm/amdgpu: Limit vm max ctx number to 4096

2018-12-06 Thread Rex Zhu
driver need to reserve resource for each ctx for some hw features. so add this limitation. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 2/9] drm/amdgpu: Refine function amdgpu_csa_vaddr

2018-12-06 Thread Rex Zhu
on baremetal, driver create csa per ctx. So add a function argument: ctx_id to get csa gpu addr. In Sriov, driver create csa per process, so ctx id always 1. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 2 +- drivers/gpu

[PATCH 4/9] drm/amdgpu: Add a bitmask in amdgpu_ctx_mgr

2018-12-06 Thread Rex Zhu
used to manager the reserverd vm space. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 7/9] drm/amdgpu: Add csa mc address into job structure

2018-12-06 Thread Rex Zhu
save csa mc address in the job, so can patch the address to pm4 when emit_ib even the ctx was freed. suggested by Christian. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion

[PATCH 5/9] drm/amdgpu: Delay map sriov csa addr to ctx init

2018-12-06 Thread Rex Zhu
1. meet kfd request 2. align with baremetal, in baremetal, driver map csa per ctx. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 19 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 2 files changed, 18 insertions(+), 9 deletions(-) diff --git

[PATCH 9/9] drm/amdgpu: Remove sriov check when insert ce/de meta_data

2018-12-06 Thread Rex Zhu
to support cp gfx mid-command buffer preemption in baremetal Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 15 ++- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 ++- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 6/9] drm/amdgpu: Create csa per ctx

2018-12-06 Thread Rex Zhu
create and map csa for gfx/sdma engine to save the middle command buffer when gpu preemption triggered. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 55 - drivers/gpu/drm/amd/amdgpu

[PATCH 4/9] drm/amdgpu: Add a bitmask in amdgpu_ctx_mgr

2018-12-06 Thread Rex Zhu
used to manager the reserverd vm space. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 3/9] drm/amdgpu: Use dynamical reserved vm size

2018-12-06 Thread Rex Zhu
at the top. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 + drivers

[PATCH] drm/amdgpu: Fix static checker warning

2018-11-23 Thread Rex Zhu
drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c:49 amdgpu_allocate_static_csa() error: uninitialized symbol 'ptr'. the test if (!bo) doesn't work, as the bo is a pointer to a pointer. so need to check !*bo Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- 1 file changed, 1

[PATCH v2] drm/amdgpu: Remove dead static variable

2018-11-19 Thread Rex Zhu
The static struct drm_driver *driver was not used because drm_pci_init was deprecated v2: Remove static pointer pdriver Reviewed-by: Christian König Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git

[PATCH v2] drm/amdgpu: Remove dead static variable

2018-11-19 Thread Rex Zhu
The static struct drm_driver *driver was not used because drm_pci_init was deprecated v2: Remove static pointer pdriver Reviewed-by: Christian König Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git

[PATCH] drm/amdgpu: Remove dead static variable

2018-11-19 Thread Rex Zhu
The static struct drm_driver *driver was not used because drm_pci_init was deprecated Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd/pp: Fix truncated clock value when set watermark

2018-11-12 Thread Rex Zhu
the clk value should be tranferred to MHz first and then transfer to uint16. otherwise, the clock value will be truncated. Reported-by: Hersen Wu Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 32 1 file changed, 16 insertions(+), 16

[PATCH] drm/amdgpu: Fix CSA buffer alloc failed on Vega

2018-11-12 Thread Rex Zhu
ff8 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c index fea4555..e2f3

[PATCH 1/2] drm/amdgpu: Refine function name

2018-10-31 Thread Rex Zhu
there is no functional changes.just refine function name to keep consistence with other files. change amdgpu_get_sdma_instance to amdgpu_sdma_get_instance_from_ring. suggested by alex. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: Add helper function to get sdma index

2018-10-31 Thread Rex Zhu
Get the sdma index from ring v2: refine function name Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 16 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 1 + 2 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers

[PATCH 5/6] drm/amdgpu: Add new ring interface ib_preempt

2018-10-31 Thread Rex Zhu
Used to trigger preemtption Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index a9ddb0d..cdd66a3 100644 --- a/drivers/gpu/drm/amd/amdgpu

[PATCH 4/6] drm/amdgpu: Add sdma ib preempt clear when emit fence

2018-10-31 Thread Rex Zhu
need to clear ib preempt in a proper time Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 13 + drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 12 2 files changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd

[PATCH 6/6] drm/amdgpu: Implement ib_preemmpt interface for sdma

2018-10-31 Thread Rex Zhu
sdma can be preempted via this interface Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 14 ++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 15 +++ 2 files changed, 29 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm

[PATCH 3/6] drm/amdgpu: Add helper function to get sdma index

2018-10-31 Thread Rex Zhu
Get the sdma index from sdma ring Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 16 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 1 + 2 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/6] drm/amdgpu: report more sdma amdgpu_fence_info

2018-10-31 Thread Rex Zhu
This can help checking MCBP feature on sdma. If preemption occurred in the previous IB the address is adjusted by 2 DWs. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 1/6] drm/amdgpu: Add fence flag AMDGPU_FENCE_FLAG_CLEAR_PREEMPT

2018-10-31 Thread Rex Zhu
when emit fence with this flag, driver will de-assert IB_PREEMPTION Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index a4b6eff..a9ddb0d

[PATCH 2/2] drm/amd/pp: Print warning if od_sclk/mclk out of range

2018-10-31 Thread Rex Zhu
print warning in dmesg to notify user the setting for sclk_od/mclk_od out of range that vbios can support Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay

[PATCH 1/2] drm/amd/pp: Fix pp_sclk/mclk_od not work on Vega10

2018-10-31 Thread Rex Zhu
not update dpm table with user's setting. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 31 ++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr

[PATCH 3/3] drm/amdgpu: Patch csa mc address to sdma IB packet

2018-10-24 Thread Rex Zhu
the csa buffer is used by sdma engine to do context save when preemption happens. if the mc address is zero, mean the preemtpion feature(MCBP) is disabled. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 1 + drivers/gpu

[PATCH 2/3] drm/amdgpu: Add csa mc address into job structure

2018-10-24 Thread Rex Zhu
save csa mc address in the job, so can patch the address to pm4 when emit_ib even the ctx was freed. suggested by Christian. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion

[PATCH 1/3] drm/amdgpu: Create csa per ctx

2018-10-24 Thread Rex Zhu
create csa for gfx/sdma engine to save the middle command buffer when gpu preemption triggered. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 48 ++--- drivers/gpu/drm/amd/amdgpu

[PATCH 3/3] drm/amdgpu: Use dynamical reserved vm size

2018-10-24 Thread Rex Zhu
. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +-- drivers/gpu/drm

[PATCH 2/3] drm/amdgpu: Refine function amdgpu_csa_vaddr

2018-10-24 Thread Rex Zhu
Add a function argument: ctx_id, so can find the vaddr via ctx_id. In Sriov, the id always is 1. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- drivers/gpu/drm/amd

[PATCH 1/3] drm/amdgpu: Limit vm max ctx number to 4096

2018-10-24 Thread Rex Zhu
driver need to reserve resource for each ctx for some hw features. so add this limitation. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 1/2] drm/amdgpu: Implement cond_exec for sdma3/4

2018-10-24 Thread Rex Zhu
the cond_exec is needed by sdma mid command buffer preemption Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 31 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 28 2 files changed, 59 insertions(+) diff --git a/drivers

[PATCH 2/2] drm/amdgpu: Add helper function amdgpu_ring_set_preempt_cond_exec

2018-10-24 Thread Rex Zhu
can preempt the ring by setting cond_exec to false Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index ef7252a..54ca8a3 100644

[PATCH v3] drm/amdgpu: Modify the argument of emit_ib interface

2018-10-24 Thread Rex Zhu
use the point of struct amdgpu_job as the function argument instand of vmid, so the other members of struct amdgpu_job can be visit in emit_ib function. v2: add a wrapper for getting the VMID add the job before the ib on the parameter list. v3: refine the wrapper name Signed-off-by: Rex Zhu

[PATCH] drm/amd/pp: Fix pp_sclk/mclk_od not work on smu7

2018-10-24 Thread Rex Zhu
not update the dpm table with user's setting Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr

[PATCH] drm/amdgpu: Change AMDGPU_CSA_SIZE to 128K

2018-10-24 Thread Rex Zhu
In order to support new asics and MCBP feature enablement on baremetal. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.h index

[PATCH] drm/amdgpu: Limit vm max ctx number to 4096

2018-10-24 Thread Rex Zhu
driver need to reserve resource for each ctx for some hw features. so add this limitation. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH v2] drm/amdgpu: Modify the argument of emit_ib interface

2018-10-24 Thread Rex Zhu
use the point of struct amdgpu_job as the function argument instand of vmid, so the other members of struct amdgpu_job can be visit in emit_ib function. v2: add a wrapper for getting the VMID add the job before the ib on the parameter list. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd

[PATCH v2] drm/amdgpu: Patch csa mc address in IB packet

2018-10-24 Thread Rex Zhu
the csa buffer is used by sdma engine to do context save when preemption happens. it the mc address is zero, mean the preemtpion feature(MCBP) is disabled. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 2

[PATCH] drm/amdgpu: Modify the argument of emit_ib interface

2018-10-23 Thread Rex Zhu
use the point of struct amdgpu_job as the function argument instand of vmid, so the other members of struct amdgpu_job can be visit in emit_ib function. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- drivers/gpu

[PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Rex Zhu
when the VA address located in the last PD entries, the alloc_pts will faile. Use the right PD mask instand of hardcode, suggested by jerry.zhang. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Rex Zhu
When the va address located in the last pd entry, the alloc_pts will failed. caused by "drm/amdgpu: add amdgpu_vm_entries_mask v2" commit 72af632549b97ead9251bb155f08fefd1fb6f5c3. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++-

[PATCH] drm/amdgpu: Reverse the sequence of ctx_mgr_fini and vm_fini in amdgpu_driver_postclose_kms

2018-10-22 Thread Rex Zhu
csa buffer will be created per ctx, when ctx fini, the csa buffer and va will be released. so need to do ctx_mgr fin before vm fini. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: Fix null point errro

2018-10-18 Thread Rex Zhu
need to check adev->powerplay.pp_funcs first, becasue from AI, the smu ip may be disabled by user, and the pp_handle is null in this case. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c| 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/

[PATCH 1/2] drm/amd/display: Fix Null point error if smu ip was disabled

2018-10-18 Thread Rex Zhu
from AI, SMU Ip is not indispensable to driver and can be disabled by user via module parameter ip_block_mask. so the pp_handle may be NULL. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions

[PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

2018-10-16 Thread Rex Zhu
If user disable uvd/vce/vcn/acp blocks via module parameter ip_block_mask, driver power off thoser blocks to save power. v2: power off uvd/vce/vcn/acp via smu. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++ 1 file

[PATCH 3/3] drm/amdgpu: Move csa related functions to separate file

2018-10-16 Thread Rex Zhu
Those functions can be shared between SRIOV and baremetal Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_csa_manager.c | 117 drivers/gpu/drm

[PATCH 2/3] drm/amdgpu: Refine CSA related functions

2018-10-16 Thread Rex Zhu
There is no functional changes, Use function arguments for SRIOV special variables which is hardcode in those functions. so we can share those functions with os preemption in baremetal. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- drivers/gpu/drm/amd/amdgpu

[PATCH 1/3] drm/amdgpu: Remove useless csa gpu address in vmid0

2018-10-16 Thread Rex Zhu
driver didn't use this address so far. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user

2018-10-15 Thread Rex Zhu
If user disable uvd/vce/vcn/acp blocks via module parameter ip_block_mask, driver power off thoser blocks to save power. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: Fix typo in amdgpu_vmid_mgr_init

2018-10-12 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c index 3a072a7..df9b173 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c

[PATCH 2/3] drm/amdgpu: Load fw between hw_init/resume_phase1 and phase2

2018-10-10 Thread Rex Zhu
Extract the function of fw loading out of powerplay. Do fw loading between hw_init/resuem_phase1 and phase2 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 61 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 drivers/gpu/drm

[PATCH 3/3] drm/amdgpu: Remove wrong fw loading type warning

2018-10-10 Thread Rex Zhu
Remove the warning message: "-1 is not supported on VI" the -1 is the default fw load type, mean auto. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/g

[PATCH 1/3] drm/amdgpu: split ip hw_init into 2 phases

2018-10-10 Thread Rex Zhu
We need to do some IPs earlier to deal with ordering issues similar to how resume is split into two phases. Do fw loading via smu/psp between the two phases. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 66 -- 1 file changed, 53 insertions

[PATCH v2 4/5] drm/amdgpu: Fix unnecessary warning in dmesg

2018-10-09 Thread Rex Zhu
Fix the warning message: "-1 is not supported on VI" the -1 is the default fw load type, mean auto. v2: fix typo Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH v2 1/5] drm/amdgpu: Split amdgpu_ucode_init/fini_bo into two functions

2018-10-09 Thread Rex Zhu
error when bo create failed. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 58 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 ++ 3 files changed, 36 insertions(+), 29 deletions(-) diff

[PATCH 5/5] drm/amdgpu: Remove the direct fw loading support for sdma2.4

2018-10-09 Thread Rex Zhu
sdma2.4 is only for iceland. For Vi, we don't maintain the direct fw loading. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 42 -- 1 file changed, 42 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd

[PATCH 4/5] drm/amdgpu: Fix unnecessary warning in dmesg

2018-10-09 Thread Rex Zhu
Fix the warning message: "-1 is not supported on VI" the -1 is the default fw load type, mean auto. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/d

[PATCH 3/5] drm/amdgpu: Extract the function of fw loading out of powerplay

2018-10-09 Thread Rex Zhu
So there is no dependence between gfx/sdma/smu. and for Vi, after IH hw_init, driver load all the smu/gfx/sdma fw. for AI, fw loading is controlled by PSP, after psp hw init, we call the function to check smu fw version. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 1/5] drm/amdgpu: Split amdgpu_ucode_init/fini_bo into two functions

2018-10-09 Thread Rex Zhu
-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 57 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 ++ 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/5] drm/amdgpu: Remove amdgpu_ucode_fini_bo

2018-10-09 Thread Rex Zhu
The variable clean is unnecessary. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 19 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 +-- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3

[PATCH] drm/amdgpu: Always enable fan sensors for read

2018-10-05 Thread Rex Zhu
don't need to set fan1_enable to read fan sensors. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 68548fb..94055a4 100644

[PATCH 1/2] drm/amdgpu: Change SI/CI gfx/sdma/smu init sequence

2018-10-03 Thread Rex Zhu
initialize gfx/sdma before dpm features enabled. Acked-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/cik.c | 17 + drivers/gpu/drm/amd/amdgpu/si.c | 13 +++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 2/2] drm/amdgpu: Change AI gfx/sdma/smu init sequence

2018-10-03 Thread Rex Zhu
initialize gfx/sdma before dpm features enabled. Acked-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/soc15.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index

[PATCH 5/5] drm/amdgpu: Change VI gfx/sdma/smu init sequence

2018-10-03 Thread Rex Zhu
initialize gfx/sdma before dpm features enabled. Acked-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/vi.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c

[PATCH 4/5] drm/amdgpu: Add fw load in gfx_v8 and sdma_v3

2018-10-03 Thread Rex Zhu
gfx and sdma can be initialized before smu. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 8 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd

[PATCH 3/5] drm/amd/pp: Implement load_firmware interface

2018-10-03 Thread Rex Zhu
with this interface, gfx/sdma can be initialized before smu. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay

[PATCH 2/5] drm/amd/pp: Allocate ucode bo in request_smu_load_fw

2018-10-03 Thread Rex Zhu
ucode bo is needed by request_smu_load_fw, the request_smu_load_fw maybe called by gfx/sdma before smu hw init. so move amdgpu_ucode_bo_init to request_smu_lowd_fw from smu hw init. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3

[PATCH 1/5] drm/amdgpu: Don't reallocate ucode bo when suspend

2018-10-03 Thread Rex Zhu
driver don't release the ucode memory when suspend. so don't need to allocate bo when resume back. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu

[PATCH 0/5] Change the hw ip initialize sequence

2018-10-03 Thread Rex Zhu
we are suggested to initialize gfx/sdma before power feature enabled. and On Vi, the gfx/sdma fw will be loaded by smu, Export load_firmware interface to gfx/sdma, so gfx/sdma can trigger fw loading if they were initialized before smu. Rex Zhu (5): drm/amdgpu: Don't reallocate ucode bo when

[PATCH v2] drm/amdgpu: Remove FW_LOAD_DIRECT type support on VI

2018-10-03 Thread Rex Zhu
AMDGPU_FW_LOAD_DIRECT is used for bring up. Now it don't work any more. so remove the support. v2: Add warning message if user select AMDGPU_FW_LOAD_DIRECT/AMDGPU_FW_LOAD_PSP on VI. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 7 +- drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu: Refine function amdgpu_device_ip_late_init

2018-10-03 Thread Rex Zhu
1. only call late_init when hw_init successful, so check status.hw instand of status.valid in late_init. 2. set status.late_initialized true if late_init was not implemented. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/2] drm/amdgpu: Check late_init status before set cg/pg state

2018-10-03 Thread Rex Zhu
Fix cg/pg unexpected set in hw init failed case. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index eda3d1e

[PATCH 5/5] drm/amdgpu: Disable sysfs pwm1 if not in manual fan control

2018-09-30 Thread Rex Zhu
Following lm-sensors 3.0.0, Only enable pwm1 sysfs when fan control mode(pwm1_enable) in manual Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 4/5] drm/amdgpu: Add fan RPM setting via sysfs

2018-09-30 Thread Rex Zhu
Add fan1_target for get/set fan speed in RPM unit Add fan1_min/fan1_max for get min, max fan speed in RPM unit Add fan1_enable to enable/disable the fan1 sensor v2: query the min/max rpm gpu support instand of hardcode. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h

[PATCH 2/5] drm/amdgpu: Add new AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM sensor

2018-09-30 Thread Rex Zhu
For getting the min/max fan speed in RPM units. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h index 8593850..97001a6

[PATCH 1/5] drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg

2018-09-30 Thread Rex Zhu
1. make uvd_v7_0_enc_get_destroy_msg static 2. drop a function variable that always true Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 2 files changed, 7 insertions(+), 15 deletions(-) diff --git

[PATCH 3/5] drm/amd/pp: Implement AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM

2018-09-30 Thread Rex Zhu
so user can query the RPM range Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c| 6 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c

[PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence

2018-09-29 Thread Rex Zhu
initialize gfx/sdma before dpm features enabled. and disable dpm features before gfx/sdma fini. Acked-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/cik.c | 17 + drivers/gpu/drm/amd/amdgpu/si.c| 13 +++-- drivers/gpu/drm/amd/amdgpu/soc15.c

[PATCH 1/4] drm/amd/pp: Not allocate ucode bo in smu hw init

2018-09-29 Thread Rex Zhu
ucode bo is needed by request_smu_load_fw, the request_smu_load_fw maybe called by gfx/sdma before smu hw init. so move amdgpu_ucode_bo_init to request_smu_lowd_fw. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3 --- drivers/gpu/drm/amd/powerplay/smumgr

[PATCH 2/4] drm/amd/pp: Implement load_firmware interface

2018-09-29 Thread Rex Zhu
with this interface, gfx/sdma can be initialized before smu. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay

[PATCH 3/4] drm/amdgpu: Add fw load in gfx_v8 and sdma_v3.

2018-09-29 Thread Rex Zhu
gfx and sdma can be initialized before smu. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 8 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd

[PATCH 3/3] drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function

2018-09-29 Thread Rex Zhu
/resume, driver need to reload fw. so in suspend, reset the reload_fw flag to true to enable load fw when resume. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c| 1 + drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 55 - drivers/gpu/drm/amd

[PATCH 2/3] drm/amd/pp: Setup SoftRegsStart before request smu load fw

2018-09-29 Thread Rex Zhu
need to know SoftRegsStart value to visit the register UcodeLoadStatus to check fw loading state. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 11 ++- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 9 + 2 files changed, 19

[PATCH 1/3] drm/amd/pp: Refine function iceland_start_smu

2018-09-29 Thread Rex Zhu
if upload firmware failed, no matter how many times the function runs again, the same error will be encountered. so remove the duplicated code. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions

[PATCH 3/6] drm/amdgpu: Fix cg/pg unexpected disabled when hw init failed

2018-09-29 Thread Rex Zhu
Check the ip blocks late_initialized state before enable/disable cg/pg, so if hw init failed, cg/pg function will not be executed. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 1/6] drm/amdgpu: Remove FW_LOAD_DIRECT type support on VI

2018-09-29 Thread Rex Zhu
AMDGPU_FW_LOAD_DIRECT is used for bring up. Now it don't work any more. so remove the support. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 249 ++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

[PATCH 6/6] drm/amdgpu: Drop dead define in amdgpu.h

2018-09-29 Thread Rex Zhu
the struct was not in use any more. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 28 1 file changed, 28 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 7c44871..c21d9b9 100644

[PATCH 4/6] drm/amdgpu: Don't allocate memory for ucode when suspend

2018-09-29 Thread Rex Zhu
driver don't release the ucode memory when suspend. so don't need to allocate bo when resume back. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu

[PATCH 2/6] drm/amdgpu: Move gfx flag in_suspend to adev

2018-09-29 Thread Rex Zhu
Move in_suspend flag to adev from gfx, so can be used in other ip blocks, also keep consistent with gpu_in_reset flag. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h

  1   2   3   4   5   6   7   8   >