<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c, branch v4.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-02-09T16:29:44Z</updated>
<entry>
<title>drm/amdgpu: report the number of bytes moved at buffer creation</title>
<updated>2017-02-09T16:29:44Z</updated>
<author>
<name>Samuel Pitoiset</name>
<email>samuel.pitoiset@gmail.com</email>
</author>
<published>2017-02-09T10:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fad061270ac43ff9eed315f0eae7c40b694592de'/>
<id>urn:sha1:fad061270ac43ff9eed315f0eae7c40b694592de</id>
<content type='text'>
Like ttm_bo_validate(), ttm_bo_init() might need to move BO and
the number of bytes moved by TTM should be reported. This can help
the throttle buffer migration mechanism to make a better decision.

v2: fix computation

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Samuel Pitoiset &lt;samuel.pitoiset@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()</title>
<updated>2017-02-09T16:28:24Z</updated>
<author>
<name>Samuel Pitoiset</name>
<email>samuel.pitoiset@gmail.com</email>
</author>
<published>2017-02-09T10:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38fc4856ad98f230bc91da0421dec69e4aee40f8'/>
<id>urn:sha1:38fc4856ad98f230bc91da0421dec69e4aee40f8</id>
<content type='text'>
When ttm_bo_init() fails, the reservation mutex should be unlocked.

In debug build, the kernel reported "possible recursive locking
detected" in this codepath. For debugging purposes, I also added
a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init() fails and the
mutex was locked as expected.

This should fix (random) GPU hangs. The easy way to reproduce the
issue is to change the "Super Sampling" option from 1.0 to 2.0 in
Hitman. It will create a huge buffer, evict a bunch of buffers
(around ~5k) and deadlock.

This regression has been introduced pretty recently.

v2: only release the mutex if resv is NULL

Fixes: 12a852219583 ("drm/amdgpu: improve AMDGPU_GEM_CREATE_VRAM_CLEARED handling (v2)")
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Samuel Pitoiset &lt;samuel.pitoiset@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: shut up #warning for compile testing</title>
<updated>2017-02-09T05:23:24Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-02-01T15:59:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31bb90f1cd084e0ca1359455eaf74bb64b5c5c82'/>
<id>urn:sha1:31bb90f1cd084e0ca1359455eaf74bb64b5c5c82</id>
<content type='text'>
My randconfig tests on linux-next showed a newly introduced warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_create_restricted':
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:377:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp]

Generally speaking, warnings about bad kernel configuration are not particularly
helpful. We could enforce the selection of X86_PAT through Kconfig, so the driver
cannot even be used unless it is enabled, or we could just rely on the runtime
warning that is also there.

In this version, I'm making the warning conditional on CONFIG_COMPILE_TEST, which
shuts it up for me, but not people that may actually want to run the kernel
as a compromize.

Fixes: a2e2f29970aa ("drm/amdgpu: Bring bo creation in line with radeon driver (v2)")
Reviewed-by: Michel Dänzer &lt;michel.daenzer@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: Bring bo creation in line with radeon driver (v2)</title>
<updated>2017-01-27T17:20:36Z</updated>
<author>
<name>Nils Holland</name>
<email>nholland@tisys.org</email>
</author>
<published>2017-01-22T19:15:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2e2f29970aa1e53219e3499382c41d61c8959f8'/>
<id>urn:sha1:a2e2f29970aa1e53219e3499382c41d61c8959f8</id>
<content type='text'>
Add the bo creation changes that have been done to the radeon driver in
recent times, e.g. disable GTT WC on 32 bit because it is broken there,
and also disable it generally (and print a warning message) when
CONFIG_X86_PAT is not set.

