<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/amd/amdkfd, branch v4.19.237</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.237</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.237'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-05-22T08:59:33+00:00</updated>
<entry>
<title>drm/amdkfd: fix build error with AMD_IOMMU_V2=m</title>
<updated>2021-05-22T08:59:33+00:00</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2021-03-09T03:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a384254b17a41d9b68fb523b6c5a2ebb1d9425f'/>
<id>urn:sha1:7a384254b17a41d9b68fb523b6c5a2ebb1d9425f</id>
<content type='text'>
[ Upstream commit 1e87068570a2cc4db5f95a881686add71729e769 ]

Using 'imply AMD_IOMMU_V2' does not guarantee that the driver can link
against the exported functions. If the GPU driver is built-in but the
IOMMU driver is a loadable module, the kfd_iommu.c file is indeed
built but does not work:

x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_bind_process_to_device':
kfd_iommu.c:(.text+0x516): undefined reference to `amd_iommu_bind_pasid'
x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_unbind_process':
kfd_iommu.c:(.text+0x691): undefined reference to `amd_iommu_unbind_pasid'
x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_suspend':
kfd_iommu.c:(.text+0x966): undefined reference to `amd_iommu_set_invalidate_ctx_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0x97f): undefined reference to `amd_iommu_set_invalid_ppr_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0x9a4): undefined reference to `amd_iommu_free_device'
x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_resume':
kfd_iommu.c:(.text+0xa9a): undefined reference to `amd_iommu_init_device'
x86_64-linux-ld: kfd_iommu.c:(.text+0xadc): undefined reference to `amd_iommu_set_invalidate_ctx_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xaff): undefined reference to `amd_iommu_set_invalid_ppr_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xc72): undefined reference to `amd_iommu_bind_pasid'
x86_64-linux-ld: kfd_iommu.c:(.text+0xe08): undefined reference to `amd_iommu_set_invalidate_ctx_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xe26): undefined reference to `amd_iommu_set_invalid_ppr_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xe42): undefined reference to `amd_iommu_free_device'

Use IS_REACHABLE to only build IOMMU-V2 support if the amd_iommu symbols
are reachable by the amdkfd driver. Output a warning if they are not,
because that may not be what the user was expecting.

Fixes: 64d1c3a43a6f ("drm/amdkfd: Centralize IOMMUv2 code and make it conditional")
Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: fix a memory leak issue</title>
<updated>2020-10-01T11:14:50+00:00</updated>
<author>
<name>Dennis Li</name>
<email>Dennis.Li@amd.com</email>
</author>
<published>2020-09-02T09:11:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce81be26d33f32b5e6edf02abade4259165223c9'/>
<id>urn:sha1:ce81be26d33f32b5e6edf02abade4259165223c9</id>
<content type='text'>
[ Upstream commit 087d764159996ae378b08c0fdd557537adfd6899 ]

In the resume stage of GPU recovery, start_cpsch will call pm_init
which set pm-&gt;allocated as false, cause the next pm_release_ib has
no chance to release ib memory.

Add pm_release_ib in stop_cpsch which will be called in the suspend
stage of GPU recovery.

Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Dennis Li &lt;Dennis.Li@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Fix reference count leaks.</title>
<updated>2020-09-03T09:24:19+00:00</updated>
<author>
<name>Qiushi Wu</name>
<email>wu000273@umn.edu</email>
</author>
<published>2020-06-13T19:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74d20579fcf02320fb51efd12bad1ff320e0d4f0'/>
<id>urn:sha1:74d20579fcf02320fb51efd12bad1ff320e0d4f0</id>
<content type='text'>
[ Upstream commit 20eca0123a35305e38b344d571cf32768854168c ]

kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object.

Signed-off-by: Qiushi Wu &lt;wu000273@umn.edu&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: kfree the wrong pointer</title>
<updated>2020-04-23T08:30:20+00:00</updated>
<author>
<name>Jack Zhang</name>
<email>Jack.Zhang1@amd.com</email>
</author>
<published>2020-04-01T12:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=044a884072b4313554d910b792f46c3e1f0099a5'/>
<id>urn:sha1:044a884072b4313554d910b792f46c3e1f0099a5</id>
<content type='text'>
[ Upstream commit 3148a6a0ef3cf93570f30a477292768f7eb5d3c3 ]

