summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-04-09 00:26:32 +0200
committerMarek Olšák <[email protected]>2014-04-10 20:50:17 +0200
commitac330d4130cb005c75972da2a701b674413456ba (patch)
treef917b9391e52cdd292221a35f83f7605ea3dd9f2 /src/gallium/drivers/r300/r300_screen.c
parent7c57b01564b987259ec3ce8ed24266290fa60e75 (diff)
winsys/radeon: fix a race condition between winsys_create and winsys_destroy
This also hides the reference count from drivers. v2: update the reference count while the mutex is locked in winsys_create Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 70c9cdf468a..8e601e3d37f 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -552,7 +552,7 @@ static void r300_destroy_screen(struct pipe_screen* pscreen)
struct r300_screen* r300screen = r300_screen(pscreen);
struct radeon_winsys *rws = radeon_winsys(pscreen);
- if (rws && !radeon_winsys_unref(rws))
+ if (rws && !rws->unref(rws))
return;
pipe_mutex_destroy(r300screen->cmask_mutex);