summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/freedreno/drm
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-01-11 10:34:36 -0500
committerRob Clark <[email protected]>2014-02-01 11:47:08 -0500
commit4971628baedf885ba6987a2946c6e24526464125 (patch)
tree252bdd1fe354d309551773b3bb0a79cbc2026d7c /src/gallium/winsys/freedreno/drm
parent303df12db8a9b54a3471e259d8b38d1f4cf8b393 (diff)
freedreno: ctx should hold ref to dev
The ctx should hold ref to dev to avoid problems if screen is destroyed before ctx. Doesn't really fix the egl/glx issues, but at least it prevents things from getting much worse. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/winsys/freedreno/drm')
-rw-r--r--src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c b/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
index 8afb9cd8380..9eb974451d1 100644
--- a/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
+++ b/src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
@@ -11,7 +11,7 @@
struct pipe_screen *
fd_drm_screen_create(int fd)
{
- struct fd_device *dev = fd_device_new(fd);
+ struct fd_device *dev = fd_device_new_dup(fd);
if (!dev)
return NULL;
return fd_screen_create(dev);