Originally, it kfrees the wrong pointer for mem_obj.
It would cause memory leak under stress test.

Signed-off-by: Jack Zhang &lt;Jack.Zhang1@amd.com&gt;
Acked-by: Nirmoy Das &lt;nirmoy.das@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: fix a potential NULL pointer dereference (v2)</title>
<updated>2019-12-31T15:34:53+00:00</updated>
<author>
<name>Allen Pais</name>
<email>allen.pais@oracle.com</email>
</author>
<published>2019-09-18T16:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55248674330101fb3ccf7cec8b729e8e067e5f71'/>
<id>urn:sha1:55248674330101fb3ccf7cec8b729e8e067e5f71</id>
<content type='text'>
[ Upstream commit 81de29d842ccb776c0f77aa3e2b11b07fff0c0e2 ]

alloc_workqueue is not checked for errors and as a result,
a potential NULL dereference could occur.

v2 (Felix Kuehling):
* Fix compile error (kfifo_free instead of fifo_free)
* Return proper error code

Signed-off-by: Allen Pais &lt;allen.pais@oracle.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Add missing Polaris10 ID</title>
<updated>2019-09-16T06:22:14+00:00</updated>
<author>
<name>Kent Russell</name>
<email>kent.russell@amd.com</email>
</author>
<published>2019-05-13T13:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90772cf588380e6253b8d820ed6c3a7933950181'/>
<id>urn:sha1:90772cf588380e6253b8d820ed6c3a7933950181</id>
<content type='text'>
[ Upstream commit 0a5a9c276c335870a1cecc4f02b76d6d6f663c8b ]

This was added to amdgpu but was missed in amdkfd

Signed-off-by: Kent Russell &lt;kent.russell@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.rg
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Fix sdma queue map issue</title>
<updated>2019-07-31T05:26:58+00:00</updated>
<author>
<name>Oak Zeng</name>
<email>Oak.Zeng@amd.com</email>
</author>
<published>2019-02-08T21:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=210dfe6309112dd028bf06561b828a749b6e1169'/>
<id>urn:sha1:210dfe6309112dd028bf06561b828a749b6e1169</id>
<content type='text'>
[ Upstream commit 065e4bdfa1f3ab2884c110394d8b7e7ebe3b988c ]

Previous codes assumes there are two sdma engines.
This is not true e.g., Raven only has 1 SDMA engine.
Fix the issue by using sdma engine number info in
device_info.

Signed-off-by: Oak Zeng &lt;Oak.Zeng@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Fix a potential memory leak</title>
<updated>2019-07-31T05:26:58+00:00</updated>
<author>
<name>Oak Zeng</name>
<email>ozeng@amd.com</email>
</author>
<published>2018-11-28T04:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=db64bc13944013357d231cbf9d1aee798d7b9892'/>
<id>urn:sha1:db64bc13944013357d231cbf9d1aee798d7b9892</id>
<content type='text'>
[ Upstream commit e73390d181103a19e1111ec2f25559a0570e9fe0 ]

Free mqd_mem_obj it GTT buffer allocation for MQD+control stack fails.

Signed-off-by: Oak Zeng &lt;ozeng@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: use init_mqd function to allocate object for hid_mqd (CI)</title>
<updated>2019-04-20T07:16:04+00:00</updated>
<author>
<name>Kevin Wang</name>
<email>kevin1.wang@amd.com</email>
</author>
<published>2019-02-22T04:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=539282e9cd9bac049c08c62279277188e141ad24'/>
<id>urn:sha1:539282e9cd9bac049c08c62279277188e141ad24</id>
<content type='text'>
[ Upstream commit cac734c2dbd2514f14c8c6a17caba1990d83bf1d ]

if use the legacy method to allocate object, when mqd_hiq need to run
uninit code, it will be cause WARNING call trace.

