Home | History | Annotate | Download | only in libhwc

Lines Matching refs:pdev

145 static void exynos5_cleanup_gsc_m2m(exynos5_hwc_composer_device_1_t *pdev,
765 struct exynos5_hwc_composer_device_1_t *pdev)
767 return layer.displayFrame.left > pdev->xres ||
769 layer.displayFrame.top > pdev->yres ||
774 struct exynos5_hwc_composer_device_1_t *pdev)
782 int right = min(layer.displayFrame.right, pdev->xres);
788 struct exynos5_hwc_composer_device_1_t *pdev)
802 if (exynos5_visible_width(layer, handle->format, pdev) < BURSTLEN_BYTES) {
821 if (CC_UNLIKELY(exynos5_is_offscreen(layer, pdev))) {
847 static int exynos5_prepare_fimd(exynos5_hwc_composer_device_1_t *pdev,
852 memset(pdev->bufs.gsc_map, 0, sizeof(pdev->bufs.gsc_map));
854 bool force_fb = pdev->force_gpu;
856 pdev->bufs.overlay_map[i] = -1;
876 if (exynos5_supports_overlay(contents->hwLayers[i], i, pdev) &&
916 fb_rect.right = pdev->xres - 1;
917 fb_rect.bottom = pdev->yres - 1;
918 pixels_left = MAX_PIXELS - pdev->xres * pdev->yres;
1013 pdev->bufs.overlay_map[nextWindow] = i;
1019 pdev->bufs.gsc_map[nextWindow].mode =
1021 pdev->bufs.gsc_map[nextWindow].idx = FIMD_GSC_IDX;
1029 exynos5_cleanup_gsc_m2m(pdev, FIMD_GSC_IDX);
1032 pdev->bufs.fb_window = first_fb;
1034 pdev->bufs.fb_window = NO_FB_NEEDED;
1039 static int exynos5_prepare_hdmi(exynos5_hwc_composer_device_1_t *pdev,
1045 pdev->hdmi_fb_needed = false;
1074 pdev->hdmi_fb_needed = true;
1088 exynos5_hwc_composer_device_1_t *pdev =
1093 if (pdev->hdmi_hpd) {
1094 hdmi_enable(pdev);
1096 hdmi_disable(pdev);
1100 int err = exynos5_prepare_fimd(pdev, fimd_contents);
1106 int err = exynos5_prepare_hdmi(pdev, hdmi_contents);
1285 static void exynos5_cleanup_gsc_m2m(exynos5_hwc_composer_device_1_t *pdev,
1288 exynos5_gsc_data_t &gsc_data = pdev->gsc[gsc_idx];
1298 pdev->alloc_device->free(pdev->alloc_device, gsc_data.dst_buf[i]);
1311 exynos5_hwc_composer_device_1_t *pdev)
1330 if (displayFrame.right > pdev->xres) {
1331 unsigned int crop = displayFrame.right - pdev->xres;
1348 if (displayFrame.bottom > pdev->yres) {
1349 int crop = displayFrame.bottom - pdev->yres;
1369 exynos5_hwc_composer_device_1_t *pdev)
1377 cfg.w = pdev->xres;
1378 cfg.h = pdev->yres;
1384 layer->blending, layer->acquireFenceFd, cfg, pdev);
1387 static int exynos5_post_fimd(exynos5_hwc_composer_device_1_t *pdev,
1390 exynos5_hwc_post_data_t *pdata = &pdev->bufs;
1407 exynos5_gsc_data_t &gsc = pdev->gsc[gsc_idx];
1418 int err = exynos5_config_gsc_m2m(layer, pdev->alloc_device, &gsc,
1433 pdev);
1435 exynos5_config_overlay(&layer, config[i], pdev);
1447 int ret = ioctl(pdev->fd, S3CFB_WIN_CONFIG, &win_data);
1456 memcpy(pdev->last_config, &win_data.config, sizeof(win_data.config));
1457 memcpy(pdev->last_gsc_map, pdata->gsc_map, sizeof(pdata->gsc_map));
1458 pdev->last_fb_window = pdata->fb_window;
1463 pdev->last_handles[i] = layer.handle;
1470 static int exynos5_clear_fimd(exynos5_hwc_composer_device_1_t *pdev)
1475 int ret = ioctl(pdev->fd, S3CFB_WIN_CONFIG, &win_data);
1484 static int exynos5_set_fimd(exynos5_hwc_composer_device_1_t *pdev,
1490 if (pdev->bufs.fb_window != NO_FB_NEEDED) {
1494 pdev->bufs.overlay_map[pdev->bufs.fb_window] = i;
1511 fence = exynos5_post_fimd(pdev, contents);
1517 fence = exynos5_clear_fimd(pdev);
1520 if (pdev->bufs.overlay_map[i] != -1) {
1522 contents->hwLayers[pdev->bufs.overlay_map[i]];
1524 if (pdev->bufs.gsc_map[i].mode == exynos5_gsc_map_t::GSC_M2M) {
1525 int gsc_idx = pdev->bufs.gsc_map[i].idx;
1526 exynos5_gsc_data_t &gsc = pdev->gsc[gsc_idx];
1539 static int exynos5_set_hdmi(exynos5_hwc_composer_device_1_t *pdev,
1544 if (!pdev->hdmi_enabled) {
1570 exynos5_gsc_data_t &gsc = pdev->gsc[HDMI_GSC_IDX];
1571 int ret = exynos5_config_gsc_m2m(layer, pdev->alloc_device, &gsc, 1,
1584 hdmi_output(pdev, pdev->hdmi_layers[0], layer, h, acquireFenceFd,
1601 if (pdev->hdmi_fb_needed && layer.handle) {
1606 hdmi_show_layer(pdev, pdev->hdmi_layers[1]);
1607 hdmi_output(pdev, pdev->hdmi_layers[1], layer, h, layer.acquireFenceFd,
1619 hdmi_hide_layer(pdev, pdev->hdmi_layers[1]);
1625 hdmi_disable_layer(pdev, pdev->hdmi_layers[0]);
1626 exynos5_cleanup_gsc_m2m(pdev, HDMI_GSC_IDX);
1629 if (exynos_v4l2_s_ctrl(pdev->hdmi_layers[1].fd, V4L2_CID_TV_UPDATE, 1) < 0) {
1643 exynos5_hwc_composer_device_1_t *pdev =
1650 fimd_err = exynos5_set_fimd(pdev, fimd_contents);
1653 hdmi_err = exynos5_set_hdmi(pdev, hdmi_contents);
1664 struct exynos5_hwc_composer_device_1_t* pdev =
1666 pdev->procs = procs;
1671 struct exynos5_hwc_composer_device_1_t *pdev =
1681 value[0] = pdev->vsync_period;
1693 struct exynos5_hwc_composer_device_1_t *pdev =
1699 int err = ioctl(pdev->fd, S3CFB_SET_VSYNC_INT, &val);
1711 static void handle_hdmi_uevent(struct exynos5_hwc_composer_device_1_t *pdev,
1719 pdev->hdmi_hpd = atoi(s + strlen("SWITCH_STATE=")) == 1;
1726 if (pdev->hdmi_hpd) {
1727 if (hdmi_get_config(pdev)) {
1729 pdev->hdmi_hpd = false;
1733 pdev->hdmi_blanked = false;
1736 ALOGV("HDMI HPD changed to %s", pdev->hdmi_hpd ? "enabled" : "disabled");
1737 if (pdev->hdmi_hpd)
1738 ALOGI("HDMI Resolution changed to %dx%d", pdev->hdmi_h, pdev->hdmi_w);
1743 if (pdev->procs)
1744 pdev->procs->hotplug(pdev->procs, HWC_DISPLAY_EXTERNAL, pdev->hdmi_hpd);
1747 static void handle_vsync_event(struct exynos5_hwc_composer_device_1_t *pdev)
1749 if (!pdev->procs)
1752 int err = lseek(pdev->vsync_fd, 0, SEEK_SET);
1759 err = read(pdev->vsync_fd, buf, sizeof(buf));
1769 pdev->procs->vsync(pdev->procs, 0, timestamp);
1774 struct exynos5_hwc_composer_device_1_t *pdev =
1784 int err = read(pdev->vsync_fd, temp, sizeof(temp));
1791 fds[0].fd = pdev->vsync_fd;
1801 handle_vsync_event(pdev);
1810 handle_hdmi_uevent(pdev, uevent_desc, len);
1825 struct exynos5_hwc_composer_device_1_t *pdev =
1831 int err = ioctl(pdev->fd, FBIOBLANK, fb_blank);
1845 if (pdev->hdmi_hpd) {
1846 if (blank && !pdev->hdmi_blanked)
1847 hdmi_disable(pdev);
1848 pdev->hdmi_blanked = !!blank;
1865 struct exynos5_hwc_composer_device_1_t *pdev =
1870 result.appendFormat(" hdmi_enabled=%u\n", pdev->hdmi_enabled);
1871 if (pdev->hdmi_enabled)
1872 result.appendFormat(" w=%u, h=%u\n", pdev->hdmi_w, pdev->hdmi_h);
1879 struct s3c_fb_win_config &config = pdev->last_config[i];
1890 pdev->last_fb_window == i ? "FB" : "OVERLAY",
1891 intptr_t(pdev->last_handles[i]),
1897 if (pdev->last_gsc_map[i].mode == exynos5_gsc_map_t::GSC_NONE)
1901 AVAILABLE_GSC_UNITS[pdev->last_gsc_map[i].idx]);
1911 struct exynos5_hwc_composer_device_1_t *pdev =
1922 if (!pdev->hdmi_hpd) {
1926 int err = hdmi_get_config(pdev);
1939 static int32_t exynos5_fimd_attribute(struct exynos5_hwc_composer_device_1_t *pdev,
1944 return pdev->vsync_period;
1947 return pdev->xres;
1950 return pdev->yres;
1953 return pdev->xdpi;
1956 return pdev->ydpi;
1964 static int32_t exynos5_hdmi_attribute(struct exynos5_hwc_composer_device_1_t *pdev,
1969 return pdev->vsync_period;
1972 return pdev->hdmi_w;
1975 return pdev->hdmi_h;
1990 struct exynos5_hwc_composer_device_1_t *pdev =
1995 values[i] = exynos5_fimd_attribute(pdev, attributes[i]);
1997 values[i] = exynos5_hdmi_attribute(pdev, attributes[i]);