overlay->crtc_width, overlay->crtc_height);
}
-static void exynos_drm_crtc_page_flip_apply(struct drm_crtc *crtc,
- struct drm_framebuffer *fb)
-{
- struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
- struct exynos_drm_overlay *overlay = &exynos_crtc->overlay;
- int nr = exynos_drm_format_num_buffers(fb->pixel_format);
- int i;
-
- for (i = 0; i < nr; i++) {
- struct exynos_drm_gem_buf *buffer;
-
- buffer = exynos_drm_fb_buffer(fb, i);
- overlay->dma_addr[i] = buffer->dma_addr;
- overlay->vaddr[i] = buffer->kvaddr;
-
- DRM_DEBUG_KMS("buffer: %d, vaddr = 0x%lx, dma_addr = 0x%lx\n",
- i, (unsigned long)overlay->vaddr[i],
- (unsigned long)overlay->dma_addr[i]);
- }
-
- exynos_drm_fn_encoder(crtc, overlay,
- exynos_drm_encoder_crtc_page_flip);
- exynos_drm_fn_encoder(crtc, &exynos_crtc->pipe,
- exynos_drm_encoder_crtc_commit);
-}
-
static void exynos_drm_crtc_update(struct drm_crtc *crtc,
struct drm_framebuffer *fb)
{
struct kds_resource_set *prev_kds;
unsigned long flags;
- exynos_drm_crtc_page_flip_apply(crtc, fb);
+ exynos_drm_crtc_update(crtc, fb);
+ exynos_drm_crtc_apply(crtc);
spin_lock_irqsave(&dev->event_lock, flags);
prev_kds = exynos_crtc->pending_kds;
* @power: Sets the controller's power to mode
* @dpms: Same as power, but called in different places. Best to avoid it
* @mode_set: Sets the controller to output mode
- * @page_flip: Updates the controller's dma pointer
* @commit: Applies controller level settings (as opposed to window level)
* @apply: Commits the changes on all of the controller's windows
* @win_commit: Commits the changes on only one window
int (*power)(void *ctx, int mode);
int (*dpms)(void *ctx, int mode);
void (*mode_set)(void *ctx, struct exynos_drm_overlay *overlay);
- void (*page_flip)(void *ctx, struct exynos_drm_overlay *overlay);
void (*commit)(void *ctx);
void (*apply)(void *ctx);
void (*win_commit)(void *ctx, int zpos);
display->controller_ops->win_disable(display->controller_ctx,
zpos);
}
-
-void exynos_drm_encoder_crtc_page_flip(struct drm_encoder *encoder, void *data)
-{
- struct exynos_drm_display *display = exynos_drm_get_display(encoder);
- struct exynos_drm_overlay *overlay = data;
-
- if (display->controller_ops->page_flip)
- display->controller_ops->page_flip(display->controller_ctx,
- overlay);
-}
void *data);
void exynos_drm_encoder_crtc_dpms(struct drm_encoder *encoder, void *data);
void exynos_drm_encoder_crtc_mode_set(struct drm_encoder *encoder, void *data);
-void exynos_drm_encoder_crtc_page_flip(struct drm_encoder *encoder, void *data);
void exynos_drm_encoder_crtc_disable(struct drm_encoder *encoder, void *data);
#endif
}
}
-static void fimd_win_page_flip(void *ctx, struct exynos_drm_overlay *overlay)
-{
- struct fimd_context *fimd_ctx = ctx;
- int win = overlay->zpos;
- struct fimd_win_data *win_data;
- unsigned long offset;
-
- if (win == DEFAULT_ZPOS)
- win = fimd_ctx->default_win;
-
- if (win < 0 || win > WINDOWS_NR)
- return;
-
- win_data = &fimd_ctx->win_data[win];
-
- offset = overlay->fb_x * (overlay->bpp >> 3);
- offset += overlay->fb_y * overlay->fb_pitch;
-
- win_data->dma_addr = overlay->dma_addr[0] + offset;
- win_data->vaddr = overlay->vaddr[0] + offset;
-}
-
static void fimd_win_commit(void *ctx, int zpos)
{
struct fimd_context *fimd_ctx = ctx;
.disable_vblank = fimd_disable_vblank,
.power = fimd_power,
.mode_set = fimd_win_mode_set,
- .page_flip = fimd_win_page_flip,
.commit = fimd_commit,
.apply = fimd_apply,
.win_commit = fimd_win_commit,
win_data->scan_flags = overlay->scan_flag;
}
-static void mixer_win_page_flip(void *ctx, struct exynos_drm_overlay *overlay)
-{
- struct mixer_context *mixer_ctx = ctx;
- struct hdmi_win_data *win_data;
- int win = overlay->zpos;
-
- if (win == DEFAULT_ZPOS)
- win = MIXER_DEFAULT_WIN;
-
- if (win < 0 || win > MIXER_WIN_NR) {
- DRM_ERROR("overlay plane[%d] is wrong\n", win);
- return;
- }
-
- win_data = &mixer_ctx->win_data[win];
-
- win_data->dma_addr = overlay->dma_addr[0];
- win_data->vaddr = overlay->vaddr[0];
- win_data->chroma_dma_addr = overlay->dma_addr[1];
- win_data->chroma_vaddr = overlay->vaddr[1];
-}
-
static void mixer_win_commit(void *ctx, int zpos)
{
struct mixer_context *mctx = ctx;
/* overlay */
.mode_set = mixer_win_mode_set,
- .page_flip = mixer_win_page_flip,
.apply = mixer_apply,
.win_commit = mixer_win_commit,
.win_disable = mixer_win_disable,