1. 19 12月, 2015 1 次提交
  2. 17 12月, 2015 3 次提交
    • I
      drm/i915: add support for checking RPM atomic sections · 2b19efeb
      Imre Deak 提交于
      In some cases we want to check whether we hold an RPM wakelock reference
      for the whole duration of a sequence. To achieve this add a new RPM
      atomic sequence counter that we increment any time the wakelock refcount
      drops to zero.  Check whether the sequence number stays the same during
      the atomic section and that we hold the wakelock at the beginning of the
      section.
      
      Motivated by Chris.
      
      v2-v3:
      - unchanged
      v4:
      - swap the order of atomic_read() and assert_rpm_wakelock_held() in
        assert_rpm_atomic_begin() to avoid race
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v3)
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1450203038-5150-10-git-send-email-imre.deak@intel.com
      2b19efeb
    • I
      drm/i915: add support for checking if we hold an RPM reference · 1f814dac
      Imre Deak 提交于
      Atm, we assert that the device is not suspended until the point when the
      device is truly put to a suspended state. This is fine, but we can catch
      more problems if we check that RPM refcount is non-zero. After that one
      drops to zero we shouldn't access the device any more, even if the actual
      device suspend may be delayed. Change assert_rpm_wakelock_held()
      accordingly to check for a non-zero RPM refcount in addition to the
      current device-not-suspended check.
      
      For the new asserts to work we need to annotate every place explicitly in
      the code where we expect that the device is powered. The places where we
      only assume this, but may not hold an RPM reference:
      - driver load
        We assume the device to be powered until we enable RPM. Make this
        explicit by taking an RPM reference around the load function.
      - system and runtime sudpend/resume handlers
        These handlers are called when the RPM reference becomes 0 and know the
        exact point after which the device can get powered off. Disable the
        RPM-reference-held check for their duration.
      - the IRQ, hangcheck and RPS work handlers
        These handlers are flushed in the system/runtime suspend handler
        before the device is powered off, so it's guaranteed that they won't
        run while the device is powered off even though they don't hold any
        RPM reference. Disable the RPM-reference-held check for their duration.
      
      In all these cases we still check that the device is not suspended.
      These explicit annotations also have the positive side effect of
      documenting our assumptions better.
      
      This caught additional WARNs from the atomic modeset path, those should
      be fixed separately.
      
      v2:
      - remove the redundant HAS_RUNTIME_PM check (moved to patch 1) (Ville)
      v3:
      - use a new dedicated RPM wakelock refcount to also catch cases where
        our own RPM get/put functions were not called (Chris)
      - assert also that the new RPM wakelock refcount is 0 in the RPM
        suspend handler (Chris)
      - change the assert error message to be more meaningful (Chris)
      - prevent false assert errors and check that the RPM wakelock is 0 in
        the RPM resume handler too
      - prevent false assert errors in the hangcheck work too
      - add a device not suspended assert check to the hangcheck work
      v4:
      - rename disable/enable_rpm_asserts to disable/enable_rpm_wakeref_asserts
        and wakelock_count to wakeref_count
      - disable the wakeref asserts in the IRQ handlers and RPS work too
      - update/clarify commit message
      v5:
      - mark places we plan to change to use proper RPM refcounting with
        separate DISABLE/ENABLE_RPM_WAKEREF_ASSERTS aliases (Chris)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1450227139-13471-1-git-send-email-imre.deak@intel.com
      1f814dac
    • I
      drm/i915: refactor RPM disabling due to RC6 being disabled · b268c699
      Imre Deak 提交于
      We can make the RPM dependency on RC6 explcit in the code by taking an
      actual RPM reference, instead of avoiding to drop the initial one. This
      will also enable us to remove the HAS_RUNTIME_PM special casing from
      more places in the next patch.
      
      v2:
      - fixed typo in commit message (Joonas)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1450203038-5150-4-git-send-email-imre.deak@intel.com
      b268c699
  3. 16 12月, 2015 1 次提交
  4. 10 12月, 2015 1 次提交
  5. 09 12月, 2015 1 次提交
  6. 08 12月, 2015 2 次提交
  7. 03 12月, 2015 1 次提交
    • 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
  8. 02 12月, 2015 1 次提交
  9. 18 11月, 2015 2 次提交
  10. 17 11月, 2015 1 次提交
    • K
      drm/i915/skl: Correct other-pipe watermark update condition check (v2) · e6d90023
      Kumar, Mahesh 提交于
      If ddb allocation for planes in current CRTC is changed, that doesn't
      lead to ddb allocation change for other CRTCs, because our DDB allocation
      is not dynamic according to plane parameters, ddb is allocated according
      to number of CRTC enabled, & divided equally among CTRC's.
      
      In current condition check during Watermark calculation, if number of
      plane/ddb allocation changes for current CRTC, Watermark for other pipes
      are recalculated. But there is no change in DDB allocation of other pipe
      so watermark is also not changed, This leads to warning messages.
      WARN_ON(!wm_changed)
      
      This patch corrects this and check if DDB allocation for pipes is changed,
      then only recalculate watermarks.
      
      v2 (by Matt): Rebased to latest -nightly and fixed a typo
      Signed-off-by: NKumar, Mahesh <mahesh1.kumar@intel.com>
      Reviewed-by(v1): Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e6d90023
  11. 16 11月, 2015 1 次提交
  12. 02 11月, 2015 1 次提交
  13. 29 10月, 2015 2 次提交
  14. 27 10月, 2015 1 次提交
  15. 22 10月, 2015 6 次提交
  16. 21 10月, 2015 2 次提交
  17. 20 10月, 2015 1 次提交
    • M
      drm/i915/skl: Eliminate usage of pipe_wm_parameters from SKL-style WM (v4) · 024c9045
      Matt Roper 提交于
      Just pull the info out of the state structures rather than staging
      it in an additional set of structures.  To make this more
      straightforward, we change the signature of several internal WM
      functions to take the crtc state as a parameter.
      
      v2:
       - Don't forget to skip cursor planes on a loop in the DDB allocation
         function to match original behavior.  (Ander)
       - Change a use of intel_crtc->active to cstate->active.  They should
         be identical, but it's better to be consistent.  (Ander)
       - Rework more function signatures to pass states rather than crtc for
         consistency. (Ander)
      
      v3:
        - Add missing "+ 1" to skl_wm_plane_id()'s 'overlay' case. (Maarten)
        - Packed formats should pass '0' to drm_format_plane_cpp(), not 1.
          (Maarten)
        - Drop unwanted WARN_ON() for disabled planes when calculating data
          rate for SKL.  (Maarten)
      
      v4:
       - Don't include cursor plane in total relative data rate calculation;
         we've already handled the cursor allocation earlier.
       - Fix 'bytes_per_pixel' calculation braindamage.  Somehow I hardcoded
         the NV12 format as a parameter rather than the actual
         fb->pixel_format, and even then still managed to get the format plane
         wrong.  (Ville)
       - Use plane->state->fb rather than plane->fb in
         skl_allocate_pipe_ddb(); the plane->fb pointer isn't updated until
         after we've done our watermark recalculation, so it has stale
         values.  (Bob Paauwe)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by(v3): Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Paauwe, Bob J <bob.j.paauwe@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      References: http://lists.freedesktop.org/archives/intel-gfx/2015-September/077060.html
      References: http://lists.freedesktop.org/archives/intel-gfx/2015-October/077721.html
      Smoke-tested-by(v4): Paulo Zanoni <paulo.r.zanoni@intel.com> (SKL)
      Link: http://patchwork.freedesktop.org/patch/61968/
      024c9045
  18. 13 10月, 2015 2 次提交
  19. 09 10月, 2015 1 次提交
  20. 07 10月, 2015 1 次提交
  21. 06 10月, 2015 1 次提交
  22. 30 9月, 2015 7 次提交