#
0a999f7d |
|
16-Nov-2020 |
Lee Jones <lee.jones@linaro.org> |
drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c:4845:5: warning: no previous prototype for ‘cik_gpu_check_soft_reset’ [-Wmissing-prototypes] 4845 | u32 cik_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
f934f937 |
|
10-Nov-2020 |
Lee Jones <lee.jones@linaro.org> |
drm/radeon/cik_sdma: Demote vague attempt at kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik_sdma.c:949: warning: Function parameter or member 'ring' not described in 'cik_dma_vm_flush' drivers/gpu/drm/radeon/cik_sdma.c:949: warning: Function parameter or member 'vm_id' not described in 'cik_dma_vm_flush' drivers/gpu/drm/radeon/cik_sdma.c:949: warning: Function parameter or member 'pd_addr' not described in 'cik_dma_vm_flush' Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
fbd62354 |
|
03-Jan-2020 |
Wambui Karuga <wambui.karugax@gmail.com> |
drm/radeon: remove boolean checks in if statements. Remove unnecessary variable comparisions to true/false in if statements and check the value of the variable directly. Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
52791eee |
|
11-Aug-2019 |
Christian König <christian.koenig@amd.com> |
dma-buf: rename reservation_object to dma_resv Be more consistent with the naming of the other DMA-buf objects. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/323401/
|
#
c182615f |
|
08-Jun-2019 |
Sam Ravnborg <sam@ravnborg.org> |
drm/radeon: drop use of drmP.h (2/2) Drop use of drmP.h in remaining .c files. To ease review a little the drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-8-sam@ravnborg.org
|
#
0e1a351d |
|
08-Jun-2019 |
Sam Ravnborg <sam@ravnborg.org> |
drm/radeon: drop dependency on drm_os_linux.h The drm_os_linux.h header file is deprecated. Drop all uses of symbols from this file. All macros are just opencoded. A few adjustments to include files was required as the obsolete drm_os_linux.h included these headers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-4-sam@ravnborg.org
|
#
04db4caf |
|
07-Feb-2016 |
Matthew Dawson <matthew@mjdsystems.ca> |
drm/radeon: Avoid double gpu reset by adding a timeout on IB ring tests. When the radeon driver resets a gpu, it attempts to test whether all the rings can successfully handle an IB. If these rings fail to respond, the process will wait forever. Another gpu reset can't happen at this point, as the current reset holds a lock required to do so. Instead, make all the IB tests run with a timeout, so the system can attempt to recover in this case. While this doesn't fix the underlying issue with card resets failing, it gives the system a higher chance of recovering. These timeouts have been confirmed to help both a Tathi and Hawaii card recover after a gpu reset. This also adds a new function, radeon_fence_wait_timeout, that behaves like fence_wait_timeout. It is used instead of fence_wait_timeout as it continues to work during a reset. radeon_fence_wait is changed to be implemented using this function. V2: - Changed the timeout to 1s, as the default 10s from radeon_wait_timeout was too long. A timeout of 100ms was tested and found to be too short. - Changed radeon_fence_wait_timeout to behave more like fence_wait_timeout. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Matthew Dawson <matthew@mjdsystems.ca> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
2ba8d1bb |
|
19-Jun-2015 |
Jérôme Glisse <jglisse@redhat.com> |
drm/radeon: SDMA fix hibernation (CI GPU family). In order for hibernation to reliably work we need to properly turn off the SDMA block, sadly after numerous attemps i haven't not found proper sequence for clean and full shutdown. So simply reset both SDMA block, this makes hibernation works reliably on sea island GPU family (CI) Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
16653dba |
|
21-Jan-2015 |
Michel Dänzer <michel.daenzer@amd.com> |
drm/radeon: Remove rdev->gart.pages_addr array radeon_vm_map_gart can use rdev->gart.pages_entry instead. Also move the masking of the page address to radeon_vm_map_gart from its callers. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
55e3ad34 |
|
21-Jan-2015 |
kbuild test robot <fengguang.wu@intel.com> |
drm/radeon: cik_sdma_ctx_switch_enable() can be static drivers/gpu/drm/radeon/cik_sdma.c:293:6: sparse: symbol 'cik_sdma_ctx_switch_enable' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
|
#
d7a60d8e |
|
03-Jan-2015 |
Ben Goz <ben.goz@amd.com> |
drm/radeon: Enable sdma preemption This patch adds to radeon the enablement of sdma preemption. This is needed to support HWS of SDMA user-mode queues. Signed-off-by: Ben Goz <ben.goz@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
#
3a01fd36 |
|
05-Jan-2015 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: fix VM flush on CIK (v3) We need to wait for the GPUVM flush to complete. There was some confusion as to how this mechanism was supposed to work. The operation is not atomic. For GPU initiated invalidations you need to read back a VM register to introduce enough latency for the update to complete. v2: drop gart changes v3: just read back rather than polling Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
|
#
7c42bc1a |
|
19-Nov-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: use one VMID for each ring Use multiple VMIDs for each VM, one for each ring. That allows us to execute flushes separately on each ring, still not ideal cause in a lot of cases rings can share IDs. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
975700d2 |
|
19-Nov-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: split semaphore and sync object handling v2 Previously we just allocated space for four hardware semaphores in each software semaphore object. Make software semaphore objects represent only one hardware semaphore address again by splitting the sync code into it's own object. v2: fix typo in comment Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
faffaf62 |
|
19-Nov-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: rework vm_flush parameters Use ring structure instead of index and provide vm_id and pd_addr separately. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
0b021c58 |
|
03-Nov-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: use gart for DMA IB tests Use gart rather than vram to avoid having to deal with the HDP cache. Port of adfed2b0587289013f8143c54913ddfd44ac1fd3 (drm/radeon: use gart memory for DMA ring tests) to the IB tests. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
|
#
adfed2b0 |
|
13-Oct-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: use gart memory for DMA ring tests Avoids HDP cache flush issues when using vram which can cause ring test failures on certain boards. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Alexander Fyodorov <halcy@yandex.ru> Cc: stable@vger.kernel.org
|
#
392a250b |
|
24-Sep-2014 |
Maarten Lankhorst <maarten.lankhorst@canonical.com> |
drm/radeon: cope with foreign fences inside the reservation object 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>
|
#
799028d5 |
|
18-Sep-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: don't reset sdma on CIK init Otherwise we may lose the DMA golden settings which can lead to hangs, etc. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
|
#
57d20a43 |
|
04-Sep-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: add the infrastructure for concurrent buffer access This allows us to specify if we want to sync to the shared fences of a reservation object or not. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
1538a9e0 |
|
18-Aug-2014 |
Michel Dänzer <michel.daenzer@amd.com> |
drm/radeon: Only flush HDP cache for indirect buffers from userspace It isn't necessary for command streams generated by the kernel (at least not while we aren't storing ring or indirect buffers in VRAM). Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
03f62abd |
|
30-Jul-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: split PT setup in more functions Move the decision what to use into the common VM code. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
f069dc1d |
|
29-Jul-2014 |
Michel Dänzer <michel.daenzer@amd.com> |
drm/radeon/cik: Read back SDMA WPTR register after writing it For symmetry with other *_set_wptr hooks. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
33fa9fe3 |
|
22-Jul-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: fix R600_PTE_GART handling That didn't worked correctly any more and opened up a security problem. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
02376d82 |
|
17-Jul-2014 |
Michel Dänzer <michel.daenzer@amd.com> |
drm/radeon: Allow write-combined CPU mappings of BOs in GTT (v2) v2: fix rebase onto drm-fixes Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
f2c6b0f4 |
|
25-Jun-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon/cik: Add support for new ucode format (v5) This adds CIK support for the new ucode format. v2: add size validation, integrate debug info v3: add support for MEC2 on KV v4: fix typos v4: update to latest format Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
5e167cdb |
|
03-Jun-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: use lower_32_bits where appropriate Replace occurrences of "v & 0xffffffff" with lower_32_bits(v) when it's next to an upper_32_bits(v). Also remove unnecessary "upper_32_bits(v) & 0xffffffff" code snippets. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
3d7938fa |
|
27-May-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: optimize CIK VM handling v2 Fill VM page tables from the GART page table if applicable. v2: fix copy&paste error Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
aa4c8b36 |
|
24-Apr-2014 |
Maarten Lankhorst <maarten.lankhorst@canonical.com> |
drm/radeon: drm/radeon: add missing radeon_semaphore_free to error path It would appear this bug has been copy/pasted many times without being noticed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
#
7e95cfb0 |
|
22-Apr-2014 |
Alex Deucher <alexdeucher@gmail.com> |
drm/radeon: fix count in cik_sdma_ring_test() Should be 5 rather than 4. Noticed-by: Mathias Fröhlich <Mathias.Froehlich@gmx.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Christian König <christian.koenig@amd.com>
|
#
07ae78c9 |
|
12-Mar-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon/cik: stop the sdma engines in the enable() function We always stop the rings when disabling the engines so just call the stop functions directly from the sdma enable function. This way the rings' status is set correctly on suspend so there are no problems on resume. Fixes resume failures that result in acceleration getting disabled. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
|
#
7b1bbe88 |
|
12-Mar-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon/cik: properly set sdma ring status on disable When we disable the rings, set the status properly. If not other code pathes may try and use the rings which are not functional at this point. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
|
#
2d2fe3f9 |
|
17-Feb-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: drop radeon_ring_force_activity The reason for the false positives was fixed quite some time ago and since most engines can still execute NOPs while being locked up it leads to false negatives. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
#
ff212f25 |
|
18-Feb-2014 |
Christian König <christian.koenig@amd.com> |
drm/radeon: drop drivers copy of the rptr In all cases where it really matters we are using the read functions anyway. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
#
50efa51a |
|
27-Jan-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: clean up active vram sizing If we are not able to properly initialize one of the gpu engines for buffer paging, we limit vram to the size of the cpu visible aperture. We generally either use the gfx or dma engine to do this. Clean up the size limiting code to only adjust the size based on what ring is selected for buffer paging rather than making assumptions about which engine is selected for paging. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
|
#
da9e07e6 |
|
09-Jan-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon/cik: use POLL_REG_MEM special op for sDMA HDP flush This is the preferred flushing method on CIK. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
ca113f6b |
|
09-Jan-2014 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: consolidate sdma hdp flushing code for CIK It's used in several places so move to a common shared function. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
ea31bf69 |
|
09-Dec-2013 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: remove generic rptr/wptr functions (v2) Fill in asic family specific versions rather than using the generic version. This lets us handle asic specific differences more easily. In this case, we disable sw swapping of the rtpr writeback value on r6xx+ since the hw does it for us. Fixes bogus rptr readback on BE systems. v2: remove missed cpu_to_le32(), add comments Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
1b3abef8 |
|
10-Dec-2013 |
Christian König <christian.koenig@amd.com> |
drm/radeon: fix typo in cik_copy_dma Otherwise we end up with a rather strange looking result. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
1654b817 |
|
11-Nov-2013 |
Christian König <christian.koenig@amd.com> |
drm/radeon: allow semaphore emission to fail 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
|
#
d45fd24d |
|
07-Nov-2013 |
Alex Deucher <alexander.deucher@amd.com> |
drm/radeon: use HDP_MEM_COHERENCY_FLUSH_CNTL for sdma as well The new HDP flush method doesn't seem to work reliably on sDMA either, so use the old method here too. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
24c16439 |
|
30-Oct-2013 |
Christian König <christian.koenig@amd.com> |
drm/radeon: drop CP page table updates & cleanup v2 The DMA ring seems to be stable now. v2: remove pt_ring_index as well Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
74d360f6 |
|
29-Oct-2013 |
Christian König <christian.koenig@amd.com> |
drm/radeon: add vm_set_page tracepoint Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
#
2483b4ea |
|
13-Aug-2013 |
Christian König <christian.koenig@amd.com> |
drm/radeon: separate DMA code Similar to separating the UVD code, just put the DMA functions into separate files. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|