<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c, branch v4.3</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=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-10-07T13:59:18Z</updated>
<entry>
<title>drm/amdgpu: fix 32-bit compiler warning</title>
<updated>2015-10-07T13:59:18Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-10-07T07:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=028423b0d8fa27c30a46da4af2a5cab230369de6'/>
<id>urn:sha1:028423b0d8fa27c30a46da4af2a5cab230369de6</id>
<content type='text'>
The new amdgpu driver passes a user space pointer in a 64-bit structure
member, which is the correct way to do it, but it attempts to
directly cast it to a __user pointer in the kernel, which causes
a warning in three places:

drm/amd/amdgpu/amdgpu_cs.c: In function 'amdgpu_cs_parser_init':
drm/amd/amdgpu/amdgpu_cs.c:180:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  chunk_array_user = (uint64_t __user *)(cs-&gt;in.chunks);

This changes all three to add an intermediate cast to 'unsigned long'
as other drivers do. This avoids the warning and works correctly on
both 32-bit and 64-bit architectures.

Fixes: e60b344f6c0eff ("drm/amdgpu: optimize amdgpu_parser_init")

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: signedness bug in amdgpu_cs_parser_init()</title>
<updated>2015-09-29T17:44:15Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-09-25T11:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54313503f9a3c34a9e45aad7654976b7f50b9ae7'/>
<id>urn:sha1:54313503f9a3c34a9e45aad7654976b7f50b9ae7</id>
<content type='text'>
The "i" variable should be signed or it leads to a crash in the error
handling code.

Fixes: 1d263474c441 ('drm/amdgpu: unwind properly in amdgpu_cs_parser_init()')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: unwind properly in amdgpu_cs_parser_init()</title>
<updated>2015-09-23T21:23:43Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-09-23T10:59:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d263474c4416efb6d0feca98fe6d462b0d28f56'/>
<id>urn:sha1:1d263474c4416efb6d0feca98fe6d462b0d28f56</id>
<content type='text'>
The amdgpu_cs_parser_init() function doesn't clean up after itself but
instead the caller uses a free everything function amdgpu_cs_parser_fini()
on failure.  This style of error handling is often buggy.  In this
example, we call "drm_free_large(parser-&gt;chunks[i].kdata);" when it is
an unintialized pointer or when "parser-&gt;chunks" is NULL.

I fixed this bug by adding unwind code so that it frees everything that
it allocates.

I also mode some other very minor changes:
1) Renamed "r" to "ret".
2) Moved the chunk_array allocation to the start of the function.
3) Removed some initializers which are no longer needed.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reported-by: Ilja Van Sprundel &lt;ivansprundel@ioactive.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: more scheduler cleanups v2</title>
<updated>2015-09-23T21:23:39Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-09-08T18:22:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f'/>
<id>urn:sha1:4f839a243d3b0d8b1a14f4778a87ec4d8ddbf15f</id>
<content type='text'>
Embed the scheduler into the ring structure instead of allocating it.
Use the ring name directly instead of the id.

v2: rebased, whitespace cleanup

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Junwei Zhang &lt;Jerry.Zhang@amd.com&gt;
Reviewed-by: Chunming Zhou&lt;david1.zhou@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: rename fence-&gt;scheduler to sched v2</title>
<updated>2015-09-23T21:23:37Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-09-07T16:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b398fa5c24eb05fc60fafd8543cc03e9170f054'/>
<id>urn:sha1:9b398fa5c24eb05fc60fafd8543cc03e9170f054</id>
<content type='text'>
Just to be consistent with the other members.

v2: rename the ring member as well.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Junwei Zhang &lt;Jerry.Zhang@amd.com&gt; (v1)
Reviewed-by: Chunming Zhou&lt;david1.zhou@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: refine the scheduler job type conversion</title>
<updated>2015-09-23T21:23:36Z</updated>
<author>
<name>Junwei Zhang</name>
<email>Jerry.Zhang@amd.com</email>
</author>
<published>2015-09-09T01:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6db8a33e164ae72fb5429ab637e8cfee057a722'/>
<id>urn:sha1:a6db8a33e164ae72fb5429ab637e8cfee057a722</id>
<content type='text'>
Use container_of rather than casting.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: David Zhou &lt;david1.zhou@amd.com&gt;
Signed-off-by: Junwei Zhang &lt;Jerry.Zhang@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: refine the job naming for amdgpu_job and amdgpu_sched_job</title>
<updated>2015-09-23T21:23:36Z</updated>
<author>
<name>Junwei Zhang</name>
<email>Jerry.Zhang@amd.com</email>
</author>
<published>2015-09-09T01:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4c7eb91cae88fd2aa101750d6825b4176f85ffb2'/>
<id>urn:sha1:4c7eb91cae88fd2aa101750d6825b4176f85ffb2</id>
<content type='text'>
Use consistent naming across functions.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: David Zhou &lt;david1.zhou@amd.com&gt;
Signed-off-by: Junwei Zhang &lt;Jerry.Zhang@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: validate duplicates in the CS as well</title>
<updated>2015-09-23T21:23:34Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-09-03T14:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5b750583eb4af69da1e659c7684b6d370b2ae97'/>
<id>urn:sha1:a5b750583eb4af69da1e659c7684b6d370b2ae97</id>
<content type='text'>
This allows for multiple BOs to have the same reservation object.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Jammy Zhou &lt;Jammy.Zhou@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: fix buffer placement under memory pressure</title>
<updated>2015-09-03T18:30:49Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-09-02T18:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=270e869d846af143f60b7404e01e785d18420007'/>
<id>urn:sha1:270e869d846af143f60b7404e01e785d18420007</id>
<content type='text'>
Some buffers (UVD/VM page tables) must be placed in VRAM,
but the byte restriction for moving buffers didn't took this
into account.

Port of radeon commit 4b09556660bfe1b43d72ca858524c6baf2c6cb1d.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Jammy Zhou &lt;Jammy.Zhou@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: add owner for sched fence</title>
<updated>2015-08-25T14:51:32Z</updated>
<author>
<name>Chunming Zhou</name>
<email>david1.zhou@amd.com</email>
</author>
<published>2015-08-24T04:47:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84f76ea6b03a766931e5d6d650af5ab980c6c4f4'/>
<id>urn:sha1:84f76ea6b03a766931e5d6d650af5ab980c6c4f4</id>
<content type='text'>
Signed-off-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
Reviewed-by: Christian K?nig &lt;christian.koenig@amd.com&gt;
</content>
</entry>
</feed>
