Eric Engestrom
79af30768d
meson: inline inc_common
...
Let's make it clear what includes are being added everywhere, so that
they can be cleaned up.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360 >
2020-03-28 21:36:54 +01:00
Christian Gmeiner
d3fa18a1fa
etnaviv: drm-shim: add GC400
...
These are the ETNAVIV_PARAM's returned from a GC400 found on a
STM32MP157C-DK2 Discovery Board running mainline kernel.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3195 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3195 >
2020-01-30 04:05:39 +00:00
Martin Fuzzey
d1925fec53
etnaviv: update Android build files
...
etnaviv no longer builds on Android, fix this.
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3447 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3447 >
2020-01-24 14:03:28 +00:00
Anthony Pesch
f77369086c
util/hash_table: update users to use new optimal integer hash functions
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475 >
2020-01-23 17:06:57 +00:00
Guido Günther
d817f2c696
etnaviv: drm: Don't miscalculate timeout
...
The current code overflows (s * 1000000000) for s >= 5 but that is
e.g. used in etna_bo_cpu_prep.
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3509 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3509 >
2020-01-22 13:22:47 +00:00
Christian Gmeiner
8acaab1aa7
etnaviv: add drm-shim
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-11-21 22:56:04 +00:00
Timothy Arceri
1909bc526d
util: remove LIST_IS_EMPTY macro
...
Just use the inlined function directly. The new function was introduced
in addcf410 .
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
2019-10-28 11:24:39 +00:00
Lucas Stach
0bdf5420f1
etnaviv: drm: add softpin interface
...
If softpin is available on the kernel side, we transparently replace the
relocs with self-managed GPU virtual addresses. This allows to skip some
work at the kernel side, as it doesn't need to touch the command stream
anymore before submitting it to the hardware.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
2019-10-18 19:05:21 +02:00
Marek Vasut
0c38c5454b
etnaviv: Command buffer realloc
...
Reallocate the command stream buffer in case it is too small.
The older kernel versions are limited to 64 kiB buffer, so
limit the size to avoid oversized buffers.
Signed-off-by: Marek Vasut <marex@denx.de >
2019-10-18 17:03:25 +00:00
Lucas Stach
1194afdfe3
etnaviv: rework the stream flush to always go through the context flush
...
This way we can ensure that the pipe driver tracking of pending resources
stays in sync with the actual command buffer state, even if a space
reservation triggers a forced flush.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
2019-10-18 17:03:25 +00:00
Lucas Stach
1864fcd8c7
etnaviv: drm: remove unused etna_cmd_stream_finish
...
It's not used by anything and gets in the way for the refactoring of
the flush handling.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
2019-10-18 17:03:25 +00:00
Marek Vasut
6bb4b6d078
etnaviv: Add valgrind support
...
Add Valgrind support for etnaviv to track BO leaks.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
2019-08-14 10:36:20 +02:00
Marek Vasut
cf92074277
etnaviv: Use hash table to track BO indexes
...
Use hash table instead of ad-hoc arrays.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
2019-08-14 10:36:04 +02:00
Marek Vasut
23f5f126d5
etnaviv: Fix double-free in etna_bo_cache_free()
...
The following situation can happen in a multithreaded OpenGL application.
A BO is submitted from etna_cmd_stream #1 with flags set for read.
A BO is submitted from etna_cmd_stream #2 with flags set for write.
This triggers a flush on stream #1 and clears the BO's current_stream
pointer. If at this point, stream #2 attempts to queue BO again, which
does happen, the BO will be added to the submit list twice. The Linux
kernel driver correctly detects this and warns about it with "BO at
index %u already on submit list" kernel message.
However, when cleaning the BO cache in etna_bo_cache_free(), the BO
which was submitted twice will also be free()d twice, this triggering
a glibc double free detector.
The fix is easy, even if the BO does not have current_stream set,
iterate over current streams' list of BOs before adding the BO to it
and verify that the BO is not yet there.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
2019-08-14 10:35:48 +02:00
Marek Vasut
bb47bedc85
etnaviv: Remove etna_bo_from_handle() prototype
...
Remove etna_bo_from_handle() as there are no known users.
Signed-off-by: Marek Vasut <marex@denx.de >
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
2019-08-09 17:21:55 +02:00
Andrii Simiklit
dc471f2ef8
etnaviv: fix a null pointer dereference
...
This issue was found by cppcheck
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
2019-08-05 15:31:43 +02:00
Eric Engestrom
d2d85b950d
meson: replace libmesa_util with idep_mesautil
...
This automates the include_directories and dependencies tracking so that
all users of libmesa_util don't need to add them manually.
Next commit will remove the ones that were only added for that reason.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com >
Acked-by: Eric Anholt <eric@anholt.net >
Tested-by: Vinson Lee <vlee@freedesktop.org >
2019-08-03 00:08:37 +00:00
Jonathan Marek
f6a0d17abe
etnaviv: detect v4 compression
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-07-04 14:05:18 -04:00
Guido Günther
755fdd6f9d
etnaviv: etnaviv_bo_cache_test: Use /dev/dri/renderD128 by default
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
90cc0de102
build: Build etnaviv drm tests
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
01a8ba79fe
etnaviv: drm tests: Use mesa header locations
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
2b377547c3
etnaviv: Add libdrm tests as of 922d92994267743266024ecceb734ce0ebbca808
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
b921df352d
build: Build etnaviv drm
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
95d8b4ac0b
etnaviv: drm: s/bo_del/_etna_bo_del/
...
This avoids a conflict with freedreno's bo_del().
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
17d7282cca
etnaviv: drm: s/table_lock/etna_table_lock/
...
This avoids a conflict with freedreno's table_lock
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
7a5b19346a
etnaviv: drm: Move uapi header
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
3925d38870
etnaviv: drm: Drop excessive debugging in perfmon
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
22fa1c95ff
entaviv: drm: Don't use drmMsg()
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
c93007a618
etnaviv: drm: Use _mesa_hash_table instead of drmHash
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
92fc14321f
etnaviv: drm: Use mesa's ARRAY_SIZE
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
e87d128b52
etnaviv: drm: Use mesa's os_m{un,}map
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
2ebd444c10
etnaviv: drm: Use mesa's atomic definitions
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
6ab83b8474
etnaviv: drm: Drop drm_{public,private}
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
66eb554d46
etnaviv: drm: Drop inexistent headers
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00
Guido Günther
58eec3808e
etnaviv: Add libdrm code as of 922d92994267743266024ecceb734ce0ebbca808
...
Signed-off-by: Guido Günther <guido.gunther@puri.sm >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2019-06-05 08:58:05 +00:00