Closed Bug 1250117 Opened 8 years ago Closed 8 years ago

Timeouts if gralloc is disabled on b2g

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: nical, Assigned: nical)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files, 1 obsolete file)

If gralloc is disabled on b2g we still go through the AsyncTransactionWaiter code such as https://dxr.mozilla.org/mozilla-central/rev/af6356a3e8c56036b74ba097395356d9c6e6c5a3/gfx/layers/client/TiledContentClient.cpp#572 expecting to get a notification back from the compositor, but since BufferTextureHost does not expose fence objects, SendFenceHandleIfPresent on the other side will not send what the AsyncTransactionWaiter is waiting on.

We should not create an AsyncTransactionWaiter unless we know that the TextureClient/Host works with fence objects or some other thing that will send the notification back from the compositor.
We should also pass the information along in the transaction that something will wait for the compositor, in order to be extra certain the compositor will send the notification back, otherwise it is very easy to get into this kind of deadlock.
Whiteboard: [gfx-noted]
The remaining manual AsyncTransactionWaiter/Tracker usage is in ImageClient/ImageBridgeChild but it is a bit different and is not specific to gralloc so I think it's best to leave it as it is for now.
Assignee: nobody → nical.bugzilla
Attachment #8723013 - Flags: review?(sotaro.ikeda.g)
Juan, when you have some time could you test this patch with the device you are interested running b2g on without gralloc? This should fix the deadlock you were having.
Flags: needinfo?(jgomez)
Sorry for the noise, I forgot to hg qrefresh before submitting the previous patch.
Attachment #8723013 - Attachment is obsolete: true
Attachment #8723013 - Flags: review?(sotaro.ikeda.g)
Attachment #8723015 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8723015 [details] [diff] [review]
Centralize the gralloc specific txn tracking logic and make sure it only runs with gralloc.

Looks good.
Attachment #8723015 - Flags: review?(sotaro.ikeda.g) → review+
Attached patch build fixSplinter Review
Ok, tried the fix, and I could build without errors :)
Flags: needinfo?(jgomez)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4c4f342da9f5
https://hg.mozilla.org/mozilla-central/rev/3a55e7c48a53
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: