From: Yong Zhao <Yong.Zhao-5C7GfCeVMHo@public.gmane.org> To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Jay.Cornwall-5C7GfCeVMHo@public.gmane.org Cc: Yong Zhao <Yong.Zhao-5C7GfCeVMHo@public.gmane.org> Subject: [PATCH 3/3] drm/amdkfd: Fix a bug when calculating save_area_used_size Date: Mon, 11 Nov 2019 18:25:21 -0500 [thread overview] Message-ID: <20191111232521.10528-3-Yong.Zhao@amd.com> (raw) In-Reply-To: <20191111232521.10528-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org> workgroup context data writes from m->cp_hqd_cntl_stack_size, so we should deduct it when calculating the used size. Change-Id: I5252e25662c3b8221f451c39115bf084d1911eae Signed-off-by: Yong Zhao <Yong.Zhao@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c index d3380c5bdbde..3a2ee1f01aae 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c @@ -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; -- 2.17.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Yong Zhao <Yong.Zhao@amd.com> To: amd-gfx@lists.freedesktop.org, Jay.Cornwall@amd.com Cc: Yong Zhao <Yong.Zhao@amd.com> Subject: [PATCH 3/3] drm/amdkfd: Fix a bug when calculating save_area_used_size Date: Mon, 11 Nov 2019 18:25:21 -0500 [thread overview] Message-ID: <20191111232521.10528-3-Yong.Zhao@amd.com> (raw) Message-ID: <20191111232521.AFToUStbu6_LmUbieNmLUFmfohJriNfF4xVKEOx75cM@z> (raw) In-Reply-To: <20191111232521.10528-1-Yong.Zhao@amd.com> workgroup context data writes from m->cp_hqd_cntl_stack_size, so we should deduct it when calculating the used size. Change-Id: I5252e25662c3b8221f451c39115bf084d1911eae Signed-off-by: Yong Zhao <Yong.Zhao@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c index d3380c5bdbde..3a2ee1f01aae 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c @@ -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; -- 2.17.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-11-11 23:25 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-11 23:25 [PATCH 1/3] drm/amdkfd: Implement queue priority controls for gfx10 Yong Zhao 2019-11-11 23:25 ` Yong Zhao [not found] ` <20191111232521.10528-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org> 2019-11-11 23:25 ` [PATCH 2/3] drm/amdkfd: Update get_wave_state() for GFX10 Yong Zhao 2019-11-11 23:25 ` Yong Zhao [not found] ` <20191111232521.10528-2-Yong.Zhao-5C7GfCeVMHo@public.gmane.org> 2019-11-12 21:52 ` Felix Kuehling 2019-11-12 21:52 ` Felix Kuehling 2019-11-11 23:25 ` Yong Zhao [this message] 2019-11-11 23:25 ` [PATCH 3/3] drm/amdkfd: Fix a bug when calculating save_area_used_size Yong Zhao [not found] ` <20191111232521.10528-3-Yong.Zhao-5C7GfCeVMHo@public.gmane.org> 2019-11-12 21:14 ` Zhao, Yong 2019-11-12 21:14 ` Zhao, Yong 2019-11-12 21:43 ` Felix Kuehling 2019-11-12 21:43 ` Felix Kuehling
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191111232521.10528-3-Yong.Zhao@amd.com \ --to=yong.zhao-5c7gfcevmho@public.gmane.org \ --cc=Jay.Cornwall-5C7GfCeVMHo@public.gmane.org \ --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.