diff options
| author | Rob Clark <robclark@freedesktop.org> | 2014-01-12 08:27:36 -0500 |
|---|---|---|
| committer | Rob Clark <robclark@freedesktop.org> | 2014-01-12 09:00:51 -0500 |
| commit | 8279c8fb498785ea2700c6cc4a3456d7e1134665 (patch) | |
| tree | 3c18768a0b69bf294fd0bc3db5d59d3dbacdbc07 /freedreno/freedreno_priv.h | |
| parent | de0970203091618834e4753c14d5169770797800 (diff) | |
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 <robclark@freedesktop.org>
Diffstat (limited to 'freedreno/freedreno_priv.h')
| -rw-r--r-- | freedreno/freedreno_priv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h index 061d807e..d5cf9f97 100644 --- a/freedreno/freedreno_priv.h +++ b/freedreno/freedreno_priv.h @@ -84,6 +84,8 @@ struct fd_device { struct fd_bo_bucket cache_bucket[14 * 4]; int num_buckets; time_t time; + + int closefd; /* call close(fd) upon destruction */ }; void fd_cleanup_bo_cache(struct fd_device *dev, time_t time); |
