From: "Kuehling, Felix" <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
<ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 2/8] drm/amdgpu: cleanup VM dw estimation a bit
Date: Mon, 4 Feb 2019 20:20:32 +0000 [thread overview]
Message-ID: <19fe9751-13ff-002e-7459-16b8b8668a2d@amd.com> (raw)
In-Reply-To: <20190204124256.1765-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
On 2019-02-04 7:42 a.m., Christian König wrote:
> No functional change.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Minor indentation issue inline. With that fixed, this patch is
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 44950f3b8801..69b0bee0661e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1804,13 +1804,12 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
> /*
> * reserve space for two commands every (1 << BLOCK_SIZE)
> * entries or 2k dwords (whatever is smaller)
> - *
> - * The second command is for the shadow pagetables.
> */
> + ncmds = ((nptes >> min(adev->vm_manager.block_size, 11u)) + 1);
> +
> + /* The second command is for the shadow pagetables. */
Using space instead of TABs.
> if (vm->root.base.bo->shadow)
> - ncmds = ((nptes >> min(adev->vm_manager.block_size, 11u)) + 1) * 2;
> - else
> - ncmds = ((nptes >> min(adev->vm_manager.block_size, 11u)) + 1);
> + ncmds *= 2;
>
> /* padding, etc. */
> ndw = 64;
> @@ -1829,10 +1828,11 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
> ndw += ncmds * 10;
>
> /* extra commands for begin/end fragments */
> + ncmds = 2 * adev->vm_manager.fragment_size;
> if (vm->root.base.bo->shadow)
> - ndw += 2 * 10 * adev->vm_manager.fragment_size * 2;
> - else
> - ndw += 2 * 10 * adev->vm_manager.fragment_size;
> + ncmds *= 2;
> +
> + ndw += 10 * ncmds;
>
> params.func = amdgpu_vm_do_set_ptes;
> }
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-02-04 20:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 12:42 [PATCH 1/8] drm/amdgpu: fix waiting for BO moves with CPU based PD/PT updates Christian König
[not found] ` <20190204124256.1765-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-04 12:42 ` [PATCH 2/8] drm/amdgpu: cleanup VM dw estimation a bit Christian König
[not found] ` <20190204124256.1765-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-04 20:20 ` Kuehling, Felix [this message]
2019-02-04 12:42 ` [PATCH 3/8] drm/amdgpu: clear PDs/PTs only after initializing them Christian König
2019-02-04 12:42 ` [PATCH 4/8] drm/amdgpu: rework shadow handling during PD clear Christian König
2019-02-04 12:42 ` [PATCH 5/8] drm/amdgpu: let amdgpu_vm_clear_bo figure out ats status Christian König
2019-02-04 12:42 ` [PATCH 6/8] drm/amdgpu: allocate VM PDs/PTs on demand Christian König
[not found] ` <20190204124256.1765-6-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-04 20:17 ` Kuehling, Felix
[not found] ` <d9b5d989-cf1f-03ec-70d4-0baa8dc451c5-5C7GfCeVMHo@public.gmane.org>
2019-02-05 0:33 ` Kuehling, Felix
[not found] ` <976d2bd1-34b9-405f-06a8-5dbc8c481699-5C7GfCeVMHo@public.gmane.org>
2019-02-05 11:40 ` Christian König
2019-02-05 11:37 ` Christian König
[not found] ` <d2b729fb-e2b0-1b46-3709-e50b4e2ec7c7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-02-05 15:20 ` Kuehling, Felix
[not found] ` <DM5PR12MB1707CB26A54B5AF86FB1027C926E0-2J9CzHegvk9TCtO+SvGBKwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-05 15:39 ` Christian König
[not found] ` <2feffc18-277e-b3b9-8991-2afae9558bdf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-02-05 15:49 ` Kuehling, Felix
[not found] ` <DM5PR12MB1707DABD8376BC395C0558D4926E0-2J9CzHegvk9TCtO+SvGBKwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-05 16:00 ` Koenig, Christian
[not found] ` <7bf939a3-cfe6-9559-8479-4c69368d369a-5C7GfCeVMHo@public.gmane.org>
2019-02-05 23:51 ` Kuehling, Felix
[not found] ` <1a54fcea-e90b-159d-23b8-239e0d66a45d-5C7GfCeVMHo@public.gmane.org>
2019-02-06 9:06 ` Koenig, Christian
[not found] ` <10356d12-8a73-cc2d-359c-7e10275c050e-5C7GfCeVMHo@public.gmane.org>
2019-02-07 19:50 ` Kuehling, Felix
2019-02-12 15:26 ` Kuehling, Felix
2019-02-04 12:42 ` [PATCH 7/8] drm/amdgpu: free " Christian König
2019-02-04 12:42 ` [PATCH 8/8] drm/amdgpu: drop the huge page flag Christian König
2019-02-04 20:19 ` [PATCH 1/8] drm/amdgpu: fix waiting for BO moves with CPU based PD/PT updates Kuehling, Felix
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=19fe9751-13ff-002e-7459-16b8b8668a2d@amd.com \
--to=felix.kuehling-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@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: link
Be 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.