v2: agd: fix warning in defined(CONFIG_X86) &amp;&amp; !defined(CONFIG_X86_PAT)
    case

Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Nils Holland &lt;nholland@tisys.org&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: double the priority of kernel allocations</title>
<updated>2017-01-27T17:20:34Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2017-01-23T21:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=373308a5f5f3f82656567481f688350887abb771'/>
<id>urn:sha1:373308a5f5f3f82656567481f688350887abb771</id>
<content type='text'>
Give kernel allocations a higher priority cause it is often
more work to swap them back in.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Roger.He &lt;Hongbo.He@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: user BO priority instead of self coding it (v2)</title>
<updated>2017-01-27T17:20:33Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2017-01-10T16:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1f055b30187204439b6693a118b9dde9cda04ae'/>
<id>urn:sha1:e1f055b30187204439b6693a118b9dde9cda04ae</id>
<content type='text'>
Keeping groups of BOs on the LRU is to time consuming on command submission.

Instead use the newly added BO priority to give a certain eviction order.

v2: agd: trivial warning fix

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Roger.He &lt;Hongbo.He@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/amdgpu: fix locking in bo creation error path</title>
<updated>2017-01-27T16:13:29Z</updated>
<author>
<name>Nicolai Hähnle</name>
<email>nicolai.haehnle@amd.com</email>
</author>
<published>2017-01-10T19:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1543f58cbc7f62c4ea0cca57bbb4a95dc752264'/>
<id>urn:sha1:f1543f58cbc7f62c4ea0cca57bbb4a95dc752264</id>
<content type='text'>
Unlock the resv lock only if we were the ones to lock it in the first
place.

Signed-off-by: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
Reviewed-by: Edward O'Callaghan &lt;funfunctor@folklore1984.net&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/amdgpu: lock reservation object while creating shadow bo</title>
<updated>2017-01-27T16:13:28Z</updated>
<author>
<name>Nicolai Hähnle</name>
<email>nicolai.haehnle@amd.com</email>
</author>
<published>2017-01-10T18:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36ea83d1512008ab6631c54971e8de8cf2f0a7b4'/>
<id>urn:sha1:36ea83d1512008ab6631c54971e8de8cf2f0a7b4</id>
<content type='text'>
ttm_bo_init checks that the reservation object is locked. This is
the caller's responsibility when resv != NULL. Otherwise, the inline
reservation object of the newly allocated buffer is used and must
explicitly be locked.

Uninterruptible w/w locks without an acquire context are always
successful.

v2: use ww_mutex_lock

Signed-off-by: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
Reviewed-by: Edward O'Callaghan &lt;funfunctor@folklore1984.net&gt; (v1)
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/amdgpu: move eviction counting to amdgpu_bo_move_notify</title>
<updated>2017-01-27T16:13:16Z</updated>
<author>
<name>Nicolai Hähnle</name>
<email>nicolai.haehnle@amd.com</email>
</author>
<published>2016-12-15T16:26:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=661a7606c97b6e6a73f553b0a6b60f553d5afa77'/>
<id>urn:sha1:661a7606c97b6e6a73f553b0a6b60f553d5afa77</id>
<content type='text'>
This catches evictions of shadow page tables from the GART. Since shadow
page tables are always stored in system memory, amdgpu_bo_move is never
called for them.

This fixes a crash during command submission that occurs when only a shadow
page table and no other BOs were evicted since the last submission.

Fixes: 1baa439fb2f4e586 ("drm/amdgpu: allocate shadow for pd/pt bo V2")
Signed-off-by: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@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;
</content>
</entry>
<entry>
<title>drm/ttm: add evict parameter to ttm_bo_driver::move_notify</title>
<updated>2017-01-27T16:13:15Z</updated>
<author>
<name>Nicolai Hähnle</name>
<email>nicolai.haehnle@amd.com</email>
</author>
<published>2016-12-15T16:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=66257db7a5276d7f1aff8850388a0eb675ffa2e1'/>
<id>urn:sha1:66257db7a5276d7f1aff8850388a0eb675ffa2e1</id>
<content type='text'>
Ensure that the driver can listen to evictions even when they don't take the
path through ttm_bo_driver::move.

This is crucial for amdgpu, which relies on an eviction counter to skip
re-binding page tables when possible.

Signed-off-by: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@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;
</content>
</entry>
</feed>
