Ejemplo n.º 1
0
int omap_rfbi_update(struct omap_dss_device *dssdev,
                u16 x, u16 y, u16 w, u16 h,
                void (*callback)(void *), void *data)
{
        if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
#if TEST_IMAGE != NO_TEST_IMAGE
                omap_rfbi_write_pixels(data, 428, x, y, w, h);
#else
                rfbi_transfer_area(dssdev, w, h, callback, data);
#endif
        } else {
                struct omap_overlay *ovl;
                void __iomem *addr;
                int scr_width;

                ovl = dssdev->manager->overlays[0];
                scr_width = ovl->info.screen_width;
                addr = ovl->info.vaddr;

                omap_rfbi_write_pixels(addr, scr_width, x, y, w, h);

                callback(data);
        }

        return 0;
}
Ejemplo n.º 2
0
/* returns 1 for async op, and 0 for sync op */
static int do_update(struct omap_dss_device *dssdev, struct update_region *upd)
{
	u16 x = upd->x;
	u16 y = upd->y;
	u16 w = upd->w;
	u16 h = upd->h;

	perf_mark_setup();

	if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
		/*dssdev->driver->enable_te(dssdev, 1); */
		dss_setup_partial_planes(dssdev, &x, &y, &w, &h);
	}

#ifdef MEASURE_PERF
	rfbi.perf_bytes = w * h * 2; /* XXX always 16bit */
#endif

	dssdev->driver->setup_update(dssdev, x, y, w, h);

	if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
		rfbi_transfer_area(w, h, NULL, NULL);
		return 1;
	} else {
		struct omap_overlay *ovl;
		void __iomem *addr;
		int scr_width;

		ovl = dssdev->manager->overlays[0];
		scr_width = ovl->info.screen_width;
		addr = ovl->info.vaddr;

		omap_rfbi_write_pixels(addr, scr_width, x, y, w, h);

		perf_show("L4");

		return 0;
	}
}