<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/gpu, branch v5.4-rc4</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'drm-misc-fixes-2019-10-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes</title>
<updated>2019-10-17T20:40:28+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2019-10-17T20:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5c1e34b5159ec65bf33e2c1a62fa7158132c10cf'/>
<id>5c1e34b5159ec65bf33e2c1a62fa7158132c10cf</id>
<content type='text'>
-dma-resv: Change shared_count to post-increment to fix lima crash (Qiang)
-ttm: A couple fixes related to lifetime and restore prefault behavior
 (Christian &amp; Thomas)
-panfrost: Fill in missing feature reg values and fix stoppedjob timeouts
 (Steven)

Cc: Qiang Yu &lt;yuq825@gmail.com&gt;
Cc: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;

From: Sean Paul &lt;sean@poorly.run&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191017203419.GA142909@art_vandelay
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-dma-resv: Change shared_count to post-increment to fix lima crash (Qiang)
-ttm: A couple fixes related to lifetime and restore prefault behavior
 (Christian &amp; Thomas)
-panfrost: Fill in missing feature reg values and fix stoppedjob timeouts
 (Steven)

Cc: Qiang Yu &lt;yuq825@gmail.com&gt;
Cc: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;

From: Sean Paul &lt;sean@poorly.run&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191017203419.GA142909@art_vandelay
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'drm-fixes-5.4-2019-10-16' of git://people.freedesktop.org/~agd5f/linux into drm-fixes</title>
<updated>2019-10-17T20:12:05+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2019-10-17T20:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7557d2783850eec199cae78dac561e9b7de181be'/>
<id>7557d2783850eec199cae78dac561e9b7de181be</id>
<content type='text'>
drm-fixes-5.4-2019-10-16:

amdgpu:
- Powerplay fix for SMU7 parts
- Bail earlier when cik/si support is not set to 1
- Fix an SDMA issue on navi

radeon:
- revert a PPC fix which broken x86

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
From: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191017022443.3853-1-alexander.deucher@amd.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drm-fixes-5.4-2019-10-16:

amdgpu:
- Powerplay fix for SMU7 parts
- Bail earlier when cik/si support is not set to 1
- Fix an SDMA issue on navi

radeon:
- revert a PPC fix which broken x86

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
From: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191017022443.3853-1-alexander.deucher@amd.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Fixup preempt-to-busy vs resubmission of a virtual request</title>
<updated>2019-10-16T17:57:33+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-09-23T15:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a544a2a728e2e33bb7fc38dd542ecb90ee393eb'/>
<id>0a544a2a728e2e33bb7fc38dd542ecb90ee393eb</id>
<content type='text'>
As preempt-to-busy leaves the request on the HW as the resubmission is
processed, that request may complete in the background and even cause a
second virtual request to enter queue. This second virtual request
breaks our "single request in the virtual pipeline" assumptions.
Furthermore, as the virtual request may be completed and retired, we
lose the reference the virtual engine assumes is held. Normally, just
removing the request from the scheduler queue removes it from the
engine, but the virtual engine keeps track of its singleton request via
its ve-&gt;request. This pointer needs protecting with a reference.

v2: Drop unnecessary motion of rq-&gt;engine = owner

Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@linux.intel.com&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-1-chris@chris-wilson.co.uk
(cherry picked from commit b647c7df01b75761b4c0b1cb6f4841088c0b1121)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As preempt-to-busy leaves the request on the HW as the resubmission is
processed, that request may complete in the background and even cause a
second virtual request to enter queue. This second virtual request
breaks our "single request in the virtual pipeline" assumptions.
Furthermore, as the virtual request may be completed and retired, we
lose the reference the virtual engine assumes is held. Normally, just
removing the request from the scheduler queue removes it from the
engine, but the virtual engine keeps track of its singleton request via
its ve-&gt;request. This pointer needs protecting with a reference.