eg: (s3 suspend test)
[   34.918944] Call Trace:
[   34.918948]  [&lt;ffffffff92961dc1&gt;] dump_stack+0x19/0x1b
[   34.918950]  [&lt;ffffffff92297648&gt;] __warn+0xd8/0x100
[   34.918951]  [&lt;ffffffff9229778d&gt;] warn_slowpath_null+0x1d/0x20
[   34.918991]  [&lt;ffffffffc03ce1fe&gt;] uninit_mqd_hiq_sdma+0x4e/0x50 [amdgpu]
[   34.919028]  [&lt;ffffffffc03d0ef7&gt;] uninitialize+0x37/0xe0 [amdgpu]
[   34.919064]  [&lt;ffffffffc03d15a6&gt;] kernel_queue_uninit+0x16/0x30 [amdgpu]
[   34.919086]  [&lt;ffffffffc03d26c2&gt;] pm_uninit+0x12/0x20 [amdgpu]
[   34.919107]  [&lt;ffffffffc03d4915&gt;] stop_nocpsch+0x15/0x20 [amdgpu]
[   34.919129]  [&lt;ffffffffc03c1dce&gt;] kgd2kfd_suspend.part.4+0x2e/0x50 [amdgpu]
[   34.919150]  [&lt;ffffffffc03c2667&gt;] kgd2kfd_suspend+0x17/0x20 [amdgpu]
[   34.919171]  [&lt;ffffffffc03c103a&gt;] amdgpu_amdkfd_suspend+0x1a/0x20 [amdgpu]
[   34.919187]  [&lt;ffffffffc02ec428&gt;] amdgpu_device_suspend+0x88/0x3a0 [amdgpu]
[   34.919189]  [&lt;ffffffff922e22cf&gt;] ? enqueue_entity+0x2ef/0xbe0
[   34.919205]  [&lt;ffffffffc02e8220&gt;] amdgpu_pmops_suspend+0x20/0x30 [amdgpu]
[   34.919207]  [&lt;ffffffff925c56ff&gt;] pci_pm_suspend+0x6f/0x150
[   34.919208]  [&lt;ffffffff925c5690&gt;] ? pci_pm_freeze+0xf0/0xf0
[   34.919210]  [&lt;ffffffff926b45c6&gt;] dpm_run_callback+0x46/0x90
[   34.919212]  [&lt;ffffffff926b49db&gt;] __device_suspend+0xfb/0x2a0
[   34.919213]  [&lt;ffffffff926b4b9f&gt;] async_suspend+0x1f/0xa0
[   34.919214]  [&lt;ffffffff922c918f&gt;] async_run_entry_fn+0x3f/0x130
[   34.919216]  [&lt;ffffffff922b9d4f&gt;] process_one_work+0x17f/0x440
[   34.919217]  [&lt;ffffffff922bade6&gt;] worker_thread+0x126/0x3c0
[   34.919218]  [&lt;ffffffff922bacc0&gt;] ? manage_workers.isra.25+0x2a0/0x2a0
[   34.919220]  [&lt;ffffffff922c1c31&gt;] kthread+0xd1/0xe0
[   34.919221]  [&lt;ffffffff922c1b60&gt;] ? insert_kthread_work+0x40/0x40
[   34.919222]  [&lt;ffffffff92974c1d&gt;] ret_from_fork_nospec_begin+0x7/0x21
[   34.919224]  [&lt;ffffffff922c1b60&gt;] ? insert_kthread_work+0x40/0x40
[   34.919224] ---[ end trace 38cd9f65c963adad ]---

Signed-off-by: Kevin Wang &lt;kevin1.wang@amd.com&gt;
Reviewed-by: Oak Zeng &lt;Oak.Zeng@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Don't assign dGPUs to APU topology devices</title>
<updated>2019-02-27T09:08:55+00:00</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2019-01-02T22:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf846e9035b5dff964b055fc994e5743cfc1caec'/>
<id>urn:sha1:bf846e9035b5dff964b055fc994e5743cfc1caec</id>
<content type='text'>
[ Upstream commit bbdf514fe5648566b0754476cbcb92ac3422dde2 ]

dGPUs need their own topology devices. Don't assign them to APU topology
devices with CPU cores.

Bug: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/issues/66
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Tested-by: Elias Konstantinidis &lt;ekondis@gmail.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
