1. 07 1月, 2016 4 次提交
  2. 06 1月, 2016 3 次提交
    • M
      drm/i915: Allow fuzzy matching in intel_compare_link_m_n · 31d10b57
      Maarten Lankhorst 提交于
      This prevents a unnecessary modeset on a dell XPS 13 (2016).
      
      N is always a power of 2, which means that for fuzzy matching we should
      compare for inequality on the n values, then do fuzzy matching on the m
      values.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Tested-by: NKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/568D0E93.304@linux.intel.com
      31d10b57
    • M
      drm/i915: Sanitize watermarks after hardware state readout (v4) · d93c0372
      Matt Roper 提交于
      Although we can do a good job of reading out hardware state, the
      graphics firmware may have programmed the watermarks in a creative way
      that doesn't match how i915 would have chosen to program them.  We
      shouldn't trust the firmware's watermark programming, but should rather
      re-calculate how we think WM's should be programmed and then shove those
      values into the hardware.
      
      We can do this pretty easily by creating a dummy top-level state,
      running it through the check process to calculate all the values, and
      then just programming the watermarks for each CRTC.
      
      v2:  Move watermark sanitization after our BIOS fb reconstruction; the
           watermark calculations that we do here need to look at pstate->fb,
           which isn't setup yet in intel_modeset_setup_hw_state(), even
           though we have an enabled & visible plane.
      
      v3:
       - Don't move 'active = optimal' watermark assignment; we just undo
         that change in the next patch anyway.  (Ville)
       - Move atomic helper locking fix to separate patch.  (Maarten)
      
      v4:
       - Grab connection_mutex before calling atomic helper to duplicate
         state.  The connector loop inside the helper will throw a WARN
         if we don't hold something to protect the connector list (and the
         helper itself doesn't try to lock the list).
       - Make failure to calculate watermarks for inherited state a WARN()
         since it probably indicates a serious problem in either our state
         readout code or our watermark code for this platform.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      d93c0372
    • M
      drm/i915: Setup clipped src/dest coordinates during FB reconstruction (v2) · 0a8d8a86
      Matt Roper 提交于
      Plane state objects contain two copies of src/dest coordinates:  the
      original (requested by userspace) coordinates in the base
      drm_plane_state object, and a second, clipped copy (i.e., what we
      actually want to program to the hardware) in intel_plane_state.  We've
      only been setting up the former set of values during boot time FB
      reconstruction, but we should really be initializing both.
      
      Note that the code here probably still needs some more work since we
      make a lot of assumptions about how the BIOS programmed the hardware
      that may not always be true, especially on gen9+; e.g.,
       * Primary plane might not be positioned at 0,0
       * Primary plane could have been rotated by the BIOS
       * Primary plane might be scaled
       * The BIOS fb might be a single "extended mode" FB that spans
         multiple displays.
       * ...etc...
      
      v2: Reword/expand commit message description of assumptions we make
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by(v1): Ville Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449171462-30763-4-git-send-email-matthew.d.roper@intel.comSigned-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      0a8d8a86
  3. 22 12月, 2015 5 次提交
  4. 21 12月, 2015 1 次提交
    • V
      drm/i915: Workaround CHV pipe C cursor fail · b29ec92c
      Ville Syrjälä 提交于
      Turns out CHV pipe C was glued on somewhat poorly, and there's something
      wrong with the cursor. If the cursor straddles the left screen edge,
      and is then moved away from the edge or disabled, the pipe will often
      underrun. If enough underruns are triggered quickly enough the pipe
      will fall over and die (it just scans out a solid color and reports
      a constant underrun). We need to turn the disp2d power well off and
      on again to recover the pipe.
      
      None of that is very nice for the user, so let's just refuse to place
      the cursor in the compromised position. The ddx appears to fall back
      to swcursor when the ioctl returns an error, so theoretically there's
      no loss of functionality for the user (discounting swcursor bugs).
      I suppose most cursors images actually have the hotspot not exactly
      at 0,0 so under typical conditions the fallback will in fact kick in
      as soon as the cursor touches the left edge of the screen.
      
      Any atomic compositor should anyway be prepared to fall back to
      GPU composition when things don't work out, so there should be no
      problem with those.
      
      Other things that I tried to solve this include flipping all
      display related clock gating knobs I could find, increasing the
      minimum gtt alignment all the way up to 512k. I also tried to see
      if there are more specific screen coordinates that hit the bug, but
      the findings were somewhat inconclusive. Sometimes the failures
      happen almost across the whole left edge, sometimes more at the very
      top and around the bottom half. I wasn't able to find any real pattern
      to these variations, so it seems our only choice is to just refuse
      to straddle the left screen edge at all.
      
      Cc: stable@vger.kernel.org
      Cc: Jason Plum <max@warheads.net>
      Testcase: igt/kms_chv_cursor_fail
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92826Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1450459479-16286-1-git-send-email-ville.syrjala@linux.intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b29ec92c
  5. 18 12月, 2015 1 次提交
  6. 16 12月, 2015 1 次提交
  7. 15 12月, 2015 2 次提交
  8. 10 12月, 2015 3 次提交
  9. 08 12月, 2015 5 次提交
  10. 07 12月, 2015 4 次提交
  11. 03 12月, 2015 6 次提交
    • M
      drm/i915: Handle cdclk limits on broadwell. · 63ba534e
      Maarten Lankhorst 提交于
      As the comment indicates this can only fail gracefully when
      called from compute_config. Fortunately this is now what's happening,
      so the fixme can be removed and the DRM_ERROR downgraded.
      
      Link: http://patchwork.freedesktop.org/patch/msgid/1448360945-5723-3-git-send-email-maarten.lankhorst@linux.intel.comSigned-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      63ba534e
    • A
      i915: wait for fence in prepare_plane_fb · 3c28ff22
      Alex Goins 提交于
      In intel_prepare_plane_fb, if fb is backed by dma-buf, wait for exclusive
      fence
      
      v2: First commit
      v3: Remove object_name_lock acquire
          Move wait from intel_atomic_commit() to intel_prepare_plane_fb()
      v4: Wait only on exclusive fences, interruptible with no timeout
      v5: Style tweaks to more closely match rest of file
      v6: Properly handle interrupted waits
      v7: No change
      v8: No change
      
      Link: https://patchwork.kernel.org/patch/7704181/Signed-off-by: NAlex Goins <agoins@nvidia.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      3c28ff22
    • A
      i915: wait for fence in mmio_flip_work_func · fd8e058a
      Alex Goins 提交于
      If a buffer is backed by dmabuf, wait on its reservation object's exclusive
      fence before flipping.
      
      v2: First commit
      v3: Remove object_name_lock acquire
      v4: Move wait ahead of mark_page_flip_active
          Use crtc->primary->fb to get GEM object instead of pending_flip_obj
          use_mmio_flip() return true when exclusive fence is attached
          Wait only on exclusive fences, interruptible with no timeout
      v5: Move wait from do_mmio_flip to mmio_flip_work_func
          Style tweaks to more closely match rest of file
      v6: Change back to unintteruptible wait to match __i915_wait_request due to
          inability to properly handle interrupted wait.
          Warn on error code from waiting.
      v7: No change
      v8: Test for !reservation_object_signaled_rcu(test_all=FALSE) instead of
          obj->base.dma_buf->resv->fence_excl
      
      Link: https://patchwork.kernel.org/patch/7704181/Signed-off-by: NAlex Goins <agoins@nvidia.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      fd8e058a
    • P
      drm/i915: introduce intel_fbc_{enable,disable} · d029bcad
      Paulo Zanoni 提交于
      The goal is to call FBC enable/disable only once per modeset, while
      activate/deactivate/update will be called multiple times.
      
      The enable() function will be responsible for deciding if a CRTC will
      have FBC on it and then it will "lock" FBC on this CRTC: it won't be
      possible to change FBC's CRTC until disable(). With this, all checks
      and resource acquisition that only need to be done once per modeset
      can be moved from update() to enable(). And then the update(),
      activate() and deactivate() code will also get simpler since they
      won't need to worry about the CRTC being changed.
      
      The disable() function will do the reverse operation of enable(). One
      of its features is that it should only be called while the pipe is
      already off. This guarantees that FBC is stopped and nothing is
      using the CFB.
      
      With this, the activate() and deactivate() functions just start and
      temporarily stop FBC. They are the ones touching the hardware enable
      bit, so HW state reflects dev_priv->crtc.active.
      
      The last function remaining is update(). A lot of times I thought
      about renaming update() to activate() or try_to_activate() since it's
      called when we want to activate FBC. The thing is that update() may
      not only decide to activate FBC, but also deactivate or keep it on the
      same state, so I'll leave this name for now.
      
      Moving code to enable() and disable() will also help in case we decide
      to move FBC to pipe_config or something else later.
      
      The current patch only puts the very basic code on enable() and
      disable(). The next commits will take care of moving more stuff from
      update() to the new functions.
      
      v2:
        - Rebase.
        - Improve commit message (Chris).
      v3: Rebase after changing the patch order.
      v4: Rebase again after upstream changes.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/
      d029bcad
    • P
      drm/i915: introduce is_active/activate/deactivate to the FBC terminology · 0e631adc
      Paulo Zanoni 提交于
      The long term goal is to have enable/disable as the higher level
      functions and activate/deactivate as the lower level functions, just
      like we do for PSR and for the CRTC. This way, we'll run enable and
      disable once per modeset, while update, activate and deactivate will
      be run many times. With this, we can move the checks and code that
      need to run only once per modeset to enable(), making the code simpler
      and possibly a little faster.
      
      This patch is just the first step on the conversion: it starts by
      converting the current low level functions from enable/disable to
      activate/deactivate. This patch by itself has no benefits other than
      making review and rebase easier. Please see the next patches for more
      details on the conversion.
      
      v2:
        - Rebase.
        - Improve commit message (Chris).
      v3: Rebase after changing the patch order.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/
      0e631adc
    • P
      drm/i915: pass the crtc as an argument to intel_fbc_update() · 754d1133
      Paulo Zanoni 提交于
      There's no need to reevaluate the status of every single crtc when a
      single crtc changes its state.
      
      With this, we're cutting the case where due to a change in pipe B,
      intel_fbc_update() is called, then intel_fbc_find_crtc() concludes FBC
      should be enabled on pipe A, then it completely rechecks the state of
      pipe A only to conclude FBC should remain enabled on pipe A. If any
      change on pipe A triggers a need to recompute whether FBC is valid on
      pipe A, then at some point someone is going to call
      intel_fbc_update(PIPE_A).
      
      The addition of intel_fbc_deactivate() is necessary so we keep track
      of the previously selected CRTC when we do invalidate/flush. We're
      also going to continue the enable/disable/activate/deactivate concept
      in the next patches.
      
      v2: Rebase.
      v3: Rebase after changing the patch order.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/
      754d1133
  12. 02 12月, 2015 5 次提交