summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2017-03-21 18:36:57 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-04-28 16:37:58 -0400
commitbe70bbda3fb9a1b876ed80e2ebc292203eb0ffec (patch)
tree83febc7694ed4883345b6de9efad1e7dc1fac6f4 /drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
parentf5cfef98f736f9aa42e9ad41e67b5abd96b77835 (diff)
downloadtalos-obmc-linux-be70bbda3fb9a1b876ed80e2ebc292203eb0ffec.tar.gz
talos-obmc-linux-be70bbda3fb9a1b876ed80e2ebc292203eb0ffec.zip
drm/amdgpu: split psp ring init function
Rework in order to properly support suspend. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_v3_1.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/psp_v3_1.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index aae6b6540161..d351583785e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -268,7 +268,6 @@ int psp_v3_1_prep_cmd_buf(struct amdgpu_firmware_info *ucode, struct psp_gfx_cmd
int psp_v3_1_ring_init(struct psp_context *psp, enum psp_ring_type ring_type)
{
int ret = 0;
- unsigned int psp_ring_reg = 0;
struct psp_ring *ring;
struct amdgpu_device *adev = psp->adev;
@@ -288,6 +287,16 @@ int psp_v3_1_ring_init(struct psp_context *psp, enum psp_ring_type ring_type)
return ret;
}
+ return 0;
+}
+
+int psp_v3_1_ring_create(struct psp_context *psp, enum psp_ring_type ring_type)
+{
+ int ret = 0;
+ unsigned int psp_ring_reg = 0;
+ struct psp_ring *ring = &psp->km_ring;
+ struct amdgpu_device *adev = psp->adev;
+
/* Write low address of the ring to C2PMSG_69 */
psp_ring_reg = lower_32_bits(ring->ring_mem_mc_addr);
WREG32(SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_69), psp_ring_reg);
OpenPOWER on IntegriCloud