[Intel-gfx] [PATCH 4/7] drm/i915: DRRS calls based on frontbuffer
Daniel Vetter
daniel at ffwll.ch
Thu Dec 18 12:15:48 PST 2014
On Thu, Dec 18, 2014 at 09:02:18PM +0530, Vandana Kannan wrote:
> Calls have been added to invalidate/flush DRRS whenever invalidate/flush is
> called as part of frontbuffer tracking.
> Apart from calls as a result of GEM tracking to fb invalidate/flush, a
> call has been added to invalidate fb obj from crtc_page_flip as well. This
> is to track busyness through flip calls.
> The call to fb_obj_invalidate (in flip) is placed before queuing flip for this
> obj.
>
> drrs_invalidate() and drrs_flush() check for drrs.dp which would be NULL if
> it was setup in drrs_enable(). This covers for the condition when DRRS is
> not supported.
>
> Signed-off-by: Vandana Kannan <vandana.kannan at intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 8 +++--
> drivers/gpu/drm/i915/intel_dp.c | 51 ++++++++++++++++++++++++++++++++
> drivers/gpu/drm/i915/intel_drv.h | 3 ++
> drivers/gpu/drm/i915/intel_frontbuffer.c | 2 ++
> 4 files changed, 61 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3044af5..448f551 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9717,6 +9717,11 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> if (ret)
> goto cleanup_pending;
>
> + i915_gem_track_fb(work->old_fb_obj, obj,
> + INTEL_FRONTBUFFER_PRIMARY(pipe));
> +
> + intel_fb_obj_invalidate(obj, ring);
> +
> work->gtt_offset =
> i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset;
>
> @@ -9741,9 +9746,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> work->flip_queued_vblank = drm_vblank_count(dev, intel_crtc->pipe);
> work->enable_stall_check = true;
>
> - i915_gem_track_fb(work->old_fb_obj, obj,
> - INTEL_FRONTBUFFER_PRIMARY(pipe));
> -
> intel_fbc_disable(dev);
> intel_frontbuffer_flip_prepare(dev, INTEL_FRONTBUFFER_PRIMARY(pipe));
> mutex_unlock(&dev->struct_mutex);
Just to make sure we don't have a communication issue: The above two hunts
is what I'm talking about wrt the pageflip related flush change.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list