Loading services/surfaceflinger/DisplayHardware/HWComposer.cpp +8 −10 Original line number Original line Diff line number Diff line Loading @@ -99,7 +99,7 @@ HWComposer::HWComposer( bool needVSyncThread = true; bool needVSyncThread = true; // Note: some devices may insist that the FB HAL be opened before HWC. // Note: some devices may insist that the FB HAL be opened before HWC. loadFbHalModule(); int fberr = loadFbHalModule(); loadHwcModule(); loadHwcModule(); if (mFbDev && mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) { if (mFbDev && mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) { Loading @@ -113,7 +113,8 @@ HWComposer::HWComposer( // If we have no HWC, or a pre-1.1 HWC, an FB dev is mandatory. // If we have no HWC, or a pre-1.1 HWC, an FB dev is mandatory. if ((!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) if ((!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) && !mFbDev) { && !mFbDev) { ALOGE("ERROR: failed to open framebuffer, aborting"); ALOGE("ERROR: failed to open framebuffer (%s), aborting", strerror(-fberr)); abort(); abort(); } } Loading Loading @@ -234,20 +235,17 @@ void HWComposer::loadHwcModule() } } // Load and prepare the FB HAL, which uses the gralloc module. Sets mFbDev. // Load and prepare the FB HAL, which uses the gralloc module. Sets mFbDev. void HWComposer::loadFbHalModule() int HWComposer::loadFbHalModule() { { hw_module_t const* module; hw_module_t const* module; if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) != 0) { int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module); if (err != 0) { ALOGE("%s module not found", GRALLOC_HARDWARE_MODULE_ID); ALOGE("%s module not found", GRALLOC_HARDWARE_MODULE_ID); return; return err; } } int err = framebuffer_open(module, &mFbDev); return framebuffer_open(module, &mFbDev); if (err) { ALOGE("framebuffer_open failed (%s)", strerror(-err)); return; } } } status_t HWComposer::initCheck() const { status_t HWComposer::initCheck() const { Loading services/surfaceflinger/DisplayHardware/HWComposer.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -265,7 +265,7 @@ public: private: private: void loadHwcModule(); void loadHwcModule(); void loadFbHalModule(); int loadFbHalModule(); LayerListIterator getLayerIterator(int32_t id, size_t index); LayerListIterator getLayerIterator(int32_t id, size_t index); Loading Loading
services/surfaceflinger/DisplayHardware/HWComposer.cpp +8 −10 Original line number Original line Diff line number Diff line Loading @@ -99,7 +99,7 @@ HWComposer::HWComposer( bool needVSyncThread = true; bool needVSyncThread = true; // Note: some devices may insist that the FB HAL be opened before HWC. // Note: some devices may insist that the FB HAL be opened before HWC. loadFbHalModule(); int fberr = loadFbHalModule(); loadHwcModule(); loadHwcModule(); if (mFbDev && mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) { if (mFbDev && mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) { Loading @@ -113,7 +113,8 @@ HWComposer::HWComposer( // If we have no HWC, or a pre-1.1 HWC, an FB dev is mandatory. // If we have no HWC, or a pre-1.1 HWC, an FB dev is mandatory. if ((!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) if ((!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) && !mFbDev) { && !mFbDev) { ALOGE("ERROR: failed to open framebuffer, aborting"); ALOGE("ERROR: failed to open framebuffer (%s), aborting", strerror(-fberr)); abort(); abort(); } } Loading Loading @@ -234,20 +235,17 @@ void HWComposer::loadHwcModule() } } // Load and prepare the FB HAL, which uses the gralloc module. Sets mFbDev. // Load and prepare the FB HAL, which uses the gralloc module. Sets mFbDev. void HWComposer::loadFbHalModule() int HWComposer::loadFbHalModule() { { hw_module_t const* module; hw_module_t const* module; if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) != 0) { int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module); if (err != 0) { ALOGE("%s module not found", GRALLOC_HARDWARE_MODULE_ID); ALOGE("%s module not found", GRALLOC_HARDWARE_MODULE_ID); return; return err; } } int err = framebuffer_open(module, &mFbDev); return framebuffer_open(module, &mFbDev); if (err) { ALOGE("framebuffer_open failed (%s)", strerror(-err)); return; } } } status_t HWComposer::initCheck() const { status_t HWComposer::initCheck() const { Loading
services/surfaceflinger/DisplayHardware/HWComposer.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -265,7 +265,7 @@ public: private: private: void loadHwcModule(); void loadHwcModule(); void loadFbHalModule(); int loadFbHalModule(); LayerListIterator getLayerIterator(int32_t id, size_t index); LayerListIterator getLayerIterator(int32_t id, size_t index); Loading