1. 05 9月, 2014 1 次提交
    • C
      drm/i915: Check for a stalled page flip after each vblank · d6bbafa1
      Chris Wilson 提交于
      Long ago, back in the racy haydays of 915gm interrupt handling, page
      flips would occasionally go astray and leave the hardware stuck, and the
      display not updating. This annoyed people who relied on their systems
      being able to display continuously updating information 24/7, and so
      some code to detect when the driver missed the page flip completion
      signal was added. Until recently, it was presumed that the interrupt
      handling was now flawless, but once again Simon Farnsworth has found a
      system whose display will stall. Reinstate the pageflip stall detection,
      which works by checking to see if the hardware has been updated to the
      new framebuffer address following each vblank. If the hardware is
      scanning out from the new framebuffer, but we still think the flip is
      pending, then we kick our driver into submision.
      
      This is a continuation of the effort started with
      commit 4e5359cd
      Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
      Date:   Wed Sep 1 17:47:52 2010 +0100
      
          drm/i915: Avoid pageflipping freeze when we miss the flip prepare interrupt
      
      This now includes a belt-and-braces approach to make sure the driver
      (or the hardware) doesn't miss an interrupt and cause us to stop
      updating the display should the unthinkable happen and the pageflip fail - i.e.
      that the user is able to continue submitting flips.
      
      v2: Cleanup, refactor, and rename
      v3: Only start counting vblanks after the flip command has been seen by
          the hardware.
      v4: Record the seqno after we touch the ring, or else there may be no
          seqno allocated yet.
      v5: Rebase on mmio-flip.
      v6: Rebase, rebase.
      Reported-by: NSimon Farnsworth <simon@farnz.org.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75502Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [v4]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d6bbafa1
  2. 04 9月, 2014 2 次提交
  3. 03 9月, 2014 5 次提交
    • C
      drm/i915/dp: Cache EDID for a detection cycle · beb60608
      Chris Wilson 提交于
      As we may query the edid multiple times following a detect, record the
      EDID found during output discovery and reuse it. This is a separate
      issue from caching the output EDID across detection cycles.
      
      v2: Implement connector->force() callback so that edid is associated
      with the connector for user overrides as well (Ville)
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      beb60608
    • V
      drm/i915: Pass intel_crtc to intel_disable_pipe() and intel_wait_for_pipe_off() · 575f7ab7
      Ville Syrjälä 提交于
      Just pass the intel_crtc around instead of dev_priv+pipe.
      
      Also make intel_wait_for_pipe_off() static since it's only used in
      intel_display.c.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NThomas Richter <richter@rus.uni-stuttgart.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      575f7ab7
    • J
      drm/i915: make fbdev initialization asynchronous v2 · d1d70677
      Jesse Barnes 提交于
      This gets us out of our init code and out to userspace quite a bit
      faster, but does open us up to some bugs given the state of our init
      time locking.
      
      v2: switch to async_schedule (Chris)
          check with lockdep, seems happy (Jesse)
          move hotplug enable flag set to fbdev_initial_config (Jesse)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Rebase on top of the dev_priv->enable_hotplug_processing
      removal.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d1d70677
    • J
      drm/i915: add some framework for backlight bl_power support · ab656bb9
      Jani Nikula 提交于
      Make backlight class sysfs bl_power a sub-state of backlight enabled, if
      a backlight power connector callback is defined. It's up to the
      connector callback to handle the sub-state, typically in a way that
      respects panel power sequencing.
      
      v2: Post the version that does not oops. *facepalm*.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed_by: Clinton Taylor <Clinton.A.Taylor@intel.com>
      Tested_by: Clinton Taylor <Clinton.A.Taylor@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab656bb9
    • S
      drm/i915: Add 180 degree primary plane rotation support · 48404c1e
      Sonika Jindal 提交于
      Primary planes support 180 degree rotation. Expose the feature
      through rotation drm property.
      
      v2: Calculating linear/tiled offsets based on pipe source width and
      height. Added 180 degree rotation support in ironlake_update_plane.
      
      v3: Checking if CRTC is active before issueing update_plane. Added
      wait for vblank to make sure we dont overtake page flips. Disabling
      FBC since it does not work with rotated planes.
      
      v4: Updated rotation checks for pending flips, fbc disable. Creating
      rotation property only for Gen4 onwards. Property resetting as part
      of lastclose.
      
      v5: Resetting property in i915_driver_lastclose properly for planes
      and crtcs. Fixed linear offset calculation that was off by 1 w.r.t
      width in i9xx_update_plane and ironlake_update_plane. Removed tab
      based indentation and unnecessary braces in intel_crtc_set_property
      and intel_update_fbc. FBC and flip related checks should be done only
      for valid crtcs.
      
      v6: Minor nits in FBC disable checks for comments in intel_crtc_set_property
      and positioning the disable code in intel_update_fbc.
      
      v7: In case rotation property on inactive crtc is updated, we return
      successfully printing debug log as crtc is inactive and only property change
      is preserved.
      
      v8: update_plane is changed to update_primary_plane, crtc->fb is changed to
      crtc->primary->fb  and return value of update_primary_plane is ignored.
      
      v9: added rotation property to primary plane instead of crtc. Removing reset
      of rotation property from lastclose. rotation_property is moved to
      drm_mode_config, so drm layer will take care of resetting. Adding updation of
      fbc when rotation is set to 0. Allowing rotation only if value is
      different than old one.
      
      v10: Calling intel_primary_plane_setplane instead of update_primary_plane in
      set_property(Daniel).
      
      v11: Using same set_property function for both primary and sprite, Adding
      primary plane specific code in the same function (Matt).
      
      v12: Removing disabling/ enabling of fbc from set_property because it is done
      from intel_pipe_set_base. Other formatting
      
      v13: we need to call disable_fbc before changing the rotation to 180,
      disable_fbc from intel_pipe_set_base gets called very late, that will
      be used to re-enable fbc if rotation is set to 0 (Ville).
      
      Testcase: igt/kms_rotation_crc
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      Signed-off-by: NSagar Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NSonika Jindal <sonika.jindal@intel.com>
      [danvet: Add FIXME to explain why we need the open-coded update_fbc
      hunk to disable fbc when rotated 180 degree. And make checkpatch
      happier.]
      Acked-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      48404c1e
  4. 18 8月, 2014 2 次提交
    • I
      drm/i915: make sure VDD is turned off during system suspend · 07f9cd0b
      Imre Deak 提交于
      Atm we may leave eDP VDD enabled during system suspend after the CRTCs
      are disabled through an HPD->DPCD read event. So disable VDD during
      suspend at a point when no HPDs can occur.
      
      Note that runtime suspend doesn't have the same problem, since there the
      RPM ref held by VDD provides already the needed serialization.
      
      v2:
      - add note to commit message about the runtime suspend path (Ville)
      - use edp_panel_vdd_off_sync(), so we can keep the WARN in
        edp_panel_vdd_off() (Ville)
      v3:
      - rebased on -fixes (for_each_intel_encoder()->list_for_each_entry())
        (Imre)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v2)
      Cc: stable@vger.kernel.org (3.16+)
      [Jani: fix sparse warning reported by Fengguang Wu]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      07f9cd0b
    • V
      drm/i915: Fix locking for intel_enable_pipe_a() · 208bf9fd
      Ville Syrjälä 提交于
      intel_enable_pipe_a() gets called with all the modeset locks already
      held (by drm_modeset_lock_all()), so trying to grab the same
      locks using another drm_modeset_acquire_ctx is going to fail miserably.
      
      Move most of the drm_modeset_acquire_ctx handling (init/drop/fini)
      out from intel_{get,release}_load_detect_pipe() into the callers
      (intel_{crt,tv}_detect()). Only the actual locking and backoff
      handling is left in intel_get_load_detect_pipe(). And in
      intel_enable_pipe_a() we just share the mode_config.acquire_ctx from
      drm_modeset_lock_all() which is already holding all the relevant locks.
      
      It's perfectly legal to lock the same ww_mutex multiple times using the
      same ww_acquire_ctx. drm_modeset_lock() will convert the returned
      -EALREADY into 0, so the caller doesn't need to do antyhing special.
      
      Fixes a hang on resume on my 830.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      208bf9fd
  5. 13 8月, 2014 2 次提交
  6. 08 8月, 2014 5 次提交
  7. 07 8月, 2014 1 次提交
  8. 23 7月, 2014 8 次提交
    • J
      drm/i915: respect the VBT minimum backlight brightness · 6dda730e
      Jani Nikula 提交于
      Historically we've exposed the full backlight PWM duty cycle range to
      the userspace, in the name of "mechanism, not policy". However, it turns
      out there are both panels and board designs where there is a minimum
      duty cycle that is required for proper operation. The minimum duty cycle
      is available in the VBT.
      
      The backlight class sysfs interface does not make any promises to the
      userspace about the physical meaning of the range
      0..max_brightness. Specifically there is no guarantee that 0 means off;
      indeed for acpi_backlight 0 usually is not off, but the minimum
      acceptable value.
      
      Respect the minimum backlight, and expose the range acceptable to the
      hardware as 0..max_brightness to the userspace via the backlight class
      device; 0 means the minimum acceptable enabled value. To switch off the
      backlight, the user must disable the encoder.
      
      As a side effect, make the backlight class device max brightness and
      physical PWM modulation frequency (i.e. max duty cycle)
      independent. This allows a follow-up patch to virtualize the max value
      exposed to the userspace.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: s/BUG_ON/WARN_ON/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6dda730e
    • J
      drm/i915: add helper for checking whether IRQs are enabled · 9df7575f
      Jesse Barnes 提交于
      Now that we use the runtime IRQ enable/disable functions in our suspend
      path, we can simply check the pm._irqs_disabled flag everywhere.  So
      rename it to catch the users, and add an inline for it to make the
      checks clear everywhere.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9df7575f
    • P
      drm/i915: extract and improve gen8_irq_power_well_post_enable · d49bdb0e
      Paulo Zanoni 提交于
      Move it from hsw_power_well_post_enable() (intel_pm.c) to i915_irq.c
      so we can reuse the nice IRQ macros we have there. The main difference
      is that now we're going to check if the IIR register is non-zero when
      we try to re-enable the interrupts.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d49bdb0e
    • D
      drm/i915: Use genX_ prefix for gt irq enable/disable functions · 480c8033
      Daniel Vetter 提交于
      Traditionally we use genX_ for GT/render stuff and the codenames for
      display stuff. But the gt and pm interrupt handling functions on
      gen5/6+ stuck out as exceptions, so convert them.
      
      Looking at the diff this nicely realigns our ducks since almost all
      the callers are already platform-specific functions following the
      genX_ pattern.
      
      Spotted while reviewing some internal rps patches.
      
      No function change in this patch.
      Acked-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      480c8033
    • D
      drm/i915: Also give the sprite width for WM computation · ed57cb8a
      Damien Lespiau 提交于
      In the future, we'll need the height of the fb to fetch from memory for
      WM computation.
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ed57cb8a
    • V
      drm/i915: Add aspect ratio property for HDMI · 94a11ddc
      Vandana Kannan 提交于
      Create and attach the drm property to set aspect ratio. If there is no user
      specified value, then PAR_NONE/Automatic option is set by default. User can
      select aspect ratio 4:3 or 16:9. The aspect ratio selected by user would
      come into effect with a mode set.
      
      v2: Modified switch case to include aspect ratio enum changes
      
      v3: Modified the patch according the change in the earlier patch to return
      errno in case property creation fails. With this change, property will be
      attached only if creation is successful
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      94a11ddc
    • D
      drm/i915: Fix up PSR frontbuffer tracking · 9ca15301
      Daniel Vetter 提交于
      I've tried to split this up, but all the changes are so tightly
      related that I didn't find a good way to do this without breaking
      bisecting. Essentially this completely changes how psr is glued into
      the overall driver, and there's not much you can do to soften such a
      paradigm change.
      
      - Use frontbuffer tracking bits stuff to separate disable and
        re-enable.
      
      - Don't re-check everything in the psr work. We have now accurate
        tracking for everything, so no need to check for sprites or tiling
        really. Allows us to ditch tons of locks.
      
      - That in turn allows us to properly cancel the work in the disable
        function - no more deadlocks.
      
      - Add a check for HSW sprites and force a flush. Apparently the
        hardware doesn't forward the flushing when updating the sprite base
        address. We can do the same trick everywhere else we have such
        issues, e.g. on baytrail with ... everything.
      
      - Don't re-enable psr with a delay in psr_exit. It really must be
        turned off forever if we detect a gtt write. At least with the
        current frontbuffer render tracking. Userspace can do a busy ioctl
        call or no-op pageflip to re-enable psr.
      
      - Drop redundant checks for crtc and crtc->active - now that they're
        only called from enable this is guaranteed.
      
      - Fix up the hsw port check. eDP can also happen on port D, but the
        issue is exactly that it doesn't work there. So an || check is
        wrong.
      
      - We still schedule the psr work with a delay. The frontbuffer
        flushing interface mandates that we upload the next full frame, so
        need to wait a bit. Once we have single-shot frame uploads we can do
        better here.
      
      v2: Don't enable psr initially, rely upon the fb flush of the initial
      plane setup for that. Gives us more unified code flow and makes the
      crtc enable sequence less a special case.
      
      v3: s/psr_exit/psr_invalidate/ for consistency
      
      v4: Fixup whitespace.
      
      v5: Correctly bail out of psr_invalidate/flush when
      dev_priv->psr.enabled is NULL. Spotted by Rodrigo.
      
      v6:
      - Only schedule work when there's work to do. Fixes WARNINGs reported
        by Rodrigo.
      - Comments Chris requested to clarify the code.
      
      v7: Fix conflict on rebase (Rodrigo)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v6)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9ca15301
    • B
      drm/i915: Power gating display wells during i915_pm_suspend · b04c5bd6
      Borun Fu 提交于
      On VLV, after i915_pm_suspend display power wells are staying
      power ungated. So, after initiating mem sleep "echo mem > /sys/power/state"
      Display is staing D0 State. There might be better way/place to power gate
      these wells. Also, we need to make sure that if wells are power gated due to
      DPMS OFF sequence, they need not be turned off by i915_pm_suspend again.
      
      v2: Extracted helper for intel_crtc_disable and power gating CRTC power wells.
      [Daniel]
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Change-Id: I34c80da66aa24c423a5576c68aa1f3a8d0f43848
      Signed-off-by: NBorun Fu <borun.fu@intel.com>
      Signed-off-by: NSagar Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b04c5bd6
  9. 22 7月, 2014 1 次提交
    • D
      drm/i915: add DP 1.2 MST support (v0.7) · 0e32b39c
      Dave Airlie 提交于
      This adds DP 1.2 MST support on Haswell systems.
      
      Notes:
      a) this reworks irq handling for DP MST ports, so that we can
      avoid the mode config locking in the current hpd handlers, as
      we need to process up/down msgs at a better time.
      
      Changes since v0.1:
      use PORT_PCH_HOTPLUG to detect short vs long pulses
      add a workqueue to deal with digital events as they can get blocked on the
      main workqueue beyong mode_config mutex
      fix a bunch of modeset checker warnings
      acks irqs in the driver
      cleanup the MST encoders
      
      Changes since v0.2:
      check irq status again in work handler
      move around bring up and tear down to fix DPMS on/off
      use path properties.
      
      Changes since v0.3:
      updates for mst apis
      more state checker fixes
      irq handling improvements
      fbcon handling support
      improved reference counting of link - fixes redocking.
      
      Changes since v0.4:
      handle gpu reset hpd reinit without oopsing
      check link status on HPD irqs
      fix suspend/resume
      
      Changes since v0.5:
      use proper functions to get max link/lane counts
      fix another checker backtrace - due to connectors disappearing.
      set output type in more places fro, unknown->displayport
      don't talk to devices if no HPD asserted
      check mst on short irqs only
      check link status properly
      rebase onto prepping irq changes.
      drop unsued force_act
      
      Changes since v0.6:
      cleanup unused struct entry.
      
      [airlied: fix some sparse warnings].
      Reviewed-by: NTodd Previte <tprevite@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0e32b39c
  10. 21 7月, 2014 1 次提交
  11. 11 7月, 2014 3 次提交
  12. 09 7月, 2014 2 次提交
  13. 08 7月, 2014 1 次提交
    • D
      drm/i915: Support pf CRC source on haswell transcoder edp · fabf6e51
      Daniel Vetter 提交于
      The always-on power well pixel path on haswell is routed such that it
      bypasses the panel fitter when we use is. Which means the pfit CRC
      source won't work in that configuration.
      
      Add a new disallow-bypass flags to the pfit pipe config state and set
      it when we want to use the pf CRC. Results in a bit of flicker, but
      should get the job done. We'll also undo do it afterwards to make sure
      other tests arent' negatively affected.
      
      Totally untested due to lack of hsw laptops around here.
      
      v2: s/disallow_bypass/force_power_well_on/ to avoid a double negative
      (Damien).
      
      v3: force_thru because roadsigns.
      
      v4: Don't forget the power wells! Also note that until the runtime pm
      for DPMS series is fully merged the simple disable/enable trick won't
      work since the ->crtc_mode_set callback is still required to do nasty
      things. This stuff is tricky, but I think by both fixing up
      get_crtc_power_domains and the debugfs wa code we should always
      grab/drop the additional power well correctly.
      
      v5: Wrap in () as suggested by Damien to avoid setting reserved values
      for the edp transcoder path on bdw+
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=72864
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Tested-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fabf6e51
  14. 07 7月, 2014 4 次提交
  15. 23 6月, 2014 1 次提交
  16. 20 6月, 2014 1 次提交
    • D
      drm/i915: Track frontbuffer invalidation/flushing · f99d7069
      Daniel Vetter 提交于
      So these are the guts of the new beast. This tracks when a frontbuffer
      gets invalidated (due to frontbuffer rendering) and hence should be
      constantly scaned out, and when it's flushed again and can be
      compressed/one-shot-upload.
      
      Rules for flushing are simple: The frontbuffer needs one more full
      upload starting from the next vblank. Which means that the flushing
      can _only_ be called once the frontbuffer update has been latched.
      
      But this poses a problem for pageflips: We can't just delay the
      flushing until the pageflip is latched, since that would pose the risk
      that we override frontbuffer rendering that has been scheduled
      in-between the pageflip ioctl and the actual latching.
      
      To handle this track asynchronous invalidations (and also pageflip)
      state per-ring and delay any in-between flushing until the rendering
      has completed. And also cancel any delayed flushing if we get a new
      invalidation request (whether delayed or not).
      
      Also call intel_mark_fb_busy in both cases in all cases to make sure
      that we keep the screen at the highest refresh rate both on flips,
      synchronous plane updates and for frontbuffer rendering.
      
      v2: Lots of improvements
      
      Suggestions from Chris:
      - Move invalidate/flush in flush_*_domain and set_to_*_domain.
      - Drop the flush in busy_ioctl since it's redundant. Was a leftover
        from an earlier concept to track flips/delayed flushes.
      - Don't forget about the initial modeset enable/final disable.
        Suggested by Chris.
      
      Track flips accurately, too. Since flips complete independently of
      rendering we need to track pending flips in a separate mask. Again if
      an invalidate happens we need to cancel the evenutal flush to avoid
      races.
      
      v3:
      Provide correct header declarations for flip functions. Currently not
      needed outside of intel_display.c, but part of the proper interface.
      
      v4: Add proper domain management to fbcon so that the fbcon buffer is
      also tracked correctly.
      
      v5: Fixup locking around the fbcon set_to_gtt_domain call.
      
      v6: More comments from Chris:
      - Split out fbcon changes.
      - Drop superflous checks for potential scanout before calling intel_fb
        functions - we can micro-optimize this later.
      - s/intel_fb_/intel_fb_obj_/ to make it clear that this deals in gem
        object. We already have precedence for fb_obj in the pin_and_fence
        functions.
      
      v7: Clarify the semantics of the flip flush handling by renaming
      things a bit:
      - Don't go through a gem object but take the relevant frontbuffer bits
        directly. These functions center on the plane, the actual object is
        irrelevant - even a flip to the same object as already active should
        cause a flush.
      - Add a new intel_frontbuffer_flip for synchronous plane updates. It
        currently just calls intel_frontbuffer_flush since the implemenation
        differs.
      
      This way we achieve a clear split between one-shot update events on
      one side and frontbuffer rendering with potentially a very long delay
      between the invalidate and flush.
      
      Chris and I also had some discussions about mark_busy and whether it
      is appropriate to call from flush. But mark busy is a state which
      should be derived from the 3 events (invalidate, flush, flip) we now
      have by the users, like psr does by tracking relevant information in
      psr.busy_frontbuffer_bits. DRRS (the only real use of mark_busy for
      frontbuffer) needs to have similar logic. With that the overall
      mark_busy in the core could be removed.
      
      v8: Only when retiring gpu buffers only flush frontbuffer bits we
      actually invalidated in a batch. Just for safety since before any
      additional usage/invalidate we should always retire current rendering.
      Suggested by Chris Wilson.
      
      v9: Actually use intel_frontbuffer_flip in all appropriate places.
      Spotted by Chris.
      
      v10: Address more comments from Chris:
      - Don't call _flip in set_base when the crtc is inactive, avoids redunancy
        in the modeset case with the initial enabling of all planes.
      - Add comments explaining that the initial/final plane enable/disable
        still has work left to do before it's fully generic.
      
      v11: Only invalidate for gtt/cpu access when writing. Spotted by Chris.
      
      v12: s/_flush/_flip/ in intel_overlay.c per Chris' comment.
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f99d7069