Home | History | Annotate | Download | only in hwc

Lines Matching refs:ext

124     omap4_hwc_ext_t ext;           /* external mirroring data */
440 static void set_ext_matrix(omap4_hwc_ext_t *ext, struct hwc_rect region)
451 memcpy(ext->m, m_unit, sizeof(m_unit));
452 m_translate(ext->m, -(orig_w >> 1) - region.left, -(orig_h >> 1) - region.top);
453 m_rotate(ext->m, ext->current.rotation);
454 if (ext->current.hflip)
455 m_scale(ext->m, 1, -1, 1, 1);
457 if (ext->current.rotation & 1) {
465 ext->xres, ext->yres, ext->width, ext->height,
468 m_scale(ext->m, orig_w, adj_xres, orig_h, adj_yres);
469 m_translate(ext->m, ext->xres >> 1, ext->yres >> 1);
473 omap4_hwc_create_ext_matrix(omap4_hwc_ext_t *ext)
476 if (!ext->xres ||
477 !ext->yres) {
478 ext->xres = 640;
479 ext->yres = 480;
483 if (ext->mirror.enabled) {
484 ext->current = ext->mirror;
485 set_ext_matrix(ext, ext->mirror_region);
562 omap4_hwc_adjust_ext_layer(omap4_hwc_ext_t *ext, struct dss2_ovl_info *ovl)
568 if (!ext->current.docking &&
569 crop_to_rect(&ovl->cfg, ext->mirror_region) != 0) {
575 x = ext->m[0][0] * oc->win.x + ext->m[0][1] * oc->win.y + ext->m[0][2];
576 y = ext->m[1][0] * oc->win.x + ext->m[1][1] * oc->win.y + ext->m[1][2];
577 w = ext->m[0][0] * oc->win.w + ext->m[0][1] * oc->win.h;
578 h = ext->m[1][0] * oc->win.w + ext->m[1][1] * oc->win.h;
585 oc->rotation += (oc->mirror ? -1 : 1) * ext->current.rotation;
587 if (ext->current.hflip)
694 omap4_hwc_ext_t *ext = &hwc_dev->ext;
706 ext->width = d.dis.width_in_mm;
707 ext->height = d.dis.height_in_mm;
708 ext->xres = d.dis.timings.x_res;
709 ext->yres = d.dis.timings.y_res;
749 score = (score << 1) | (i == ~ext->mirror_mode && ext->avoid_mode_change);
767 ext->width = ext_width;
768 ext->height = ext_height;
769 ext->xres = d.modedb[i].xres;
770 ext->yres = d.modedb[i].yres;
780 if (ext->last_mode != ~best)
782 ext->last_mode = ~best;
799 ext->last_xres_used = xres;
800 ext->last_yres_used = yres;
801 ext->last_xpy = xpy;
803 ext->on_tv = 1;
823 omap4_hwc_ext_t *ext = &hwc_dev->ext;
832 if (ext->dock.enabled && !(ext->mirror.enabled && !num->dockable)) {
840 if (ext->mirror.enabled) {
841 ext->current = ext->mirror;
842 ext->current.docking = 1;
844 ext->current = ext->dock;
846 } else if (ext->mirror.enabled) {
854 ext->current = ext->mirror;
858 ext->current.enabled = 0;
871 if (hwc_dev->ext_ovls && ext->current.enabled && !ext->current.docking)
876 int on_tv = hwc_dev->ext.on_tv;
877 int tform = hwc_dev->ext.current.enabled && (hwc_dev->ext.current.rotation || hwc_dev->ext.current.hflip);
898 int on_tv = hwc_dev->ext.on_tv;
899 int tform = hwc_dev->ext.current.enabled && (hwc_dev->ext.current.rotation || hwc_dev->ext.current.hflip);
974 LOGD("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",
980 hwc_dev->ext.on_tv ? "tv+" : "",
981 hwc_dev->ext.current.enabled ? hwc_dev->ext.current.docking ? "dock+" : "mirror+" : "OFF+",
982 hwc_dev->ext.current.rotation * 90,
983 hwc_dev->ext.current.hflip ? "+hflip" : "",
1091 if (hwc_dev->ext.current.docking && (ix_docking == -1))
1094 if (hwc_dev->ext.current.enabled && hwc_dev->ext_ovls) {
1096 if (hwc_dev->ext.current.docking) {
1105 if (hwc_dev->ext.last.docking) {
1106 __u32 xres = WIDTH(hwc_dev->ext.mirror_region);
1107 __u32 yres = HEIGHT(hwc_dev->ext.mirror_region);
1108 if (hwc_dev->ext.current.rotation & 1)
1111 set_ext_matrix(&hwc_dev->ext, hwc_dev->ext.mirror_region);
1115 for (ix = ix_back; hwc_dev->ext.current.enabled && ix >= 0 && ix <= ix_front; ix++) {
1125 if (hwc_dev->ext.current.docking) {
1128 if ((hwc_dev->ext.current.rotation + o->cfg.rotation) & 1)
1135 if (hwc_dev->ext.current.rotation & 1)
1139 if (xres != hwc_dev->ext.last_xres_used ||
1140 yres != hwc_dev->ext.last_yres_used ||
1141 xpy < hwc_dev->ext.last_xpy * (1.f - ASPECT_RATIO_TOLERANCE) ||
1142 xpy * (1.f - ASPECT_RATIO_TOLERANCE) > hwc_dev->ext.last_xpy) {
1146 hwc_dev->ext.current.enabled = 0;
1156 set_ext_matrix(&hwc_dev->ext, region);
1158 omap4_hwc_adjust_ext_layer(&hwc_dev->ext, o);
1163 hwc_dev->ext.last = hwc_dev->ext.current;
1174 if (hwc_dev->ext.current.enabled || hwc_dev->last_ext_ovls) {
1424 omap4_hwc_ext_t *ext = &hwc_dev->ext;
1427 ext->dock.enabled = ext->mirror.enabled = 0;
1432 ext->dock.enabled = atoi(value) > 0;
1434 ext->mirror.enabled = atoi(value) > 0;
1436 ext->avoid_mode_change = atoi(value) > 0;
1440 ext->dock.rotation = atoi(value) & EXT_ROTATION;
1441 ext->dock.hflip = (atoi(value) & EXT_HFLIP) > 0;
1442 ext->dock.docking = 1;
1444 ext->mirror.rotation = atoi(value) & EXT_ROTATION;
1445 ext->mirror.hflip = (atoi(value) & EXT_HFLIP) > 0;
1446 ext->mirror.docking = 0;
1449 if (ext->mirror.enabled) {
1450 __u32 xres = WIDTH(ext->mirror_region);
1451 __u32 yres = HEIGHT(ext->mirror_region);
1452 if (ext->mirror.rotation & 1)
1454 ext->mirror_mode = 0;
1457 ext->mirror_mode = ext->last_mode;
1460 ext->mirror.enabled = 0;
1463 ext->last_mode = 0;
1465 omap4_hwc_create_ext_matrix(ext);
1467 ext->mirror.enabled ? "enabled" : "disabled",
1468 ext->mirror.rotation * 90,
1469 ext->mirror.hflip ? "+hflip" : "",
1470 ext->dock.enabled ? "enabled" : "disabled",
1471 ext->dock.rotation * 90,
1472 ext->dock.hflip ? "+hflip" : "",
1473 ext->on_tv);
1675 &hwc_dev->ext.mirror_region.left, &hwc_dev->ext.mirror_region.top,
1676 &hwc_dev->ext.mirror_region.right, &hwc_dev->ext.mirror_region.bottom) != 4 ||
1677 hwc_dev->ext.mirror_region.left >= hwc_dev->ext.mirror_region.right ||
1678 hwc_dev->ext.mirror_region.top >= hwc_dev->ext.mirror_region.bottom) {
1680 hwc_dev->ext.mirror_region = fb_region;
1683 hwc_dev->ext.mirror_region.left, hwc_dev->ext.mirror_region.top,
1684 hwc_dev->ext.mirror_region.right, hwc_dev->ext.mirror_region.bottom);