Lines Matching refs:hwc_dev
242 static void dump_set_info(omap4_hwc_device_t *hwc_dev, hwc_display_contents_1_t* list) in dump_set_info() argument
244 struct dsscomp_setup_dispc_data *dsscomp = &hwc_dev->dsscomp_data; in dump_set_info()
284 for (i = 0; i < hwc_dev->post2_layers; i++) { in dump_set_info()
287 dump_printf(&log, "%p", hwc_dev->buffers[i]); in dump_set_info()
289 dump_printf(&log, "}%s\n", hwc_dev->use_sgx ? " swap" : ""); in dump_set_info()
453 omap4_hwc_setup_layer(omap4_hwc_device_t *hwc_dev, struct dss2_ovl_info *ovl, in omap4_hwc_setup_layer() argument
760 static int omap4_hwc_can_scale_layer(omap4_hwc_device_t *hwc_dev, hwc_layer_1_t *layer, IMG_native_… in omap4_hwc_can_scale_layer() argument
773 … return omap4_hwc_can_scale(src_w, src_h, dst_w, dst_h, is_NV12(handle), &hwc_dev->fb_dis, &limits, in omap4_hwc_can_scale_layer()
774 hwc_dev->fb_dis.timings.pixel_clock); in omap4_hwc_can_scale_layer()
777 static int omap4_hwc_is_valid_layer(omap4_hwc_device_t *hwc_dev, in omap4_hwc_is_valid_layer() argument
796 return omap4_hwc_can_scale_layer(hwc_dev, layer, handle); in omap4_hwc_is_valid_layer()
837 static int omap4_hwc_set_best_hdmi_mode(omap4_hwc_device_t *hwc_dev, __u32 xres, __u32 yres, in omap4_hwc_set_best_hdmi_mode() argument
844 omap4_hwc_ext_t *ext = &hwc_dev->ext; in omap4_hwc_set_best_hdmi_mode()
847 int ret = ioctl(hwc_dev->dsscomp_fd, DSSCIOC_QUERY_DISPLAY, &d); in omap4_hwc_set_best_hdmi_mode()
925 ioctl(hwc_dev->dsscomp_fd, DSSCIOC_SETUP_DISPLAY, &sdis); in omap4_hwc_set_best_hdmi_mode()
966 static void gather_layer_statistics(omap4_hwc_device_t *hwc_dev, struct counts *num, hwc_display_co… in gather_layer_statistics() argument
977 if (omap4_hwc_is_valid_layer(hwc_dev, layer, handle)) { in gather_layer_statistics()
1002 static void decide_supported_cloning(omap4_hwc_device_t *hwc_dev, struct counts *num) in decide_supported_cloning() argument
1004 omap4_hwc_ext_t *ext = &hwc_dev->ext; in decide_supported_cloning()
1017 hwc_dev->ext_ovls = (num->dockable || ext->force_dock) ? 1 : 0; in decide_supported_cloning()
1018 num->max_hw_overlays -= max(hwc_dev->ext_ovls, hwc_dev->last_ext_ovls); in decide_supported_cloning()
1034 hwc_dev->ext_ovls = MAX_HW_OVERLAYS - num->max_hw_overlays; in decide_supported_cloning()
1037 num->max_hw_overlays -= hwc_dev->last_ext_ovls; in decide_supported_cloning()
1038 hwc_dev->ext_ovls = 0; in decide_supported_cloning()
1047 hwc_dev->ext_ovls_wanted = hwc_dev->ext_ovls; in decide_supported_cloning()
1048 hwc_dev->ext_ovls = min(MAX_HW_OVERLAYS - hwc_dev->last_int_ovls, hwc_dev->ext_ovls); in decide_supported_cloning()
1052 if (hwc_dev->ext_ovls && ext->current.enabled && !ext->current.docking) in decide_supported_cloning()
1053 num->max_hw_overlays = hwc_dev->ext_ovls; in decide_supported_cloning()
1058 static int can_dss_render_all(omap4_hwc_device_t *hwc_dev, struct counts *num) in can_dss_render_all() argument
1060 omap4_hwc_ext_t *ext = &hwc_dev->ext; in can_dss_render_all()
1064 return !hwc_dev->force_sgx && in can_dss_render_all()
1076 (num->BGR == 0 || (num->RGB == 0 && !on_tv) || !hwc_dev->flags_rgb_order); in can_dss_render_all()
1079 static inline int can_dss_render_layer(omap4_hwc_device_t *hwc_dev, in can_dss_render_layer() argument
1084 omap4_hwc_ext_t *ext = &hwc_dev->ext; in can_dss_render_layer()
1088 return omap4_hwc_is_valid_layer(hwc_dev, layer, handle) && in can_dss_render_layer()
1092 (!hwc_dev->flags_nv12_only || (!hwc_dev->use_sgx || is_NV12(handle))) && in can_dss_render_layer()
1094 (!(hwc_dev->swap_rb ? is_RGB(handle) : is_BGR(handle)) || in can_dss_render_layer()
1095 !hwc_dev->flags_rgb_order) && in can_dss_render_layer()
1105 static int clone_layer(omap4_hwc_device_t *hwc_dev, int ix) { in clone_layer() argument
1106 struct dsscomp_setup_dispc_data *dsscomp = &hwc_dev->dsscomp_data; in clone_layer()
1107 omap4_hwc_ext_t *ext = &hwc_dev->ext; in clone_layer()
1108 int ext_ovl_ix = dsscomp->num_ovls - hwc_dev->post2_layers; in clone_layer()
1125 o->cfg.zorder += hwc_dev->post2_layers; in clone_layer()
1127 omap4_hwc_adjust_ext_layer(&hwc_dev->ext, o); in clone_layer()
1132 static int clone_external_layer(omap4_hwc_device_t *hwc_dev, int ix) { in clone_external_layer() argument
1133 struct dsscomp_setup_dispc_data *dsscomp = &hwc_dev->dsscomp_data; in clone_external_layer()
1134 omap4_hwc_ext_t *ext = &hwc_dev->ext; in clone_external_layer()
1157 if (omap4_hwc_set_best_hdmi_mode(hwc_dev, xres, yres, xpy)) { in clone_external_layer()
1168 set_ext_matrix(&hwc_dev->ext, region); in clone_external_layer()
1170 return clone_layer(hwc_dev, ix); in clone_external_layer()
1173 static int setup_mirroring(omap4_hwc_device_t *hwc_dev) in setup_mirroring() argument
1175 omap4_hwc_ext_t *ext = &hwc_dev->ext; in setup_mirroring()
1181 if (omap4_hwc_set_best_hdmi_mode(hwc_dev, xres, yres, ext->lcd_xpy)) in setup_mirroring()
1225 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *)dev; in omap4_hwc_prepare() local
1226 struct dsscomp_setup_dispc_data *dsscomp = &hwc_dev->dsscomp_data; in omap4_hwc_prepare()
1230 pthread_mutex_lock(&hwc_dev->lock); in omap4_hwc_prepare()
1234 gather_layer_statistics(hwc_dev, &num, list); in omap4_hwc_prepare()
1236 decide_supported_cloning(hwc_dev, &num); in omap4_hwc_prepare()
1239 if (hwc_dev->force_sgx && num.composited_layers <= 1) in omap4_hwc_prepare()
1240 hwc_dev->force_sgx = 0; in omap4_hwc_prepare()
1243 if (can_dss_render_all(hwc_dev, &num)) { in omap4_hwc_prepare()
1245 hwc_dev->use_sgx = 0; in omap4_hwc_prepare()
1246 hwc_dev->swap_rb = num.BGR != 0; in omap4_hwc_prepare()
1249 hwc_dev->use_sgx = 1; in omap4_hwc_prepare()
1250 hwc_dev->swap_rb = is_BGR_format(hwc_dev->fb_dev->base.format); in omap4_hwc_prepare()
1254 dsscomp->num_ovls = hwc_dev->use_sgx; in omap4_hwc_prepare()
1262 hwc_dev->ovls_blending = 0; in omap4_hwc_prepare()
1268 can_dss_render_layer(hwc_dev, layer) && in omap4_hwc_prepare()
1269 (!hwc_dev->force_sgx || in omap4_hwc_prepare()
1272 (hwc_dev->ext.current.docking && hwc_dev->ext.current.enabled && dockable(layer))) && in omap4_hwc_prepare()
1282 if (hwc_dev->use_sgx && !is_BLENDED(layer)) in omap4_hwc_prepare()
1286 hwc_dev->ovls_blending = 1; in omap4_hwc_prepare()
1288 hwc_dev->buffers[dsscomp->num_ovls] = layer->handle; in omap4_hwc_prepare()
1290 omap4_hwc_setup_layer(hwc_dev, in omap4_hwc_prepare()
1320 } else if (hwc_dev->use_sgx) { in omap4_hwc_prepare()
1337 if (hwc_dev->use_sgx) { in omap4_hwc_prepare()
1345 hwc_dev->buffers[0] = NULL; in omap4_hwc_prepare()
1347 hwc_dev->fb_dev->base.format, in omap4_hwc_prepare()
1349 hwc_dev->fb_dev->base.width, in omap4_hwc_prepare()
1350 hwc_dev->fb_dev->base.height); in omap4_hwc_prepare()
1357 hwc_dev->post2_layers = dsscomp->num_ovls; in omap4_hwc_prepare()
1359 omap4_hwc_ext_t *ext = &hwc_dev->ext; in omap4_hwc_prepare()
1360 if (ext->current.enabled && hwc_dev->ext_ovls) { in omap4_hwc_prepare()
1362 if (clone_external_layer(hwc_dev, ix_docking) == 0) in omap4_hwc_prepare()
1370 if (clone_external_layer(hwc_dev, ix_docking) == 0) { in omap4_hwc_prepare()
1380 res = setup_mirroring(hwc_dev); in omap4_hwc_prepare()
1383 for (ix = 0; res == 0 && ix < hwc_dev->post2_layers; ix++) { in omap4_hwc_prepare()
1384 if (clone_layer(hwc_dev, ix)) in omap4_hwc_prepare()
1409 dsscomp->mgrs[0].swap_rb = hwc_dev->swap_rb; in omap4_hwc_prepare()
1412 if (ext->current.enabled || hwc_dev->last_ext_ovls) { in omap4_hwc_prepare()
1416 hwc_dev->ext_ovls = dsscomp->num_ovls - hwc_dev->post2_layers; in omap4_hwc_prepare()
1422 hwc_dev->use_sgx ? "SGX+OVL" : "all-OVL", in omap4_hwc_prepare()
1430 … hwc_dev->ext_ovls, num.max_hw_overlays, hwc_dev->last_ext_ovls, hwc_dev->last_int_ovls); in omap4_hwc_prepare()
1433 pthread_mutex_unlock(&hwc_dev->lock); in omap4_hwc_prepare()
1437 static void omap4_hwc_reset_screen(omap4_hwc_device_t *hwc_dev) in omap4_hwc_reset_screen() argument
1448 ret = ioctl(hwc_dev->dsscomp_fd, DSSCIOC_SETUP_DISPC, &d); in omap4_hwc_reset_screen()
1455 ret = ioctl(hwc_dev->fb_fd, FBIOBLANK, FB_BLANK_POWERDOWN); in omap4_hwc_reset_screen()
1459 ret = ioctl(hwc_dev->fb_fd, FBIOBLANK, FB_BLANK_UNBLANK); in omap4_hwc_reset_screen()
1479 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *)dev; in omap4_hwc_set() local
1480 struct dsscomp_setup_dispc_data *dsscomp = &hwc_dev->dsscomp_data; in omap4_hwc_set()
1484 pthread_mutex_lock(&hwc_dev->lock); in omap4_hwc_set()
1486 omap4_hwc_reset_screen(hwc_dev); in omap4_hwc_set()
1488 invalidate = hwc_dev->ext_ovls_wanted && !hwc_dev->ext_ovls; in omap4_hwc_set()
1491 dump_set_info(hwc_dev, list); in omap4_hwc_set()
1498 if (hwc_dev->use_sgx) { in omap4_hwc_set()
1509 write(hwc_dev->pipe_fds[1], "s", 1); in omap4_hwc_set()
1510 if (hwc_dev->force_sgx > 0) in omap4_hwc_set()
1511 hwc_dev->force_sgx--; in omap4_hwc_set()
1513 err = hwc_dev->fb_dev->Post2((framebuffer_device_t *)hwc_dev->fb_dev, in omap4_hwc_set()
1514 hwc_dev->buffers, in omap4_hwc_set()
1515 hwc_dev->post2_layers, in omap4_hwc_set()
1518 hwc_dev->last_ext_ovls = hwc_dev->ext_ovls; in omap4_hwc_set()
1519 hwc_dev->last_int_ovls = hwc_dev->post2_layers; in omap4_hwc_set()
1526 pthread_mutex_unlock(&hwc_dev->lock); in omap4_hwc_set()
1529 hwc_dev->procs->invalidate(hwc_dev->procs); in omap4_hwc_set()
1536 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *)dev; in omap4_hwc_dump() local
1537 struct dsscomp_setup_dispc_data *dsscomp = &hwc_dev->dsscomp_data; in omap4_hwc_dump()
1545 dump_printf(&log, " idle timeout: %dms\n", hwc_dev->idle); in omap4_hwc_dump()
1554 hwc_dev->buffers[i], cfg->width, cfg->height, cfg->stride); in omap4_hwc_dump()
1564 static void free_png_image(omap4_hwc_device_t *hwc_dev, struct omap4_hwc_img *img) in free_png_image() argument
1569 static int load_png_image(omap4_hwc_device_t *hwc_dev, char *path, struct omap4_hwc_img *img) in load_png_image() argument
1641 if (img->size > hwc_dev->img_mem_size) { in load_png_image()
1642 … ALOGE("image does not fit into framebuffer area (%d > %d)", img->size, hwc_dev->img_mem_size); in load_png_image()
1645 img->ptr = hwc_dev->img_mem_ptr; in load_png_image()
1669 free_png_image(hwc_dev, img); in load_png_image()
1682 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *) device;; in omap4_hwc_device_close() local
1684 if (hwc_dev) { in omap4_hwc_device_close()
1685 if (hwc_dev->dsscomp_fd >= 0) in omap4_hwc_device_close()
1686 close(hwc_dev->dsscomp_fd); in omap4_hwc_device_close()
1687 if (hwc_dev->hdmi_fb_fd >= 0) in omap4_hwc_device_close()
1688 close(hwc_dev->hdmi_fb_fd); in omap4_hwc_device_close()
1689 if (hwc_dev->fb_fd >= 0) in omap4_hwc_device_close()
1690 close(hwc_dev->fb_fd); in omap4_hwc_device_close()
1692 pthread_mutex_destroy(&hwc_dev->lock); in omap4_hwc_device_close()
1693 free(hwc_dev); in omap4_hwc_device_close()
1725 static void handle_hotplug(omap4_hwc_device_t *hwc_dev) in handle_hotplug() argument
1727 omap4_hwc_ext_t *ext = &hwc_dev->ext; in handle_hotplug()
1730 pthread_mutex_lock(&hwc_dev->lock); in handle_hotplug()
1747 …property_get("persist.hwc.mirroring.transform", value, hwc_dev->fb_dev->base.height > hwc_dev->fb_… in handle_hotplug()
1760 load_png_image(hwc_dev, value, &dock_image); in handle_hotplug()
1768 if (setup_mirroring(hwc_dev) == 0) { in handle_hotplug()
1770 ioctl(hwc_dev->hdmi_fb_fd, FBIOBLANK, FB_BLANK_UNBLANK); in handle_hotplug()
1787 pthread_mutex_unlock(&hwc_dev->lock); in handle_hotplug()
1792 if (hwc_dev->procs) in handle_hotplug()
1793 hwc_dev->procs->invalidate(hwc_dev->procs); in handle_hotplug()
1796 static void handle_uevents(omap4_hwc_device_t *hwc_dev, const char *buff, int len) in handle_uevents() argument
1829 if (hwc_dev->procs) in handle_uevents()
1830 hwc_dev->procs->vsync(hwc_dev->procs, 0, timestamp); in handle_uevents()
1833 hwc_dev->ext.force_dock = state == 1; in handle_uevents()
1835 hwc_dev->ext.hdmi_state = state == 1; in handle_uevents()
1836 handle_hotplug(hwc_dev); in handle_uevents()
1842 omap4_hwc_device_t *hwc_dev = data; in omap4_hwc_hdmi_thread() local
1855 fds[1].fd = hwc_dev->pipe_fds[0]; in omap4_hwc_hdmi_thread()
1858 timeout = hwc_dev->idle ? hwc_dev->idle : -1; in omap4_hwc_hdmi_thread()
1863 err = poll(fds, hwc_dev->idle ? 2 : 1, timeout); in omap4_hwc_hdmi_thread()
1866 if (hwc_dev->idle) { in omap4_hwc_hdmi_thread()
1867 if (hwc_dev->procs) { in omap4_hwc_hdmi_thread()
1868 pthread_mutex_lock(&hwc_dev->lock); in omap4_hwc_hdmi_thread()
1869 invalidate = !hwc_dev->force_sgx && hwc_dev->ovls_blending; in omap4_hwc_hdmi_thread()
1871 hwc_dev->force_sgx = 2; in omap4_hwc_hdmi_thread()
1873 pthread_mutex_unlock(&hwc_dev->lock); in omap4_hwc_hdmi_thread()
1876 hwc_dev->procs->invalidate(hwc_dev->procs); in omap4_hwc_hdmi_thread()
1891 if (hwc_dev->idle && fds[1].revents & POLLIN) { in omap4_hwc_hdmi_thread()
1893 read(hwc_dev->pipe_fds[0], &c, 1); in omap4_hwc_hdmi_thread()
1894 if (!hwc_dev->force_sgx) in omap4_hwc_hdmi_thread()
1895 timeout = hwc_dev->idle ? hwc_dev->idle : -1; in omap4_hwc_hdmi_thread()
1901 handle_uevents(hwc_dev, uevent_desc, len); in omap4_hwc_hdmi_thread()
1911 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *) dev; in omap4_hwc_registerProcs() local
1913 hwc_dev->procs = (typeof(hwc_dev->procs)) procs; in omap4_hwc_registerProcs()
1919 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *) dev; in omap4_hwc_query() local
1928 value[0] = 1000000000.0 / hwc_dev->fb_dev->base.fps; in omap4_hwc_query()
1940 omap4_hwc_device_t *hwc_dev = (omap4_hwc_device_t *) dev; in omap4_hwc_event_control() local
1948 err = ioctl(hwc_dev->fb_fd, OMAPFB_ENABLEVSYNC, &val); in omap4_hwc_event_control()
1970 omap4_hwc_device_t *hwc_dev; in omap4_hwc_device_open() local
1989 hwc_dev = (omap4_hwc_device_t *)malloc(sizeof(*hwc_dev)); in omap4_hwc_device_open()
1990 if (hwc_dev == NULL) in omap4_hwc_device_open()
1993 memset(hwc_dev, 0, sizeof(*hwc_dev)); in omap4_hwc_device_open()
1995 hwc_dev->base.common.tag = HARDWARE_DEVICE_TAG; in omap4_hwc_device_open()
1996 hwc_dev->base.common.version = HWC_DEVICE_API_VERSION_1_0; in omap4_hwc_device_open()
1997 hwc_dev->base.common.module = (hw_module_t *)module; in omap4_hwc_device_open()
1998 hwc_dev->base.common.close = omap4_hwc_device_close; in omap4_hwc_device_open()
1999 hwc_dev->base.prepare = omap4_hwc_prepare; in omap4_hwc_device_open()
2000 hwc_dev->base.set = omap4_hwc_set; in omap4_hwc_device_open()
2001 hwc_dev->base.eventControl = omap4_hwc_event_control; in omap4_hwc_device_open()
2002 hwc_dev->base.blank = omap4_hwc_blank; in omap4_hwc_device_open()
2003 hwc_dev->base.query = omap4_hwc_query; in omap4_hwc_device_open()
2004 hwc_dev->base.registerProcs = omap4_hwc_registerProcs; in omap4_hwc_device_open()
2005 hwc_dev->base.dump = omap4_hwc_dump; in omap4_hwc_device_open()
2006 hwc_dev->fb_dev = hwc_mod->fb_dev; in omap4_hwc_device_open()
2007 *device = &hwc_dev->base.common; in omap4_hwc_device_open()
2009 hwc_dev->dsscomp_fd = open("/dev/dsscomp", O_RDWR); in omap4_hwc_device_open()
2010 if (hwc_dev->dsscomp_fd < 0) { in omap4_hwc_device_open()
2016 hwc_dev->hdmi_fb_fd = open("/dev/graphics/fb1", O_RDWR); in omap4_hwc_device_open()
2017 if (hwc_dev->hdmi_fb_fd < 0) { in omap4_hwc_device_open()
2023 hwc_dev->fb_fd = open("/dev/graphics/fb0", O_RDWR); in omap4_hwc_device_open()
2024 if (hwc_dev->fb_fd < 0) { in omap4_hwc_device_open()
2031 if (ioctl(hwc_dev->fb_fd, FBIOGET_FSCREENINFO, &fix)) { in omap4_hwc_device_open()
2037 hwc_dev->img_mem_size = fix.smem_len; in omap4_hwc_device_open()
2038 hwc_dev->img_mem_ptr = mmap(NULL, fix.smem_len, PROT_WRITE, MAP_SHARED, hwc_dev->fb_fd, 0); in omap4_hwc_device_open()
2039 if (hwc_dev->img_mem_ptr == MAP_FAILED) { in omap4_hwc_device_open()
2045 hwc_dev->buffers = malloc(sizeof(buffer_handle_t) * MAX_HW_OVERLAYS); in omap4_hwc_device_open()
2046 if (!hwc_dev->buffers) { in omap4_hwc_device_open()
2051 int ret = ioctl(hwc_dev->dsscomp_fd, DSSCIOC_QUERY_DISPLAY, &hwc_dev->fb_dis); in omap4_hwc_device_open()
2058 if (hwc_dev->fb_dis.timings.x_res && hwc_dev->fb_dis.height_in_mm) { in omap4_hwc_device_open()
2059 hwc_dev->ext.lcd_xpy = (float) in omap4_hwc_device_open()
2060 hwc_dev->fb_dis.width_in_mm / hwc_dev->fb_dis.timings.x_res / in omap4_hwc_device_open()
2061 hwc_dev->fb_dis.height_in_mm * hwc_dev->fb_dis.timings.y_res; in omap4_hwc_device_open()
2064 hwc_dev->ext.lcd_xpy = 1.0; in omap4_hwc_device_open()
2067 if (pipe(hwc_dev->pipe_fds) == -1) { in omap4_hwc_device_open()
2073 if (pthread_mutex_init(&hwc_dev->lock, NULL)) { in omap4_hwc_device_open()
2078 if (pthread_create(&hwc_dev->hdmi_thread, NULL, omap4_hwc_hdmi_thread, hwc_dev)) in omap4_hwc_device_open()
2090 hwc_dev->flags_rgb_order = atoi(value); in omap4_hwc_device_open()
2092 hwc_dev->flags_nv12_only = atoi(value); in omap4_hwc_device_open()
2094 hwc_dev->idle = atoi(value); in omap4_hwc_device_open()
2100 &hwc_dev->ext.mirror_region.left, &hwc_dev->ext.mirror_region.top, in omap4_hwc_device_open()
2101 &hwc_dev->ext.mirror_region.right, &hwc_dev->ext.mirror_region.bottom) != 4 || in omap4_hwc_device_open()
2102 hwc_dev->ext.mirror_region.left >= hwc_dev->ext.mirror_region.right || in omap4_hwc_device_open()
2103 hwc_dev->ext.mirror_region.top >= hwc_dev->ext.mirror_region.bottom) { in omap4_hwc_device_open()
2104 …struct hwc_rect fb_region = { .right = hwc_dev->fb_dev->base.width, .bottom = hwc_dev->fb_dev->bas… in omap4_hwc_device_open()
2105 hwc_dev->ext.mirror_region = fb_region; in omap4_hwc_device_open()
2108 hwc_dev->ext.mirror_region.left, hwc_dev->ext.mirror_region.top, in omap4_hwc_device_open()
2109 hwc_dev->ext.mirror_region.right, hwc_dev->ext.mirror_region.bottom); in omap4_hwc_device_open()
2116 hwc_dev->ext.hdmi_state = value == '1'; in omap4_hwc_device_open()
2123 hwc_dev->ext.force_dock = value == '1'; in omap4_hwc_device_open()
2126 handle_hotplug(hwc_dev); in omap4_hwc_device_open()
2129 hwc_dev->flags_rgb_order, hwc_dev->flags_nv12_only); in omap4_hwc_device_open()
2132 if (err && hwc_dev) { in omap4_hwc_device_open()
2133 if (hwc_dev->dsscomp_fd >= 0) in omap4_hwc_device_open()
2134 close(hwc_dev->dsscomp_fd); in omap4_hwc_device_open()
2135 if (hwc_dev->hdmi_fb_fd >= 0) in omap4_hwc_device_open()
2136 close(hwc_dev->hdmi_fb_fd); in omap4_hwc_device_open()
2137 if (hwc_dev->fb_fd >= 0) in omap4_hwc_device_open()
2138 close(hwc_dev->fb_fd); in omap4_hwc_device_open()
2139 pthread_mutex_destroy(&hwc_dev->lock); in omap4_hwc_device_open()
2140 free(hwc_dev->buffers); in omap4_hwc_device_open()
2141 free(hwc_dev); in omap4_hwc_device_open()