struct drm_i915_gem_object *reg_bo;
struct overlay_registers __iomem *regs;
u32 flip_addr;
+ u32 frontbuffer_bits;
/* flip handling */
struct i915_active last_flip;
void (*flip_complete)(struct intel_overlay *ovl);
}
/* overlay needs to be disable in OCMD reg */
-static int intel_overlay_on(struct intel_overlay *overlay)
+static int intel_overlay_on(struct intel_overlay *overlay,
+ u32 frontbuffer_bits)
{
struct intel_display *display = overlay->display;
struct i915_request *rq;
}
overlay->active = true;
+ overlay->frontbuffer_bits = frontbuffer_bits;
if (display->platform.i830)
i830_overlay_clock_gating(display, false);
struct i915_vma *vma)
{
struct intel_display *display = overlay->display;
- enum pipe pipe = overlay->crtc->pipe;
struct intel_frontbuffer *frontbuffer = NULL;
drm_WARN_ON(display->drm, overlay->old_vma);
frontbuffer = intel_frontbuffer_get(intel_bo_to_drm_bo(vma->obj));
intel_frontbuffer_track(overlay->frontbuffer, frontbuffer,
- INTEL_FRONTBUFFER_OVERLAY(pipe));
+ overlay->frontbuffer_bits);
if (overlay->frontbuffer)
intel_frontbuffer_put(overlay->frontbuffer);
if (drm_WARN_ON(display->drm, !vma))
return;
- intel_frontbuffer_flip(display, INTEL_FRONTBUFFER_OVERLAY(overlay->crtc->pipe));
+ intel_frontbuffer_flip(display, overlay->frontbuffer_bits);
i915_vma_unpin(vma);
i915_vma_put(vma);
intel_overlay_release_old_vma(overlay);
- overlay->crtc->overlay = NULL;
- overlay->crtc = NULL;
overlay->active = false;
+ overlay->frontbuffer_bits = 0;
if (display->platform.i830)
i830_overlay_clock_gating(display, true);
overlay->old_yscale = 0;
overlay->crtc = NULL;
overlay->active = false;
+ overlay->frontbuffer_bits = 0;
}
static int packed_depth_bytes(u32 format)
OCONF_PIPE_A : OCONF_PIPE_B;
iowrite32(oconfig, ®s->OCONFIG);
- ret = intel_overlay_on(overlay);
+ ret = intel_overlay_on(overlay, INTEL_FRONTBUFFER_OVERLAY(pipe));
if (ret != 0)
goto out_unpin;
}
iowrite32(0, &overlay->regs->OCMD);
+ overlay->crtc->overlay = NULL;
+ overlay->crtc = NULL;
+
return intel_overlay_off(overlay);
}