egl: platform_android: prevent deadlock in eglMakeCurrent

eglMakeCurrent would call dri_make_current and then droid_image_get_buffers
and then android::BufferQueueProducer::dequeueBuffer which could call
eglClientWaitSyncKHR. To avoid dead lock, release the display mutex before
calling it and re-acquire it afterwards. We already have similar logic
in droid_window_enqueue_buffer

Signed-off-by: Lepton Wu <lepton@chromium.org>
72 jobs for !8734 with lock1 in 24 minutes and 25 seconds (queued for 6 seconds)
latest detached
Status Job ID Name Coverage
  Container+Docs
passed #6913293
aarch64
arm_build

00:00:25

passed #6913294
arm_test-base

00:00:22

passed #6913290
x86_build-base

00:00:18

passed #6913292
x86_build_old

00:00:15

passed #6913291
x86_test-base

00:00:20

 
  Container 2
passed #6913304
arm64_test

00:00:13

passed #6913299
i386_build

00:00:15

passed #6913295
kernel+rootfs_amd64

00:00:31

passed #6913296
aarch64
kernel+rootfs_arm64

00:00:17

passed #6913297
aarch64
kernel+rootfs_armhf

00:01:26

passed #6913300
ppc64el_build

00:00:22

passed #6913301
s390x_build

00:00:19

passed #6913298
x86_build

00:00:22

passed #6913302
x86_test-gl

00:00:15

passed #6913303
x86_test-vk

00:00:23

 
  Meson X86 64
passed #6913308
meson-android

00:04:30

passed #6913309
meson-clang

00:07:08

passed #6913307
meson-classic

00:02:31

passed #6913310
meson-clover

00:05:08

passed #6913311
meson-clover-old-llvm

00:08:14

passed #6913306
meson-gallium

00:08:23

passed #6913305
meson-testing

00:05:29

passed #6913312
meson-vulkan

00:05:19

 
  Scons
passed #6913313
scons-win64

00:07:05

 
  Meson Misc
passed #6913315
aarch64
meson-arm64

00:01:57

passed #6913316
aarch64
meson-arm64-build-test

00:03:25

passed #6913314
aarch64
meson-armhf

00:03:40

passed #6913317
meson-i386

00:04:46

passed #6913320
meson-mingw32-x86_64

00:01:55

passed #6913319
kvm
meson-ppc64el

00:05:52

passed #6913318
kvm
meson-s390x

00:04:26

 
  Llvmpipe
passed #6913324
llvmpipe-gles2

00:02:17

passed #6913325
llvmpipe-traces

00:01:44

passed #6913322
piglit-glslparser

00:04:03

passed #6913321
piglit-quick_gl

00:05:56

passed #6913323
piglit-quick_shader

00:06:08

 
  Softpipe
passed #6913326
softpipe-gles2

00:01:43

passed #6913327
softpipe-gles3

00:06:21

passed #6913328
softpipe-gles31 1/2

00:05:29

passed #6913329
softpipe-gles31 2/2

00:02:35

 
  Freedreno
passed #6913339
google-freedreno-db410c
arm64_a306_gles2

00:07:00

passed #6913340
google-freedreno-db410c
arm64_a306_gles3

00:05:11

passed #6913341
google-freedreno-db410c
arm64_a306_gles3_options

00:03:41

passed #6913342
google-freedreno-db820c
arm64_a530_gles2

00:10:28

passed #6913343
google-freedreno-db820c
arm64_a530_gles3

00:02:58

passed #6913344
google-freedreno-db820c
arm64_a530_gles31

00:04:28

passed #6913334
google-freedreno-cheza
arm64_a630_bypass

00:02:50

passed #6913330
google-freedreno-cheza
arm64_a630_gles2

00:03:08

passed #6913332
google-freedreno-cheza
arm64_a630_gles3

00:07:25

passed #6913331
google-freedreno-cheza
arm64_a630_gles31

00:05:28

passed #6913336
google-freedreno-cheza
arm64_a630_gmem

00:03:05

passed #6913333
google-freedreno-cheza
arm64_a630_noubo

00:02:39

passed #6913335
google-freedreno-cheza
arm64_a630_traces

00:04:13

passed #6913337
google-freedreno-cheza
arm64_a630_vk

00:04:44

passed #6913338
google-freedreno-cheza
arm64_a630_vk_sysmem

00:02:35

 
  Panfrost
passed #6913345
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64

00:14:10

passed #6913346
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf

00:04:42

passed #6913347
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64

00:17:02

passed #6913348
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2

00:22:00

passed #6913349
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2

00:17:51

passed #6913350
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64

00:19:58

 
  Radv
passed #6913351
radv-fossils

00:08:38

 
  Virgl
passed #6913356
virgl-gl30-on-gl

00:00:19

passed #6913357
virgl-gl31-on-gl

00:01:32

passed #6913358
virgl-gl32-on-gl

00:01:40

passed #6913352
virgl-gles2-on-gl

00:02:08

passed #6913354
virgl-gles31-on-gl 1/2

00:02:37

passed #6913355
virgl-gles31-on-gl 2/2

00:04:20

passed #6913353
virgl-gles3-on-gl

00:04:35

passed #6913359
virgl-traces

00:00:30

 
  Radeonsi
passed #6913360
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64

00:09:01

passed #6913361
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64

00:11:18