Lines Matching refs:ext
143 omap4_hwc_ext_t ext; /* external mirroring data */ member
561 static void set_ext_matrix(omap4_hwc_ext_t *ext, struct hwc_rect region) in set_ext_matrix() argument
565 float xpy = ext->lcd_xpy; in set_ext_matrix()
570 memcpy(ext->m, m_unit, sizeof(m_unit)); in set_ext_matrix()
571 m_translate(ext->m, -(orig_w >> 1) - region.left, -(orig_h >> 1) - region.top); in set_ext_matrix()
572 m_rotate(ext->m, ext->current.rotation); in set_ext_matrix()
573 if (ext->current.hflip) in set_ext_matrix()
574 m_scale(ext->m, 1, -1, 1, 1); in set_ext_matrix()
576 if (ext->current.rotation & 1) { in set_ext_matrix()
584 ext->xres, ext->yres, ext->width, ext->height, in set_ext_matrix()
587 m_scale(ext->m, orig_w, adj_xres, orig_h, adj_yres); in set_ext_matrix()
588 m_translate(ext->m, ext->xres >> 1, ext->yres >> 1); in set_ext_matrix()
664 omap4_hwc_adjust_ext_layer(omap4_hwc_ext_t *ext, struct dss2_ovl_info *ovl) in omap4_hwc_adjust_ext_layer() argument
670 if (!ext->current.docking && in omap4_hwc_adjust_ext_layer()
671 crop_to_rect(&ovl->cfg, ext->mirror_region) != 0) { in omap4_hwc_adjust_ext_layer()
677 x = ext->m[0][0] * oc->win.x + ext->m[0][1] * oc->win.y + ext->m[0][2]; in omap4_hwc_adjust_ext_layer()
678 y = ext->m[1][0] * oc->win.x + ext->m[1][1] * oc->win.y + ext->m[1][2]; in omap4_hwc_adjust_ext_layer()
679 w = ext->m[0][0] * oc->win.w + ext->m[0][1] * oc->win.h; in omap4_hwc_adjust_ext_layer()
680 h = ext->m[1][0] * oc->win.w + ext->m[1][1] * oc->win.h; in omap4_hwc_adjust_ext_layer()
687 oc->rotation += (oc->mirror ? -1 : 1) * ext->current.rotation; in omap4_hwc_adjust_ext_layer()
689 if (ext->current.hflip) in omap4_hwc_adjust_ext_layer()
844 omap4_hwc_ext_t *ext = &hwc_dev->ext; in omap4_hwc_set_best_hdmi_mode() local
856 ext->width = d.dis.width_in_mm; in omap4_hwc_set_best_hdmi_mode()
857 ext->height = d.dis.height_in_mm; in omap4_hwc_set_best_hdmi_mode()
858 ext->xres = d.dis.timings.x_res; in omap4_hwc_set_best_hdmi_mode()
859 ext->yres = d.dis.timings.y_res; in omap4_hwc_set_best_hdmi_mode()
862 if (!ext->xres || !ext->yres) { in omap4_hwc_set_best_hdmi_mode()
863 ext->xres = 640; in omap4_hwc_set_best_hdmi_mode()
864 ext->yres = 480; in omap4_hwc_set_best_hdmi_mode()
902 score = (score << 1) | (i == ~ext->mirror_mode && ext->avoid_mode_change); in omap4_hwc_set_best_hdmi_mode()
911 ext->width = ext_width; in omap4_hwc_set_best_hdmi_mode()
912 ext->height = ext_height; in omap4_hwc_set_best_hdmi_mode()
913 ext->xres = mode_xres; in omap4_hwc_set_best_hdmi_mode()
914 ext->yres = mode_yres; in omap4_hwc_set_best_hdmi_mode()
924 if (ext->last_mode != ~best) in omap4_hwc_set_best_hdmi_mode()
926 ext->last_mode = ~best; in omap4_hwc_set_best_hdmi_mode()
943 ext->last_xres_used = xres; in omap4_hwc_set_best_hdmi_mode()
944 ext->last_yres_used = yres; in omap4_hwc_set_best_hdmi_mode()
945 ext->last_xpy = xpy; in omap4_hwc_set_best_hdmi_mode()
947 ext->on_tv = 1; in omap4_hwc_set_best_hdmi_mode()
1004 omap4_hwc_ext_t *ext = &hwc_dev->ext; in decide_supported_cloning() local
1013 if (ext->dock.enabled && !(ext->mirror.enabled && !(num->dockable || ext->force_dock))) { in decide_supported_cloning()
1017 hwc_dev->ext_ovls = (num->dockable || ext->force_dock) ? 1 : 0; in decide_supported_cloning()
1021 if (ext->mirror.enabled) { in decide_supported_cloning()
1022 ext->current = ext->mirror; in decide_supported_cloning()
1023 ext->current.docking = 1; in decide_supported_cloning()
1025 ext->current = ext->dock; in decide_supported_cloning()
1027 } else if (ext->mirror.enabled) { in decide_supported_cloning()
1035 ext->current = ext->mirror; in decide_supported_cloning()
1039 ext->current.enabled = 0; in decide_supported_cloning()
1052 if (hwc_dev->ext_ovls && ext->current.enabled && !ext->current.docking) in decide_supported_cloning()
1060 omap4_hwc_ext_t *ext = &hwc_dev->ext; in can_dss_render_all() local
1061 int on_tv = ext->on_tv && ext->current.enabled; in can_dss_render_all()
1062 int tform = ext->current.enabled && (ext->current.rotation || ext->current.hflip); in can_dss_render_all()
1084 omap4_hwc_ext_t *ext = &hwc_dev->ext; in can_dss_render_layer() local
1085 int on_tv = ext->on_tv && ext->current.enabled; in can_dss_render_layer()
1086 int tform = ext->current.enabled && (ext->current.rotation || ext->current.hflip); in can_dss_render_layer()
1107 omap4_hwc_ext_t *ext = &hwc_dev->ext; in clone_layer() local
1127 omap4_hwc_adjust_ext_layer(&hwc_dev->ext, o); in clone_layer()
1134 omap4_hwc_ext_t *ext = &hwc_dev->ext; in clone_external_layer() local
1141 if ((ext->current.rotation + o->cfg.rotation) & 1) in clone_external_layer()
1143 float xpy = ext->lcd_xpy * o->cfg.win.w / o->cfg.win.h; in clone_external_layer()
1148 if (ext->current.rotation & 1) in clone_external_layer()
1152 if (xres != ext->last_xres_used || in clone_external_layer()
1153 yres != ext->last_yres_used || in clone_external_layer()
1154 xpy < ext->last_xpy * (1.f - ASPECT_RATIO_TOLERANCE) || in clone_external_layer()
1155 xpy * (1.f - ASPECT_RATIO_TOLERANCE) > ext->last_xpy) { in clone_external_layer()
1158 ext->current.enabled = 0; in clone_external_layer()
1168 set_ext_matrix(&hwc_dev->ext, region); in clone_external_layer()
1175 omap4_hwc_ext_t *ext = &hwc_dev->ext; in setup_mirroring() local
1177 __u32 xres = WIDTH(ext->mirror_region); in setup_mirroring()
1178 __u32 yres = HEIGHT(ext->mirror_region); in setup_mirroring()
1179 if (ext->current.rotation & 1) in setup_mirroring()
1181 if (omap4_hwc_set_best_hdmi_mode(hwc_dev, xres, yres, ext->lcd_xpy)) in setup_mirroring()
1183 set_ext_matrix(ext, ext->mirror_region); in setup_mirroring()
1272 (hwc_dev->ext.current.docking && hwc_dev->ext.current.enabled && dockable(layer))) && in omap4_hwc_prepare()
1359 omap4_hwc_ext_t *ext = &hwc_dev->ext; in omap4_hwc_prepare() local
1360 if (ext->current.enabled && hwc_dev->ext_ovls) { in omap4_hwc_prepare()
1361 if (ext->current.docking && ix_docking >= 0) { in omap4_hwc_prepare()
1364 } else if (ext->current.docking && ix_docking < 0 && ext->force_dock) { in omap4_hwc_prepare()
1375 } else if (!ext->current.docking) { in omap4_hwc_prepare()
1379 if (ext->last.docking) in omap4_hwc_prepare()
1390 ext->last = ext->current; in omap4_hwc_prepare()
1412 if (ext->current.enabled || hwc_dev->last_ext_ovls) { in omap4_hwc_prepare()
1426 ext->on_tv ? "tv+" : "", in omap4_hwc_prepare()
1427 ext->current.enabled ? ext->current.docking ? "dock+" : "mirror+" : "OFF+", in omap4_hwc_prepare()
1428 ext->current.rotation * 90, in omap4_hwc_prepare()
1429 ext->current.hflip ? "+hflip" : "", in omap4_hwc_prepare()
1727 omap4_hwc_ext_t *ext = &hwc_dev->ext; in handle_hotplug() local
1728 __u8 state = ext->hdmi_state; in handle_hotplug()
1731 ext->dock.enabled = ext->mirror.enabled = 0; in handle_hotplug()
1736 ext->dock.enabled = atoi(value) > 0; in handle_hotplug()
1738 ext->mirror.enabled = atoi(value) > 0; in handle_hotplug()
1740 ext->avoid_mode_change = atoi(value) > 0; in handle_hotplug()
1744 ext->dock.rotation = atoi(value) & EXT_ROTATION; in handle_hotplug()
1745 ext->dock.hflip = (atoi(value) & EXT_HFLIP) > 0; in handle_hotplug()
1746 ext->dock.docking = 1; in handle_hotplug()
1748 ext->mirror.rotation = atoi(value) & EXT_ROTATION; in handle_hotplug()
1749 ext->mirror.hflip = (atoi(value) & EXT_HFLIP) > 0; in handle_hotplug()
1750 ext->mirror.docking = 0; in handle_hotplug()
1752 if (ext->force_dock) { in handle_hotplug()
1754 ext->mirror.enabled = 0; in handle_hotplug()
1755 ext->dock.rotation = 0; in handle_hotplug()
1756 ext->dock.hflip = 0; in handle_hotplug()
1765 if (ext->mirror.enabled) { in handle_hotplug()
1766 ext->current = ext->mirror; in handle_hotplug()
1767 ext->mirror_mode = 0; in handle_hotplug()
1769 ext->mirror_mode = ext->last_mode; in handle_hotplug()
1772 ext->mirror.enabled = 0; in handle_hotplug()
1775 ext->last_mode = 0; in handle_hotplug()
1778 ext->mirror.enabled ? "enabled" : "disabled", in handle_hotplug()
1779 ext->mirror.rotation * 90, in handle_hotplug()
1780 ext->mirror.hflip ? "+hflip" : "", in handle_hotplug()
1781 ext->dock.enabled ? "enabled" : "disabled", in handle_hotplug()
1782 ext->dock.rotation * 90, in handle_hotplug()
1783 ext->dock.hflip ? "+hflip" : "", in handle_hotplug()
1784 ext->force_dock ? " forced" : "", in handle_hotplug()
1785 ext->on_tv); in handle_hotplug()
1833 hwc_dev->ext.force_dock = state == 1; in handle_uevents()
1835 hwc_dev->ext.hdmi_state = state == 1; in handle_uevents()
2059 hwc_dev->ext.lcd_xpy = (float) in omap4_hwc_device_open()
2064 hwc_dev->ext.lcd_xpy = 1.0; 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()
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()