hwc: Set HPD once at boot up
- HPD has to be set only once during boot up. - This also helps in use case where HPD is turned off (on purpose)through by adb shell for power testing and on suspend/resume, it gets re-enabled. Change-Id: I7bf6fdd08e719432029c5d6e5756685d36cdca43
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
8921608ed8
commit
2225eaab7c
@@ -475,10 +475,11 @@ static int hwc_setPowerMode(struct hwc_composer_device_1* dev, int dpy,
|
|||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mode == HWC_POWER_MODE_NORMAL) {
|
if(mode == HWC_POWER_MODE_NORMAL && !ctx->mHPDEnabled) {
|
||||||
// Enable HPD here, as during bootup POWER_MODE_NORMAL is set
|
// Enable HPD here, as during bootup POWER_MODE_NORMAL is set
|
||||||
// when SF is completely initialized
|
// when SF is completely initialized
|
||||||
ctx->mHDMIDisplay->setHPD(1);
|
ctx->mHDMIDisplay->setHPD(1);
|
||||||
|
ctx->mHPDEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->dpyAttr[dpy].isActive = not(mode == HWC_POWER_MODE_OFF);
|
ctx->dpyAttr[dpy].isActive = not(mode == HWC_POWER_MODE_OFF);
|
||||||
|
|||||||
@@ -413,6 +413,7 @@ void initContext(hwc_context_t *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(&(ctx->mPtorInfo), 0, sizeof(ctx->mPtorInfo));
|
memset(&(ctx->mPtorInfo), 0, sizeof(ctx->mPtorInfo));
|
||||||
|
ctx->mHPDEnabled = false;
|
||||||
ALOGI("Initializing Qualcomm Hardware Composer");
|
ALOGI("Initializing Qualcomm Hardware Composer");
|
||||||
ALOGI("MDP version: %d", ctx->mMDP.version);
|
ALOGI("MDP version: %d", ctx->mMDP.version);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -644,6 +644,8 @@ struct hwc_context_t {
|
|||||||
bool mBWCEnabled;
|
bool mBWCEnabled;
|
||||||
// Provides a way for OEM's to disable setting dynfps via metadata.
|
// Provides a way for OEM's to disable setting dynfps via metadata.
|
||||||
bool mUseMetaDataRefreshRate;
|
bool mUseMetaDataRefreshRate;
|
||||||
|
// Stores the hpd enabled status- avoids re-enabling HDP on suspend resume.
|
||||||
|
bool mHPDEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace qhwc {
|
namespace qhwc {
|
||||||
|
|||||||
Reference in New Issue
Block a user