<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/ttm, branch v5.19</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.19</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.19'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-06-14T09:15:19+00:00</updated>
<entry>
<title>drm/ttm: fix bulk move handling v2</title>
<updated>2022-06-14T09:15:19+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2022-06-13T07:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f9cd1ea10d307cad221d6693b648a8956e812b0'/>
<id>urn:sha1:0f9cd1ea10d307cad221d6693b648a8956e812b0</id>
<content type='text'>
The resource must be on the LRU before ttm_lru_bulk_move_add() is called
and we need to check if the BO is pinned or not before adding it.

Additional to that we missed taking the LRU spinlock in ttm_bo_unpin().

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Arunpravin Paneer Selvam &lt;Arunpravin.PaneerSelvam@amd.com&gt;
Acked-by: Luben Tuikov &lt;luben.tuikov@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220613080816.4965-1-christian.koenig@amd.com
Fixes: fee2ede15542 ("drm/ttm: rework bulk move handling v5")
</content>
</entry>
<entry>
<title>drm/ttm: fix missing NULL check in ttm_device_swapout</title>
<updated>2022-06-10T11:20:21+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2022-06-03T10:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=81b0d0e4f811553cbe2d58c8a495c124fb626432'/>
<id>urn:sha1:81b0d0e4f811553cbe2d58c8a495c124fb626432</id>
<content type='text'>
Resources about to be destructed are not tied to BOs any more.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Fixes: 6a9b02899402 ("drm/ttm: move the LRU into resource handling v4")
Link: https://patchwork.freedesktop.org/patch/msgid/20220603104604.456991-1-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>LoongArch: Add writecombine support for drm</title>
<updated>2022-06-03T12:09:27+00:00</updated>
<author>
<name>Huacai Chen</name>
<email>chenhuacai@loongson.cn</email>
</author>
<published>2022-05-31T10:04:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=439057ec3b748b1ff61855d09859f369493e22d8'/>
<id>urn:sha1:439057ec3b748b1ff61855d09859f369493e22d8</id>
<content type='text'>
LoongArch maintains cache coherency in hardware, but its WUC attribute
(Weak-ordered UnCached, which is similar to WC) is out of the scope of
cache coherency machanism. This means WUC can only used for write-only
memory regions.

Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: WANG Xuerui &lt;git@xen0n.name&gt;
Reviewed-by: Jiaxun Yang &lt;jiaxun.yang@flygoat.com&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>Merge tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2022-05-26T19:32:41+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-05-26T19:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98931dd95fd489fcbfa97da563505a6f071d7c77'/>
<id>urn:sha1:98931dd95fd489fcbfa97da563505a6f071d7c77</id>
<content type='text'>
Pull MM updates from Andrew Morton:
 "Almost all of MM here. A few things are still getting finished off,
  reviewed, etc.

   - Yang Shi has improved the behaviour of khugepaged collapsing of
     readonly file-backed transparent hugepages.

   - Johannes Weiner has arranged for zswap memory use to be tracked and
     managed on a per-cgroup basis.

   - Munchun Song adds a /proc knob ("hugetlb_optimize_vmemmap") for
     runtime enablement of the recent huge page vmemmap optimization
     feature.

   - Baolin Wang contributes a series to fix some issues around hugetlb
     pagetable invalidation.

   - Zhenwei Pi has fixed some interactions between hwpoisoned pages and
     virtualization.

   - Tong Tiangen has enabled the use of the presently x86-only
     page_table_check debugging feature on arm64 and riscv.

   - David Vernet has done some fixup work on the memcg selftests.

   - Peter Xu has taught userfaultfd to handle write protection faults
     against shmem- and hugetlbfs-backed files.

   - More DAMON development from SeongJae Park - adding online tuning of
     the feature and support for monitoring of fixed virtual address
     ranges. Also easier discovery of which monitoring operations are
     available.

   - Nadav Amit has done some optimization of TLB flushing during
     mprotect().

   - Neil Brown continues to labor away at improving our swap-over-NFS
     support.

   - David Hildenbrand has some fixes to anon page COWing versus
     get_user_pages().

   - Peng Liu fixed some errors in the core hugetlb code.

   - Joao Martins has reduced the amount of memory consumed by
     device-dax's compound devmaps.

   - Some cleanups of the arch-specific pagemap code from Anshuman
     Khandual.

   - Muchun Song has found and fixed some errors in the TLB flushing of
     transparent hugepages.

   - Roman Gushchin has done more work on the memcg selftests.

  ... and, of course, many smaller fixes and cleanups. Notably, the
  customary million cleanup serieses from Miaohe Lin"

* tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (381 commits)
  mm: kfence: use PAGE_ALIGNED helper
  selftests: vm: add the "settings" file with timeout variable
  selftests: vm: add "test_hmm.sh" to TEST_FILES
  selftests: vm: check numa_available() before operating "merge_across_nodes" in ksm_tests
  selftests: vm: add migration to the .gitignore
  selftests/vm/pkeys: fix typo in comment
  ksm: fix typo in comment
  selftests: vm: add process_mrelease tests
  Revert "mm/vmscan: never demote for memcg reclaim"
  mm/kfence: print disabling or re-enabling message
  include/trace/events/percpu.h: cleanup for "percpu: improve percpu_alloc_percpu event trace"
  include/trace/events/mmflags.h: cleanup for "tracing: incorrect gfp_t conversion"
  mm: fix a potential infinite loop in start_isolate_page_range()
  MAINTAINERS: add Muchun as co-maintainer for HugeTLB
  zram: fix Kconfig dependency warning
  mm/shmem: fix shmem folio swapoff hang
  cgroup: fix an error handling path in alloc_pagecache_max_30M()
  mm: damon: use HPAGE_PMD_SIZE
  tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
  nodemask.h: fix compilation error with GCC12
  ...
</content>
</entry>
<entry>
<title>mmap locking API: fix missed mmap_sem references in comments</title>
<updated>2022-05-13T14:20:07+00:00</updated>
<author>
<name>Florian Rommel</name>
<email>mail@florommel.de</email>
</author>
<published>2022-05-10T01:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b4494896cb379b0304ba8320589f2ffd08a7b31'/>
<id>urn:sha1:5b4494896cb379b0304ba8320589f2ffd08a7b31</id>
<content type='text'>
Commit c1e8d7c6a7a6 ("mmap locking API: convert mmap_sem comments") missed
replacing some references of mmap_sem by mmap_lock due to misspelling
(mm_sem instead of mmap_sem).

Link: https://lkml.kernel.org/r/20220503113333.214124-1-mail@florommel.de
Signed-off-by: Florian Rommel &lt;mail@florommel.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm/ttm: use kvcalloc() instead of kvmalloc_array() in ttm_tt v2</title>
<updated>2022-04-21T12:47:30+00:00</updated>
<author>
<name>Yang Wang</name>
<email>KevinYang.Wang@amd.com</email>
</author>
<published>2022-04-21T12:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f97344aa04b29acd69e592c3708b9045cf62794'/>
<id>urn:sha1:8f97344aa04b29acd69e592c3708b9045cf62794</id>
<content type='text'>
simplify programming with existing functions.

v2 (chk): minimal coding style cleanup

Signed-off-by: Yang Wang &lt;KevinYang.Wang@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220421123442.1834102-1-KevinYang.Wang@amd.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Add common debugfs code for resource managers</title>
<updated>2022-04-21T01:06:01+00:00</updated>
<author>
<name>Zack Rusin</name>
<email>zackr@vmware.com</email>
</author>
<published>2022-04-12T03:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8cd9efd1b7fb329681d5a5fdf441c8fc8dc4f5ae'/>
<id>urn:sha1:8cd9efd1b7fb329681d5a5fdf441c8fc8dc4f5ae</id>
<content type='text'>
Drivers duplicate the code required to add debugfs entries for various
ttm resource managers. To fix it add common TTM resource manager debugfs
code that each driver can reuse.

Specific resource managers can overwrite
ttm_resource_manager_func::debug to get more information from those
debugfs entries.

Signed-off-by: Zack Rusin &lt;zackr@vmware.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220412033526.369115-2-zack@kde.org
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: fixup ttm_bo_add_move_fence v2</title>
<updated>2022-04-13T08:53:09+00:00</updated>
<author>
<name>Matthew Auld</name>
<email>matthew.auld@intel.com</email>
</author>
<published>2022-04-13T08:21:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7be2bb8c2ff3f769c49f5a527e7ea992b81e9ca1'/>
<id>urn:sha1:7be2bb8c2ff3f769c49f5a527e7ea992b81e9ca1</id>
<content type='text'>
It looks like we still need to call dma_fence_put() on the man-&gt;move,
otherwise we just end up leaking it, leading to fireworks later.

v2(Daniel):
  - Simplify the function tail

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5689
Fixes: 8bb31587820a ("drm/ttm: remove bo-&gt;moving")
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220413082133.272445-1-matthew.auld@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup</title>
<updated>2022-04-12T12:35:53+00:00</updated>
<author>
<name>Matthew Auld</name>
<email>matthew.auld@intel.com</email>
</author>
<published>2022-04-11T08:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c63462184b35316fed7657d3c92dc5099ad5fab2'/>
<id>urn:sha1:c63462184b35316fed7657d3c92dc5099ad5fab2</id>
<content type='text'>
If we hit the sync case, like when skipping clearing for kernel internal
objects, or when falling back to cpu clearing, like in i915, we end up
trying to add a NULL fence, but with some recent changes in this area
this now just results in NULL deref in dma_resv_add_fence:

