]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Simplify and fix object to display tracking
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 13 Apr 2015 10:50:09 +0000 (11:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 20 Apr 2015 15:51:45 +0000 (08:51 -0700)
commit4eb99b4de3ca2e7b4cdf1d67e0cd863da569d78b
treef33ff937283ac487e4b758eabd553961b5cbad2b
parent78e0958c22cd29e69a4f96d086362b2979bd8192
drm/i915: Simplify and fix object to display tracking

Purpose of this tracking is to know when to flush the cache between
the CPU and the non-coherent display engine. Prior to:

   commit 03de7a7dd801d0d35a281666382551a54dde8042
   Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
   Date:   Mon Mar 23 11:10:37 2015 +0000

       drm/i915/skl: Query display address through a wrapper

This worked by a mix of direct flag manipulation and checking for
existence of a pinned GGTT VMA.

With the introduction of rotated display mappings this approach is
no longer correct.

New simpler approach is to just keep this count over calls which pin
and unpin objects to and from display, at the slight cost of extra
space in every bo.

(Inspired and extracted code from a larger rework by Chris Wilson.)

v2: Remove the limit since it is not well defined. (Chris Wilson, Ville Syrjälä)
v3: Commit message corrections. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c