Loading services/surfaceflinger/SurfaceFlinger.cpp +13 −0 Original line number Original line Diff line number Diff line Loading @@ -2626,6 +2626,7 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, } } if (currentMode == HWC_POWER_MODE_OFF) { if (currentMode == HWC_POWER_MODE_OFF) { // Turn on the display getHwComposer().setPowerMode(type, mode); getHwComposer().setPowerMode(type, mode); if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { // FIXME: eventthread only knows about the main display right now // FIXME: eventthread only knows about the main display right now Loading @@ -2636,7 +2637,19 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, mVisibleRegionsDirty = true; mVisibleRegionsDirty = true; mHasPoweredOff = true; mHasPoweredOff = true; repaintEverything(); repaintEverything(); struct sched_param param = {0}; param.sched_priority = 1; if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) { ALOGW("Couldn't set SCHED_FIFO on display on"); } } else if (mode == HWC_POWER_MODE_OFF) { } else if (mode == HWC_POWER_MODE_OFF) { // Turn off the display struct sched_param param = {0}; if (sched_setscheduler(0, SCHED_OTHER, ¶m) != 0) { ALOGW("Couldn't set SCHED_OTHER on display off"); } if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { disableHardwareVsync(true); // also cancels any in-progress resync disableHardwareVsync(true); // also cancels any in-progress resync Loading services/surfaceflinger/SurfaceFlinger_hwc1.cpp +13 −0 Original line number Original line Diff line number Diff line Loading @@ -2530,6 +2530,7 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, } } if (currentMode == HWC_POWER_MODE_OFF) { if (currentMode == HWC_POWER_MODE_OFF) { // Turn on the display getHwComposer().setPowerMode(type, mode); getHwComposer().setPowerMode(type, mode); if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { // FIXME: eventthread only knows about the main display right now // FIXME: eventthread only knows about the main display right now Loading @@ -2540,7 +2541,19 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, mVisibleRegionsDirty = true; mVisibleRegionsDirty = true; mHasPoweredOff = true; mHasPoweredOff = true; repaintEverything(); repaintEverything(); struct sched_param param = {0}; param.sched_priority = 1; if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) { ALOGW("Couldn't set SCHED_FIFO on display on"); } } else if (mode == HWC_POWER_MODE_OFF) { } else if (mode == HWC_POWER_MODE_OFF) { // Turn off the display struct sched_param param = {0}; if (sched_setscheduler(0, SCHED_OTHER, ¶m) != 0) { ALOGW("Couldn't set SCHED_OTHER on display off"); } if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { disableHardwareVsync(true); // also cancels any in-progress resync disableHardwareVsync(true); // also cancels any in-progress resync Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +13 −0 Original line number Original line Diff line number Diff line Loading @@ -2626,6 +2626,7 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, } } if (currentMode == HWC_POWER_MODE_OFF) { if (currentMode == HWC_POWER_MODE_OFF) { // Turn on the display getHwComposer().setPowerMode(type, mode); getHwComposer().setPowerMode(type, mode); if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { // FIXME: eventthread only knows about the main display right now // FIXME: eventthread only knows about the main display right now Loading @@ -2636,7 +2637,19 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, mVisibleRegionsDirty = true; mVisibleRegionsDirty = true; mHasPoweredOff = true; mHasPoweredOff = true; repaintEverything(); repaintEverything(); struct sched_param param = {0}; param.sched_priority = 1; if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) { ALOGW("Couldn't set SCHED_FIFO on display on"); } } else if (mode == HWC_POWER_MODE_OFF) { } else if (mode == HWC_POWER_MODE_OFF) { // Turn off the display struct sched_param param = {0}; if (sched_setscheduler(0, SCHED_OTHER, ¶m) != 0) { ALOGW("Couldn't set SCHED_OTHER on display off"); } if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { disableHardwareVsync(true); // also cancels any in-progress resync disableHardwareVsync(true); // also cancels any in-progress resync Loading
services/surfaceflinger/SurfaceFlinger_hwc1.cpp +13 −0 Original line number Original line Diff line number Diff line Loading @@ -2530,6 +2530,7 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, } } if (currentMode == HWC_POWER_MODE_OFF) { if (currentMode == HWC_POWER_MODE_OFF) { // Turn on the display getHwComposer().setPowerMode(type, mode); getHwComposer().setPowerMode(type, mode); if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { // FIXME: eventthread only knows about the main display right now // FIXME: eventthread only knows about the main display right now Loading @@ -2540,7 +2541,19 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw, mVisibleRegionsDirty = true; mVisibleRegionsDirty = true; mHasPoweredOff = true; mHasPoweredOff = true; repaintEverything(); repaintEverything(); struct sched_param param = {0}; param.sched_priority = 1; if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) { ALOGW("Couldn't set SCHED_FIFO on display on"); } } else if (mode == HWC_POWER_MODE_OFF) { } else if (mode == HWC_POWER_MODE_OFF) { // Turn off the display struct sched_param param = {0}; if (sched_setscheduler(0, SCHED_OTHER, ¶m) != 0) { ALOGW("Couldn't set SCHED_OTHER on display off"); } if (type == DisplayDevice::DISPLAY_PRIMARY) { if (type == DisplayDevice::DISPLAY_PRIMARY) { disableHardwareVsync(true); // also cancels any in-progress resync disableHardwareVsync(true); // also cancels any in-progress resync Loading