From 8279c8fb498785ea2700c6cc4a3456d7e1134665 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 12 Jan 2014 08:27:36 -0500 Subject: freedreno: add fd_device_new_dup() There seem to be some cases (I've noticed this switching resolution in some games, for example) where the fd can get closed() before the device and all it's bo's are destroyed. Which, if the drm device is opened again and bo's are allocated with the same handles, results that when the first pipe_screen/pipe_context is destroyed causes the first dev to close handles for bo's allocated by the second device. The easy solution to that is to add a mode where the fd_device creates it's own private fd (a dup()). Signed-off-by: Rob Clark --- freedreno/freedreno_drmif.h | 1 + 1 file changed, 1 insertion(+) (limited to 'freedreno/freedreno_drmif.h') diff --git a/freedreno/freedreno_drmif.h b/freedreno/freedreno_drmif.h index 6a40ab8f..f3a01aff 100644 --- a/freedreno/freedreno_drmif.h +++ b/freedreno/freedreno_drmif.h @@ -72,6 +72,7 @@ enum fd_param_id { */ struct fd_device * fd_device_new(int fd); +struct fd_device * fd_device_new_dup(int fd); struct fd_device * fd_device_ref(struct fd_device *dev); void fd_device_del(struct fd_device *dev); -- cgit v1.2.3