示例#1
0
/* update which fb (if any) is pinned for scanout */
static int update_pin(struct drm_plane *plane, struct drm_framebuffer *fb)
{
	struct omap_plane *omap_plane = to_omap_plane(plane);
	int ret = 0;

	if (omap_plane->pinned_fb != fb) {
		if (omap_plane->pinned_fb)
			omap_framebuffer_unpin(omap_plane->pinned_fb);
		omap_plane->pinned_fb = fb;
		if (fb)
			ret = omap_framebuffer_pin(fb);
	}

	return ret;
}
示例#2
0
static void omap_plane_cleanup_fb(struct drm_plane *plane,
				  struct drm_plane_state *old_state)
{
	if (old_state->fb)
		omap_framebuffer_unpin(old_state->fb);
}