winsys/radeon: fix a race condition in initialization of radeon_winsys::screen
authorMarek Olšák <marek.olsak@amd.com>
Tue, 8 Apr 2014 23:07:52 +0000 (01:07 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 Apr 2014 18:50:17 +0000 (20:50 +0200)
commit3b0b44f7def0acb4f7a7aef086c0bece321418a6
treeb156e7e948909c0a31d127d30099da60cb178b5d
parentac330d4130cb005c75972da2a701b674413456ba
winsys/radeon: fix a race condition in initialization of radeon_winsys::screen

Create the screen in the winsys while the mutex is locked.
This also results in a nice code cleanup!

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/targets/egl-static/egl_pipe.c
src/gallium/targets/pipe-loader/pipe_r300.c
src/gallium/targets/pipe-loader/pipe_r600.c
src/gallium/targets/pipe-loader/pipe_radeonsi.c
src/gallium/targets/r300/common/drm_target.c
src/gallium/targets/r600/common/drm_target.c
src/gallium/targets/radeonsi/common/drm_target.c
src/gallium/winsys/radeon/drm/radeon_drm_public.h
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c