1. 08 10月, 2019 2 次提交
  2. 06 10月, 2019 1 次提交
  3. 02 10月, 2019 1 次提交
  4. 24 9月, 2019 1 次提交
  5. 29 8月, 2019 1 次提交
    • I
      drm/i915: Align power domain names with port names · 8a84bacb
      Imre Deak 提交于
      There is a difference in BSpec's and the driver's designation of DDI
      ports. BSpec uses the following names:
      - before GEN11:
        BSpec/driver:
        	port A/B/C/D etc
      - GEN11:
        BSpec/driver:
      	port A-F
      - GEN12:
        BSpec:
        	port A/B/C for combo PHY ports
      	port TC1-6 for Type C PHY ports
        driver:
      	port A-I.
        The driver's port D name matches BSpec's TC1 port name.
      
      So far power domains were named according to the BSpec designation, to
      make it easier to match the code against the specification. That however
      can be confusing when a power domain needs to be matched to a port on
      GEN12+. To resolve that use the driver's port A-I designation for power
      domain names too and rename the corresponding power wells so that they
      reflect the mapping from the driver's to BSpec's port name.
      
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823100711.27833-1-imre.deak@intel.com
      8a84bacb
  6. 21 8月, 2019 1 次提交
  7. 20 8月, 2019 1 次提交
  8. 17 8月, 2019 2 次提交
  9. 12 8月, 2019 2 次提交
  10. 07 8月, 2019 2 次提交
  11. 29 7月, 2019 1 次提交
  12. 27 7月, 2019 1 次提交
  13. 12 7月, 2019 5 次提交
  14. 11 7月, 2019 2 次提交
  15. 05 7月, 2019 1 次提交
    • V
      drm/i915/ehl: Add support for DPLL4 (v10) · eef037ea
      Vivek Kasireddy 提交于
      This patch adds support for DPLL4 on EHL that include the
      following restrictions:
      
      - DPLL4 cannot be used with DDIA (combo port A internal eDP usage).
        DPLL4 can be used with other DDIs, including DDID
        (combo port A external usage).
      
      - DPLL4 cannot be enabled when DC5 or DC6 are enabled.
      
      - The DPLL4 enable, lock, power enabled, and power state are connected
        to the MGPLL1_ENABLE register.
      
      v2: (suggestions from Bob Paauwe)
      - Rework ehl_get_dpll() function to call intel_find_shared_dpll() and
        iterate twice: once for Combo plls and once for MG plls.
      
      - Use MG pll funcs for DPLL4 instead of creating new ones and modify
        mg_pll_enable to include the restrictions for EHL.
      
      v3: Fix compilation error
      
      v4: (suggestions from Lucas and Ville)
      - Treat DPLL4 as a combo phy PLL and not as MG PLL
      - Disable DC states when this DPLL is being enabled
      - Reuse icl_get_dpll instead of creating a separate one for EHL
      
      v5: (suggestion from Ville)
      - Refcount the DC OFF power domains during the enabling and disabling
        of this DPLL.
      
      v6: rebase
      
      v7: (suggestion from Imre)
      - Add a new power domain instead of iterating over the domains
        assoicated with DC OFF power well.
      
      v8: (Ville and Imre)
      - Rename POWER_DOMAIN_DPLL4 TO POWER_DOMAIN_DPLL_DC_OFF
      - Grab a reference in intel_modeset_setup_hw_state() if this
        DPLL was already enabled perhaps by BIOS.
      - Check for the port type instead of the encoder
      
      v9: (Ville)
      - Move the block of code that grabs a reference to the power domain
        POWER_DOMAIN_DPLL_DC_OFF to intel_modeset_readout_hw_state() to ensure
        that there is a reference present before this DPLL might get disabled.
      
      v10: rebase
      
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NVivek Kasireddy <vivek.kasireddy@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190703230353.24059-1-vivek.kasireddy@intel.com
      eef037ea
  16. 03 7月, 2019 1 次提交
  17. 01 7月, 2019 3 次提交
  18. 17 6月, 2019 2 次提交
  19. 14 6月, 2019 2 次提交
  20. 12 6月, 2019 1 次提交
  21. 04 6月, 2019 1 次提交
  22. 14 5月, 2019 6 次提交
    • I
      drm/i915: Replace use of PLLS power domain with DISPLAY_CORE domain · 08d8e170
      Imre Deak 提交于
      There isn't a separate power domain specific to PLLs. When programming
      them we require the same power domain to be enabled which is needed when
      accessing other display core parts (not specific to any
      pipe/port/transcoder). This corresponds to the DISPLAY_CORE domain added
      previously in this patchset, so use that instead to save bits in the
      power domain mask.
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-10-imre.deak@intel.com
      08d8e170
    • I
      drm/i915: Remove the unneeded AUX power ref from intel_dp_detect() · 6cfe7ec0
      Imre Deak 提交于
      We don't need the AUX power for the whole duration of the detect, only
      when we're doing AUX transfers. The AUX transfer function takes its own
      reference on the AUX power domain already. The two places during detect
      which access display core registers (not specific to a
      pipe/port/transcoder) only need the power domain that is required for
      that access. That power domain is equivalent to the device global power
      domain on most platforms (enabled whenever we hold a runtime PM
      reference) except on CHV/VLV where it's equivalent to the display power
      well.
      
      Add a new power domain that reflects the above, and use this at the two
      spots accessing registers. With that we can avoid taking the AUX
      reference for the whole duration of the detect function.
      
      Put the domains asynchronously to avoid the unneeded on-off-on toggling.
      
      Also adapt the idea from with_intel_runtime_pm et al. for making it easy
      to write short sequences where a display power ref is needed.
      
      v2: (Ville)
      - Add with_intel_display_power() helper to simplify things.
      - s/bool res/bool is_connected/
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-8-imre.deak@intel.com
      6cfe7ec0
    • I
      drm/i915: Add support for asynchronous display power disabling · e0da2d63
      Imre Deak 提交于
      By disabling a power domain asynchronously we can restrict holding a
      reference on that power domain to the actual code sequence that
      requires the power to be on for the HW access it's doing, by also
      avoiding unneeded on-off-on togglings of the power domain (since the
      disabling happens with a delay).
      
      One benefit is potential power saving due to the following two reasons:
      1. The fact that we will now be holding the reference only for the
         necessary duration by the end of the patchset. While simply not
         delaying the disabling has the same benefit, it has the problem that
         frequent on-off-on power switching has its own power cost (see the 2.
         point below) and the debug trace for power well on/off events will
         cause a lot of dmesg spam (see details about this further below).
      2. Avoiding the power cost of freuqent on-off-on power switching. This
         requires us to find the optimal disabling delay based on the measured
         power cost of on->off and off->on switching of each power well vs.
         the power of keeping the given power well on.
      
         In this patchset I'm not providing this optimal delay for two
         reasons:
         a) I don't have the means yet to perform the measurement (with high
            enough signal-to-noise ratio, or with the help of an energy
            counter that takes switching into account). I'm currently looking
            for a way to measure this.
      
         b) Before reducing the disabling delay we need an alternative way for
            debug tracing powerwell on/off events. Simply avoiding/throttling
            the debug messages is not a solution, see further below.
      
         Note that even in the case where we can't measure any considerable
         power cost of frequent on-off switching of powerwells, it still would
         make sense to do the disabling asynchronously (with 0 delay) to avoid
         blocking on the disabling. On VLV I measured this disabling time
         overhead to be 1ms on average with a worst case of 4ms.
      
      In the case of the AUX power domains on ICL we would also need to keep
      the sequence where we hold the power reference short, the way it would
      be by the end of this patchset where we hold it only for the actual AUX
      transfer. Anything else would make the locking we need for ICL TypeC
      ports (whenever we hold a reference on any AUX power domain) rather
      problematic, adding for instance unnecessary lockdep dependencies to
      the required TypeC port lock.
      
      I chose the disabling delay to be 100msec for now to avoid the unneeded
      toggling (and so not to introduce dmesg spamming) in the DP MST sideband
      signaling code. We could optimize this delay later, once we have the
      means to measure the switching power cost (see above).
      
      Note that simply removing/throttling the debug tracing for power well
      on/off events is not a solution. We need to know the exact spots of
      these events and cannot rely only on incorrect register accesses caught
      (due to not holding a wakeref at the time of access). Incorrect
      powerwell enabling/disabling could lead to other problems, for instance
      we need to keep certain powerwells enabled for the duration of modesets
      and AUX transfers.
      
      v2:
      - Clarify the commit log parts about power cost measurement and the
        problem of simply removing/throttling debug tracing. (Chris)
      - Optimize out local wakeref vars at intel_runtime_pm_put_raw() and
        intel_display_power_put_async() call sites if
        CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n. (Chris)
      - Rebased on v2 of the wakeref w/o power-on guarantee patch.
      - Add missing docbook headers.
      v3:
      - Checkpatch spelling/missing-empty-line fix.
      v4:
      - Fix unintended local wakeref var optimization when using
        call-arguments with side-effects, by using inline funcs instead of
        macros. In this patch in particular this will fix the
        intel_display_power_grab_async_put_ref()->intel_runtime_pm_put_raw()
        call).
      
        No size change in practice (would be the same disregarding the
        corresponding change in intel_display_power_grab_async_put_ref()):
        $ size i915-macro.ko
           text	   data	    bss	    dec	    hex	filename
        2455190	 105890	  10272	2571352	 273c58	i915-macro.ko
        $ size i915-inline.ko
           text	   data	    bss	    dec	    hex	filename
        2455195	 105890	  10272	2571357	 273c5d	i915-inline.ko
      
        Kudos to Stan for reporting the raw-wakeref WARNs this issue caused. His
        config has CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n, which I didn't retest
        after v1, and we are also not testing this config in CI.
      
        Now tested both with CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y/n on ICL,
        connecting both Chamelium and regular DP, HDMI sinks.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190513192533.12586-1-imre.deak@intel.com
      e0da2d63
    • I
      drm/i915: Verify power domains state during suspend in all cases · ee70080a
      Imre Deak 提交于
      There is no reason why we couldn't verify the power domains state during
      suspend in all cases, so do that. I overlooked this when originally
      adding the check.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-4-imre.deak@intel.com
      ee70080a
    • I
      drm/i915: Force printing wakeref tacking during pm_cleanup · dbf99c1f
      Imre Deak 提交于
      Make sure we print and drop the wakeref tracking info during pm_cleanup
      even if there are wakeref holders (either raw-wakeref or wakelock
      holders). Dropping the wakeref tracking means that a late put on the ref
      will WARN since the wakeref will be unknown, but that is rightly so,
      since the put is late and we want to catch that case.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-3-imre.deak@intel.com
      dbf99c1f
    • I
      drm/i915: Add support for tracking wakerefs w/o power-on guarantee · 4547c255
      Imre Deak 提交于
      It's useful to track runtime PM refs that don't guarantee a device
      power-on state to the rest of the driver. One such case is holding a
      reference that will be put asynchronously, during which normal users
      without their own reference shouldn't access the HW. A follow-up patch
      will add support for disabling display power domains asynchronously
      which needs this.
      
      For this we can split wakeref_count into a low half-word tracking
      all references (raw-wakerefs) and a high half-word tracking
      references guaranteeing a power-on state (wakelocks).
      
      Follow-up patches will make use of the API added here.
      
      While at it add the missing docbook header for the unchecked
      display-power and runtime_pm put functions.
      
      No functional changes, except for printing leaked raw-wakerefs
      and wakelocks separately in intel_runtime_pm_cleanup().
      
      v2:
      - Track raw wakerefs/wakelocks in the low/high half-word of
        wakeref_count, instead of adding a new counter. (Chris)
      v3:
      - Add a struct_member(T, m) helper instead of open-coding it. (Chris)
      - Checkpatch indentation formatting fix.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-2-imre.deak@intel.com
      4547c255