From: Felix Kuehling <felix.kuehling@amd.com>
To: "Thomas Zimmermann" <tzimmermann@suse.de>,
"Christian König" <christian.koenig@amd.com>,
alexander.deucher@amd.com, airlied@linux.ie, daniel@ffwll.ch,
bskeggs@redhat.com, ray.huang@amd.com,
linux-graphics-maintainer@vmware.com, sroland@vmware.com,
zackr@vmware.com, shashank.sharma@amd.com, sam@ravnborg.org,
emil.velikov@collabora.com, nirmoy.das@amd.com
Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org
Subject: Re: [Nouveau] [PATCH 3/8] drm/amdgpu: Implement mmap as GEM object function
Date: Wed, 14 Apr 2021 04:37:26 -0400 [thread overview]
Message-ID: <f2e3ae0d-083c-c919-74bd-8fedbfad7718@amd.com> (raw)
In-Reply-To: <63c90815-c9d8-68df-daa1-c165215a6b7c@suse.de>
Am 2021-04-14 um 3:44 a.m. schrieb Thomas Zimmermann:
> Hi
>
> Am 07.04.21 um 21:49 schrieb Felix Kuehling:
>> On 2021-04-07 3:34 p.m., Felix Kuehling wrote:
>>> On 2021-04-07 7:25 a.m., Christian König wrote:
>>>>>>>> + /*
>>>>>>>> + * Don't verify access for KFD BOs. They
> don't have a GEM
>>>>>>>> + * object associated with them.
>>>>>>>> + */
>>>>>>>> + if (bo->kfd_bo)
>>>>>>>> + goto out;
>>>>>>> Who does the access verification now?
>>>>>> This is somewhat confusing.
>>>>>>
>>>>>> I took this check as-is, including the comment, from amdgpu's
>>>>>> verify_access function. The verify_access function was called by
>>>>>> ttm_bo_mmap. It returned 0 and ttm_bo_mmap did the mapping.
>>>>> This is probably a left-over from when we mapped BOs using /dev/kfd.
> We
>>>>> changed this to use /dev/dri/renderD* a long time ago to fix CPU
>>>>> mapping
>>>>> invalidations on memory evictions. I think we can let GEM do the
>>>>> access
>>>>> check.
>>>>
>>>> Ok, good to know.
>>>>
>>>> Thomas can you remove the extra handling in a separate prerequisite
>>>> patch?
>>>>
>>>> If anybody then bisects to this patch we at least know what to do
>>>> to get it working again.
>>>
>>> FWIW, I ran KFDTest test with this shortcut removed on current
>>> amd-staging-drm-next + my HMM patch series, and it didn't seem to
>>> cause any issues.
>>
>> Wait, I celebrated too soon. I was running the wrong kernel. I do see
>> some failures where access is being denied. I need to do more debugging
>
>> to figure out what's causing that.
>
> Any news here? I saw the patch at [1], which removes the kfd_bo test.
> Can I assume that the series addresses the issue?
Yes, that series fixes the problem. I need to pester more people to
review it.
Regards,
Felix
>
> Best regards
> Thomas
>
> [1] https://patchwork.freedesktop.org/patch/427516/?series=88822&rev=1
>
>>
>> Regards,
>> Felix
>>
>>
>>>
>>> Regards,
>>> Felix
>>>
>>>
>>>>
>>>> Regards,
>>>> Christian.
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2021-04-14 8:37 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 9:08 [Nouveau] [PATCH 0/8] drm: Clean up mmap for TTM-based GEM drivers Thomas Zimmermann
2021-04-06 9:08 ` [Nouveau] [PATCH 1/8] drm/ttm: Don't override vm_ops callbacks, if set Thomas Zimmermann
2021-04-06 9:08 ` [Nouveau] [PATCH 2/8] drm/amdgpu: Remove unused function amdgpu_bo_fbdev_mmap() Thomas Zimmermann
2021-04-06 9:43 ` Christian König
2021-04-06 10:21 ` Thomas Zimmermann
2021-04-06 9:08 ` [Nouveau] [PATCH 3/8] drm/amdgpu: Implement mmap as GEM object function Thomas Zimmermann
2021-04-06 9:35 ` Christian König
2021-04-06 10:38 ` Thomas Zimmermann
2021-04-06 10:56 ` Christian König
2021-04-06 11:55 ` Thomas Zimmermann
2021-04-06 12:42 ` Christian König
2021-04-06 12:52 ` Thomas Zimmermann
2021-04-06 13:04 ` Christian König
2021-04-06 15:22 ` Felix Kuehling
2021-04-06 15:27 ` Felix Kuehling
2021-04-07 11:25 ` Christian König
2021-04-07 19:34 ` Felix Kuehling
2021-04-07 19:49 ` Felix Kuehling
2021-04-08 4:45 ` Thomas Zimmermann
2021-04-14 7:44 ` Thomas Zimmermann
2021-04-14 8:37 ` Felix Kuehling [this message]
2021-04-06 9:08 ` [Nouveau] [PATCH 4/8] drm/radeon: " Thomas Zimmermann
2021-04-06 9:38 ` Christian König
2021-04-06 14:18 ` Alex Deucher
2021-04-06 9:09 ` [Nouveau] [PATCH 5/8] drm/nouveau: " Thomas Zimmermann
2021-04-06 9:09 ` [Nouveau] [PATCH 6/8] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver Thomas Zimmermann
2021-04-07 16:52 ` Zack Rusin
2021-04-06 9:09 ` [Nouveau] [PATCH 7/8] drm/vmwgfx: Inline vmw_verify_access() Thomas Zimmermann
2021-04-07 16:52 ` Zack Rusin
2021-04-06 9:09 ` [Nouveau] [PATCH 8/8] drm/ttm: Remove ttm_bo_mmap() and friends Thomas Zimmermann
2021-04-06 9:40 ` Christian König
2021-04-08 11:19 ` [Nouveau] [PATCH 0/8] drm: Clean up mmap for TTM-based GEM drivers Daniel Vetter
2021-04-08 11:38 ` Thomas Zimmermann
2021-04-08 11:42 ` Daniel Vetter
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=f2e3ae0d-083c-c919-74bd-8fedbfad7718@amd.com \
--to=felix.kuehling@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=nirmoy.das@amd.com \
--cc=nouveau@lists.freedesktop.org \
--cc=ray.huang@amd.com \
--cc=sam@ravnborg.org \
--cc=shashank.sharma@amd.com \
--cc=sroland@vmware.com \
--cc=tzimmermann@suse.de \
--cc=zackr@vmware.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;
as well as URLs for NNTP newsgroup(s).