<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/amd/scheduler, branch v4.4.171</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2015-12-02T20:04:04+00:00</updated>
<entry>
<title>drm/amdgpu: fix race condition in amd_sched_entity_push_job</title>
<updated>2015-12-02T20:04:04+00:00</updated>
<author>
<name>Nicolai Hähnle</name>
<email>Nicolai.Haehnle@amd.com</email>
</author>
<published>2015-12-02T16:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=07df04dfcfe51a45239d056d43cbc09702262c82'/>
<id>urn:sha1:07df04dfcfe51a45239d056d43cbc09702262c82</id>
<content type='text'>
As soon as we leave the spinlock after the job has been added to the job
queue, we can no longer rely on the job's data to be available.

I have seen a null-pointer dereference due to sched == NULL in
amd_sched_wakeup via amd_sched_entity_push_job and
amd_sched_ib_submit_kernel_helper. Since the latter initializes
sched_job-&gt;sched with the address of the ring scheduler, which is
guaranteed to be non-NULL, this race appears to be a likely culprit.

Signed-off-by: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
Bugzilla: https://bugs.freedesktop.org/attachment.cgi?bugid=93079
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: move dependency handling out of atomic section v2</title>
<updated>2015-11-23T17:20:15+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-11-12T20:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d65193635e122d0783b97cb2202b7f21601037a'/>
<id>urn:sha1:3d65193635e122d0783b97cb2202b7f21601037a</id>
<content type='text'>
This way the driver isn't limited in the dependency handling callback.

v2: remove extra check in amd_sched_entity_pop_job()

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: optimize scheduler fence handling</title>
<updated>2015-11-23T17:19:58+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-11-05T11:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=393a0bd4376a8ecdde079344681a014ec3eb1291'/>
<id>urn:sha1:393a0bd4376a8ecdde079344681a014ec3eb1291</id>
<content type='text'>
We only need to wait for jobs to be scheduled when
the dependency is from the same scheduler.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: fix incorrect mutex usage v3</title>
<updated>2015-11-16T16:05:58+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-11-05T18:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e284022163716ecf11c37fd1057c35d689ef2c11'/>
<id>urn:sha1:e284022163716ecf11c37fd1057c35d689ef2c11</id>
<content type='text'>
Before this patch the scheduler fence was created when we push the job
into the queue, so we could only get the fence after pushing it.

The mutex now was necessary to prevent the thread pushing the jobs to
the hardware from running faster than the thread pushing the jobs into
the queue.

Otherwise the thread pushing jobs into the queue would have accessed
possible freed up memory when it tries to get a reference to the fence.

So what you get in the end is thread A:
mutex_lock(&amp;job-&gt;lock);
...
Kick of thread B.
...
mutex_unlock(&amp;job-&gt;lock);

And thread B:
mutex_lock(&amp;job-&gt;lock);
....
mutex_unlock(&amp;job-&gt;lock);
kfree(job);

I'm actually not sure if I'm still up to date on this, but this usage
pattern used to be not allowed with mutexes. See here as well
https://lwn.net/Articles/575460/.

v2: remove unrelated changes, fix missing owner
v3: rebased, add more commit message

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: cleanup scheduler fence get/put dance</title>
<updated>2015-11-16T16:05:58+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-11-06T13:09:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a562283376197722b295d27633134401bbc80f5'/>
<id>urn:sha1:4a562283376197722b295d27633134401bbc80f5</id>
<content type='text'>
The code was correct, but getting two references when the ownership
is linearly moved on is a bit awkward and just overhead.

Signed: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: add command submission workflow tracepoint</title>
<updated>2015-11-16T16:05:57+00:00</updated>
<author>
<name>Chunming Zhou</name>
<email>David1.Zhou@amd.com</email>
</author>
<published>2015-11-11T06:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7034decf6a5b1ff778d83ff9d7ce1f0b404804e4'/>
<id>urn:sha1:7034decf6a5b1ff778d83ff9d7ce1f0b404804e4</id>
<content type='text'>
OGL needs these tracepoints to investigate performance issue.

Change-Id: I5e58187d061253f7d665dfce8e4e163ba91d3e2b
Signed-off-by: Chunming Zhou &lt;David1.Zhou@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd: add kmem cache for sched fence</title>
<updated>2015-11-16T16:05:51+00:00</updated>
<author>
<name>Chunming Zhou</name>
<email>David1.Zhou@amd.com</email>
</author>
<published>2015-11-05T03:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5617f9dde5ae2466560f7cb008c741e2b88adab'/>
<id>urn:sha1:f5617f9dde5ae2466560f7cb008c741e2b88adab</id>
<content type='text'>
Change-Id: I45bb8ff10ef05dc3b15e31a77fbcf31117705f11
Signed-off-by: Chunming Zhou &lt;David1.Zhou@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: fix stoping the scheduler timeout</title>
<updated>2015-11-04T17:29:21+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-11-02T15:25:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=424839a6a913f2d2f473ce6d5b6465aeddf694db'/>
<id>urn:sha1:424839a6a913f2d2f473ce6d5b6465aeddf694db</id>
<content type='text'>
cancel_delayed_work_sync is forbidden in interrupt context.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/scheduler: don't oops on failure to load</title>
<updated>2015-11-03T16:15:29+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2015-11-03T16:10:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=32544d021515f767e651648e5702472d48ab9436'/>
<id>urn:sha1:32544d021515f767e651648e5702472d48ab9436</id>
<content type='text'>
In two places amdgpu tries to tear down something it hasn't
initalised when failing. This is what happens when you
enable experimental support on topaz which then fails in
ring init.

This patch allows it to fail cleanly.

agd: Split out from from the original patch since the
scheduler is a driver independent.

Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>drm/amdgpu: ignore scheduler fences from the same entity</title>
<updated>2015-10-28T21:04:18+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-10-27T16:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe537d003f9a97c65848e47b3b9acbb0c5002fd9'/>
<id>urn:sha1:fe537d003f9a97c65848e47b3b9acbb0c5002fd9</id>
<content type='text'>
We are going to submit them before the job anyway.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
</content>
</entry>
</feed>
