libexternal: enable HPD if target supports HDMI

enable HPD only on targets that has valid HDMI fb device.

Change-Id: Ia43d9138167b6ab3a887f7663a05831a2fcc09ea
CRs-fixed: 506363
This commit is contained in:
Arun Kumar K.R
2013-06-26 16:20:30 -07:00
parent 34e8b81174
commit 47d6b64faa

View File

@@ -670,6 +670,7 @@ int ExternalDisplay::getExtFbNum(int &fbNum) {
bool ExternalDisplay::writeHPDOption(int userOption) const
{
bool ret = true;
if(mHdmiFbNum != -1) {
char sysFsHPDFilePath[MAX_SYSFS_FILE_PATH];
snprintf(sysFsHPDFilePath ,sizeof(sysFsHPDFilePath),
"/sys/devices/virtual/graphics/fb%d/hpd", mHdmiFbNum);
@@ -691,6 +692,7 @@ bool ExternalDisplay::writeHPDOption(int userOption) const
}
close(hdmiHPDFile);
}
}
return ret;
}