AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Luben Tuikov <luben.tuikov@amd.com>,
	tom.stdenis@amd.com, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/amdgpu: return EINVAL instead of ENOENT in the VM code
Date: Wed, 22 Jan 2020 19:52:25 +0100	[thread overview]
Message-ID: <ce959351-cbb0-be90-a955-96c8c7a9e633@gmail.com> (raw)
In-Reply-To: <816d058c-cd19-a6c0-fe50-4fc84646c94a@amd.com>

Am 22.01.20 um 19:11 schrieb Luben Tuikov:
> Do we have user-space/libs rely on this errno in particular?

No, userspace can't even directly call this function.

The problem was rather that during debugging I called the function with 
fixed parameters and wondered for quite a while why it can't find the 
table in the tree structure.

Turned out that the table was perfectly fine, but my parameters had a 0 
to much and so was outside of the valid range.

Regards,
Christian.

>
> On 2020-01-22 9:03 a.m., Christian König wrote:
>> That we can't find a PD above the root is expected can only happen if
>> we try to update a larger range than actually managed by the VM.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 5cb182231f5d..8119f32ca94d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -1475,7 +1475,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
>>   			 * shift we should go up one level and check it again.
>>   			 */
>>   			if (!amdgpu_vm_pt_ancestor(&cursor))
>> -				return -ENOENT;
>> +				return -EINVAL;
>>   			continue;
>>   		}
>>   
>>

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

      reply	other threads:[~2020-01-22 18:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 14:03 [PATCH 1/2] drm/amdgpu: return EINVAL instead of ENOENT in the VM code Christian König
2020-01-22 14:03 ` [PATCH 2/2] drm/amdgpu: allow higher level PD invalidations Christian König
2020-01-22 22:22   ` Felix Kuehling
2020-01-22 18:11 ` [PATCH 1/2] drm/amdgpu: return EINVAL instead of ENOENT in the VM code Luben Tuikov
2020-01-22 18:52   ` Christian König [this message]

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=ce959351-cbb0-be90-a955-96c8c7a9e633@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=luben.tuikov@amd.com \
    --cc=tom.stdenis@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