Closed
Bug 878977
Opened 11 years ago
Closed 11 years ago
HwcComposer2D doesn't render Camera or Video frames
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: diego, Assigned: bjacob)
References
Details
This was definitely working at some point. Currently it fails here:
https://mxr.mozilla.org/mozilla-b2g18/source/widget/gonk/HwcComposer2D.cpp#351
and it falls back to GPU rendering.
Reporter | ||
Comment 1•11 years ago
|
||
This is causing problems in video playback. Either the GPU or HwcComposer2d holds on to a buffer longer than needed so eventually there's a genlock error:
E/libgenlock( 132): perform_lock_unlock_operation: GENLOCK_IOC_DREADLOCK failed (lockType0x1, >err=Connection timed out fd=31)
E/omx_vdec( 132): Failed to acquire genlock, ret = 1
If you just skip rendering canvas layers by returing True here:
https://mxr.mozilla.org/mozilla-b2g18/source/widget/gonk/HwcComposer2D.cpp#352
Playback will never lock this way anymore.
Comment 2•11 years ago
|
||
Is this the case where the screen stays frozen, but the audio continues to play?
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Mike Habicher [:mikeh] from comment #2)
> Is this the case where the screen stays frozen, but the audio continues to
> play?
Yep
Comment 4•11 years ago
|
||
(In reply to Diego Wilson [:diego] from comment #1)
> This is causing problems in video playback. Either the GPU or HwcComposer2d
> holds on to a buffer longer than needed so eventually there's a genlock
> error:
>
> E/libgenlock( 132): perform_lock_unlock_operation: GENLOCK_IOC_DREADLOCK
> failed (lockType0x1, >err=Connection timed out fd=31)
> E/omx_vdec( 132): Failed to acquire genlock, ret = 1
>
> If you just skip rendering canvas layers by returing True here:
What does it mean to change to true? Can you explain about it?
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> What does it mean to change to true? Can you explain about it?
This function is called once per each layer to be rendered.
If you return "false", the Hwc compositing will fail and it will fall back to GPU rendering.
If you return "true" before adding the layer into the compositing list, the layer is ignored, but all other layers in the compositing list are rendered.
How do you know it's a CanvasLayer? Using the debugger?
We need an owner for this bug. Sorry Benoit :-)
Assignee: nobody → bjacob
Diego, was this on mozilla-b2g18 or mozilla-central?
Flags: needinfo?(dwilson)
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #8)
> Diego, was this on mozilla-b2g18 or mozilla-central?
This was on mozilla-b2g18.
Flags: needinfo?(dwilson)
Reporter | ||
Comment 10•11 years ago
|
||
I think I figured out why this causes the genlock error and screen freeze:
1. The status bar displays a "network activity" animation in a canvas (CanvasLayer).
2. HwcComposer2D can't render it because for some reason it's not gralloc backed. The ShadowCanvasLayer is backed by an Shmem descriptor.
3. When HwcComposer2D can't render it falls back to GPU rendering.
4. This causes continues fluctuation between Hwc and GPU rendering everytime there's network activity.
5. It appears ImageLayerOGL does not unlock external buffers properly. This causes the genlock issue when the HW decoder or HWC try to reuse the buffer.
I filed bug 879297 for fixing the ImageLayerOGL lock issue. I have a working patch that I'll share ASAP there.
Depends on: 879297
No longer blocks: 877024
Reporter | ||
Updated•11 years ago
|
Summary: HwcComposer2D can't render CanvasLayers anymore → HwcComposer2D doesn't render Camera or Video frames
Reporter | ||
Comment 11•11 years ago
|
||
OK, now that bug 879297 has been fixed we can come back to this bug. Camera and Video are the key hardware composer use cases. I may need nrc's help figuring out how hwc is supposed to fetch the CanvasLayer buffer using composite layers.
Comment 12•11 years ago
|
||
(In reply to Diego Wilson [:diego] from comment #11)
> OK, now that bug 879297 has been fixed we can come back to this bug. Camera
> and Video are the key hardware composer use cases. I may need nrc's help
> figuring out how hwc is supposed to fetch the CanvasLayer buffer using
> composite layers.
In current Firefox OS use case, camera and video frames are rendered by ImageLayer. Is there a use case for using CanvasLayer for them now?
Flags: needinfo?(dwilson)
Reporter | ||
Comment 13•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #12)
> (In reply to Diego Wilson [:diego] from comment #11)
> > OK, now that bug 879297 has been fixed we can come back to this bug. Camera
> > and Video are the key hardware composer use cases. I may need nrc's help
> > figuring out how hwc is supposed to fetch the CanvasLayer buffer using
> > composite layers.
>
> In current Firefox OS use case, camera and video frames are rendered by
> ImageLayer. Is there a use case for using CanvasLayer for them now?
You're totally right! I created bug 885345 for video and camera hwc.
Closing this bug as the fact that powerskull works means CanvasLayer is at least rendering, albeit with some artifacts.
Flags: needinfo?(dwilson)
I don't understand the difference between bug 885345 and this bug.
Assignee | ||
Comment 15•11 years ago
|
||
(In reply to Diego Wilson [:diego] from comment #13)
> Closing this bug as the fact that powerskull works means CanvasLayer is at
> least rendering, albeit with some artifacts.
Did you mean to actually close the present bug? And bug 885345 is the one that should be worked on now?
(Didn't realize that I was the assignee until today).
Flags: needinfo?(dwilson)
Reporter | ||
Comment 16•11 years ago
|
||
Sorry, meant to close this bug. Please follow up on bug 885245.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(dwilson)
Resolution: --- → INCOMPLETE
Reporter | ||
Comment 17•11 years ago
|
||
Arg s/bug 885245/bug 885345
You need to log in
before you can comment on or make changes to this bug.
Description
•