static void omap_plane_post_apply(struct omap_drm_apply *apply) { struct omap_plane *omap_plane = container_of(apply, struct omap_plane, apply); struct drm_plane *plane = &omap_plane->base; struct omap_overlay_info *info = &omap_plane->info; struct drm_gem_object *bo = NULL; struct callback cb; cb = omap_plane->apply_done_cb; omap_plane->apply_done_cb.fxn = NULL; while (kfifo_get(&omap_plane->unpin_fifo, &bo)) { omap_gem_put_paddr(bo); drm_gem_object_unreference_unlocked(bo); } if (cb.fxn) cb.fxn(cb.arg); if (omap_plane->enabled) { omap_framebuffer_flush(plane->fb, info->pos_x, info->pos_y, info->out_width, info->out_height); } }
static int omap_framebuffer_dirty(struct drm_framebuffer *fb, struct drm_file *file_priv, unsigned flags, unsigned color, struct drm_clip_rect *clips, unsigned num_clips) { int i; for (i = 0; i < num_clips; i++) { omap_framebuffer_flush(fb, clips[i].x1, clips[i].y1, clips[i].x2 - clips[i].x1, clips[i].y2 - clips[i].y1); } return 0; }
/* push changes down to dss2 */ static int commit(struct drm_plane *plane) { struct drm_device *dev = plane->dev; struct omap_plane *omap_plane = to_omap_plane(plane); struct omap_overlay *ovl = omap_plane->ovl; struct omap_overlay_info *info = &omap_plane->info; int ret; DBG("%s", ovl->name); DBG("%dx%d -> %dx%d (%d)", info->width, info->height, info->out_width, info->out_height, info->screen_width); DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, info->paddr, info->p_uv_addr); /* NOTE: do we want to do this at all here, or just wait * for dpms(ON) since other CRTC's may not have their mode * set yet, so fb dimensions may still change.. */ ret = ovl->set_overlay_info(ovl, info); if (ret) { dev_err(dev->dev, "could not set overlay info\n"); return ret; } /* our encoder doesn't necessarily get a commit() after this, in * particular in the dpms() and mode_set_base() cases, so force the * manager to update: * * could this be in the encoder somehow? */ if (ovl->manager) { ret = ovl->manager->apply(ovl->manager); if (ret) { dev_err(dev->dev, "could not apply settings\n"); return ret; } } if (ovl->is_enabled(ovl)) { omap_framebuffer_flush(plane->fb, info->pos_x, info->pos_y, info->out_width, info->out_height); } return 0; }