Enable b2g vsync refresh driver on android L device

RESOLVED DUPLICATE of bug 1155797

Status

()

--
major
RESOLVED DUPLICATE of bug 1155797
4 years ago
4 years ago

People

(Reporter: jerry, Assigned: jerry)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1147753 +++
We have some issue to turn on vsync refresh driver on L device(nexus5). Bug 1147753 just turn off the vsync refresh for all L device. Find the root cause and turn on again in this bug.
I still can't find a good way to reproduce this problem.
But when this issue occur, there are a lot of error message for cpu online.

adb logcat:
E/MP-Decision(  860): Error 1 setting online status to 1 forcpu3
E/MP-Decision(  860): Error 1 setting online status to 1 forcpu3
E/MP-Decision(  860): Error 1 setting online status to 1 forcpu2
E/MP-Decision(  860): Error 1 setting online status to 1 forcpu3
E/MP-Decision(  860): Error 1 setting online status to 1 forcpu3
E/MP-Decision(  860): Error 1 setting online status to 1 forcpu3
....

kernel message(dmesg):
_cpu_up: attempt to bring up CPU 3 failed
_cpu_up: attempt to bring up CPU 2 failed
...
I don't have nexus5-l kernel code, but I think the error message comes from kernel _cpu_up function[1].

[1]
http://lxr.free-electrons.com/source/kernel/cpu.c#L487
I can sometimes reproduce this issue using testing step in the Bug 1148718 comment 0.
Status: NEW → ASSIGNED
Hi Diego,
Do you have idea about the cpu bring up problem in comment 1?
Flags: needinfo?(dwilson)

Updated

4 years ago
No longer blocks: 1094121
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #4)
> Hi Diego,
> Do you have idea about the cpu bring up problem in comment 1?

I also see VSync issues on another Lollipop target, but I don't see the errors on comment 1.

I also noticed that it happens mostly when the hardware composer is enabled. Can you try enabling "gfx.vsync.refreshdriver" but disabling "gfx.vsync.hw-vsync.enabled"?

https://mxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js#4664
Flags: needinfo?(dwilson)
(In reply to Diego Wilson [:diego] from comment #5)
> (In reply to Jerry Shih[:jerry] (UTC+8) from comment #4)
> > Hi Diego,
> > Do you have idea about the cpu bring up problem in comment 1?
> 
> I also see VSync issues on another Lollipop target, but I don't see the
> errors on comment 1.
> 
> I also noticed that it happens mostly when the hardware composer is enabled.
> Can you try enabling "gfx.vsync.refreshdriver" but disabling
> "gfx.vsync.hw-vsync.enabled"?
> 
> https://mxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.
> js#4664

This will by default stop using HwcComposer. This is the current situation, gfx.vsync.refreshdriver is disabled on L devices. Since we do not use the HwcComposer, this issue does not happen. All the vsync issues are due to the HwcComposer. Do we have a bug to track vsync issues on L?
Flags: needinfo?(dwilson)
(In reply to Mason Chang [:mchang] from comment #6)
> Do we have a bug to track vsync issues on L?

Isn't that what this bug is for?
Flags: needinfo?(dwilson)
(In reply to Diego Wilson [:diego] from comment #7)
> (In reply to Mason Chang [:mchang] from comment #6)
> > Do we have a bug to track vsync issues on L?
> 
> Isn't that what this bug is for?

Oh, I thought this was specifically for tracking this issue. From comment 5, I thought there was another bug where we have vsync issues, so maybe there was some meta bug.
Any updates on this Jerry?
Flags: needinfo?(hshih)
If I put a log at hwc vsync callback, I can't reproduce this issue.
Without log, debugging with gdb when comment 1 occur, I can't break at hwc vsync callback or b2g's refresh driver. I'm check some block issue last week. Will focus on this bug on Wednesday.
Created attachment 8593317 [details] [diff] [review]
wip: turn on vsync for 5.1 n5-l.

Turn on vsync on n5-l.
I update the base image to android 5.1, and I haven't got the issue in comment 1 yet.
Need more test.
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #11)
> Created attachment 8593317 [details] [diff] [review]
> wip: turn on vsync for 5.1 n5-l.
> 
> Turn on vsync on n5-l.
> I update the base image to android 5.1, and I haven't got the issue in
> comment 1 yet.
> Need more test.

I can't, either.....Still try to reproduce it.s
I can reproduce this pretty easily. STR:

1) ./config.sh nexus-5-l
2) Flash with the patch from Jerry
3) Go through the FTU until you get to the homescreen.
4) Run adb logcat
5) Scroll through the homescreen
6) Turn the display off by pushing the power button
7) Turn on the display to get to the homescreen
8) Repeat steps 5-7 until the CPUs no longer turn on.

Also, the really bad thing is that even though the hardware composer doesn't turn on initially, we still try to enable vsync in the hardware composer. When we turn the screen on, we automatically enable vsync due to the GonkDisplayJB.cpp, vsync sometimes works so we actually get 2 vsync notifications: One in the software thread and one in the hardware thread. Then after enough times of turning the screen on and off, all the CPUs die.

@Jerry - Where in the kernel is this bug happening?
The b2g vsync refresh driver is enabled on L devices, it just uses software vsync. The real problem is that vsync on L devices from the HwcComposer is unreliable, which is bug 1155797.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1155797
(Assignee)

Updated

4 years ago
Flags: needinfo?(hshih)
You need to log in before you can comment on or make changes to this bug.