Closed Bug 1127585 Opened 11 years ago Closed 11 years ago

HwcComposer2D flickers on Android Lollipop

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.2+, firefox36 wontfix, firefox37 wontfix, firefox38 fixed, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
mozilla38
blocking-b2g 2.2+
Tracking Status
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: diego, Assigned: sushilchauhan)

References

Details

(Whiteboard: [caf priority: p2][CR 789657])

Attachments

(1 file, 2 obsolete files)

This is due to a misdefined constant HWC_BLIT. This constant value was hard coded into HwcComposer2D but has since changed value in CAF Android Lollipop headers. https://mxr.mozilla.org/mozilla-central/source/widget/gonk/HwcComposer2D.cpp#42
Blocks: gonk-L
status-b2g-v2.2: --- → ?
blocking-b2g: --- → 2.2?
(In reply to Diego Wilson [:diego] from comment #0) > This is due to a misdefined constant HWC_BLIT. This constant value was hard > coded into HwcComposer2D but has since changed value in CAF Android Lollipop > headers. > > https://mxr.mozilla.org/mozilla-central/source/widget/gonk/HwcComposer2D. > cpp#42 Should we define HWC_BLIT as a special number (-1 or other integer value), not just "HWC_FRAMEBUFFER_TARGET + 1" or "HW_XXX + 1" to prevent that Android adds new HW compose types in the future?
Whiteboard: [CR 789657]
Whiteboard: [CR 789657] → [caf priority: p2][CR 789657]
Boris, please take a look this issue. NI diego for comment 1.
Flags: needinfo?(dwilson)
Flags: needinfo?(boris.chiou)
blocking-b2g: 2.2? → 2.2+
(In reply to Michael Vines [:m1] [:evilmachines] from comment #3) > There's a patch for this already at > https://www.codeaurora.org/cgit/quic/lf/b2g/build/commit/?h=v2. > 2&id=5e825875151c89c5138a791135d3f976fdd124cf. Err..wrong hwc bug, but Sushil is looking at this regardless.
Flags: needinfo?(boris.chiou)
(In reply to Boris Chiou [:boris] from comment #1) > (In reply to Diego Wilson [:diego] from comment #0) > > This is due to a misdefined constant HWC_BLIT. This constant value was hard > > coded into HwcComposer2D but has since changed value in CAF Android Lollipop > > headers. > > > > https://mxr.mozilla.org/mozilla-central/source/widget/gonk/HwcComposer2D. > > cpp#42 > > Should we define HWC_BLIT as a special number (-1 or other integer value), > not just "HWC_FRAMEBUFFER_TARGET + 1" or "HW_XXX + 1" to prevent that > Android adds new HW compose types in the future? No, we should not define HWC_BLIT to -1, it will not solve the issue with our HWC HAL. Unfortunately, HWC_BLIT definition has not been up-streamed to AOSP yet that's why we have to maintain the local definition of HWC_BLIT composition type in HwcComposer2D because Mozilla servers compile with AOSP HWC headers (while up-steaming). So it is OK to set the value of a new composition type enum as the value after already defined composition types in HWC header. I will upload the patch.
New definitions have been added in the latest Android version's HWC header, so HWC_BLIT needs to be defined correctly based on version. Otherwise HWC HAL will mark the layers for HWC_BLIT composition but HwcComposer2D will not understand this composition type and it will lead to flickers and corruption.
Attachment #8557715 - Flags: review?(dwilson)
Comment on attachment 8557715 [details] [diff] [review] Define HWC_BLIT based on android version. Review of attachment 8557715 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/gonk/HwcComposer2D.cpp @@ +41,4 @@ > > +#if ANDROID_VERSION >= 21 > +#ifndef HWC_BLIT > +#define HWC_BLIT (HWC_CURSOR_OVERLAY + 1) Can we add a new HWC_CUSTOM_COMPOSITETYPE instead of using the last one for android release? Then we don't need to update this define when android version is changed. For example, HWC_CUSTOM_COMPOSITETYPE 0xFF00 HWC_BLIT (HWC_CUSTOM_COMPOSITETYPE +1)
(In reply to peter chang[:pchang][:peter] from comment #7) > Can we add a new HWC_CUSTOM_COMPOSITETYPE instead of using the last one for > android release? Then we don't need to update this define when android > version is changed. > > For example, HWC_CUSTOM_COMPOSITETYPE 0xFF00 > HWC_BLIT (HWC_CUSTOM_COMPOSITETYPE +1) We can consider this suggestion, if we need to update HWC_BLIT for any future android version. But for now, it is too late for us to update HWC_BLIT value in HWC HAL for current android version.
We can consider to set a high value for HWC_BLIT in HAL, in current Android version's HWC header.
Set the value of HWC_BLIT composition type to a higher value, so that there is no need to update it, if new composition types are added in a future android version.
Attachment #8557715 - Attachment is obsolete: true
Attachment #8557715 - Flags: review?(dwilson)
Attachment #8558353 - Flags: review?(pchang)
Comment on attachment 8558353 [details] [diff] [review] Update HWC_BLIT composition-type value. Review of attachment 8558353 [details] [diff] [review]: ----------------------------------------------------------------- Looks okay to me but it would be nice to have another defination to indicate the start the custom composition type, like HWC_BLIT = HWC_CUSTOM_COMPOSITE_TYPE_START + 1.
Attachment #8558353 - Flags: review?(sotaro.ikeda.g)
Attachment #8558353 - Flags: review?(pchang)
Attachment #8558353 - Flags: review+
Attachment #8558353 - Flags: review?(sotaro.ikeda.g) → review+
Uploading the HG friendly version of reviewed patch.
Attachment #8558353 - Attachment is obsolete: true
Attachment #8558640 - Flags: review+
Flags: needinfo?(dwilson)
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment on attachment 8558640 [details] [diff] [review] Update HWC_BLIT composition-type value. r=sotaro NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Testing completed: Risk to taking this patch (and alternatives if risky): String or UUID changes made by this patch:
Attachment #8558640 - Flags: approval-mozilla-b2g37?
Comment on attachment 8558640 [details] [diff] [review] Update HWC_BLIT composition-type value. r=sotaro [Approval Request Comment] Bug caused by (feature/regressing bug #): Caused by mismatch of HWC_BLIT composition type value in CAF Android Lollipop HWC header. User impact if declined: Flickers and corruption in HWC_BLIT composition path. Testing completed: Basic display testing. Risk to taking this patch (and alternatives if risky): No String or UUID changes made by this patch: No
Attachment #8558640 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
No longer blocks: CAF-v3.0-FL-metabug
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: