1. 05 11月, 2014 1 次提交
  2. 24 10月, 2014 1 次提交
  3. 24 9月, 2014 1 次提交
  4. 19 9月, 2014 3 次提交
  5. 03 9月, 2014 3 次提交
    • D
      drm/i915: init sprites with univeral plane init function · 8fe8a3fe
      Derek Foreman 提交于
      Really just for completeness - old init function ends up making the plane
      exactly the same way due to the way the enums are set up.
      Signed-off-by: NDerek Foreman <derek.foreman@collabora.co.uk>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8fe8a3fe
    • V
      drm/i915: Don't call intel_plane_restore() when the prop value didn't change · 09dba00c
      Ville Syrjälä 提交于
      No point in calling intel_plane_restore() in .set_property() if the
      value didn't change.
      
      More importantly this papers over a bug where the current primary plane
      code forgets to update the user coordinates we store under intel_plane
      unless the primary plane .update_plane() hook is actually called. This
      means we have 0 in the coordinates straight after boot and any call
      to intel_restore_plane() (such as from restore_fbdev_mode()) will
      actually turn off the primary plane. This mess needs to be fixed properly
      but that's a bigger task and the first step there is killing off
      intel_pipe_set_base() and just calling the primary plane
      .update_plane() hook. For the immediate problem of black screen after
      boot this small patch is enough to hide it.
      
      The problem originates from these two commits:
       commit 3a5f87c2
       Author: Thomas Wood <thomas.wood@intel.com>
       Date:   Wed Aug 20 14:45:00 2014 +0100
      
          drm: fix plane rotation when restoring fbdev configuration
      
       commit d91a2cb8e5104233c02bbde539bd4ee455ec12ac
       Author: Sonika Jindal <sonika.jindal@intel.com>
       Date:   Fri Aug 22 14:06:04 2014 +0530
      
          drm/i915: Add 180 degree primary plane rotation support
      
      Cc: Thomas Wood <thomas.wood@intel.com>
      Cc: Sonika Jindal <sonika.jindal@intel.com>
      Tested-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Tested-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      09dba00c
    • 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
  6. 08 8月, 2014 4 次提交
  7. 23 7月, 2014 1 次提交
  8. 18 7月, 2014 1 次提交
  9. 27 6月, 2014 1 次提交
    • V
      drm/i915: Wait for vblank after enabling the primary plane on BDW · 33c3b0d1
      Ville Syrjälä 提交于
      BDW signals the flip done interrupt immediately after the DSPSURF write
      when the plane is disabled. This is true even if we've already armed
      DSPCNTR to enable the plane at the next vblank. This causes major
      problems for our page flip code which relies on the flip done interrupts
      happening at vblank time.
      
      So what happens is that we enable the plane, and immediately allow
      userspace to submit a page flip. If the plane is still in the process
      of being enabled when the page flip is issued, the flip done gets
      signalled immediately. Our DSPSURFLIVE check catches this to prevent
      premature flip completion, but it also means that we don't get a flip
      done interrupt when the plane actually gets enabled, and so the page
      flip is never completed.
      
      Work around this by re-introducing blocking vblank waits on BDW
      whenever we enable the primary plane.
      
      I removed some of the vblank waits here:
       commit 6304cd91
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Fri Apr 25 13:30:12 2014 +0300
      
          drm/i915: Drop the excessive vblank waits from modeset codepaths
      
      To avoid these blocking vblank waits we should start using the vblank
      interrupt instead of the flip done interrupt to complete page flips.
      But that's material for another patch.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79354Tested-by: NGuo Jinxian <jinxianx.guo@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      33c3b0d1
  10. 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
  11. 19 6月, 2014 3 次提交
    • D
      drm/i915: Introduce accurate frontbuffer tracking · a071fa00
      Daniel Vetter 提交于
      So from just a quick look we seem to have enough information to
      accurately figure out whether a given gem bo is used as a frontbuffer
      and where exactly: We have obj->pin_count as a first check with no
      false negatives and only negligible false positives. And then we can
      just walk the modeset objects and figure out where exactly a buffer is
      used as scanout.
      
      Except that we can't due to locking order: If we already hold
      dev->struct_mutex we can't acquire any modeset locks, so could
      potential chase freed pointers and other evil stuff.
      
      So we need something else. For that introduce a new set of bits
      obj->frontbuffer_bits to track where a buffer object is used. That we
      can then chase without grabbing any modeset locks.
      
      Of course the consumers of this (DRRS, PSR, FBC, ...) still need to be
      able to do their magic both when called from modeset and from gem
      code. But that can be easily achieved by adding locks for these
      specific subsystems which always nest within either kms or gem
      locking.
      
      This patch just adds the relevant update code to all places.
      
      Note that if we ever support multi-planar scanout targets then we need
      one frontbuffer tracking bit per attachment point that we expose to
      userspace.
      
      v2:
      - Fix more oopsen. Oops.
      - WARN if we leak obj->frontbuffer_bits when freeing a gem buffer. Fix
        the bugs this brought to light.
      - s/update_frontbuffer_bits/update_fb_bits/. More consistent with the
        fb tracking functions (fb for gem object, frontbuffer for raw bits).
        And the function name was way too long.
      
      v3: Size obj->frontbuffer_bits correctly so that all pipes fit in.
      
      v4: Don't update fb bits in set_base on failure. Noticed by Chris.
      
      v5: s/i915_gem_update_fb_bits/i915_gem_track_fb/ Also remove a few
      local enum pipe variables which are now no longer needed to make the
      function arguments no drop over the 80 char limit.
      
      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>
      a071fa00
    • D
      drm/i915: Drop schedule_back from psr_exit · 3108e99e
      Daniel Vetter 提交于
      It doesn't make sense to never again schedule the work, since by the
      time we might want to re-enable psr the world might have changed and
      we can do it again.
      
      The only exception is when we shut down the pipe, but that's an
      entirely different thing and needs to be handled in psr_disable.
      
      Note that later patch will again split psr_exit into psr_invalidate
      and psr_flush. But the split is different and this simplification
      helps with the transition.
      
      v2: Improve the commit message a bit.
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3108e99e
    • D
      drm/i915: Ditch intel_edp_psr_update · e6e559d4
      Daniel Vetter 提交于
      We have _enable/_disable interfaces now for the modeset sequence and
      intel_edp_psr_exit for workarounds.
      
      The callsites in intel_display.c are all redundant with the modeset
      sequence enable/disable calls in intel_ddi.c. The one in
      intel_sprite.c is real and needs to be switched to psr_exit.
      
      If this breaks anything then we need to augment the enable/disable
      functions accordingly.
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e6e559d4
  12. 13 6月, 2014 1 次提交
  13. 05 6月, 2014 1 次提交
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
  14. 22 5月, 2014 1 次提交
  15. 21 5月, 2014 1 次提交
  16. 06 5月, 2014 3 次提交
  17. 25 1月, 2014 2 次提交
  18. 17 12月, 2013 4 次提交
  19. 21 11月, 2013 1 次提交
  20. 09 11月, 2013 4 次提交
  21. 06 11月, 2013 1 次提交
  22. 10 10月, 2013 1 次提交