virgl: fix reference counting of prime handles
authorRob Herring <robh@kernel.org>
Fri, 29 Jan 2016 22:36:29 +0000 (16:36 -0600)
committerDave Airlie <airlied@redhat.com>
Mon, 1 Feb 2016 23:58:29 +0000 (09:58 +1000)
commit2d3301e4d513614873002707d32453f926f63666
tree051444ec6057047802ad4d42c043af6398eaaae6
parentf87330dbce3f67cb531194f63a5db59685dcbbd3
virgl: fix reference counting of prime handles

The virgl reference counting of buffers is broken for prime fd buffers.
Each prime fd passed into virgl_drm_winsys_resource_create_handle creates
a new resource. The solution requires creating a separate hash table to
track flink names separately from prime handles.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
src/gallium/winsys/virgl/drm/virgl_drm_winsys.h