drm-shim: Let the driver choose to overwrite the first render node.
authorEric Anholt <eric@anholt.net>
Tue, 21 Apr 2020 16:21:52 +0000 (09:21 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Apr 2020 17:54:54 +0000 (17:54 +0000)
commite9add0c501c3765cae43ef60ec58404c2340991b
tree31887ec82b6531e5dc8e9d4ca1e6144af9e2a0ee
parent5a8718f01b3976e1bc82362a907befef68a7f525
drm-shim: Let the driver choose to overwrite the first render node.

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 <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4664>
src/broadcom/drm-shim/v3d.c
src/broadcom/drm-shim/v3d_noop.c
src/drm-shim/drm_shim.c
src/drm-shim/drm_shim.h
src/etnaviv/drm-shim/etnaviv_noop.c
src/freedreno/drm-shim/freedreno_noop.c