diff options
Diffstat (limited to 'libhwcomposer/SecHWC.cpp')
-rw-r--r-- | libhwcomposer/SecHWC.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp index e63558b..b7c3790 100644 --- a/libhwcomposer/SecHWC.cpp +++ b/libhwcomposer/SecHWC.cpp @@ -436,6 +436,11 @@ static int hwc_device_close(struct hw_device_t *dev) ret = -1; } + if (window_close(&ctx->global_lcd_win) < 0) { + ALOGE("%s::window_close() fail", __func__); + ret = -1; + } + for (i = 0; i < NUM_OF_WIN; i++) { if (window_close(&ctx->win[i]) < 0) { ALOGE("%s::window_close() fail", __func__); @@ -494,8 +499,15 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, } } + /* open window 2, used to query global LCD info */ + if (window_open(&dev->global_lcd_win, 2) < 0) { + ALOGE("%s:: Failed to open window 2 device ", __func__); + status = -EINVAL; + goto err; + } + /* get default window config */ - if (window_get_global_lcd_info(&dev->lcd_info) < 0) { + if (window_get_global_lcd_info(dev) < 0) { ALOGE("%s::window_get_global_lcd_info is failed : %s", __func__, strerror(errno)); status = -EINVAL; @@ -558,6 +570,9 @@ err: if (destroyFimc(&dev->fimc) < 0) ALOGE("%s::destroyFimc() fail", __func__); + if (window_close(&dev->global_lcd_win) < 0) + ALOGE("%s::window_close() fail", __func__); + for (int i = 0; i < NUM_OF_WIN; i++) { if (window_close(&dev->win[i]) < 0) ALOGE("%s::window_close() fail", __func__); |