<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/amd/amdkfd/kfd_process.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-01-10T23:15:09Z</updated>
<entry>
<title>drm/amdkfd: Fix potential NULL pointer dereferences</title>
<updated>2018-01-10T23:15:09Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>garsilva@embeddedor.com</email>
</author>
<published>2018-01-10T23:15:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2e3dca53654ddc51bada4cee4ca32d0d266fc9dd'/>
<id>urn:sha1:2e3dca53654ddc51bada4cee4ca32d0d266fc9dd</id>
<content type='text'>
In case kfd_get_process_device_data returns null, there are some
null pointer dereferences in functions kfd_bind_processes_to_device
and kfd_unbind_processes_from_device.

Fix this by printing a WARN_ON for PDDs that aren't found and skip
them with continue statements.

Addresses-Coverity-ID: 1463794 ("Dereference null return value")
Addresses-Coverity-ID: 1463772 ("Dereference null return value")
Suggested-by: Felix Kuehling &lt;felix.kuehling@amd.com&gt;
Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Simplify locking during process creation</title>
<updated>2017-11-27T23:29:56Z</updated>
<author>
<name>Yong Zhao</name>
<email>yong.zhao@amd.com</email>
</author>
<published>2017-11-27T23:29:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c0ede1f8dc3a22464b126f4d54ad7999ebb789a0'/>
<id>urn:sha1:c0ede1f8dc3a22464b126f4d54ad7999ebb789a0</id>
<content type='text'>
Also fixes error handling if kfd_process_init_cwsr fails.

Signed-off-by: Yong Zhao &lt;yong.zhao@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Factor PDD destruction out of kfd_process_wq_release</title>
<updated>2017-11-27T23:29:55Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-27T23:29:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=de1450a5597a642bdc4987aa31873d8475810aae'/>
<id>urn:sha1:de1450a5597a642bdc4987aa31873d8475810aae</id>
<content type='text'>
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Reduce nesting in kfd_create_process_device_data</title>
<updated>2017-11-27T23:29:54Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-27T23:29:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2d9b36f98343624282f81c1886e95bc552d1a9b7'/>
<id>urn:sha1:2d9b36f98343624282f81c1886e95bc552d1a9b7</id>
<content type='text'>
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Return NULL if kfd_lookup_process_by_pasid fails</title>
<updated>2017-11-27T23:29:53Z</updated>
<author>
<name>Yong Zhao</name>
<email>yong.zhao@amd.com</email>
</author>
<published>2017-11-27T23:29:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=82c16b4280bc42bc035af566e1480d88666126b1'/>
<id>urn:sha1:82c16b4280bc42bc035af566e1480d88666126b1</id>
<content type='text'>
If no matching process is found, return NULL instead of a pointer
to the last process in the kfd_processes_table.

Signed-off-by: Yong Zhao &lt;yong.zhao@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Use ref count to prevent kfd_process destruction</title>
<updated>2017-11-27T23:29:52Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-27T23:29:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=abb208a8d490bac9d765c45f20cf306757733778'/>
<id>urn:sha1:abb208a8d490bac9d765c45f20cf306757733778</id>
<content type='text'>
Use a reference counter instead of a lock to prevent process
destruction while functions running out of process context are using
the kfd_process structure. In many cases these functions don't need
the structure to be locked. In the few cases that really do need the
process lock, take it explicitly.

This helps simplify lock dependencies between the process lock and
other locks, particularly amdgpu and mm_struct locks. This will be
important when amdgpu calls back to amdkfd for memory evictions.

Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Make kfd_process reference counted</title>
<updated>2017-11-27T23:29:51Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-27T23:29:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85'/>
<id>urn:sha1:5ce10687ae5ba2aa06aeaaf3fad9ce64dff45a85</id>
<content type='text'>
This will be used to elliminate the use of the process lock for
preventing concurrent process destruction. This will simplify lock
dependencies between KFD and KGD.

This also simplifies the process destruction in a few ways:
* Don't allocate work struct dynamically
* Remove unnecessary hack that increments mm reference counter
* Remove unnecessary process locking during destruction

Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Get reference to lead_thread task struct</title>
<updated>2017-11-27T23:29:50Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-27T23:29:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c7b1243eef128c49aabdfab71cd4f5ecb6602d97'/>
<id>urn:sha1:c7b1243eef128c49aabdfab71cd4f5ecb6602d97</id>
<content type='text'>
Increment the kfd_process.lead_thread's reference counter to make
it safe to dereference. This is needed for getting a safe reference
to the process' mm_struct.

Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Add debugfs support to KFD</title>
<updated>2017-11-27T23:29:49Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-27T23:29:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=851a645efd0fee7f27819ab30f3b353bace3cd98'/>
<id>urn:sha1:851a645efd0fee7f27819ab30f3b353bace3cd98</id>
<content type='text'>
This commit adds several debugfs entries for kfd:

kfd/hqds: dumps all HQDs on all GPUs for KFD-controlled compute and
    SDMA RLC queues

kfd/mqds: dumps all MQDs of all KFD processes on all GPUs

kfd/rls: dumps HWS runlists on all GPUs

Signed-off-by: Yong Zhao &lt;yong.zhao@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Add CWSR support</title>
<updated>2017-11-14T21:41:19Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2017-11-14T21:41:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=373d7080896a3cb3b28ae3a2abdafb7bb87552b1'/>
<id>urn:sha1:373d7080896a3cb3b28ae3a2abdafb7bb87552b1</id>
<content type='text'>
This hardware feature allows the GPU to preempt shader execution in
the middle of a compute wave, save the state and restore it later
to resume execution.

Memory for saving the state is allocated per queue in user mode and
the address and size passed to the create_queue ioctl. The size
depends on the number of waves that can be in flight simultaneously
on a given ASIC.

Signed-off-by: Shaoyun.liu &lt;shaoyun.liu@amd.com&gt;
Signed-off-by: Yong Zhao &lt;yong.zhao@amd.com&gt;
Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
</feed>
