summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
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/drivers/freedreno/a2xx
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/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_context.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_context.c b/src/gallium/drivers/freedreno/a2xx/fd2_context.c
index ec9eaf66417..239558b6f07 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_context.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_context.c
@@ -98,6 +98,8 @@ fd2_context_create(struct pipe_screen *pscreen, void *priv)
pctx = &fd2_ctx->base.base;
+ fd2_ctx->base.dev = fd_device_ref(screen->dev);
+
pctx->destroy = fd2_context_destroy;
pctx->create_blend_state = fd2_blend_state_create;
pctx->create_rasterizer_state = fd2_rasterizer_state_create;