Marek Olšák
f815009036
gallium/radeon: change the BO priority definitions to bits
...
This is for the next microoptimization.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478 >
2021-10-29 06:54:21 +00:00
Marek Olšák
c5f39acb33
winsys/amdgpu: set max_ib_size and max_check_space_size later in cs_check_space
...
If there is enough CS space, don't update them. This eliminates some overhead.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
6129db68bf
winsys/amdgpu: remove force_chaining parameter from cs_check_space
...
it's always false
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
af7c6720de
winsys/amdgpu: include CS ioctl overhead in RADEON_NOOP
...
submit an empty IB instead of skipping the ioctl
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
468135abab
winsys/amdgpu: precompute amdgpu_ib_max_submit_dwords
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
576f8394db
radeonsi: remove the primitive discard compute shader
...
It doesn't always work, it's only useful on gfx9 and older, and it's too
complicated.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4011
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812 >
2021-09-10 23:32:03 +00:00
Marek Olšák
77a0411694
winsys/amdgpu: clean up amdgpu_cs_check_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Mike Blumenkrantz
a3a6611e96
util/queue: add a global data pointer for the queue object
...
this better enables object-specific (e.g., context) queues where the owner
of the queue will always be needed and various pointers will be passed in
for tasks
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11312 >
2021-06-16 15:10:09 -04:00
Pierre-Eric Pelloux-Prayer
a57e90bfea
winsys/amdgpu: use int16 for buffer_indices_hashlist
...
int16 allows to correctly store the indices of 32k buffers; this
seems sufficient and is twice smaller than regular int.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11010 >
2021-06-07 07:38:35 +00:00
Pierre-Eric Pelloux-Prayer
a981105d90
winsys/amdgpu: reduce amdgpu_cs size
...
buffer_indices_hashlist is only used by the current
amdgpu_cs_context (= amdgpu_cs.csc).
So store a single 16k int array instead of 2, and switch
the owner when flushing the cs.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11010 >
2021-06-07 07:38:35 +00:00
Pierre-Eric Pelloux-Prayer
74c67f2b72
amdgpu/winsys: remove amdgpu_cs_has_chaining
...
Store this property in admgpu_cs instead of using a function.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11010 >
2021-06-07 07:38:35 +00:00
Pierre-Eric Pelloux-Prayer
8fd912b9ae
amdgpu,radeon: add full_reset_only param to ctx_query_reset_status
...
Using this boolean the caller tells if it wants to ignore resets
fixed by a soft recovery.
When true, amdgpu can skip the call to libdrm if no cs has been
rejected (since only full gpu reset cause cs rejections).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
bc71f689f1
amdgpu,radeon: add needs_reset param to ctx_query_reset_status
...
The kernel can do different types of recovery (soft recovery, GPU reset).
Since they both increase gpu_reset_counter, this will cause all contexts
to report AMDGPU_CTX_QUERY2_FLAGS_RESET, which is a bit misleading: if
a single context was soft-recovered, the others are fine and we don't need
special processing.
This commit uses the AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST to distinguish
between the 2 kind of reset and later commits will use this information.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Marek Olšák
c105c8ad2c
winsys/amdgpu: remove another 8 bytes from amdgpu_winsys_bo by packing better
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
3d0a4864ce
winsys/amdgpu: add amdgpu_cs::ws to reduce dereferences
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
d5b877619d
winsys/amdgpu: remove amdgpu_winsys_bo::ws
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
65495e6caa
radeon_winsys.h: add a winsys parameter to most winsys buffer functions
...
This will allow removing the winsys pointer from buffers.
The amdgpu winsys adds dummy_ws to get radeon_winsys because there can be
no radeon_winsys around (e.g. while amdgpu_winsys is being destroyed), but
we still need some way to call buffer functions.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
e5fc8a28dc
winsys/amdgpu: try not to skip any code with RADEON_NOOP=1 to test CPU perf
...
This enables more accurate estimation of the maximum achievable CPU-bound
performance.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
ccaad7d844
winsys/amdgpu: don't set unused usage for backing BOs of sparse BOs
...
This is never used.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
7d76b912bc
winsys/amdgpu: don't inc/dec num_active_ioctls for backing BOs of sparse BOs
...
It's not correct.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
ff311df6b5
winsys/amdgpu: remove amdgpu_winsys_bo::num_cs_references to remove atomics
...
This decreases the CPU time percentage of amdgpu_cs_add_buffer by 50%
on Ryzen 3900X.
We don't need to call amdgpu_bo_is_referenced_by_any_cs
in amdgpu_bo_can_reclaim. The reclaim function is only called for buffers
that have 0 references.
The only downside is that amdgpu_bo_is_referenced_by_cs might be slower
in some very rare cases. Overall the driver overhead is better.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:22 +00:00
Marek Olšák
06b9dedfd9
winsys/amdgpu: optimize out conditionals in amdgpu_lookup_buffer
...
Move them to a wrapper function.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:22 +00:00
Marek Olšák
e93b42c214
ac,radeonsi: track memory usage in KB to reduce types from uint64 to uint32
...
Decreasing the time spent in radeon_cs_memory_below_limit is the motivation.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:38:15 -05:00
Marek Olšák
b94626d3ee
ac,radeonsi: limit Smart Access Memory to Zen 3 and GFX10.3 due to perf issues
...
Many people experience performance degradation on some systems.
There will be a driconf option to enable SAM on other chips as well as
disable it on enabled systems.
Fixes: d3d6d38145
- ac: add radeon_info::all_vram_visible for Smart Access Memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3982
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8225 >
2021-01-05 02:43:55 +00:00
Marek Olšák
d60930c017
winsys/amdgpu: use VRAM for command buffers if all VRAM is visible
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7951 >
2020-12-09 10:34:02 -05:00
Marek Olšák
3bd9db5be3
r300,r600,radeonsi: inline struct radeon_cmdbuf to remove dereferences
...
It's straightforward except that the amdgpu winsys had to be cleaned up
to allow this.
radeon_cmdbuf is inlined and optionally the winsys can save the pointer
to it. radeon_cmdbuf::priv points to the winsys cs structure.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7907 >
2020-12-05 10:52:17 -05:00
Marek Olšák
2c61411f25
winsys/amdgpu: don't use debug_get_option_noop in a hot path
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721 >
2020-12-01 15:33:03 -05:00
Pierre-Eric Pelloux-Prayer
111a1b2e1c
winsys/amdgpu: make RADEON_ALL_BOS a debug only feature
...
Improves performance in SPECviewperf13 snx.
e.g.: test10 fps evolution: 235 -> 270.
Extract from "pahole radeonsi_dri.so -C amdgpu_winsys_bo", before:
struct amdgpu_winsys_bo {
struct pb_buffer base; /* 0 32 */
union {
struct {
struct pb_cache_entry cache_entry; /* 32 56 */
/* XXX last struct has 4 bytes of padding */
/* --- cacheline 1 boundary (64 bytes) was 24 bytes ago --- */
amdgpu_va_handle va_handle; /* 88 8 */
int map_count; /* 96 4 */
_Bool use_reusable_pool; /* 100 1 */
/* XXX 3 bytes hole, try to pack */
struct list_head global_list_item; /* 104 16 */
uint32_t kms_handle; /* 120 4 */
} real;
[...]
} u; /* 32 96 */
[...]
/* size: 200, cachelines: 4, members: 15 */
};
After:
struct amdgpu_winsys_bo {
struct pb_buffer base; /* 0 32 */
union {
struct {
struct pb_cache_entry cache_entry; /* 32 56 */
/* XXX last struct has 4 bytes of padding */
/* --- cacheline 1 boundary (64 bytes) was 24 bytes ago --- */
amdgpu_va_handle va_handle; /* 88 8 */
int map_count; /* 96 4 */
_Bool use_reusable_pool; /* 100 1 */
/* XXX 3 bytes hole, try to pack */
uint32_t kms_handle; /* 104 4 */
} real; /* 32 80 */
} u; /* 32 80 */
/* --- cacheline 1 boundary (64 bytes) was 48 bytes ago --- */
[...]
/* size: 184, cachelines: 3, members: 15 */
};
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7532 >
2020-11-19 12:44:40 +00:00
Marek Olšák
bccb9a7457
winsys/amdgpu: replace amdgpu_winsys_bo::initial_domain with pb_buffer::placement
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7585 >
2020-11-18 23:50:41 -05:00
Marek Olšák
9c239aa638
winsys/amdgpu: replace amdgpu_winsys_bo::flags with pb_buffer::usage
...
Let's use the field so as not to waste memory.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7585 >
2020-11-18 23:50:40 -05:00
Marek Olšák
37cdce0146
winsys/amdgpu: remove amdgpu_winsys_bo::sparse
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7585 >
2020-11-18 23:50:38 -05:00
Marek Olšák
095ee8f867
winsys/amdgpu: remove incorrect assertion check against max_check_space_size
...
Fixes: 114a899cc8
"winsys/amdgpu: cs_check_space sets the minimum IB size for future IBs"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056 >
2020-10-31 00:18:11 +00:00
Marek Olšák
ed3c5fe469
radeonsi: implement GL_INTEL_blackhole_render
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031 >
2020-10-06 15:59:08 +00:00
Pierre-Eric Pelloux-Prayer
90b98c0649
amd/tmz: move uses_secure_bos to radeon_winsys
...
This allows to inline radeon_uses_secure_bos calls and reduce CPU overhead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049 >
2020-09-24 14:51:16 +00:00
Pierre-Eric Pelloux-Prayer
55b018b634
amd/winsys: add RADEON_FLUSH_TOGGLE_SECURE_SUBMISSION
...
Instead of exposing a cs_set_secure() callback that always needs a call
to si_flush_gfx_cs before a switch, this commit introduces a new
flag to switch between secure and non-secure on submissions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049 >
2020-09-24 14:51:16 +00:00
Pierre-Eric Pelloux-Prayer
1b0d660cbc
radeonsi/tmz: allow secure job if the app made a tmz allocation
...
This commit makes TMZ always allowed instead of being either off or forced-on
with AMD_DEBUG=tmz.
With this change:
- secure job can be used as soon as the application made a tmz allocation. Driver
internal allocations are not enough to enable secure jobs (if tmz is supported
and enabled by the kernel)
- AMD_DEBUG=tmz forces all scanout/depth/stencil buffers to be allocated as TMZ.
This is useful to test app thats don't explicitely support protected content.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049 >
2020-09-24 14:51:16 +00:00
Marek Olšák
8e1193b8d3
radeon: rename RADEON_TRANSFER_* -> RADEON_MAP_*
...
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749 >
2020-09-22 03:20:54 +00:00
Marek Olšák
22253e6b65
gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*
...
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749 >
2020-09-22 03:20:54 +00:00
Qiang Yu
4656e68294
radeonsi: fix user fence GPU address
...
User fence should have 4 QWORD memory space, I updated its CPU address
but forgot to update GPU address.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3513
Fixes: 3d5bed0e88
"radeonsi: fix user fence space when MCBP is enabled"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6776 >
2020-09-19 03:11:21 +00:00
Qiang Yu
ef980ac0c1
radeonsi: fix max syncobj wait timeout
...
syncobj wait takes int64_t timeout and won't clamp it
in kernel code, so we have to pass in INT64_MAX instead
of OS_TIMEOUT_INFINITE which is UINT64_MAX. Otherwise
syncobj wait with OS_TIMEOUT_INFINITE case just return
fail.
Fixes: c638301b42
"radeonsi: fix syncobj wait timeout"
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6676 >
2020-09-11 12:47:27 +00:00
Qiang Yu
3d5bed0e88
radeonsi: fix user fence space when MCBP is enabled
...
When MCBP is enabled, IB maybe preempted which will also update
the preempted fence field of the user fence. So we need to reserve
enough space for each user fence.
Fixes: 89d2dac554
"radeonsi: enable preemption if the kernel enabled it"
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6577 >
2020-09-07 02:49:23 +00:00
Qiang Yu
c638301b42
radeonsi: fix syncobj wait timeout
...
syncobj wait takes absolute timeout value.
Fixes: 162502370c
"winsys/amdgpu: implement sync_file import/export"
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6579 >
2020-09-07 02:37:19 +00:00
Marek Olšák
9e2113c6dc
radeonsi: set up IBs for preemption
...
- Execute cs_preamble_state as a separate IB with different flags.
- Set the PREEMPT flag for the main IB.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5798 >
2020-07-22 12:08:33 -04:00
Marek Olšák
c7680625c3
ac,winsys/amdgpu: align IBs the same as the kernel
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5603 >
2020-06-26 07:02:57 +00:00
Marek Olšák
556f4458fe
amd: add proper definitions for NOP packets
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5603 >
2020-06-26 07:02:57 +00:00
Marek Olšák
21504eab78
ac/gpu_info: compute the best safe IB alignment
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095 >
2020-05-23 03:44:44 -04:00
Pierre-Eric Pelloux-Prayer
92e64f4b41
amdgpu: use AMDGPU_IB_FLAGS_SECURE when requested
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4401 >
2020-05-11 10:25:53 +02:00
Marek Olšák
127aaf0b9a
amd: remove duplicated definitions from amdgpu_drm.h
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863 >
2020-05-07 20:13:41 +00:00
Pierre-Eric Pelloux-Prayer
ab54624d0d
radeonsi: stop using the VM_ALWAYS_VALID flag
...
Allocation all the bo as ALWAYS_VALID means they must all fit in memory
(vram + gtt) at each command submission.
This causes some trouble when the total allocated memory is greater than
the available memory.
Possible solutions:
- being able to tag/untag a bo as ALWAYS_VALID: would require kernel changes
- disable VM_ALWAYS_VALID when memory usage is more than a percentage of the
available memory
- disable VM_ALWAYS_VALID entirely
v1 of this patch implemented option 2. v2 (this version) implements option 3.
Related issues:
- https://gitlab.freedesktop.org/drm/amd/issues/607
- https://gitlab.freedesktop.org/mesa/mesa/issues/1257
It also helps with some piglit tests (-t maxsize -t "max[_-].*size" -t maxuniformblocksize):
instead of crashing the machine, the tests fail cleanly.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2190
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3430 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3430 >
2020-01-29 09:05:04 +01:00
Marek Olšák
36c055c9b7
winsys/amdgpu: detect noop dependencies on the same ring correctly
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2019-11-19 18:32:56 -05:00