diff options
author | Andy McFadden <fadden@android.com> | 2012-09-11 15:15:13 -0700 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2012-09-11 15:15:13 -0700 |
commit | 43601a2dc320a271ff8c3765ff61414a07221635 (patch) | |
tree | 2030c8c6d6f7e5494a538bc72cfdc7c370943168 /services/surfaceflinger/DisplayHardware/HWComposer.cpp | |
parent | b0d1dd36f104c0b581674adc7f830cbf44b7db06 (diff) | |
download | frameworks_native-43601a2dc320a271ff8c3765ff61414a07221635.zip frameworks_native-43601a2dc320a271ff8c3765ff61414a07221635.tar.gz frameworks_native-43601a2dc320a271ff8c3765ff61414a07221635.tar.bz2 |
Reduce failure uncertainty
This adds a trivial workaround for a one-shot boot time crash, plus
an explicit check and abort for a failure condition that currently
presents as a less obvious failure.
Bug: 7145521, 7147557
Change-Id: I548f6a9caa9f0bd5710aaecea0e1c6c7c8f2f281
Diffstat (limited to 'services/surfaceflinger/DisplayHardware/HWComposer.cpp')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 5c125c8..75b8ad8 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -111,6 +111,12 @@ HWComposer::HWComposer( loadFbHalModule(); loadHwcModule(); + if (!hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1) && !mFbDev) { + ALOGE("ERROR: failed to open framebuffer, aborting"); + // FB mandatory on <= 1.0, give up + abort(); + } + if (mHwc) { ALOGI("Using %s version %u.%u", HWC_HARDWARE_COMPOSER, (hwcApiVersion(mHwc) >> 24) & 0xff, |