Closed Bug 982040 Opened 10 years ago Closed 6 years ago

[dolphin] hwc doesn't work

Categories

(Firefox OS Graveyard :: Vendcom, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: seinlin, Assigned: sam.hua)

References

Details

(Whiteboard: [POVB][Dolphin_1.4][sprd312195])

Attachments

(2 files)

When hwc is enabled, there will be black screen and no image.
Blocks: dolphin
Hi Cj: can you find one to help? Thanks!
Flags: needinfo?(cku)
Hi! Solomon,

Over to you. Thanks.

--
Keven
QA Contact: schiu
Assignee: nobody → schiu
clear ni since solomon had taken this issue
Flags: needinfo?(cku)
I noticed that when hwc is enabled, b2g will get a Segmentation fault as below,

---
Program received signal SIGSEGV, Segmentation fault.
0xb54073fa in mozilla::HwcComposer2D::Commit (this=this@entry=0xb1d33e70) at ../../../../dolphin/gecko/widget/gonk/HwcComposer2D.cpp:676
676                 LayerRenderState state = mHwcLayerMap[j]->GetLayer()->GetRenderState();
(gdb) bt
#0  0xb54073fa in mozilla::HwcComposer2D::Commit (this=this@entry=0xb1d33e70) at ../../../../dolphin/gecko/widget/gonk/HwcComposer2D.cpp:676
#1  0xb5407530 in mozilla::HwcComposer2D::Render (this=0xb1d33e70, dpy=0x1, sur=<optimized out>)
    at ../../../../dolphin/gecko/widget/gonk/HwcComposer2D.cpp:618
#2  0xb51e3ec0 in mozilla::layers::CompositorOGL::EndFrame (this=0xafa78980) at ../../../../dolphin/gecko/gfx/layers/opengl/CompositorOGL.cpp:1271
#3  0xb51d21e2 in mozilla::layers::LayerManagerComposite::Render (this=this@entry=0xafeb4350)
    at ../../../../dolphin/gecko/gfx/layers/composite/LayerManagerComposite.cpp:511
#4  0xb51d2290 in EndTransaction (aFlags=<optimized out>, this=0xafeb4350, aCallback=<optimized out>, aCallbackData=<optimized out>)
    at ../../../../dolphin/gecko/gfx/layers/composite/LayerManagerComposite.cpp:245
#5  mozilla::layers::LayerManagerComposite::EndTransaction (this=0xafeb4350, aCallback=<optimized out>, aCallbackData=<optimized out>, 
    aFlags=<optimized out>) at ../../../../dolphin/gecko/gfx/layers/composite/LayerManagerComposite.cpp:202
#6  0xb51d1044 in mozilla::layers::LayerManagerComposite::EndEmptyTransaction (this=<optimized out>, aFlags=<optimized out>)
    at ../../../../dolphin/gecko/gfx/layers/composite/LayerManagerComposite.cpp:197
#7  0xb51d9ee6 in mozilla::layers::CompositorParent::CompositeToTarget (this=0xaed1d400, aTarget=<optimized out>)
    at ../../../../dolphin/gecko/gfx/layers/ipc/CompositorParent.cpp:696
#8  0xb4fc4438 in DispatchToMethod<mozilla::ipc::MessageChannel, void (mozilla::ipc::MessageChannel::*)()> (
    method=(void (mozilla::ipc::MessageChannel::*)(mozilla::ipc::MessageChannel * const)) 0xb51d9fb7 <mozilla::layers::CompositorParent::Composite()>, 
    obj=<optimized out>, arg=...) at ../../../../dolphin/gecko/ipc/chromium/src/base/tuple.h:383
#9  RunnableMethod<mozilla::ipc::MessageChannel, void (mozilla::ipc::MessageChannel::*)(), Tuple0>::Run (this=<optimized out>)
    at ../../../../dolphin/gecko/ipc/chromium/src/base/task.h:307
#10 0xb4fbc068 in MessageLoop::RunTask (this=0xb1001cb0, task=0xaebd1280) at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:344
#11 0xb4fbc72a in MessageLoop::DeferOrRunPendingTask (this=<optimized out>, pending_task=...)
    at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:352
#12 0xb4fbd75c in DoWork (this=<optimized out>) at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:430
#13 MessageLoop::DoWork (this=0xb1001cb0) at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:409
#14 0xb4fbd8ec in base::MessagePumpDefault::Run (this=0xb1490880, delegate=0xb1001cb0)
    at ../../../../dolphin/gecko/ipc/chromium/src/base/message_pump_default.cc:34
#15 0xb4fbbff6 in MessageLoop::RunInternal (this=this@entry=0xb1001cb0) at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:226
#16 0xb4fbc0a8 in RunHandler (this=0xb1001cb0) at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:219
#17 MessageLoop::Run (this=this@entry=0xb1001cb0) at ../../../../dolphin/gecko/ipc/chromium/src/base/message_loop.cc:193
#18 0xb4fbe89a in base::Thread::ThreadMain (this=0xb147dd30) at ../../../../dolphin/gecko/ipc/chromium/src/base/thread.cc:162
#19 0xb4fb5550 in ThreadFunc (closure=<optimized out>) at ../../../../dolphin/gecko/ipc/chromium/src/base/platform_thread_posix.cc:39
#20 0xb6f0021c in __thread_entry (func=0xb4fb5549 <ThreadFunc(void*)>, arg=0xb147dd30, tls=0xb1001dd0) at bionic/libc/bionic/pthread_create.cpp:105
#21 0xb6f003b8 in pthread_create (thread_out=0xb147dd38, attr=<optimized out>, start_routine=0xb4fb5549 <ThreadFunc(void*)>, arg=0x78)
    at bionic/libc/bionic/pthread_create.cpp:224
