]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: Introduce intel_prepare_cursor_plane() (v2)
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 1 Dec 2014 23:40:12 +0000 (15:40 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 6 Dec 2014 00:46:22 +0000 (01:46 +0100)
commitf4a2cf295d07b1fba9fc3599c1579681132b658a
tree6dca8f24beefece100f2aec954c88b9eb6b31699
parent455a68086d1dfb801ad7c867d5ca0ed0e0f758b0
drm/i915: Introduce intel_prepare_cursor_plane() (v2)

Primary and sprite planes have already been refactored to include a
'prepare' step which handles all the commit-time operations that could
fail (i.e., pinning buffers and such).  Refactor the cursor commit in a
similar manner.

For simplicity and consistency with other plane types, we also switch to
using intel_pin_and_fence_fb_obj() to perform our pinning for
non-physical cursors.  This will allow us to more easily migrate the
code into the atomic 'begin' handler in a plane-agnostic manner in a
future patchset.

v2:
 - Update GEM fb tracking for physical cursors too. (Ander)
 - Use intel_unpin_fb_obj() rather than
   i915_gem_object_unpin_from_display_plane() and do so while holding
   struct_mutex.  (Ander)
 - Update plane->fb in commit_cursor_plane.  This isn't really necessary
   since the DRM core does this for us in __setplane_internal(), but
   doing it in our driver once we know we're going to succeed helps
   avoid confusion. (Ander)

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c