mirror of https://gitee.com/openkylin/linux.git
drm/amdkfd: Fix a bug when calculating save_area_used_size
workgroup context data writes from m->cp_hqd_cntl_stack_size, so we should deduct it when calculating the used size. Signed-off-by: Yong Zhao <Yong.Zhao@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
681a9167dd
commit
bc05b0ec15
|
@ -302,7 +302,8 @@ static int get_wave_state(struct mqd_manager *mm, void *mqd,
|
|||
|
||||
*ctl_stack_used_size = m->cp_hqd_cntl_stack_size -
|
||||
m->cp_hqd_cntl_stack_offset;
|
||||
*save_area_used_size = m->cp_hqd_wg_state_offset;
|
||||
*save_area_used_size = m->cp_hqd_wg_state_offset -
|
||||
m->cp_hqd_cntl_stack_size;
|
||||
|
||||
if (copy_to_user(ctl_stack, mqd_ctl_stack, m->cp_hqd_cntl_stack_size))
|
||||
return -EFAULT;
|
||||
|
|
Loading…
Reference in New Issue