&lt;1&gt;[    5.466383] BUG: kernel NULL pointer dereference, address: 0000000000000008
&lt;1&gt;[    5.466384] #PF: supervisor read access in kernel mode
&lt;1&gt;[    5.466385] #PF: error_code(0x0000) - not-present page
&lt;6&gt;[    5.466386] PGD 0 P4D 0
&lt;4&gt;[    5.466387] Oops: 0000 [#1] PREEMPT SMP NOPTI
&lt;4&gt;[    5.466389] CPU: 5 PID: 267 Comm: modprobe Not tainted 5.18.0-rc2-CI-CI_DRM_11481+ #1
&lt;4&gt;[    5.466391] RIP: 0010:dma_resv_add_fence+0x63/0x260
&lt;4&gt;[    5.466395] Code: 38 85 c0 0f 84 df 01 00 00 0f 88 e8 01 00 00 83 c0 01 0f 88 df 01 00 00 8b 05 35 89 10 01 49 8d 5e 68 85 c0 0f 85 45 01 00 00 &lt;48&gt; 8b 45 08 48 3d c0 a5 0a 82 0f 84 5c 01 00 00 48 3d 60 a5 0a 82
&lt;4&gt;[    5.466396] RSP: 0018:ffffc90000e974f8 EFLAGS: 00010202
&lt;4&gt;[    5.466397] RAX: 0000000000000001 RBX: ffff888123e88b28 RCX: 00000000ffffffff
&lt;4&gt;[    5.466398] RDX: 0000000000000001 RSI: ffffffff822e4f50 RDI: ffffffff8233f087
&lt;4&gt;[    5.466399] RBP: 0000000000000000 R08: ffff8881313dbc80 R09: 0000000000000001
&lt;4&gt;[    5.466399] R10: 0000000000000001 R11: 00000000da354294 R12: 0000000000000000
&lt;4&gt;[    5.466400] R13: ffff88810927dc58 R14: ffff888123e88ac0 R15: ffff88810a88d600
&lt;4&gt;[    5.466401] FS:  00007f5fa1193540(0000) GS:ffff88845d880000(0000) knlGS:0000000000000000
&lt;4&gt;[    5.466402] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&lt;4&gt;[    5.466402] CR2: 0000000000000008 CR3: 0000000106dd6003 CR4: 00000000003706e0
&lt;4&gt;[    5.466403] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&lt;4&gt;[    5.466404] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
&lt;4&gt;[    5.466404] Call Trace:
&lt;4&gt;[    5.466405]  &lt;TASK&gt;
&lt;4&gt;[    5.466406]  ttm_bo_move_accel_cleanup+0x62/0x270 [ttm]
&lt;4&gt;[    5.466411]  ? i915_rsgt_from_buddy_resource+0x185/0x1e0 [i915]
&lt;4&gt;[    5.466529]  i915_ttm_move+0xfd/0x430 [i915]
&lt;4&gt;[    5.466833]  ? dma_resv_reserve_fences+0x4e/0x320
&lt;4&gt;[    5.466836]  ? ttm_bo_add_move_fence.constprop.20+0xf7/0x140 [ttm]
&lt;4&gt;[    5.466841]  ttm_bo_handle_move_mem+0xa1/0x140 [ttm]
&lt;4&gt;[    5.466845]  ttm_bo_validate+0xee/0x160 [ttm]
&lt;4&gt;[    5.466849]  __i915_ttm_get_pages+0x4f/0x210 [i915]
&lt;4&gt;[    5.466976]  i915_ttm_get_pages+0xad/0x140 [i915]
&lt;4&gt;[    5.467094]  ____i915_gem_object_get_pages+0x32/0xf0 [i915]
&lt;4&gt;[    5.467210]  __i915_gem_object_get_pages+0x89/0xa0 [i915]
&lt;4&gt;[    5.467323]  i915_vma_get_pages+0x114/0x1d0 [i915]
&lt;4&gt;[    5.467446]  i915_vma_pin_ww+0xd3/0xa90 [i915]
&lt;4&gt;[    5.467570]  i915_vma_pin.constprop.10+0x119/0x1b0 [i915]
&lt;4&gt;[    5.467700]  ? __mutex_unlock_slowpath+0x3e/0x2b0
&lt;4&gt;[    5.467704]  intel_alloc_initial_plane_obj.isra.6+0x1a9/0x390 [i915]
&lt;4&gt;[    5.467833]  intel_crtc_initial_plane_config+0x83/0x340 [i915]

In the ttm_bo_move_sync_cleanup() case it seems we only really care
about calling ttm_bo_wait_free_node(), so let's instead just call that
directly.

Signed-off-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Cc: Nirmoy Das &lt;nirmoy.das@linux.intel.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220411085603.58156-1-matthew.auld@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: fix logic inversion in ttm_eu_reserve_buffers</title>
<updated>2022-04-11T14:00:57+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2022-04-11T13:21:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d72dcbe9fce505228dae43bef9da8f2b707d1b3d'/>
<id>urn:sha1:d72dcbe9fce505228dae43bef9da8f2b707d1b3d</id>
<content type='text'>
That should have been max, not min.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Fixes: c8d4c18bfbc4 ("dma-buf/drivers: make reserving a shared slot mandatory v4")
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220411134537.2854-1-christian.koenig@amd.com
</content>
</entry>
</feed>
