- 28 Mar, 2015 1 commit
-
-
Maarten Lankhorst authored
[ Upstream commit b6610101 ] A normal wait adds to the front of the tail. By doing something similar to fence_default_wait the fence code can run without racing. This is a complete fix for "panic on suspend from KDE with radeon", and a partial fix for "Radeon: System pauses on TAHITI". On tahiti si_irq_set needs to be fixed too, to completely flush the writes before radeon_fence_activity is called in radeon_fence_enable_signaling. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=90741 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=90861 Signed-off-by:
Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Reported-by:
Jon Arne Jørgensen <jonjon.arnearne@gmail.com> Reported-and-tested-by:
Gustaw Smolarczyk <wielkiegie@gmail.com> Cc: stable@vger.kernel.org (v3.18+) Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Sasha Levin <sasha.levin@oracle.com>
-
- 03 Oct, 2014 1 commit
-
-
Maarten Lankhorst authored
Not the whole world is a radeon! :-) Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 01 Sep, 2014 1 commit
-
-
Maarten Lankhorst authored
Changes since v1: - Kill the sw interrupt dance, add and use radeon_irq_kms_sw_irq_get_delayed instead. - Change custom wait function, lockdep complained about it. Holding exclusive_lock in the wait function might cause deadlocks. Instead do all the processing in .enable_signaling, and wait on the global fence_queue to pick up gpu resets. - Process all fences in radeon_gpu_reset after reset to close a race with the trylock in enable_signaling. Changes since v2: - Small changes to work with the rewritten lockup recovery patches. Changes since v3: - Call radeon_fence_schedule_check when exclusive_lock cannot be acquired to always cause a wake up. - Reset irqs from hangup check. - Drop reading seqno in the callback, use cached value. - Fix indentation in radeon_fence_default_wait - Add a radeon_test_signaled function, drop a few test_bit calls. - Make to_radeon_fence global. Signed-off-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by:
Christian König <christian.koenig@amd.com>
-
- 27 Aug, 2014 5 commits
-
-
Christian König authored
It's causing issues with VMID handling and comparing the fence value two times actually doesn't make handling faster. v2: rebased on reset changes Signed-off-by:
Christian König <christian.koenig@amd.com> Reviewed-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Maarten Lankhorst authored
This makes it possible to wait for a specific amount of time, rather than wait until infinity. v2 (chk): rebased on other changes Signed-off-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Christian König authored
v5 (chk): complete rework, start when the first fence is emitted, stop when the last fence is signalled, make it work correctly with GPU resets, cleanup radeon_fence_wait_seq Signed-off-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Christian König authored
Instead of resetting all fence numbers, only reset the number of the problematic ring. Split out from a patch from Maarten Lankhorst <maarten.lankhorst@canonical.com> v2 (agd5f): rebase build fix Signed-off-by:
Christian König <christian.koenig@amd.com> Reviewed-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Christian König authored
Wake up all fences when we manually trigger a reset. Signed-off-by:
Christian König <christian.koenig@amd.com> Reviewed-by:
Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 10 Jun, 2014 1 commit
-
-
Christian König authored
Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 28 Feb, 2014 1 commit
-
-
Christian König authored
We no longer need to take the ring lock while checking for a gpu lockup, so just cleanup the code. Signed-off-by:
Christian König <christian.koenig@amd.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 29 Jan, 2014 1 commit
-
-
Christian König authored
Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 24 Dec, 2013 1 commit
-
-
Christian König authored
Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 15 Nov, 2013 1 commit
-
-
Christian König authored
To workaround bugs and/or certain limits it's sometimes useful to fall back to waiting on fences. Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-
- 06 Nov, 2013 1 commit
-
-
Christian König authored
Don't block forever if there is nothing to wait for. Signed-off-by:
Christian König <christian.koenig@amd.com> Tested-by:
Rafa? Mi?ecki <zajec5@gmail.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 01 Nov, 2013 1 commit
-
-
Christian König authored
Stop fiddling with jiffies, always wait for RADEON_FENCE_JIFFIES_TIMEOUT. Consolidate the two wait sequence implementations into just one function. Activate all waiters and remember if the reset was already done instead of trying to reset from only one thread. v2: clear reset flag earlier to avoid timeout in IB test Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 07 Aug, 2013 1 commit
-
-
Christian König authored
Otherwise just reinitialize from scratch on resume, and so make it more likely to succeed. Signed-off-by:
Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 14 Jul, 2013 1 commit
-
-
Christian König authored
Changing the UVD BOs offset on suspend/resume doesn't work because the VCPU internally keeps pointers to it. Just keep it always pinned and save the content manually. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66425 v2: fix compiler warning v3: fix CIK support Note: a version of this patch needs to go to stable. Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 12 Jun, 2013 1 commit
-
-
Jerome Glisse authored
UVD ring can't use scratch thus it does need writeback buffer to keep a valid address or radeon_ring_backup will trigger a kernel fault. It's ok to not unpin the write back buffer on suspend as it leave in gtt and thus does not need eviction. v2: Fix the uvd case. Reported and tracked by Wojtek <wojtask9@wp.pl> Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 02 May, 2013 1 commit
-
-
Christian König authored
Also init the scratch reg to zero on the UVD ring. This fixes UVD on AGP based cards. Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 22 Apr, 2013 1 commit
-
-
Christian König authored
Signed-off-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 09 Apr, 2013 1 commit
-
-
Christian König authored
Just everything needed to decode videos using UVD. v6: just all the bugfixes and support for R7xx-SI merged in one patch v7: UVD_CGC_GATE is a write only register, lockup detection fix v8: split out VRAM fallback changes, remove support for RV770, add support for HEMLOCK, add buffer sizes checks Signed-off-by:
Christian König <christian.koenig@amd.com> Reviewed-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 19 Dec, 2012 2 commits
-
-
Jerome Glisse authored
radeon_fence_wait_empty_locked should not trigger GPU reset as no place where it's call from would benefit from such thing and it actually lead to a kernel deadlock in case the reset is triggered from pm codepath. Instead force ring completion in place where it makes sense or return early in others. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-
Jerome Glisse authored
Force all fence to signal if GPU reset failed so no process get stuck on waiting fence. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-
- 12 Dec, 2012 1 commit
-
-
Jerome Glisse authored
The dma ring can't write to register thus have to write to memory its fence value. This ensure that it doesn't try to use scratch register for dma ring fence driver. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=58166 Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 02 Oct, 2012 2 commits
-
-
David Howells authored
Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by:
David Howells <dhowells@redhat.com> Acked-by:
Dave Airlie <airlied@redhat.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by:
Dave Jones <davej@redhat.com>
-
David Howells authored
Remove redundant DRM UAPI header #inclusions from drivers/gpu/. Remove redundant #inclusions of core DRM UAPI headers (drm.h, drm_mode.h and drm_sarea.h). They are now #included via drmP.h and drm_crtc.h via a preceding patch. Without this patch and the patch to make include the UAPI headers from the core headers, after the UAPI split, the DRM C sources cannot find these UAPI headers because the DRM code relies on specific -I flags to make #include "..." work on headers in include/drm/ - but that does not work after the UAPI split without adding more -I flags. Signed-off-by:
David Howells <dhowells@redhat.com> Acked-by:
Dave Airlie <airlied@redhat.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by:
Dave Jones <davej@redhat.com>
-
- 20 Sep, 2012 1 commit
-
-
Lauri Kasanen authored
Let's allow GCC to optimize better. This exposed some five unused functions, but this patch doesn't remove them. Signed-off-by:
Lauri Kasanen <cand@gmx.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 13 Sep, 2012 1 commit
-
-
Christian König authored
Only increase the higher 32bits if we really detect a wrap around. v2: instead of increasing the higher 32bits just use the higher 32bits from the last emitted fence. v3: also use last emitted fence value as upper limit. The intention of this patch is to make fences as robust as they where before introducing 64bit fences. This is necessary because on older systems it looks like the fence value gets corrupted on initialization. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=51344 Should also fix: https://bugs.freedesktop.org/show_bug.cgi?id=54129 https://bugs.freedesktop.org/show_bug.cgi?id=54662 https://bugzilla.redhat.com/show_bug.cgi?id=846505 https://bugzilla.redhat.com/show_bug.cgi?id=845639 3.5 needs a separate patch due to changes in the fence code. Will send that out separately. Signed-off-by:
Christian König <deathsimple@vodafone.de> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 18 Jul, 2012 2 commits
-
-
Alex Deucher authored
Adds documentation to most of the functions in radeon_fence.c v2: address Christian's comments: - split common concept description into it's own comment - fix description of intr parameter - Improve description of -EDEADLK error Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Reviewed-by:
Christian König <christian.koenig@amd.com>
-
Christian König authored
Otherwise the sa managers out of memory handling doesn't work. Signed-off-by:
Christian König <deathsimple@vodafone.de> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 17 Jul, 2012 3 commits
-
-
Christian König authored
Start with last signaled fence number instead of last emitted one. Signed-off-by:
Christian König <deathsimple@vodafone.de> Reviewed-by:
Jerome Glisse <jglisse@redhat.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
Christian König authored
It is possible that radeon_fence_process is called after writeback is disabled for suspend, leading to an invalid read of register 0x0. This fixes a problem for me where the fence value is temporary incremented by 0x100000000 on suspend/resume. Signed-off-by:
Christian König <deathsimple@vodafone.de> Reviewed-by:
Jerome Glisse <jglisse@redhat.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
Christian König authored
Instead of returning the error handle it directly and while at it fix the comments about the ring lock. Signed-off-by:
Christian König <deathsimple@vodafone.de> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com> Reviewed-by:
Jerome Glisse <jglisse@redhat.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 21 Jun, 2012 2 commits
-
-
Christian König authored
v2: BUG_ON not matching rings. Signed-off-by:
Christian König <deathsimple@vodafone.de> Reviewed-by:
Jerome Glisse <jglisse@redhat.com>
-
Christian König authored
It is completely unnecessary to create fences before they are emitted, so remove it and a bunch of checks if fences are emitted or not. Signed-off-by:
Christian König <deathsimple@vodafone.de> Reviewed-by:
Jerome Glisse <jglisse@redhat.com>
-
- 09 May, 2012 5 commits
-
-
Dave Airlie authored
/ssd/git/drm-core-next/drivers/gpu/drm/radeon/radeon_fence.c: In function ‘radeon_debugfs_fence_info’: /ssd/git/drm-core-next/drivers/gpu/drm/radeon/radeon_fence.c:606:7: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long int’ [-Wformat] Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
It never really belonged there in the first place. Signed-off-by:
Christian König <deathsimple@vodafone.de> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
Directly use the suballocator to get small chunks of memory. It's equally fast and doesn't crash when we encounter a GPU reset. v2: rebased on new SA interface. Signed-off-by:
Christian König <deathsimple@vodafone.de> Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
Use one wait queue for all rings. When one ring progress, other likely does to and we are not expecting to have a lot of waiter anyway. Also add a fence_wait_any that will wait until the first fence in the fence array (one fence per ring) is signaled. This allow to wait on all rings. v2: some minor cleanups and improvements. Signed-off-by:
Christian König <deathsimple@vodafone.de> Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Christian König authored
Some callers illegal called fence_wait_next/empty while holding the ring emission mutex. So don't relock the mutex in that cases, and move the actual locking into the fence code. v2: Don't try to unlock the mutex if it isn't locked. Signed-off-by:
Christian König <deathsimple@vodafone.de> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-