[PATCH 1/3] drm/amdgpu: add psp bootloader command list
Junwei Zhang
Jerry.Zhang at amd.com
Fri Jul 28 09:11:17 UTC 2017
Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 10 ++++++++++
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
index 538fa9d..3776186 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
@@ -53,6 +53,16 @@ struct psp_ring
uint32_t ring_size;
};
+enum psp_bootloader_command_list
+{
+ PSP_BL__LOAD_SYSDRV = 0x10000,
+ PSP_BL__LOAD_SOSDRV = 0x20000,
+ PSP_BL__NO_ECC = 0x30000,
+ PSP_BL__PARTIAL_ECC = 0x30001,
+ PSP_BL__FULL_ECC = 0x30002,
+ PSP_BL__DEFAULT_ECC = 0x30003,
+};
+
struct psp_context
{
struct amdgpu_device *adev;
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index 2718e86..f93a66e 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -190,7 +190,7 @@ int psp_v3_1_bootloader_load_sysdrv(struct psp_context *psp)
/* Provide the sys driver to bootrom */
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_36,
(uint32_t)(psp->fw_pri_mc_addr >> 20));
- psp_gfxdrv_command_reg = 1 << 16;
+ psp_gfxdrv_command_reg = PSP_BL__LOAD_SYSDRV;
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_35,
psp_gfxdrv_command_reg);
@@ -231,7 +231,7 @@ int psp_v3_1_bootloader_load_sos(struct psp_context *psp)
/* Provide the PSP secure OS to bootrom */
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_36,
(uint32_t)(psp->fw_pri_mc_addr >> 20));
- psp_gfxdrv_command_reg = 2 << 16;
+ psp_gfxdrv_command_reg = PSP_BL__LOAD_SOSDRV;
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_35,
psp_gfxdrv_command_reg);
--
1.9.1
More information about the amd-gfx
mailing list