aboutsummaryrefslogtreecommitdiffstats
path: root/src/etnaviv
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: drm: Normalize nano secondsGuido Günther2020-05-101-0/+4
| | | | | | | | | | | Make sure the nano second part is less than one second. This matches what clock_settime expects and allows for more concise kernel interfaces. Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3534>
* etnaviv: drm: Use NSEC_PER_SECGuido Günther2020-05-101-2/+3
| | | | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3534>
* drm-shim: Let the driver choose to overwrite the first render node.Eric Anholt2020-04-231-0/+2
| | | | | | | | | | | | | | When I was writing drm-shim, I was focused on the v3d kmsro case -- use my intel device as the kmsro display device and add on a simulator-based v3d device that we could render with. But for the noop backends we use for shader-db, it's a lot more useful to just overwrite the first render node in the system so that you don't have to pass a -d <how many render nodes I already have in my system> argument. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4664>
* drm-shim: return device platform as specifiedLionel Landwerlin2020-04-031-0/+1
| | | | | | | | v2: Embed the libdrm dependency inside the drm-shim dependency Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Eric Anholt <[email protected]> (v1) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4429>
* meson: inline `inc_common`Eric Engestrom2020-03-283-4/+19
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* etnaviv: drm-shim: add GC400Christian Gmeiner2020-01-301-1/+28
| | | | | | | | | 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 <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3195> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3195>
* etnaviv: update Android build filesMartin Fuzzey2020-01-243-0/+84
| | | | | | | | | etnaviv no longer builds on Android, fix this. Signed-off-by: Martin Fuzzey <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3447> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3447>
* util/hash_table: update users to use new optimal integer hash functionsAnthony Pesch2020-01-231-14/+2
| | | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475>
* etnaviv: drm: Don't miscalculate timeoutGuido Günther2020-01-221-3/+2
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3509> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3509>
* etnaviv: add drm-shimChristian Gmeiner2019-11-214-0/+269
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: remove LIST_IS_EMPTY macroTimothy Arceri2019-10-281-2/+2
| | | | | | | Just use the inlined function directly. The new function was introduced in addcf410. Reviewed-by: Eric Engestrom <[email protected]>
* etnaviv: drm: add softpin interfaceLucas Stach2019-10-185-7/+63
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: Command buffer reallocMarek Vasut2019-10-182-1/+33
| | | | | | | | 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 <[email protected]>
* etnaviv: rework the stream flush to always go through the context flushLucas Stach2019-10-183-32/+18
| | | | | | | | | 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 <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: drm: remove unused etna_cmd_stream_finishLucas Stach2019-10-182-10/+0
| | | | | | | | | It's not used by anything and gets in the way for the refactoring of the flush handling. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: Add valgrind supportMarek Vasut2019-08-143-1/+64
| | | | | | | | Add Valgrind support for etnaviv to track BO leaks. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: Use hash table to track BO indexesMarek Vasut2019-08-143-15/+26
| | | | | | | Use hash table instead of ad-hoc arrays. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: Fix double-free in etna_bo_cache_free()Marek Vasut2019-08-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: Remove etna_bo_from_handle() prototypeMarek Vasut2019-08-091-2/+0
| | | | | | | Remove etna_bo_from_handle() as there are no known users. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
* etnaviv: fix a null pointer dereferenceAndrii Simiklit2019-08-051-2/+2
| | | | | | | | This issue was found by cppcheck Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* meson: replace libmesa_util with idep_mesautilEric Engestrom2019-08-031-2/+4
| | | | | | | | | | | 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 <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* etnaviv: detect v4 compressionJonathan Marek2019-07-042-0/+4
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: etnaviv_bo_cache_test: Use /dev/dri/renderD128 by defaultGuido Günther2019-06-051-2/+8
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* build: Build etnaviv drm testsGuido Günther2019-06-052-0/+56
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm tests: Use mesa header locationsGuido Günther2019-06-052-4/+3
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Add libdrm tests as of 922d92994267743266024ecceb734ce0ebbca808Guido Günther2019-06-052-0/+240
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* build: Build etnaviv drmGuido Günther2019-06-052-0/+71
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: s/bo_del/_etna_bo_del/Guido Günther2019-06-052-5/+5
| | | | | | | This avoids a conflict with freedreno's bo_del(). Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: s/table_lock/etna_table_lock/Guido Günther2019-06-054-24/+24
| | | | | | | This avoids a conflict with freedreno's table_lock Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Move uapi headerGuido Günther2019-06-052-290/+1
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Drop excessive debugging in perfmonGuido Günther2019-06-051-7/+7
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* entaviv: drm: Don't use drmMsg()Guido Günther2019-06-051-5/+6
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Use _mesa_hash_table instead of drmHashGuido Günther2019-06-052-20/+25
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Use mesa's ARRAY_SIZEGuido Günther2019-06-051-1/+1
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Use mesa's os_m{un,}mapGuido Günther2019-06-051-3/+5
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Use mesa's atomic definitionsGuido Günther2019-06-054-11/+13
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Drop drm_{public,private}Guido Günther2019-06-058-51/+51
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: drm: Drop inexistent headersGuido Günther2019-06-051-5/+1
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Add libdrm code as of 922d92994267743266024ecceb734ce0ebbca808Guido Günther2019-06-0510-0/+2081
Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>