/* update a plane. just call mode_set() with bit-shifted values */ static int xilinx_drm_plane_update(struct drm_plane *base_plane, struct drm_crtc *crtc, struct drm_framebuffer *fb, int crtc_x, int crtc_y, unsigned int crtc_w, unsigned int crtc_h, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h) { int ret; ret = xilinx_drm_plane_mode_set(base_plane, fb, crtc_x, crtc_y, crtc_w, crtc_h, src_x >> 16, src_y >> 16, src_w >> 16, src_h >> 16); if (ret) { DRM_ERROR("failed to mode-set a plane\n"); return ret; } /* make sure a plane is on */ xilinx_drm_plane_dpms(base_plane, DRM_MODE_DPMS_ON); /* apply the new fb addr */ xilinx_drm_plane_commit(base_plane); return 0; }
/* apply mode to crtc pipe */ static void xilinx_drm_crtc_commit(struct drm_crtc *base_crtc) { struct xilinx_drm_crtc *crtc = to_xilinx_crtc(base_crtc); xilinx_drm_crtc_dpms(base_crtc, DRM_MODE_DPMS_ON); xilinx_drm_plane_commit(crtc->priv_plane); }