Merge "hwc: Add secure display attribute"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
02d00237c3
@@ -799,6 +799,7 @@ int hwc_getDisplayAttributes(struct hwc_composer_device_1* dev, int disp,
|
|||||||
HWC_DISPLAY_HEIGHT,
|
HWC_DISPLAY_HEIGHT,
|
||||||
HWC_DISPLAY_DPI_X,
|
HWC_DISPLAY_DPI_X,
|
||||||
HWC_DISPLAY_DPI_Y,
|
HWC_DISPLAY_DPI_Y,
|
||||||
|
HWC_DISPLAY_SECURE,
|
||||||
HWC_DISPLAY_NO_ATTRIBUTE,
|
HWC_DISPLAY_NO_ATTRIBUTE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -844,6 +845,9 @@ int hwc_getDisplayAttributes(struct hwc_composer_device_1* dev, int disp,
|
|||||||
case HWC_DISPLAY_DPI_Y:
|
case HWC_DISPLAY_DPI_Y:
|
||||||
values[i] = (int32_t) (ctx->dpyAttr[disp].ydpi*1000.0);
|
values[i] = (int32_t) (ctx->dpyAttr[disp].ydpi*1000.0);
|
||||||
break;
|
break;
|
||||||
|
case HWC_DISPLAY_SECURE:
|
||||||
|
values[i] = (int32_t) (ctx->dpyAttr[disp].secure);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ALOGE("Unknown display attribute %d",
|
ALOGE("Unknown display attribute %d",
|
||||||
attributes[i]);
|
attributes[i]);
|
||||||
|
|||||||
@@ -128,6 +128,10 @@ void updateDisplayInfo(hwc_context_t* ctx, int dpy) {
|
|||||||
ctx->dpyAttr[dpy].yres = ctx->mHDMIDisplay->getHeight();
|
ctx->dpyAttr[dpy].yres = ctx->mHDMIDisplay->getHeight();
|
||||||
ctx->dpyAttr[dpy].mMDPScalingMode = ctx->mHDMIDisplay->getMDPScalingMode();
|
ctx->dpyAttr[dpy].mMDPScalingMode = ctx->mHDMIDisplay->getMDPScalingMode();
|
||||||
ctx->dpyAttr[dpy].vsync_period = ctx->mHDMIDisplay->getVsyncPeriod();
|
ctx->dpyAttr[dpy].vsync_period = ctx->mHDMIDisplay->getVsyncPeriod();
|
||||||
|
//FIXME: for now assume HDMI as secure
|
||||||
|
//Will need to read the HDCP status from the driver
|
||||||
|
//and update this accordingly
|
||||||
|
ctx->dpyAttr[dpy].secure = true;
|
||||||
ctx->mViewFrame[dpy].left = 0;
|
ctx->mViewFrame[dpy].left = 0;
|
||||||
ctx->mViewFrame[dpy].top = 0;
|
ctx->mViewFrame[dpy].top = 0;
|
||||||
ctx->mViewFrame[dpy].right = ctx->dpyAttr[dpy].xres;
|
ctx->mViewFrame[dpy].right = ctx->dpyAttr[dpy].xres;
|
||||||
@@ -224,6 +228,7 @@ static int openFramebufferDevice(hwc_context_t *ctx)
|
|||||||
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].ydpi = ydpi;
|
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].ydpi = ydpi;
|
||||||
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].refreshRate = (uint32_t)fps;
|
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].refreshRate = (uint32_t)fps;
|
||||||
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].dynRefreshRate = (uint32_t)fps;
|
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].dynRefreshRate = (uint32_t)fps;
|
||||||
|
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].secure = true;
|
||||||
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period =
|
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period =
|
||||||
(uint32_t)(1000000000l / fps);
|
(uint32_t)(1000000000l / fps);
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ struct DisplayAttributes {
|
|||||||
uint32_t stride;
|
uint32_t stride;
|
||||||
float xdpi;
|
float xdpi;
|
||||||
float ydpi;
|
float ydpi;
|
||||||
|
bool secure;
|
||||||
int fd;
|
int fd;
|
||||||
bool connected; //Applies only to pluggable disp.
|
bool connected; //Applies only to pluggable disp.
|
||||||
//Connected does not mean it ready to use.
|
//Connected does not mean it ready to use.
|
||||||
|
|||||||
Reference in New Issue
Block a user