Lines Matching refs:ext
142 omap4_hwc_ext_t ext; /* external mirroring data */
560 static void set_ext_matrix(omap4_hwc_ext_t *ext, struct hwc_rect region)
564 float xpy = ext->lcd_xpy;
569 memcpy(ext->m, m_unit, sizeof(m_unit));
570 m_translate(ext->m, -(orig_w >> 1) - region.left, -(orig_h >> 1) - region.top);
571 m_rotate(ext->m, ext->current.rotation);
572 if (ext->current.hflip)
573 m_scale(ext->m, 1, -1, 1, 1);
575 if (ext->current.rotation & 1) {
583 ext->xres, ext->yres, ext->width, ext->height,
586 m_scale(ext->m, orig_w, adj_xres, orig_h, adj_yres);
587 m_translate(ext->m, ext->xres >> 1, ext->yres >> 1);
663 omap4_hwc_adjust_ext_layer(omap4_hwc_ext_t *ext, struct dss2_ovl_info *ovl)
669 if (!ext->current.docking &&
670 crop_to_rect(&ovl->cfg, ext->mirror_region) != 0) {
676 x = ext->m[0][0] * oc->win.x + ext->m[0][1] * oc->win.y + ext->m[0][2];
677 y = ext->m[1][0] * oc->win.x + ext->m[1][1] * oc->win.y + ext->m[1][2];
678 w = ext->m[0][0] * oc->win.w + ext->m[0][1] * oc->win.h;
679 h = ext->m[1][0] * oc->win.w + ext->m[1][1] * oc->win.h;
686 oc->rotation += (oc->mirror ? -1 : 1) * ext->current.rotation;
688 if (ext->current.hflip)
843 omap4_hwc_ext_t *ext = &hwc_dev->ext;
855 ext->width = d.dis.width_in_mm;
856 ext->height = d.dis.height_in_mm;
857 ext->xres = d.dis.timings.x_res;
858 ext->yres = d.dis.timings.y_res;
861 if (!ext->xres || !ext->yres) {
862 ext->xres = 640;
863 ext->yres = 480;
901 score = (score << 1) | (i == ~ext->mirror_mode && ext->avoid_mode_change);
910 ext->width = ext_width;
911 ext->height = ext_height;
912 ext->xres = mode_xres;
913 ext->yres = mode_yres;
923 if (ext->last_mode != ~best)
925 ext->last_mode = ~best;
942 ext->last_xres_used = xres;
943 ext->last_yres_used = yres;
944 ext->last_xpy = xpy;
946 ext->on_tv = 1;
1003 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1012 if (ext->dock.enabled && !(ext->mirror.enabled && !(num->dockable || ext->force_dock))) {
1016 hwc_dev->ext_ovls = (num->dockable || ext->force_dock) ? 1 : 0;
1020 if (ext->mirror.enabled) {
1021 ext->current = ext->mirror;
1022 ext->current.docking = 1;
1024 ext->current = ext->dock;
1026 } else if (ext->mirror.enabled) {
1034 ext->current = ext->mirror;
1038 ext->current.enabled = 0;
1051 if (hwc_dev->ext_ovls && ext->current.enabled && !ext->current.docking)
1059 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1060 int on_tv = ext->on_tv && ext->current.enabled;
1061 int tform = ext->current.enabled && (ext->current.rotation || ext->current.hflip);
1083 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1084 int on_tv = ext->on_tv && ext->current.enabled;
1085 int tform = ext->current.enabled && (ext->current.rotation || ext->current.hflip);
1106 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1126 omap4_hwc_adjust_ext_layer(&hwc_dev->ext, o);
1133 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1140 if ((ext->current.rotation + o->cfg.rotation) & 1)
1142 float xpy = ext->lcd_xpy * o->cfg.win.w / o->cfg.win.h;
1147 if (ext->current.rotation & 1)
1151 if (xres != ext->last_xres_used ||
1152 yres != ext->last_yres_used ||
1153 xpy < ext->last_xpy * (1.f - ASPECT_RATIO_TOLERANCE) ||
1154 xpy * (1.f - ASPECT_RATIO_TOLERANCE) > ext->last_xpy) {
1157 ext->current.enabled = 0;
1167 set_ext_matrix(&hwc_dev->ext, region);
1174 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1176 __u32 xres = WIDTH(ext->mirror_region);
1177 __u32 yres = HEIGHT(ext->mirror_region);
1178 if (ext->current.rotation & 1)
1180 if (omap4_hwc_set_best_hdmi_mode(hwc_dev, xres, yres, ext->lcd_xpy))
1182 set_ext_matrix(ext, ext->mirror_region);
1235 (hwc_dev->ext.current.docking && hwc_dev->ext.current.enabled && dockable(layer))) &&
1322 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1323 if (ext->current.enabled && hwc_dev->ext_ovls) {
1324 if (ext->current.docking && ix_docking >= 0) {
1327 } else if (ext->current.docking && ix_docking < 0 && ext->force_dock) {
1338 } else if (!ext->current.docking) {
1342 if (ext->last.docking)
1353 ext->last = ext->current;
1375 if (ext->current.enabled || hwc_dev->last_ext_ovls) {
1383 ALOGD("prepare (%d) - %s (comp=%d, poss=%d/%d scaled, RGB=%d,BGR=%d,NV12=%d) (ext=%s%s%ddeg%s %dex/%dmx (last %dex,%din)\n",
1389 ext->on_tv ? "tv+" : "",
1390 ext->current.enabled ? ext->current.docking ? "dock+" : "mirror+" : "OFF+",
1391 ext->current.rotation * 90,
1392 ext->current.hflip ? "+hflip" : "",
1677 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1678 __u8 state = ext->hdmi_state;
1681 ext->dock.enabled = ext->mirror.enabled = 0;
1686 ext->dock.enabled = atoi(value) > 0;
1688 ext->mirror.enabled = atoi(value) > 0;
1690 ext->avoid_mode_change = atoi(value) > 0;
1694 ext->dock.rotation = atoi(value) & EXT_ROTATION;
1695 ext->dock.hflip = (atoi(value) & EXT_HFLIP) > 0;
1696 ext->dock.docking = 1;
1698 ext->mirror.rotation = atoi(value) & EXT_ROTATION;
1699 ext->mirror.hflip = (atoi(value) & EXT_HFLIP) > 0;
1700 ext->mirror.docking = 0;
1702 if (ext->force_dock) {
1704 ext->mirror.enabled = 0;
1705 ext->dock.rotation = 0;
1706 ext->dock.hflip = 0;
1715 if (ext->mirror.enabled) {
1716 ext->current = ext->mirror;
1717 ext->mirror_mode = 0;
1719 ext->mirror_mode = ext->last_mode;
1722 ext->mirror.enabled = 0;
1725 ext->last_mode = 0;
1728 ext->mirror.enabled ? "enabled" : "disabled",
1729 ext->mirror.rotation * 90,
1730 ext->mirror.hflip ? "+hflip" : "",
1731 ext->dock.enabled ? "enabled" : "disabled",
1732 ext->dock.rotation * 90,
1733 ext->dock.hflip ? "+hflip" : "",
1734 ext->force_dock ? " forced" : "",
1735 ext->on_tv);
1781 hwc_dev->ext.force_dock = state == 1;
1783 hwc_dev->ext.hdmi_state = state == 1;
2001 hwc_dev->ext.lcd_xpy = (float) hwc_dev->fb_dis.width_in_mm / hwc_dev->fb_dis.timings.x_res /
2037 &hwc_dev->ext.mirror_region.left, &hwc_dev->ext.mirror_region.top,
2038 &hwc_dev->ext.mirror_region.right, &hwc_dev->ext.mirror_region.bottom) != 4 ||
2039 hwc_dev->ext.mirror_region.left >= hwc_dev->ext.mirror_region.right ||
2040 hwc_dev->ext.mirror_region.top >= hwc_dev->ext.mirror_region.bottom) {
2042 hwc_dev->ext.mirror_region = fb_region;
2045 hwc_dev->ext.mirror_region.left, hwc_dev->ext.mirror_region.top,
2046 hwc_dev->ext.mirror_region.right, hwc_dev->ext.mirror_region.bottom);
2053 hwc_dev->ext.hdmi_state = value == '1';
2060 hwc_dev->ext.force_dock = value == '1';