summaryrefslogtreecommitdiffstats
path: root/exynos4/hal/libhwcomposer/SecHWCUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'exynos4/hal/libhwcomposer/SecHWCUtils.cpp')
-rw-r--r--exynos4/hal/libhwcomposer/SecHWCUtils.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/exynos4/hal/libhwcomposer/SecHWCUtils.cpp b/exynos4/hal/libhwcomposer/SecHWCUtils.cpp
index 6351bbf..d210dfd 100644
--- a/exynos4/hal/libhwcomposer/SecHWCUtils.cpp
+++ b/exynos4/hal/libhwcomposer/SecHWCUtils.cpp
@@ -105,6 +105,15 @@ int window_open(struct hwc_win_info_t *win, int id)
case 1:
real_id = 4;
break;
+ case 2:
+ real_id = 0;
+ break;
+ case 3:
+ real_id = 1;
+ break;
+ case 4:
+ real_id = 2;
+ break;
default:
SEC_HWC_Log(HWC_LOG_ERROR, "%s::id(%d) is weird", __func__, id);
goto error;
@@ -272,16 +281,26 @@ int window_hide(struct hwc_win_info_t *win)
return 0;
}
-int window_get_global_lcd_info(int fd, struct fb_var_screeninfo *lcd_info)
+int window_get_global_lcd_info(struct hwc_context_t *ctx)
{
- if (ioctl(fd, FBIOGET_VSCREENINFO, lcd_info) < 0) {
+ if (ioctl(ctx->global_lcd_win.fd, FBIOGET_VSCREENINFO, &ctx->lcd_info) < 0) {
SEC_HWC_Log(HWC_LOG_ERROR, "FBIOGET_VSCREENINFO failed : %s",
strerror(errno));
return -1;
}
- SEC_HWC_Log(HWC_LOG_DEBUG, "%s:: Default LCD x(%d),y(%d)",
- __func__, lcd_info->xres, lcd_info->yres);
+ if (ctx->lcd_info.xres == 0) {
+ SEC_HWC_Log(HWC_LOG_ERROR, "ATTENTION: XRES IS 0");
+ }
+
+ if (ctx->lcd_info.yres == 0) {
+ SEC_HWC_Log(HWC_LOG_ERROR, "ATTENTION: YRES IS 0");
+ }
+
+ if (ctx->lcd_info.bits_per_pixel == 0) {
+ SEC_HWC_Log(HWC_LOG_ERROR, "ATTENTION: BPP IS 0");
+ }
+
return 0;
}