aboutsummaryrefslogtreecommitdiffstats
path: root/src/etnaviv/drm
Commit message (Collapse)AuthorAgeFilesLines
* 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-051-0/+48
| | | | | 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]>