static int omap_plane_prepare_fb(struct drm_plane *plane, struct drm_plane_state *new_state) { if (!new_state->fb) return 0; return omap_framebuffer_pin(new_state->fb); }
/* 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; }