AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Jesse Zhang <jesse.zhang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alexander.Deucher@amd.com,
	Christian Koenig <christian.koenig@amd.com>,
	jonathan.kim@amd.com, Tim.Huang@amd.com
Subject: Re: [PATCH 6/8] drm/amdkfd: remove dead code in the function svm_range_get_pte_flags
Date: Thu, 30 May 2024 16:53:05 -0400	[thread overview]
Message-ID: <25960c20-9de0-41cb-83b2-ec78437333dc@amd.com> (raw)
In-Reply-To: <20240530034950.2341520-1-jesse.zhang@amd.com>

On 2024-05-29 23:49, Jesse Zhang wrote:
> The varible uncached  set false, the condition uncached cannot be true.
> So remove the dead code, mapping flags will set the flag AMDGPU_VM_MTYPE_UC in else.
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>

Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> index 407636a68814..bd9c2921e0dc 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> @@ -1171,7 +1171,6 @@ svm_range_get_pte_flags(struct kfd_node *node,
>   	bool snoop = (domain != SVM_RANGE_VRAM_DOMAIN);
>   	bool coherent = flags & (KFD_IOCTL_SVM_FLAG_COHERENT | KFD_IOCTL_SVM_FLAG_EXT_COHERENT);
>   	bool ext_coherent = flags & KFD_IOCTL_SVM_FLAG_EXT_COHERENT;
> -	bool uncached = false; /*flags & KFD_IOCTL_SVM_FLAG_UNCACHED;*/
>   	unsigned int mtype_local;
>   
>   	if (domain == SVM_RANGE_VRAM_DOMAIN)
> @@ -1220,9 +1219,7 @@ svm_range_get_pte_flags(struct kfd_node *node,
>   			mtype_local = amdgpu_mtype_local == 1 ? AMDGPU_VM_MTYPE_NC :
>   				amdgpu_mtype_local == 2 ? AMDGPU_VM_MTYPE_CC : AMDGPU_VM_MTYPE_RW;
>   		snoop = true;
> -		if (uncached) {
> -			mapping_flags |= AMDGPU_VM_MTYPE_UC;
> -		} else if (domain == SVM_RANGE_VRAM_DOMAIN) {
> +		if (domain == SVM_RANGE_VRAM_DOMAIN) {
>   			/* local HBM region close to partition */
>   			if (bo_node->adev == node->adev &&
>   			    (!bo_node->xcp || !node->xcp || bo_node->xcp->mem_id == node->xcp->mem_id))

  reply	other threads:[~2024-05-30 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30  3:49 [PATCH 6/8] drm/amdkfd: remove dead code in the function svm_range_get_pte_flags Jesse Zhang
2024-05-30 20:53 ` Felix Kuehling [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-30  3:49 Jesse Zhang

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=25960c20-9de0-41cb-83b2-ec78437333dc@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Tim.Huang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=jesse.zhang@amd.com \
    --cc=jonathan.kim@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