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
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +++-
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
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/
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
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
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
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
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
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
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
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
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
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
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_
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
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
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
/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
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
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
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
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
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
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
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 - 100 of 798 matches
Mail list logo