<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, branch v5.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-03-02T23:36:43Z</updated>
<entry>
<title>drm/amdgpu: fix suspend/resume hang regression</title>
<updated>2022-03-02T23:36:43Z</updated>
<author>
<name>Qiang Yu</name>
<email>qiang.yu@amd.com</email>
</author>
<published>2022-03-01T06:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1ef17011c765495c876fa75435e59eecfdc1ee4'/>
<id>urn:sha1:f1ef17011c765495c876fa75435e59eecfdc1ee4</id>
<content type='text'>
Regression has been reported that suspend/resume may hang with
the previous vm ready check commit.

So bring back the evicted list check as a temp fix.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1922
Fixes: c1a66c3bc425 ("drm/amdgpu: check vm ready by amdgpu_vm-&gt;evicting flag")
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Qiang Yu &lt;qiang.yu@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: check vm ready by amdgpu_vm-&gt;evicting flag</title>
<updated>2022-02-23T21:31:06Z</updated>
<author>
<name>Qiang Yu</name>
<email>qiang.yu@amd.com</email>
</author>
<published>2022-02-21T09:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1a66c3bc425ff93774fb2f6eefa67b83170dd7e'/>
<id>urn:sha1:c1a66c3bc425ff93774fb2f6eefa67b83170dd7e</id>
<content type='text'>
Workstation application ANSA/META v21.1.4 get this error dmesg when
running CI test suite provided by ANSA/META:
[drm:amdgpu_gem_va_ioctl [amdgpu]] *ERROR* Couldn't update BO_VA (-16)

This is caused by:
1. create a 256MB buffer in invisible VRAM
2. CPU map the buffer and access it causes vm_fault and try to move
   it to visible VRAM
3. force visible VRAM space and traverse all VRAM bos to check if
   evicting this bo is valuable
4. when checking a VM bo (in invisible VRAM), amdgpu_vm_evictable()
   will set amdgpu_vm-&gt;evicting, but latter due to not in visible
   VRAM, won't really evict it so not add it to amdgpu_vm-&gt;evicted
5. before next CS to clear the amdgpu_vm-&gt;evicting, user VM ops
   ioctl will pass amdgpu_vm_ready() (check amdgpu_vm-&gt;evicted)
   but fail in amdgpu_vm_bo_update_mapping() (check
   amdgpu_vm-&gt;evicting) and get this error log

This error won't affect functionality as next CS will finish the
waiting VM ops. But we'd better clear the error log by checking
the amdgpu_vm-&gt;evicting flag in amdgpu_vm_ready() to stop calling
amdgpu_vm_bo_update_mapping() later.

Another reason is amdgpu_vm-&gt;evicted list holds all BOs (both
user buffer and page table), but only page table BOs' eviction
prevent VM ops. amdgpu_vm-&gt;evicting flag is set only for page
table BOs, so we should use evicting flag instead of evicted list
in amdgpu_vm_ready().

The side effect of this change is: previously blocked VM op (user
buffer in "evicted" list but no page table in it) gets done
immediately.

v2: update commit comments.

Acked-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Qiang Yu &lt;qiang.yu@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'amd-drm-next-5.17-2021-12-16' of https://gitlab.freedesktop.org/agd5f/linux into drm-next</title>
<updated>2021-12-23T01:55:28Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2021-12-23T01:55:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b06103b5325364e0b9944024db41b400b9028df9'/>
<id>urn:sha1:b06103b5325364e0b9944024db41b400b9028df9</id>
<content type='text'>
amdgpu:
- Add some display debugfs entries
- RAS fixes
- SR-IOV fixes
- W=1 fixes
- Documentation fixes
- IH timestamp fix
- Misc power fixes
- IP discovery fixes
- Large driver documentation updates
- Multi-GPU memory use reductions
- Misc display fixes and cleanups
- Add new SMU debug option

amdkfd:
- SVM fixes

radeon:
- Fix typo in comment

