On 01/15/2013 12:06 AM, Thierry Reding wrote:
> All the necessary support bits like .mode_set_base() and VBLANK are now
> available, so page-flipping case easily be implemented on top.
> 
> Signed-off-by: Thierry Reding <thierry.red...@avionic-design.de>
[...]
> +
> +static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer 
> *fb,
> +                           struct drm_pending_vblank_event *event)
> +{
> +     struct tegra_framebuffer *newfb = to_tegra_fb(fb);
> +     struct tegra_dc *dc = to_tegra_dc(crtc);
> +     struct drm_device *drm = crtc->dev;
> +     unsigned long flags;
> +
> +     if (dc->event)
> +             return -EBUSY;
> +
> +     tegra_dc_set_base(dc, 0, 0, newfb);

"tegra_dc_set_base" only updates the frame buffer start address to dc
registers. I think this is not enough because it's possible that this
new FB may trigger a full modeset while not just a fb change. For
example, the "bpp" of the new FB differs from current setting in dc
register.

So I suggest to trigger a full modeset here(although it's slower than fb
change) or maybe you can explain why the FB change is enough.

Mark
> +
> +     if (event) {
> +             event->pipe = dc->pipe;
> +
> +             spin_lock_irqsave(&drm->event_lock, flags);
> +             dc->event = event;
> +             spin_unlock_irqrestore(&drm->event_lock, flags);
> +
> +             drm_vblank_get(drm, dc->pipe);
> +     }
> +
> +     return 0;
> +}
> +
[...]
>  struct tegra_output_ops {
>       int (*enable)(struct tegra_output *output);
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to