drm/i915: Allow intel_plane_disable() to operate on all plane types

We'll want to call this from the type-agnostic atomic plane helper
hooks.  Since it's not sprite-specific anymore, more it to
intel_display.c as well.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drm/i915: Clarify sprite plane function names

A few of the sprite-related function names in i915 are very similar
(intel_plane_disable() vs intel_disable_plane() or
intel_enable_planes() vs intel_crtc_enable_planes()) and don't make it
clear whether they only operate on sprite planes, or whether they also
apply to all universal plane types.  Rename a few functions to be more
consistent with our function naming for primary/cursor planes or to
clarify that they apply specifically to sprite planes:

 - s/intel_disable_plane/intel_sprite_plane_disable/
 - s/intel_disable_planes/intel_disable_sprite_planes/
 - s/intel_enable_planes/intel_enable_sprite_planes/

Also, drop the sprite-specific intel_destroy_plane() and just use
the type-agnostic intel_plane_destroy() function.  The extra 'disable'
call that intel_destroy_plane() did is unnecessary since the plane will
already be disabled due to framebuffer destruction by the point it gets
called.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drm/i915: Make intel_crtc_has_pending_flip() non-static

We'll want to use this from the atomic plane helpers, so ensure it can
be called outside intel_display.c.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drm/i915: Prepare for atomic plane helpers

Add the new driver entrypoints that will be called by the atomic plane
helpers.

This patch does not actually switch over to the new plane helpers yet,
so there should be no functional change here.  Also note that although
plane programming was already split into check/prepare/commit steps,
some of the semantics of those individual functions will need to change
slightly when we do make the jump so that they match the behavior the
plane helpers expect.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drm/i915: Switch plane handling to atomic helpers

Now that we have hooks to enable the atomic plane helpers, we can use
the plane helpers for our .update_plane() and .disable_plane()
entrypoints.

Even though we'd already refactored our plane handling code into
check/commit, we still have to rework some of that logic here as we make
the transition.  The atomic plane helpers now call prepare_fb/cleanup_fb
for us, so note the following:
 - 'commit' should not longer unpin the old object; the cleanup_fb will
   take care of this for us
 - prepare_fb only gets called when we actually have an fb, so the
   internal 'disable' code needs to update frontbuffer tracking
 - the cursor plane code never had 'prepare' code separated from its
   'commit' function, so a lot of the cursor's 'commit' needs to be
   dropped since prepare_fb already does it for us
 - with all the pinning work removed from cursor commit, it can no
   longer fail and should return void rather than int

Testcase: igt/kms_plane
Testcase: igt/kms_universal_plane
Testcase: igt/kms_cursor_crc
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drm/i915: Drop unused position fields

The userspace-requested plane coordinates are now stored in
plane->state.base (and the i915-adjusted values are stored in
plane->state), so we no longer use the coordinate fields in intel_plane
or the orig_{src,dst} fields in intel_plane_state.  Drop them.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>