From: "Christian König" <christian.koenig@amd.com>
To: "Alex Deucher" <alexdeucher@gmail.com>,
"Michel Dänzer" <michel@daenzer.net>
Cc: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible
Date: Wed, 8 May 2024 19:25:35 +0200 [thread overview]
Message-ID: <d35c5f43-0c88-4437-b0fa-1e303ba41c96@amd.com> (raw)
In-Reply-To: <CADnq5_OUpzEi=gjbkaMg2ZueEbcvPB77v2W1dHiU=TE2o_C17Q@mail.gmail.com>
Am 08.05.24 um 15:45 schrieb Alex Deucher:
> On Wed, May 8, 2024 at 9:25 AM Michel Dänzer <michel@daenzer.net> wrote:
>> From: Michel Dänzer <mdaenzer@redhat.com>
>>
>> It incorrectly claimed a resource isn't CPU visible if it's located at
>> the very end of CPU visible VRAM.
>>
>> Fixes: a6ff969fe9 ("drm/amdgpu: fix visible VRAM handling during faults")
>> Reported-and-Tested-by: Jeremy Day <jsday@noreason.ca>
>> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3343
CC: stable@vger.kernel.org
Christian.
> and applied. Thanks!
>
> Alex
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>> index 109fe557a02b..29c197c00018 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>> @@ -427,7 +427,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev,
>>
>> amdgpu_res_first(res, 0, res->size, &cursor);
>> while (cursor.remaining) {
>> - if ((cursor.start + cursor.size) >= adev->gmc.visible_vram_size)
>> + if ((cursor.start + cursor.size) > adev->gmc.visible_vram_size)
>> return false;
>> amdgpu_res_next(&cursor, cursor.size);
>> }
>> --
>> 2.43.0
>>
prev parent reply other threads:[~2024-05-08 17:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 13:19 [PATCH] drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible Michel Dänzer
2024-05-08 13:45 ` Alex Deucher
2024-05-08 17:25 ` 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=d35c5f43-0c88-4437-b0fa-1e303ba41c96@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=michel@daenzer.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).