1. 01 3月, 2016 1 次提交
    • M
      drm/i915: Add two-stage ILK-style watermark programming (v11) · ed4a6a7c
      Matt Roper 提交于
      In addition to calculating final watermarks, let's also pre-calculate a
      set of intermediate watermark values at atomic check time.  These
      intermediate watermarks are a combination of the watermarks for the old
      state and the new state; they should satisfy the requirements of both
      states which means they can be programmed immediately when we commit the
      atomic state (without waiting for a vblank).  Once the vblank does
      happen, we can then re-program watermarks to the more optimal final
      value.
      
      v2: Significant rebasing/rewriting.
      
      v3:
       - Move 'need_postvbl_update' flag to CRTC state (Daniel)
       - Don't forget to check intermediate watermark values for validity
         (Maarten)
       - Don't due async watermark optimization; just do it at the end of the
         atomic transaction, after waiting for vblanks.  We do want it to be
         async eventually, but adding that now will cause more trouble for
         Maarten's in-progress work.  (Maarten)
       - Don't allocate space in crtc_state for intermediate watermarks on
         platforms that don't need it (gen9+).
       - Move WaCxSRDisabledForSpriteScaling:ivb into intel_begin_crtc_commit
         now that ilk_update_wm is gone.
      
      v4:
       - Add a wm_mutex to cover updates to intel_crtc->active and the
         need_postvbl_update flag.  Since we don't have async yet it isn't
         terribly important yet, but might as well add it now.
       - Change interface to program watermarks.  Platforms will now expose
         .initial_watermarks() and .optimize_watermarks() functions to do
         watermark programming.  These should lock wm_mutex, copy the
         appropriate state values into intel_crtc->active, and then call
         the internal program watermarks function.
      
      v5:
       - Skip intermediate watermark calculation/check during initial hardware
         readout since we don't trust the existing HW values (and don't have
         valid values of our own yet).
       - Don't try to call .optimize_watermarks() on platforms that don't have
         atomic watermarks yet.  (Maarten)
      
      v6:
       - Rebase
      
      v7:
       - Further rebase
      
      v8:
       - A few minor indentation and line length fixes
      
      v9:
       - Yet another rebase since Maarten's patches reworked a bunch of the
         code (wm_pre, wm_post, etc.) that this was previously based on.
      
      v10:
       - Move wm_mutex to dev_priv to protect against racing commits against
         disjoint CRTC sets. (Maarten)
       - Drop unnecessary clearing of cstate->wm.need_postvbl_update (Maarten)
      
      v11:
       - Now that we've moved to atomic watermark updates, make sure we call
         the proper function to program watermarks in
         {ironlake,haswell}_crtc_enable(); the failure to do so on the
         previous patch iteration led to us not actually programming the
         watermarks before turning on the CRTC, which was the cause of the
         underruns that the CI system was seeing.
       - Fix inverted logic for determining when to optimize watermarks.  We
         were needlessly optimizing when the intermediate/optimal values were
         the same (harmless), but not actually optimizing when they differed
         (also harmless, but wasteful from a power/bandwidth perspective).
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1456276813-5689-1-git-send-email-matthew.d.roper@intel.com
      ed4a6a7c
  2. 25 2月, 2016 2 次提交
  3. 23 2月, 2016 1 次提交
  4. 22 2月, 2016 1 次提交
  5. 18 2月, 2016 1 次提交
  6. 17 2月, 2016 1 次提交
    • I
      drm/i915: Add helper to get a display power ref if it was already enabled · 09731280
      Imre Deak 提交于
      We have many places in the code where we check if a given display power
      domain is enabled and if so access registers backed by this power
      domain. We assumed that some modeset lock will prevent the power
      reference from vanishing in the middle of the HW access, but this
      assumption doesn't always hold. In such cases we get either the wakeref
      not held, or an unclaimed register access error message. To fix this in
      a future-proof way that's independent of other locks wrap any such
      access with a get_ref_if_enabled()/put_ref() pair.
      
      Kudos to Ville and Joonas for the ideas of this new interface.
      
      v2:
      - init the power_domains ptr when declaring it everywhere (Joonas)
      v3:
      - don't report the device to be powered if runtime PM is disabled
      
      CC: Mika Kuoppala <mika.kuoppala@intel.com>
      CC: Chris Wilson <chris@chris-wilson.co.uk>
      CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
      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/1455711462-7442-1-git-send-email-imre.deak@intel.com
      09731280
  7. 13 2月, 2016 1 次提交
  8. 08 2月, 2016 3 次提交
  9. 06 2月, 2016 1 次提交
    • S
      drm/i915/bxt: Check BIOS RC6 setup before enabling RC6 · 274008e8
      Sagar Arun Kamble 提交于
      RC6 setup is shared between BIOS and Driver. BIOS sets up subset of RC6
      setup registers. If those are not setup Driver should not enable RC6.
      For implementing this, driver can check RC_CTRL0 and RC_CTRL1 values
      to know if BIOS has enabled HW/SW RC6.
      This will also enable user to control RC6 using BIOS settings alone.
      RC6 related instability can be avoided by disabling via BIOS settings
      till driver fixes it.
      
      v2: Had placed logic in gen8 function by mistake. Fixed it.
      Ensuring RPM is not enabled in case BIOS disabled RC6.
      
      v3: Need to disable RPM if RC6 is disabled due to BIOS settings. (Daniel)
      Runtime PM enabling happens before gen9_enable_rc6.
      Moved the updation of enable_rc6 parameter in intel_uncore_sanitize.
      
      v4: Added elaborate check for BIOS RC6 setup. Prepared check_pctx for bxt.
          (Imre)
      
      v5: Caching reserved stolen base and size in the driver private data.
          Reorganized RC6 setup check. Moved from gen9_enable_rc6 to
          intel_uncore_sanitize. (Imre)
      
      v6: Rebasing on the patch submitted by Imre that moves gem_init_stolen
          earlier in the load.
      
      v7: Removed PWRCTX_MAXCNT_VCSUNIT1 check as it applies to SKL. (Imre)
      
      v8: Fixed formatting and checkpatch issues. Fixed functional issue where
          RC6 ctx size check was missing. (Imre)
      
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1454697809-22113-1-git-send-email-sagar.a.kamble@intel.com
      274008e8
  10. 30 1月, 2016 5 次提交
  11. 29 1月, 2016 1 次提交
  12. 20 1月, 2016 2 次提交
  13. 14 1月, 2016 4 次提交
  14. 13 1月, 2016 1 次提交
  15. 12 1月, 2016 2 次提交
  16. 07 1月, 2016 3 次提交
  17. 06 1月, 2016 1 次提交
  18. 22 12月, 2015 3 次提交
  19. 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: add assert_rpm_wakelock_held helper · da5827c3
      Imre Deak 提交于
      As a preparation for follow-up patches add a new helper that checks
      whether we hold an RPM reference, since this is what we want most of
      the cases. Atm this helper will only check for the HW suspended state, a
      follow-up patch will do the actual change to check the refcount instead.
      One exception is the forcewake release timer function, where it's
      guaranteed that the HW is on even though the RPM refcount drops to zero.
      This guarantee is provided by flushing the timer in the runtime suspend
      handler. So leave the assert_device_not_suspended check in place there.
      
      Also rename assert_device_suspended for consistency and export these
      helpers as a preparation for the follow-up patches.
      
      No functional change.
      
      v3:
      - change the assert warning message to be more meaningful (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/1450203038-5150-6-git-send-email-imre.deak@intel.com
      da5827c3
  20. 15 12月, 2015 1 次提交
  21. 10 12月, 2015 2 次提交