#22 0x00000000 in ?? ()
Ying, After I use scx15_sp7715gaplus-userdebug for dolphin, now hwc does properly. But I am not sure if it is related to what you update in bug 982449 comment 4.
Can you help me to confirm this? Thanks!
Flags: needinfo?(ying.xu)
(In reply to Kai-Zhen Li from comment #5)
> Ying, After I use scx15_sp7715gaplus-userdebug for dolphin, now hwc does
> properly. But I am not sure if it is related to what you update in bug
> 982449 comment 4.
> Can you help me to confirm this? Thanks!

There are no relationships between hwc and libisp.so.
I still get a crash if enabling the hwc in developer menu manully.
Flags: needinfo?(ying.xu)
Yes, enable hwc in developer menu will still cause a crash. What I mentioned in comment 5 is now we don't need to patch gecko to disable this pref for hwc, "pref("layers.composer2d.enabled", false);". And this patch was also removed from patches.
ok,got it.

Another suggestion: Lower the priority of hwc job.

Because the functionality of hwc of 7715 is still weak than qcom's.
It only supports two layers blending simultaneously.

I have upload the datasheet of 7715 into the FTP,you can get it.
With enabling hwc from Settings app, the device keep rebooting. The logs show that HwcComposer2D::PrepareLayerList() got return fail on the below point.

http://lxr.mozilla.org/mozilla-central/source/widget/gonk/HwcComposer2D.cpp#259

It seems that hwc doesn't have ColorLayer implementation which ffos needs,
(In reply to Vincent Liu[:vliu] from comment #9)
> With enabling hwc from Settings app, the device keep rebooting. The logs
> show that HwcComposer2D::PrepareLayerList() got return fail on the below
> point.
> 
> http://lxr.mozilla.org/mozilla-central/source/widget/gonk/HwcComposer2D.
> cpp#259
> 
> It seems that hwc doesn't have ColorLayer implementation which ffos needs,

yes ,hwc of 7715 doesn't support this function
In Commit(), the variable mHwcLayerMap should be check before referenced. Applying the patch that I just uploaded can stop b2g from crash with HWC enabled. I will check if lacking the capbility of RB swap and color fill relate to this workaround later.
Depends on: 987563
Partner needs to implement RB swap and color fill.
Whiteboard: [POVB]
James,
blocking-b2g: --- → 1.4?
Flags: needinfo?(james.zhang)
Andrew, could help to support this as comment 11?
Flags: needinfo?(andrew.wu)
It seems the hwc if of version 4.4. SPRD haven't validated it.
Flags: needinfo?(andrew.wu)
(In reply to Andrew Wu from comment #15)
> It seems the hwc if of version 4.4. SPRD haven't validated it.

Andrew, it's not 6821 case, it's 7715 case.
Can we implement RB swap and color fill on my side?
Flags: needinfo?(james.zhang)
Whiteboard: [POVB] → [POVB][Dolphin_1.4]
Clearing the nomination flag here - vendor bugs don't block.
blocking-b2g: 1.4? → ---
Component: GonkIntegration → Vendcom
James, We need to modify hwcomposer to support query for b2g as file.
Sam, Please land it.
Assignee: schiu → sam.hua
Flags: needinfo?(sam.hua)
blocking-b2g: --- → 1.4?
Triage: This is by design in firefox OS. Need partner to modify the related parameter. Stay as POVB bug.
blocking-b2g: 1.4? → ---
Hi James,

Please help to close this bug after Sam lands the patch. Thanks.
Flags: needinfo?(james.zhang)
Please ni Sam, he will take it.
Flags: needinfo?(james.zhang)
merged with patch.
please help to verified it in latest build
Flags: needinfo?(sam.hua) → needinfo?(kli)
Sam, I can see the patch is merged. But "USE_SPRD_HWCOMPOSER := false" in scx15_sp7715ga/BoardConfig.mk, so hwc is not compiled and used.
Flags: needinfo?(kli)
Flags: needinfo?(sam.hua)
Whiteboard: [POVB][Dolphin_1.4] → [POVB][Dolphin_1.4][sprd312195]
Hi Kaizhen,
If u set "USE_SPRD_HWCOMPOSER := true", does it work?
Flags: needinfo?(sam.hua)
(In reply to sam.hua from comment #26)
> Hi Kaizhen,
> If u set "USE_SPRD_HWCOMPOSER := true", does it work?

When USE_SPRD_HWCOMPOSER := true is set, I can see the hwc module is built and loaded, but I don't know how to check if hwc is working properly. Can you ask your gpu team to help on this?
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: