1. 11 8月, 2016 1 次提交
    • V
      drm/i915: Rewrite fb rotation GTT handling · 6687c906
      Ville Syrjälä 提交于
      Redo the fb rotation handling in order to:
      - eliminate the NV12 special casing
      - handle fb->offsets[] properly
      - make the rotation handling easier for the plane code
      
      To achieve these goals we reduce intel_rotation_info to only contain
      (for each plane) the rotated view width,height,stride in tile units,
      and the page offset into the object where the plane starts. Each plane
      is handled exactly the same way, no special casing for NV12 or other
      formats. We then store the computed rotation_info under
      intel_framebuffer so that we don't have to recompute it again.
      
      To handle fb->offsets[] we treat them as a linear offsets and convert
      them to x/y offsets from the start of the relevant GTT mapping (either
      normal or rotated). We store the x/y offsets under intel_framebuffer,
      and for some extra convenience we also store the rotated pitch (ie.
      tile aligned plane height). So for each plane we have the normal
      x/y offsets, rotated x/y offsets, and the rotated pitch. The normal
      pitch is available already in fb->pitches[].
      
      While we're gathering up all that extra information, we can also easily
      compute the storage requirements for the framebuffer, so that we can
      check that the object is big enough to hold it.
      
      When it comes time to deal with the plane source coordinates, we first
      rotate the clipped src coordinates to match the relevant GTT view
      orientation, then add to them the fb x/y offsets. Next we compute
      the aligned surface page offset, and as a result we're left with some
      residual x/y offsets. Finally, if required by the hardware, we convert
      the remaining x/y offsets into a linear offset.
      
      For gen2/3 we simply skip computing the final page offset, and just
      convert the src+fb x/y offsets directly into a linear offset since
      that's what the hardware wants.
      
      After this all platforms, incluing SKL+, compute these things in exactly
      the same way (excluding alignemnt differences).
      
      v2: Use BIT(DRM_ROTATE_270) instead of ROTATE_270 when rotating
          plane src coordinates
          Drop some spurious changes that got left behind during
          development
      v3: Split out more changes to prep patches (Daniel)
          s/intel_fb->plane[].foo.bar/intel_fb->foo[].bar/ for brevity
          Rename intel_surf_gtt_offset to intel_fb_gtt_offset
          Kill the pointless 'plane' parameter from intel_fb_gtt_offset()
      v4: Fix alignment vs. alignment-1 when calling
          _intel_compute_tile_offset() from intel_fill_fb_info()
          Pass the pitch in tiles in
          stad of pixels to intel_adjust_tile_offset() from intel_fill_fb_info()
          Pass the full width/height of the rotated area to
          drm_rect_rotate() for clarity
          Use u32 for more offsets
      v5: Preserve the upper_32_bits()/lower_32_bits() handling for the
          fb ggtt offset (Sivakumar)
      v6: Rebase due to drm_plane_state src/dst rects
      
      Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NSivakumar Thulasimani <sivakumar.thulasimani@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-2-git-send-email-ville.syrjala@linux.intel.comAcked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6687c906
  2. 10 8月, 2016 2 次提交
  3. 06 8月, 2016 6 次提交
  4. 05 8月, 2016 4 次提交
  5. 04 8月, 2016 5 次提交
  6. 03 8月, 2016 4 次提交
  7. 02 8月, 2016 1 次提交
    • K
      drm/i915: cleanup_plane_fb: also drop reference to current state wait_req · 84978257
      Keith Packard 提交于
      There are two paths into intel_cleanup_plane_fb, the normal completion
      path and the failure path.
      
      In the failure case, intel_cleanup_plane_fb is called before
      drm_atomic_helper_swap_state, so any wait_req reference made in
      intel_prepare_plane_fb will be in old_intel_state->wait_req.
      
      In the normal completion path, drm_atomic_helper_swap_state has
      already been called, so the plane state holding the just-used wait_req
      will not be in old_intel_state->wait_req, rather it will be in the
      state associated with the plane itself.
      
      Clearing this reference ensures that the wait_req will be freed as
      soon as it the related mode setting operation is complete, rather than
      waiting for some future mode setting operation to eventually
      dereference it.
      
      The existing dereference of old_intel_state->wait_req is still
      required as that will hold the wait_req when the mode setting
      operation fails.
      
      cc: Daniel Vetter <daniel.vetter@intel.com>
      cc: David Airlie <airlied@linux.ie>
      cc: intel-gfx@lists.freedesktop.org
      cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      84978257
  8. 27 7月, 2016 1 次提交
  9. 22 7月, 2016 2 次提交
  10. 20 7月, 2016 6 次提交
  11. 19 7月, 2016 1 次提交
  12. 18 7月, 2016 2 次提交
  13. 15 7月, 2016 1 次提交
  14. 14 7月, 2016 1 次提交
    • C
      drm/i915: Defer enabling rc6 til after we submit the first batch/context · b7137e0c
      Chris Wilson 提交于
      Some hardware requires a valid render context before it can initiate
      rc6 power gating of the GPU; the default state of the GPU is not
      sufficient and may lead to undefined behaviour. The first execution of
      any batch will load the "golden render state", at which point it is safe
      to enable rc6. As we do not forcibly load the kernel context at resume,
      we have to hook into the batch submission to be sure that the render
      state is setup before enabling rc6.
      
      However, since we don't enable powersaving until that first batch, we
      queued a delayed task in order to guarantee that the batch is indeed
      submitted.
      
      v2: Rearrange intel_disable_gt_powersave() to match.
      v3: Apply user specified cur_freq (or idle_freq if not set).
      v4: Give in, and supply a delayed work to autoenable rc6
      v5: Mika suggested a couple of better names for delayed_resume_work
      v6: Rebalance rpm_put around the autoenable task
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1468397438-21226-7-git-send-email-chris@chris-wilson.co.ukReviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      b7137e0c
  15. 08 7月, 2016 1 次提交
  16. 07 7月, 2016 2 次提交