drm/amdkfd: fill in data for control stack header for gfx10
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: fill in data for control stack header for gfx10
From: Jonathan Kim <[email protected]>
The debugger requires the control stack header to be filled in to update_waves.
Signed-off-by Jonathan Kim <[email protected]>
Reviewed-by Felix Kuehling <[email protected]>
Signed-off-by Jonathan Kim <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h +25 -0
@@ -128,6 +128,31 @@ struct mqd_manager {uint32_t mqd_size; }; +struct mqd_user_context_save_area_header { +/* Byte offset from start of user context +* save area to the last saved top (lowest +* address) of control stack data. Must be +* 4 byte aligned. +*/ +uint32_t control_stack_offset; + +/* Byte size of the last saved control stack +* data. Must be 4 byte aligned. +*/ +uint32_t control_stack_size; + +/* Byte offset from start of user context save +* area to the last saved base (lowest address) +* of wave state data. Must be 4 byte aligned. +*/ +uint32_t wave_state_offset; + +/* Byte size of the last saved wave state data. +* Must be 4 byte aligned. +*/ +uint32_t wave_state_size; +}; +struct kfd_mem_obj *allocate_hiq_mqd (struct kfd_node *dev,struct queue_properties *q);
Signature · 1 line
2.42.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: support rlc auotload type set
From: Likun Gao <[email protected]>
Support to set fw_load_type=3 to use backdoor
rlc autoload.
Signed-off-by Likun Gao <[email protected]>
Reviewed-by Hawking Zhang <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2 -0
@@ -556,6 +556,8 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)default :if (!load_type)return AMDGPU_FW_LOAD_DIRECT ; +else if (load_type ==3 ) +return AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO ;else return AMDGPU_FW_LOAD_PSP ; }
Signature · 1 line
2.42.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/swsmu: add judgement for vcn jpeg dpm set
In reply to Alex DeucherFrom: Likun Gao <[email protected]>
Only enable VCN/JPEG dpm when VCN/JPEG PG flag was set when smu set dpm table.
Signed-off-by Likun Gao <[email protected]>
Reviewed-by Kenneth Feng <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 30 +++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +20 -10
@@ -751,6 +751,7 @@ static int smu_early_init(void *handle)static int smu_set_default_dpm_table (struct smu_context *smu) { +struct amdgpu_device *adev = smu->adev;struct smu_power_context *smu_power = &smu->smu_power;struct smu_power_gate *power_gate = &smu_power->power_gate;int vcn_gate, jpeg_gate;
@@ -759,25 +760,34 @@ static int smu_set_default_dpm_table(struct smu_context *smu)if (!smu->ppt_funcs->set_default_dpm_table)return 0 ; - vcn_gate =atomic_read (&power_gate->vcn_gated); - jpeg_gate =atomic_read (&power_gate->jpeg_gated); +if (adev->pg_flags &AMD_PG_SUPPORT_VCN ) + vcn_gate =atomic_read (&power_gate->vcn_gated); +if (adev->pg_flags &AMD_PG_SUPPORT_JPEG ) + jpeg_gate =atomic_read (&power_gate->jpeg_gated); - ret =smu_dpm_set_vcn_enable (smu, true); -if (ret) -return ret; +if (adev->pg_flags &AMD_PG_SUPPORT_VCN ) { + ret =smu_dpm_set_vcn_enable (smu, true); +if (ret) +return ret; + } - ret =smu_dpm_set_jpeg_enable (smu, true); -if (ret) - goto err_out; +if (adev->pg_flags &AMD_PG_SUPPORT_JPEG ) { + ret =smu_dpm_set_jpeg_enable (smu, true); +if (ret) + goto err_out; + } ret = smu->ppt_funcs->set_default_dpm_table (smu);if (ret)dev_err (smu->adev->dev,"Failed to setup default dpm clock tables!\n" ); -smu_dpm_set_jpeg_enable (smu, !jpeg_gate); +if (adev->pg_flags &AMD_PG_SUPPORT_JPEG ) +smu_dpm_set_jpeg_enable (smu, !jpeg_gate); err_out: -smu_dpm_set_vcn_enable (smu, !vcn_gate); +if (adev->pg_flags &AMD_PG_SUPPORT_VCN ) +smu_dpm_set_vcn_enable (smu, !vcn_gate); +return ret; }
Signature · 1 line
2.42.0
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: skip ucode bo reserve for RLC AUTOLOAD
In reply to Alex DeucherFrom: Likun Gao <[email protected]>
Skip ucode BO reservation for backdoor RLC autoload.
Signed-off-by Likun Gao <[email protected]>
Reviewed-by Hawking Zhang <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2 -1
@@ -1060,7 +1060,8 @@ static int amdgpu_ucode_patch_jt(struct amdgpu_firmware_info *ucode,int amdgpu_ucode_create_bo (struct amdgpu_device *adev) { -if (adev->firmware.load_type !=AMDGPU_FW_LOAD_DIRECT ) { +if ((adev->firmware.load_type !=AMDGPU_FW_LOAD_DIRECT ) && + (adev->firmware.load_type !=AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO )) { amdgpu_bo_create_kernel(adev, adev->firmware.fw_size, PAGE_SIZE, (amdgpu_sriov_vf(adev) || adev->debug_use_vram_fw_buf) ? AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
Signature · 1 line
2.42.0