On Tue, 14 Jun 2011 12:34:54 -0700
Jesse Barnes <jbar...@virtuousgeek.org> wrote:

> Use the blit ring for submitting flips since the render ring doesn't
> generate flip complete interrupts.
> 
> Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_display.c |   26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index 0fb0b0c..d40fcd0 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6379,6 +6379,29 @@ out:
>       return ret;
>  }
>  
> +static int intel_gen7_queue_flip(struct drm_device *dev,
> +                              struct drm_crtc *crtc,
> +                              struct drm_framebuffer *fb,
> +                              struct drm_i915_gem_object *obj)
> +{
> +     struct drm_i915_private *dev_priv = dev->dev_private;
> +     struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> +     struct intel_ring_buffer *ring = &dev_priv->ring[BCS];
> +     int ret;
> +
> +     ret = intel_ring_begin(ring, 4);
> +     if (ret)
> +             goto out;
> +
> +     intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | (intel_crtc->plane << 19));
> +     intel_ring_emit(ring, (fb->pitch | obj->tiling_mode));
> +     intel_ring_emit(ring, (obj->gtt_offset));
> +     intel_ring_emit(ring, (MI_NOOP));
> +     intel_ring_advance(ring);
> +out:
> +     return ret;
> +}

Oh and suggestions on how to track the BO properly through the BLT ring
appreciated...  I think that's the last missing piece.

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to