From: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20211216202731.5900-1-alexander.deucher@amd.com
</content>
</entry>
<entry>
<title>amdgpu: fix some comment typos</title>
<updated>2021-12-14T21:10:58Z</updated>
<author>
<name>Yann Dirson</name>
<email>ydirson@free.fr</email>
</author>
<published>2021-12-13T23:30:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=326db0dc00e57432b689349b4da3e86c90d5d61a'/>
<id>urn:sha1:326db0dc00e57432b689349b4da3e86c90d5d61a</id>
<content type='text'>
Signed-off-by: Yann Dirson &lt;ydirson@free.fr&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2021-10-25T13:27:56Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-10-25T13:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=736638246ec215f999dd132334d2d7c49bcb85c7'/>
<id>urn:sha1:736638246ec215f999dd132334d2d7c49bcb85c7</id>
<content type='text'>
drm-misc-next hasn't been updated in a while and I need a post -rc2
state to merge some vc4 patches.

Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: use new iterator in amdgpu_vm_prt_fini</title>
<updated>2021-10-20T12:06:35Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-09-22T12:14:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a0a8e75948117f37a1f849c44d026d0775ca59a7'/>
<id>urn:sha1:a0a8e75948117f37a1f849c44d026d0775ca59a7</id>
<content type='text'>
No need to actually allocate an array of fences here.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20211005113742.1101-14-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/amdgpu: use adev_to_drm for consistency when accessing drm_device</title>
<updated>2021-10-08T17:22:13Z</updated>
<author>
<name>Guchun Chen</name>
<email>guchun.chen@amd.com</email>
</author>
<published>2021-10-08T17:21:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c58a863b1ccf638feb52cf3d9c756a9f578a57ae'/>
<id>urn:sha1:c58a863b1ccf638feb52cf3d9c756a9f578a57ae</id>
<content type='text'>
adev_to_drm is used everywhere, so improve recent changes
when accessing drm_device pointer from amdgpu_device.

Signed-off-by: Guchun Chen &lt;guchun.chen@amd.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Put drm_dev_enter/exit outside hot codepath</title>
<updated>2021-09-23T19:17:29Z</updated>
<author>
<name>xinhui pan</name>
<email>xinhui.pan@amd.com</email>
</author>
<published>2021-09-15T01:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2fe31cf648156331991333c1d87346321cab056'/>
<id>urn:sha1:b2fe31cf648156331991333c1d87346321cab056</id>
<content type='text'>
We hit soft hang while doing memory pressure test on one numa system.
After a qucik look, this is because kfd invalid/valid userptr memory
frequently with process_info lock hold.
Looks like update page table mapping use too much cpu time.

perf top says below,
75.81%  [kernel]       [k] __srcu_read_unlock
 6.19%  [amdgpu]       [k] amdgpu_gmc_set_pte_pde
 3.56%  [kernel]       [k] __srcu_read_lock
 2.20%  [amdgpu]       [k] amdgpu_vm_cpu_update
 2.20%  [kernel]       [k] __sg_page_iter_dma_next
 2.15%  [drm]          [k] drm_dev_enter
 1.70%  [drm]          [k] drm_prime_sg_to_dma_addr_array
 1.18%  [kernel]       [k] __sg_alloc_table_from_pages
 1.09%  [drm]          [k] drm_dev_exit

So move drm_dev_enter/exit outside gmc code, instead let caller do it.
They are gart_unbind, gart_map, vm_clear_bo, vm_update_pdes and
gmc_init_pdb0. vm_bo_update_mapping already calls it.

Signed-off-by: xinhui pan &lt;xinhui.pan@amd.com&gt;
Reviewed-and-tested-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: rename amdgpu_bo_get_preferred_pin_domain</title>
<updated>2021-08-25T22:15:17Z</updated>
<author>
<name>Yifan Zhang</name>
<email>yifan1.zhang@amd.com</email>
</author>
<published>2021-08-25T09:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d035f84d834cd09d0c083f4d4cb3e46c2ae56cb2'/>
<id>urn:sha1:d035f84d834cd09d0c083f4d4cb3e46c2ae56cb2</id>
<content type='text'>
amdgpu_bo_get_preferred_pin_domain is used for page tables
creation, which is not involved with page pinning. And it is used in
more cases than display scanout, modify its documentation as well.

Signed-off-by: Yifan Zhang &lt;yifan1.zhang@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: check access permisson to restore retry fault</title>
<updated>2021-08-24T19:36:50Z</updated>
<author>
<name>Philip Yang</name>
<email>Philip.Yang@amd.com</email>
</author>
<published>2021-08-15T18:42:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff891a2e6431f79c239ab0c5bc05834c0235821c'/>
<id>urn:sha1:ff891a2e6431f79c239ab0c5bc05834c0235821c</id>
<content type='text'>
Check range access permission to restore GPU retry fault, if GPU retry
fault on address which belongs to VMA, and VMA has no read or write
permission requested by GPU, failed to restore the address. The vm fault
event will pass back to user space.

Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
