Christian König
cc6f353625
drm/radeon: update IB size estimation for VM
...
That should allow us to allocate bigger BOs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-08-05 08:53:56 -04:00
Christian König
03f62abd11
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 >
2014-08-05 08:53:55 -04:00
Christian König
ee26d83ff0
drm/radeon: take a BO reference on VM cleanup
...
This closes a small window where the GPU might have accessed freed up memory.
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-08-05 08:53:54 -04:00
Christian König
f77c4f0223
drm/radeon: try to enable VM flushing once more
...
Let's try to fix bugs related to this instead of just disabling it.
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-08-05 08:53:51 -04:00
Alex Deucher
0aea5e4aa2
drm/radeon: use an intervall tree to manage the VMA v2
...
Scales much better than scanning the address range linearly.
v2: store pfn instead of address
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-08-05 08:53:51 -04:00
Christian König
e31ad969bb
drm/radeon: invalidate moved BOs in the VM (v2)
...
Don't wait for the BO to be used again, just
update the PT on the next VM use.
v2: remove stray semicolon.
Signed-off-by: Christian König <christian.koenig@amd.com >
Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-08-05 08:53:49 -04:00
Christian König
a3a9226d29
drm/radeon: add trace_radeon_vm_flush
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-08-05 08:53:38 -04:00
Michel Dänzer
02376d8282
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 >
2014-08-05 08:53:33 -04:00
Christian König
5b75327563
drm/radeon: fix error handling in radeon_vm_bo_set_addr
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-07-22 12:21:58 -04:00
Christian König
cc9e67e3d7
drm/radeon: fix VM IB handling
...
Calling radeon_vm_bo_find on the IB BO during CS
is illegal and can lead to an crash.
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-07-21 13:17:38 -04:00
Christian König
036bf46a39
drm/radeon: fix handling of radeon_vm_bo_rmv v3
...
v3: completely rewritten. We now just remember which areas
of the PT to clear and do so on the next command submission.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=79980
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-07-21 13:17:38 -04:00
Christian König
7dae77f880
drm/radeon: page table BOs are kernel allocations
...
Userspace shouldn't be able to access them.
Signed-off-by: Christian König <christian.koenig@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-07-02 15:52:21 -04:00
Christian König
4510fb985d
drm/radeon: make vm_block_size a module parameter
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-06-09 22:06:54 -04:00
Christian König
ce6758c8bd
drm/radeon: rename alt_domain to allowed_domains
...
And also domain to prefered_domains. That matches better
what those values represent.
Signed-off-by: Christian König <christian.koenig@amd.com >
Cc: Marek Olšák <maraeo@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-06-09 22:06:52 -04:00
Dave Airlie
8d4ad9d4bb
Merge commit '9e9a928eed8796a0a1aaed7e0b676db86ba84594' into drm-next
...
Merge drm-fixes into drm-next.
Both i915 and radeon need this done for later patches.
Conflicts:
drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_gtt.c
2014-06-05 20:28:59 +10:00
Christian König
1c89d27fb9
drm/radeon: add proper support for RADEON_VM_BLOCK_SIZE v2
...
This patch makes it possible to decide how many address
bits are spend on the page directory vs the page tables.
v2: remove unintended change
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-06-02 10:25:03 -04:00
Christian König
ec3dbbcbd7
drm/radeon: add large PTE support for NI, SI and CIK v5
...
This patch implements support for VRAM page table entry compression.
PTE construction is enhanced to identify physically contiguous page
ranges and mark them in the PTE fragment field. L1/L2 TLB support is
enabled for 64KB (SI/CIK) and 256KB (NI) PTE fragments, significantly
improving TLB utilization for VRAM allocations.
Linear store bandwidth is improved from 60GB/s to 125GB/s on Pitcairn.
Unigine Heaven 3.0 sees an average improvement from 24.7 to 27.7 FPS
on default settings at 1920x1200 resolution with vsync disabled.
See main comment in radeon_vm.c for a technical description.
v2 (chk): rebased and simplified.
v3 (chk): add missing hw setup
v4 (chk): rebased on current drm-fixes-3.15
v5 (chk): fix comments and commit text
Signed-off-by: Jay Cornwall <jay@jcornwall.me >
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2014-06-02 10:25:02 -04:00
Christian König
37903b5e08
drm/radeon: sync page table updates
...
Only necessary if we don't use the same engine for buffer moves and table updates.
Signed-off-by: Christian König <christian.koenig@amd.com >
2014-06-02 10:56:21 +02:00
Christian König
2f93dc32b0
drm/radeon: fix vm buffer size estimation
...
Only relevant if we got VM_BLOCK_SIZE>9, but better save than sorry.
Signed-off-by: Christian König <christian.koenig@amd.com >
2014-06-02 10:54:02 +02:00
Christian König
7d95f6cc4e
drm/radeon: only allocate necessary size for vm bo list
...
No need to always allocate the theoretical maximum here.
Signed-off-by: Christian König <christian.koenig@amd.com >
2014-05-30 14:21:54 +02:00
Christian König
4906f6891e
drm/radeon: fix page directory update size estimation
...
Take padding into account as well.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=75651
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2014-05-20 14:42:01 +02:00
Christian König
df0af4403a
drm/radeon: remove struct radeon_bo_list
...
Just move all fields into radeon_cs_reloc, removing unused/duplicated fields.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2014-03-04 14:34:34 +01:00
Christian König
529364e05b
drm/radeon: remove global vm lock
...
Not needed any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2014-03-03 11:26:27 +01:00
Christian König
6d2f2944e9
drm/radeon: use normal BOs for the page tables v4
...
No need to make it more complicated than necessary,
just allocate the page tables as normal BO and
flush whenever the address change.
v2: update comments and function name
v3: squash bug fixes, page directory and tables patch
v4: rebased on Mareks changes
Signed-off-by: Christian König <christian.koenig@amd.com >
2014-03-03 11:26:08 +01:00
Christian König
fa68834342
drm/radeon: further cleanup vm flushing & fencing
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2014-03-03 11:03:35 +01:00
Christian König
2280ab57b6
drm/radeon: separate gart and vm functions
...
Both are complex enough on their own.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2014-03-03 11:03:34 +01:00