drm/i915: Track pinned vma in intel_plane_state
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Jan 2017 15:21:27 +0000 (15:21 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 19 Jan 2017 10:14:09 +0000 (10:14 +0000)
commitbe1e341513ca23b0668b7b0f26fa6e2ffc46ba20
tree920431032729adbf48a2601f42f23409588d9ec1
parent5464cd657632502c61c64775dffef1cc7ebd4839
drm/i915: Track pinned vma in intel_plane_state

With atomic plane states we are able to track an allocation right from
preparation, during use and through to the final free after being
swapped out for a new plane. We can couple the VMA we pin for the
framebuffer (and its rotation) to this lifetime and avoid all the clumsy
lookups in between.

v2: Remove residual vma on plane cleanup (Chris)
v3: Add a description for the vma destruction in
    intel_plane_destroy_state (Maarten)

References: https://bugs.freedesktop.org/show_bug.cgi?id=98829
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-1-chris@chris-wilson.co.uk
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_atomic_plane.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_fbc.c
drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/i915/intel_sprite.c