v2: Drop unnecessary motion of rq-&gt;engine = owner

Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@linux.intel.com&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-1-chris@chris-wilson.co.uk
(cherry picked from commit b647c7df01b75761b4c0b1cb6f4841088c0b1121)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/userptr: Never allow userptr into the mappable GGTT</title>
<updated>2019-10-16T17:56:50+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-09-28T08:25:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4f2a572eda67aecb1e7e4fc26cc985fb8158f6e8'/>
<id>4f2a572eda67aecb1e7e4fc26cc985fb8158f6e8</id>
<content type='text'>
Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to
invalidate userptr objects which also happen to be pulled into GGTT
mmaps. That is when we unbind the userptr object (on mmu invalidation),
we revoke all CPU mmaps, which may then recurse into mmu invalidation.

We looked for ways of breaking the cycle, but the revocation on
invalidation is required and cannot be avoided. The only solution we
could see was to not allow such GGTT bindings of userptr objects in the
first place. In practice, no one really wants to use a GGTT mmapping of
a CPU pointer...

Just before Daniel's explosive lockdep patches land in v5.4-rc1, we got
a genuine blip from CI:

&lt;4&gt;[  246.793958] ======================================================
&lt;4&gt;[  246.793972] WARNING: possible circular locking dependency detected
&lt;4&gt;[  246.793989] 5.3.0-gbd6c56f50d15-drmtip_372+ #1 Tainted: G     U
&lt;4&gt;[  246.794003] ------------------------------------------------------
&lt;4&gt;[  246.794017] kswapd0/145 is trying to acquire lock:
&lt;4&gt;[  246.794030] 000000003f565be6 (&amp;dev-&gt;struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
&lt;4&gt;[  246.794250]
                  but task is already holding lock:
&lt;4&gt;[  246.794263] 000000001799cef9 (&amp;anon_vma-&gt;rwsem){++++}, at: page_lock_anon_vma_read+0xe6/0x2a0
&lt;4&gt;[  246.794291]
                  which lock already depends on the new lock.

&lt;4&gt;[  246.794307]
                  the existing dependency chain (in reverse order) is:
&lt;4&gt;[  246.794322]
                  -&gt; #3 (&amp;anon_vma-&gt;rwsem){++++}:
&lt;4&gt;[  246.794344]        down_write+0x33/0x70
&lt;4&gt;[  246.794357]        __vma_adjust+0x3d9/0x7b0
&lt;4&gt;[  246.794370]        __split_vma+0x16a/0x180
&lt;4&gt;[  246.794385]        mprotect_fixup+0x2a5/0x320
&lt;4&gt;[  246.794399]        do_mprotect_pkey+0x208/0x2e0
&lt;4&gt;[  246.794413]        __x64_sys_mprotect+0x16/0x20
&lt;4&gt;[  246.794429]        do_syscall_64+0x55/0x1c0
&lt;4&gt;[  246.794443]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt;[  246.794456]
                  -&gt; #2 (&amp;mapping-&gt;i_mmap_rwsem){++++}:
&lt;4&gt;[  246.794478]        down_write+0x33/0x70
&lt;4&gt;[  246.794493]        unmap_mapping_pages+0x48/0x130
&lt;4&gt;[  246.794519]        i915_vma_revoke_mmap+0x81/0x1b0 [i915]
&lt;4&gt;[  246.794519]        i915_vma_unbind+0x11d/0x4a0 [i915]
&lt;4&gt;[  246.794519]        i915_vma_destroy+0x31/0x300 [i915]
&lt;4&gt;[  246.794519]        __i915_gem_free_objects+0xb8/0x4b0 [i915]
&lt;4&gt;[  246.794519]        drm_file_free.part.0+0x1e6/0x290
&lt;4&gt;[  246.794519]        drm_release+0xa6/0xe0
&lt;4&gt;[  246.794519]        __fput+0xc2/0x250
&lt;4&gt;[  246.794519]        task_work_run+0x82/0xb0
&lt;4&gt;[  246.794519]        do_exit+0x35b/0xdb0
&lt;4&gt;[  246.794519]        do_group_exit+0x34/0xb0
&lt;4&gt;[  246.794519]        __x64_sys_exit_group+0xf/0x10
&lt;4&gt;[  246.794519]        do_syscall_64+0x55/0x1c0
&lt;4&gt;[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt;[  246.794519]
                  -&gt; #1 (&amp;vm-&gt;mutex){+.+.}:
&lt;4&gt;[  246.794519]        i915_gem_shrinker_taints_mutex+0x6d/0xe0 [i915]
&lt;4&gt;[  246.794519]        i915_address_space_init+0x9f/0x160 [i915]
&lt;4&gt;[  246.794519]        i915_ggtt_init_hw+0x55/0x170 [i915]
&lt;4&gt;[  246.794519]        i915_driver_probe+0xc9f/0x1620 [i915]
&lt;4&gt;[  246.794519]        i915_pci_probe+0x43/0x1b0 [i915]
&lt;4&gt;[  246.794519]        pci_device_probe+0x9e/0x120
&lt;4&gt;[  246.794519]        really_probe+0xea/0x3d0
&lt;4&gt;[  246.794519]        driver_probe_device+0x10b/0x120
&lt;4&gt;[  246.794519]        device_driver_attach+0x4a/0x50
&lt;4&gt;[  246.794519]        __driver_attach+0x97/0x130
&lt;4&gt;[  246.794519]        bus_for_each_dev+0x74/0xc0
&lt;4&gt;[  246.794519]        bus_add_driver+0x13f/0x210
&lt;4&gt;[  246.794519]        driver_register+0x56/0xe0
&lt;4&gt;[  246.794519]        do_one_initcall+0x58/0x300
&lt;4&gt;[  246.794519]        do_init_module+0x56/0x1f6
&lt;4&gt;[  246.794519]        load_module+0x25bd/0x2a40
&lt;4&gt;[  246.794519]        __se_sys_finit_module+0xd3/0xf0
&lt;4&gt;[  246.794519]        do_syscall_64+0x55/0x1c0
&lt;4&gt;[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt;[  246.794519]
                  -&gt; #0 (&amp;dev-&gt;struct_mutex/1){+.+.}:
&lt;4&gt;[  246.794519]        __lock_acquire+0x15d8/0x1e90
&lt;4&gt;[  246.794519]        lock_acquire+0xa6/0x1c0
&lt;4&gt;[  246.794519]        __mutex_lock+0x9d/0x9b0
&lt;4&gt;[  246.794519]        userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
&lt;4&gt;[  246.794519]        __mmu_notifier_invalidate_range_start+0x85/0x110
&lt;4&gt;[  246.794519]        try_to_unmap_one+0x76b/0x860
&lt;4&gt;[  246.794519]        rmap_walk_anon+0x104/0x280
&lt;4&gt;[  246.794519]        try_to_unmap+0xc0/0xf0
&lt;4&gt;[  246.794519]        shrink_page_list+0x561/0xc10
&lt;4&gt;[  246.794519]        shrink_inactive_list+0x220/0x440
&lt;4&gt;[  246.794519]        shrink_node_memcg+0x36e/0x740
&lt;4&gt;[  246.794519]        shrink_node+0xcb/0x490
&lt;4&gt;[  246.794519]        balance_pgdat+0x241/0x580
&lt;4&gt;[  246.794519]        kswapd+0x16c/0x530
&lt;4&gt;[  246.794519]        kthread+0x119/0x130
&lt;4&gt;[  246.794519]        ret_from_fork+0x24/0x50
&lt;4&gt;[  246.794519]
                  other info that might help us debug this:

&lt;4&gt;[  246.794519] Chain exists of:
                    &amp;dev-&gt;struct_mutex/1 --&gt; &amp;mapping-&gt;i_mmap_rwsem --&gt; &amp;anon_vma-&gt;rwsem

&lt;4&gt;[  246.794519]  Possible unsafe locking scenario:

&lt;4&gt;[  246.794519]        CPU0                    CPU1
&lt;4&gt;[  246.794519]        ----                    ----
&lt;4&gt;[  246.794519]   lock(&amp;anon_vma-&gt;rwsem);
&lt;4&gt;[  246.794519]                                lock(&amp;mapping-&gt;i_mmap_rwsem);
&lt;4&gt;[  246.794519]                                lock(&amp;anon_vma-&gt;rwsem);
&lt;4&gt;[  246.794519]   lock(&amp;dev-&gt;struct_mutex/1);
&lt;4&gt;[  246.794519]
                   *** DEADLOCK ***

v2: Say no to mmap_ioctl

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111744
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111870
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190928082546.3473-1-chris@chris-wilson.co.uk
(cherry picked from commit a4311745bba9763e3c965643d4531bd5765b0513)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to
invalidate userptr objects which also happen to be pulled into GGTT
mmaps. That is when we unbind the userptr object (on mmu invalidation),
we revoke all CPU mmaps, which may then recurse into mmu invalidation.

We looked for ways of breaking the cycle, but the revocation on
invalidation is required and cannot be avoided. The only solution we
could see was to not allow such GGTT bindings of userptr objects in the
first place. In practice, no one really wants to use a GGTT mmapping of
a CPU pointer...

Just before Daniel's explosive lockdep patches land in v5.4-rc1, we got
a genuine blip from CI:

&lt;4&gt;[  246.793958] ======================================================
&lt;4&gt;[  246.793972] WARNING: possible circular locking dependency detected
&lt;4&gt;[  246.793989] 5.3.0-gbd6c56f50d15-drmtip_372+ #1 Tainted: G     U
&lt;4&gt;[  246.794003] ------------------------------------------------------
&lt;4&gt;[  246.794017] kswapd0/145 is trying to acquire lock:
&lt;4&gt;[  246.794030] 000000003f565be6 (&amp;dev-&gt;struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
&lt;4&gt;[  246.794250]
                  but task is already holding lock:
&lt;4&gt;[  246.794263] 000000001799cef9 (&amp;anon_vma-&gt;rwsem){++++}, at: page_lock_anon_vma_read+0xe6/0x2a0
&lt;4&gt;[  246.794291]
                  which lock already depends on the new lock.

&lt;4&gt;[  246.794307]
                  the existing dependency chain (in reverse order) is:
&lt;4&gt;[  246.794322]
                  -&gt; #3 (&amp;anon_vma-&gt;rwsem){++++}:
&lt;4&gt;[  246.794344]        down_write+0x33/0x70
&lt;4&gt;[  246.794357]        __vma_adjust+0x3d9/0x7b0
&lt;4&gt;[  246.794370]        __split_vma+0x16a/0x180
&lt;4&gt;[  246.794385]        mprotect_fixup+0x2a5/0x320
&lt;4&gt;[  246.794399]        do_mprotect_pkey+0x208/0x2e0
&lt;4&gt;[  246.794413]        __x64_sys_mprotect+0x16/0x20
&lt;4&gt;[  246.794429]        do_syscall_64+0x55/0x1c0
&lt;4&gt;[  246.794443]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt;[  246.794456]
                  -&gt; #2 (&amp;mapping-&gt;i_mmap_rwsem){++++}:
&lt;4&gt;[  246.794478]        down_write+0x33/0x70
&lt;4&gt;[  246.794493]        unmap_mapping_pages+0x48/0x130
&lt;4&gt;[  246.794519]        i915_vma_revoke_mmap+0x81/0x1b0 [i915]
&lt;4&gt;[  246.794519]        i915_vma_unbind+0x11d/0x4a0 [i915]
&lt;4&gt;[  246.794519]        i915_vma_destroy+0x31/0x300 [i915]
&lt;4&gt;[  246.794519]        __i915_gem_free_objects+0xb8/0x4b0 [i915]
&lt;4&gt;[  246.794519]        drm_file_free.part.0+0x1e6/0x290
&lt;4&gt;[  246.794519]        drm_release+0xa6/0xe0
&lt;4&gt;[  246.794519]        __fput+0xc2/0x250
&lt;4&gt;[  246.794519]        task_work_run+0x82/0xb0
&lt;4&gt;[  246.794519]        do_exit+0x35b/0xdb0
&lt;4&gt;[  246.794519]        do_group_exit+0x34/0xb0
&lt;4&gt;[  246.794519]        __x64_sys_exit_group+0xf/0x10
&lt;4&gt;[  246.794519]        do_syscall_64+0x55/0x1c0
&lt;4&gt;[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt;[  246.794519]
                  -&gt; #1 (&amp;vm-&gt;mutex){+.+.}:
&lt;4&gt;[  246.794519]        i915_gem_shrinker_taints_mutex+0x6d/0xe0 [i915]
&lt;4&gt;[  246.794519]        i915_address_space_init+0x9f/0x160 [i915]
&lt;4&gt;[  246.794519]        i915_ggtt_init_hw+0x55/0x170 [i915]
&lt;4&gt;[  246.794519]        i915_driver_probe+0xc9f/0x1620 [i915]
&lt;4&gt;[  246.794519]        i915_pci_probe+0x43/0x1b0 [i915]
&lt;4&gt;[  246.794519]        pci_device_probe+0x9e/0x120
&lt;4&gt;[  246.794519]        really_probe+0xea/0x3d0
&lt;4&gt;[  246.794519]        driver_probe_device+0x10b/0x120
&lt;4&gt;[  246.794519]        device_driver_attach+0x4a/0x50
&lt;4&gt;[  246.794519]        __driver_attach+0x97/0x130
&lt;4&gt;[  246.794519]        bus_for_each_dev+0x74/0xc0
&lt;4&gt;[  246.794519]        bus_add_driver+0x13f/0x210
&lt;4&gt;[  246.794519]        driver_register+0x56/0xe0
&lt;4&gt;[  246.794519]        do_one_initcall+0x58/0x300
&lt;4&gt;[  246.794519]        do_init_module+0x56/0x1f6
&lt;4&gt;[  246.794519]        load_module+0x25bd/0x2a40
&lt;4&gt;[  246.794519]        __se_sys_finit_module+0xd3/0xf0
&lt;4&gt;[  246.794519]        do_syscall_64+0x55/0x1c0
&lt;4&gt;[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt;[  246.794519]
                  -&gt; #0 (&amp;dev-&gt;struct_mutex/1){+.+.}:
&lt;4&gt;[  246.794519]        __lock_acquire+0x15d8/0x1e90
&lt;4&gt;[  246.794519]        lock_acquire+0xa6/0x1c0
&lt;4&gt;[  246.794519]        __mutex_lock+0x9d/0x9b0
&lt;4&gt;[  246.794519]        userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
&lt;4&gt;[  246.794519]        __mmu_notifier_invalidate_range_start+0x85/0x110
&lt;4&gt;[  246.794519]        try_to_unmap_one+0x76b/0x860
&lt;4&gt;[  246.794519]        rmap_walk_anon+0x104/0x280
&lt;4&gt;[  246.794519]        try_to_unmap+0xc0/0xf0
&lt;4&gt;[  246.794519]        shrink_page_list+0x561/0xc10
&lt;4&gt;[  246.794519]        shrink_inactive_list+0x220/0x440
&lt;4&gt;[  246.794519]        shrink_node_memcg+0x36e/0x740
&lt;4&gt;[  246.794519]        shrink_node+0xcb/0x490
&lt;4&gt;[  246.794519]        balance_pgdat+0x241/0x580
&lt;4&gt;[  246.794519]        kswapd+0x16c/0x530
&lt;4&gt;[  246.794519]        kthread+0x119/0x130
&lt;4&gt;[  246.794519]        ret_from_fork+0x24/0x50
&lt;4&gt;[  246.794519]
                  other info that might help us debug this:

&lt;4&gt;[  246.794519] Chain exists of:
                    &amp;dev-&gt;struct_mutex/1 --&gt; &amp;mapping-&gt;i_mmap_rwsem --&gt; &amp;anon_vma-&gt;rwsem

&lt;4&gt;[  246.794519]  Possible unsafe locking scenario:

&lt;4&gt;[  246.794519]        CPU0                    CPU1
&lt;4&gt;[  246.794519]        ----                    ----
&lt;4&gt;[  246.794519]   lock(&amp;anon_vma-&gt;rwsem);
&lt;4&gt;[  246.794519]                                lock(&amp;mapping-&gt;i_mmap_rwsem);
&lt;4&gt;[  246.794519]                                lock(&amp;anon_vma-&gt;rwsem);
&lt;4&gt;[  246.794519]   lock(&amp;dev-&gt;struct_mutex/1);
&lt;4&gt;[  246.794519]
                   *** DEADLOCK ***

v2: Say no to mmap_ioctl

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111744
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111870
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190928082546.3473-1-chris@chris-wilson.co.uk
(cherry picked from commit a4311745bba9763e3c965643d4531bd5765b0513)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Favor last VBT child device with conflicting AUX ch/DDC pin</title>
<updated>2019-10-16T17:56:50+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-10-11T20:20:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0336ab580878f4c5663dfa2b66095821fdc3e588'/>
<id>0336ab580878f4c5663dfa2b66095821fdc3e588</id>
<content type='text'>
The first come first served apporoach to handling the VBT
child device AUX ch conflicts has backfired. We have machines
in the wild where the VBT specifies both port A eDP and
port E DP (in that order) with port E being the real one.

So let's try to flip the preference around and let the last
child device win once again.

Cc: stable@vger.kernel.org
Cc: Jani Nikula &lt;jani.nikula@intel.com&gt;
Tested-by: Masami Ichikawa &lt;masami256@gmail.com&gt;
Tested-by: Torsten &lt;freedesktop201910@liggy.de&gt;
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111966
Fixes: 36a0f92020dc ("drm/i915/bios: make child device order the priority order")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191011202030.8829-1-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
(cherry picked from commit 41e35ffb380bde1379e4030bb5b2ac824d5139cf)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The first come first served apporoach to handling the VBT
child device AUX ch conflicts has backfired. We have machines
in the wild where the VBT specifies both port A eDP and
port E DP (in that order) with port E being the real one.

So let's try to flip the preference around and let the last
child device win once again.

Cc: stable@vger.kernel.org
Cc: Jani Nikula &lt;jani.nikula@intel.com&gt;
Tested-by: Masami Ichikawa &lt;masami256@gmail.com&gt;
Tested-by: Torsten &lt;freedesktop201910@liggy.de&gt;
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111966
Fixes: 36a0f92020dc ("drm/i915/bios: make child device order the priority order")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191011202030.8829-1-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
(cherry picked from commit 41e35ffb380bde1379e4030bb5b2ac824d5139cf)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915/execlists: Refactor -EIO markup of hung requests</title>
<updated>2019-10-16T17:55:36+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-09-23T11:00:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=128260a41eeba4dd8d4433eab96aeeb7192392a4'/>
<id>128260a41eeba4dd8d4433eab96aeeb7192392a4</id>
<content type='text'>
Pull setting -EIO on the hung requests into its own utility function.
Having allowed ourselves to short-circuit submission of completed
requests, we can now do the mark_eio() prior to submission and avoid
some redundant operations.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190923110056.15176-4-chris@chris-wilson.co.uk
(cherry picked from commit 0d7cf7bc15e75bf79f2f65d61d19f896609f816a)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull setting -EIO on the hung requests into its own utility function.
Having allowed ourselves to short-circuit submission of completed
requests, we can now do the mark_eio() prior to submission and avoid
some redundant operations.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190923110056.15176-4-chris@chris-wilson.co.uk
(cherry picked from commit 0d7cf7bc15e75bf79f2f65d61d19f896609f816a)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/panfrost: Handle resetting on timeout better</title>
<updated>2019-10-15T16:38:22+00:00</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2019-10-09T09:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b3ec8134f5f9fa1ed0a538441a495521078bbee'/>
<id>5b3ec8134f5f9fa1ed0a538441a495521078bbee</id>
<content type='text'>
Panfrost uses multiple schedulers (one for each slot, so 2 in reality),
and on a timeout has to stop all the schedulers to safely perform a
reset. However more than one scheduler can trigger a timeout at the same
time. This race condition results in jobs being freed while they are
still in use.

When stopping other slots use cancel_delayed_work_sync() to ensure that
any timeout started for that slot has completed. Also use
mutex_trylock() to obtain reset_lock. This means that only one thread
attempts the reset, the other threads will simply complete without doing
anything (the first thread will wait for this in the call to
cancel_delayed_work_sync()).

While we're here and since the function is already dependent on
sched_job not being NULL, let's remove the unnecessary checks.

Fixes: aa20236784ab ("drm/panfrost: Prevent concurrent resets")
Tested-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191009094456.9704-1-steven.price@arm.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Panfrost uses multiple schedulers (one for each slot, so 2 in reality),
and on a timeout has to stop all the schedulers to safely perform a
reset. However more than one scheduler can trigger a timeout at the same
time. This race condition results in jobs being freed while they are
still in use.

When stopping other slots use cancel_delayed_work_sync() to ensure that
any timeout started for that slot has completed. Also use
mutex_trylock() to obtain reset_lock. This means that only one thread
attempts the reset, the other threads will simply complete without doing
anything (the first thread will wait for this in the call to
cancel_delayed_work_sync()).

While we're here and since the function is already dependent on
sched_job not being NULL, let's remove the unnecessary checks.

Fixes: aa20236784ab ("drm/panfrost: Prevent concurrent resets")
Tested-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191009094456.9704-1-steven.price@arm.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/panfrost: Add missing GPU feature registers</title>
<updated>2019-10-14T18:46:48+00:00</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2019-10-14T15:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=eda6d764ac33d9ce8d656fa381f05b3feae09085'/>
<id>eda6d764ac33d9ce8d656fa381f05b3feae09085</id>
<content type='text'>
Three feature registers were declared but never actually read from the
GPU. Add THREAD_MAX_THREADS, THREAD_MAX_WORKGROUP_SIZE and
THREAD_MAX_BARRIER_SIZE so that the complete set are available.

Fixes: 4bced8bea094 ("drm/panfrost: Export all GPU feature registers")
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191014151515.13839-1-steven.price@arm.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Three feature registers were declared but never actually read from the
GPU. Add THREAD_MAX_THREADS, THREAD_MAX_WORKGROUP_SIZE and
THREAD_MAX_BARRIER_SIZE so that the complete set are available.

Fixes: 4bced8bea094 ("drm/panfrost: Export all GPU feature registers")
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191014151515.13839-1-steven.price@arm.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: fix handling in ttm_bo_add_mem_to_lru</title>
<updated>2019-10-14T11:21:15+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2019-10-10T11:24:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7fbc899ddeaa9aaef0ba646529089149572c84ee'/>
<id>7fbc899ddeaa9aaef0ba646529089149572c84ee</id>
<content type='text'>
We should not add the BO to the swap LRU when the new mem is fixed and
the TTM object about to be destroyed.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Kevin Wang &lt;kevin1.wang@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/335246/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should not add the BO to the swap LRU when the new mem is fixed and
the TTM object about to be destroyed.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Kevin Wang &lt;kevin1.wang@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/335246/
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/ttm: Restore ttm prefaulting</title>
<updated>2019-10-14T10:49:24+00:00</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2019-09-12T18:38:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=941f2f72dbbe0cf8c2d6e0b180a8021a0ec477fa'/>
<id>941f2f72dbbe0cf8c2d6e0b180a8021a0ec477fa</id>
<content type='text'>
Commit 4daa4fba3a38 ("gpu: drm: ttm: Adding new return type vm_fault_t")
broke TTM prefaulting. Since vmf_insert_mixed() typically always returns
VM_FAULT_NOPAGE, prefaulting stops after the second PTE.

Restore (almost) the original behaviour. Unfortunately we can no longer
with the new vm_fault_t return type determine whether a prefaulting
PTE insertion hit an already populated PTE, and terminate the insertion
loop. Instead we continue with the pre-determined number of prefaults.

Fixes: 4daa4fba3a38 ("gpu: drm: ttm: Adding new return type vm_fault_t")
Cc: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/330387/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 4daa4fba3a38 ("gpu: drm: ttm: Adding new return type vm_fault_t")
broke TTM prefaulting. Since vmf_insert_mixed() typically always returns
VM_FAULT_NOPAGE, prefaulting stops after the second PTE.

Restore (almost) the original behaviour. Unfortunately we can no longer
with the new vm_fault_t return type determine whether a prefaulting
PTE insertion hit an already populated PTE, and terminate the insertion
loop. Instead we continue with the pre-determined number of prefaults.

Fixes: 4daa4fba3a38 ("gpu: drm: ttm: Adding new return type vm_fault_t")
Cc: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/330387/
</pre>
</div>
</content>
</entry>
</feed>
