aboutsummaryrefslogtreecommitdiffstats
path: root/src/drm-shim
Commit message (Collapse)AuthorAgeFilesLines
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-011-1/+1
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* drm-shim/meson: Use portable override_options for setting C standardDylan Baker2020-06-011-1/+2
| | | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* drm-shim/meson: The name of the target is a string not a listDylan Baker2020-06-011-1/+2
| | | | | | | | This happens to work, but it's not guaranteed to Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* drm-shim: silence warningsLionel Landwerlin2020-04-301-15/+28
| | | | | | | | | | | | | Matt is seeing a bunch of warnings : drm_shim.c:312:4: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] v2: Add nofail variants of *asprintf (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4594>
* drm-shim: don't create a memfd per BOLionel Landwerlin2020-04-302-13/+30
| | | | | | | | | | | | | | Running shader-db on big servers with many cores, we're running out of file descriptors. Use a single 4Gb memfd instead and allocate from it using a VMA. v2: Align VMA allocation to 4096 (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4594>
* drm-shim: move handle lock to shim_fdLionel Landwerlin2020-04-302-9/+12
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4594>
* drm-shim: stub syncobj wait ioctlLionel Landwerlin2020-04-241-0/+1
| | | | | Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4726>
* drm-shim: provide a valid fake syncobj handle at creationLionel Landwerlin2020-04-241-1/+11
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4726>
* drm-shim: Let the driver choose to overwrite the first render node.Eric Anholt2020-04-232-3/+7
| | | | | | | | | | | | | | 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: stub libdrm's use of realpath()Lionel Landwerlin2020-04-031-0/+22
| | | | | | | | | | | libdrm started using realpath to get the type of bus associated with a given device. This stubs the very specific usage that prevents drm-shim's device from being listed. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4429> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4429>
* drm-shim: return device platform as specifiedLionel Landwerlin2020-04-033-4/+26
| | | | | | | | 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-281-1/+1
| | | | | | | | | 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>
* drm-shim: fix EOF caseChristian Gmeiner2019-11-131-0/+1
| | | | | | | | | Close input end of the pipe after data was written. Without this fix I have seen a hang in sysfs_uevent_get(.., "OF_FULLNAME") when key was not found. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: replace libmesa_util with idep_mesautilEric Engestrom2019-08-031-2/+1
| | | | | | | | | | | 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]>
* freedreno: Add support for drm-shim.Eric Anholt2019-07-252-0/+5
| | | | | | I'm using this for shader-db analysis on x86_64 systems. Reviewed-by: Rob Clark <[email protected]>
* v3d: Introduce a DRM shim for calling out to the simulator.Eric Anholt2019-07-255-0/+1022
The goal is to enable testing of parts of drivers without depending on any particular kernel version or hardware being present. Simply set LD_PRELOAD=$PREFIX/lib/libv3d_drm_shim.so in your environment, and we'll fake a /dev/dri/renderD128 (or whatever the next available node is) using v3dv3. That node can then be used with the surfaceless or gbm EGL platforms. Acked-by: Iago Toral Quiroga <[email protected]>