AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Yintian Tao <yttao@amd.com>, Alexander.Deucher@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: miss PRT case when bo update
Date: Mon, 16 Mar 2020 10:38:23 +0100	[thread overview]
Message-ID: <920f9784-1259-bad9-502c-885f7da4748b@amd.com> (raw)
In-Reply-To: <20200316075252.29897-1-yttao@amd.com>

Am 16.03.20 um 08:52 schrieb Yintian Tao:
> Originally, only the PTE valid is taken in consider.
> The PRT case is missied when bo update which raise problem.
> We need add condition for PRT case.

Good catch, just one style nit pick below.

>
> Signed-off-by: Yintian Tao <yttao@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 73398831196f..7a3e4514a00c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1446,7 +1446,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
>   		uint64_t incr, entry_end, pe_start;
>   		struct amdgpu_bo *pt;
>   
> -		if (flags & AMDGPU_PTE_VALID) {
> +		if (flags & (AMDGPU_PTE_VALID | AMDGPU_PTE_PRT)) {
>   			/* make sure that the page tables covering the
>   			 * address range are actually allocated
>   			 */
> @@ -1605,7 +1605,6 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>   
>   	if (flags & AMDGPU_PTE_VALID) {
>   		struct amdgpu_bo *root = vm->root.base.bo;
> -
>   		if (!dma_fence_is_signaled(vm->last_direct))

Please keep this empty line, it is required by the coding style guides.

With that fixed the patch is Reviewed-by: Christian König 
<christian.koenig@amd.com>.

Regards,
Christian.

>   			amdgpu_bo_fence(root, vm->last_direct, true);
>   
> @@ -1718,7 +1717,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,
>   					AMDGPU_GPU_PAGES_IN_CPU_PAGE;
>   			}
>   
> -		} else if (flags & AMDGPU_PTE_VALID) {
> +		} else if (flags & (AMDGPU_PTE_VALID | AMDGPU_PTE_PRT)) {
>   			addr += bo_adev->vm_manager.vram_base_offset;
>   			addr += pfn << PAGE_SHIFT;
>   		}

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-03-16  9:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  7:52 [PATCH] drm/amdgpu: miss PRT case when bo update Yintian Tao
2020-03-16  9:38 ` Christian König [this message]
2020-03-16  9:50   ` Tao, Yintian
  -- strict thread matches above, loose matches on Subject: below --
2020-03-16 10:00 Yintian Tao
2020-03-16 10:08 Yintian Tao
2020-03-16 12:17 ` Christian König

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=920f9784-1259-bad9-502c-885f7da4748b@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=yttao@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox