display: Add support for overscan compensation for ext display
- Read scan_info sys file node to check if TV underscans
- Apply action safe parameters to avoid overscan on ext display
- Store action safe width and height ratio using system property
- Use these to calculate the destination position on the ext display
- Remove unsed ActionSafe Class
Change-Id: Id27e6fa20966fb13fc16aa7e237cacce8caeb642
CRs-fixed: 447367
diff --git a/libexternal/external.h b/libexternal/external.h
index d85ce44..baf3598 100644
--- a/libexternal/external.h
+++ b/libexternal/external.h
@@ -28,6 +28,13 @@
namespace qhwc {
+//Type of scanning of EDID(Video Capability Data Block)
+enum external_scansupport_type {
+ EXT_SCAN_NOT_SUPPORTED = 0,
+ EXT_SCAN_ALWAYS_OVERSCANED = 1,
+ EXT_SCAN_ALWAYS_UNDERSCANED = 2,
+ EXT_SCAN_BOTH_SUPPORTED = 3
+};
class ExternalDisplay
{
@@ -36,6 +43,7 @@
~ExternalDisplay();
int getModeCount() const;
void getEDIDModes(int *out) const;
+ bool isCEUnderscanSupported() { return mUnderscanSupported; }
void setExternalDisplay(bool connected, int extFbNum = 0);
bool isExternalConnected() { return mConnected;};
bool post();
@@ -46,6 +54,7 @@
void processUEventOffline(const char *str);
private:
+ void readCEUnderscanInfo();
bool readResolution();
int parseResolution(char* edidStr, int* edidModes);
void setResolution(int ID);
@@ -78,6 +87,7 @@
char mEDIDs[128];
int mEDIDModes[64];
int mModeCount;
+ bool mUnderscanSupported;
hwc_context_t *mHwcContext;
fb_var_screeninfo mVInfo;
int mHdmiFbNum;