1. 01 7月, 2019 3 次提交
  2. 17 6月, 2019 2 次提交
  3. 14 6月, 2019 2 次提交
  4. 12 6月, 2019 1 次提交
  5. 04 6月, 2019 1 次提交
  6. 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
  7. 06 5月, 2019 2 次提交
  8. 03 5月, 2019 2 次提交
  9. 30 4月, 2019 4 次提交
  10. 29 4月, 2019 1 次提交
    • T
      drm: Simplify stacktrace handling · 487f3c7f
      Thomas Gleixner 提交于
      Replace the indirection through struct stack_trace by using the storage
      array based interfaces.
      
      The original code in all printing functions is really wrong. It allocates a
      storage array on stack which is unused because depot_fetch_stack() does not
      store anything in it. It overwrites the entries pointer in the stack_trace
      struct so it points to the depot storage.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: NDaniel Vetter <daniel@ffwll.ch>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: linux-mm@kvack.org
      Cc: David Rientjes <rientjes@google.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: kasan-dev@googlegroups.com
      Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: iommu@lists.linux-foundation.org
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Cc: David Sterba <dsterba@suse.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Josef Bacik <josef@toxicpanda.com>
      Cc: linux-btrfs@vger.kernel.org
      Cc: dm-devel@redhat.com
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Alasdair Kergon <agk@redhat.com>
      Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
      Cc: Miroslav Benes <mbenes@suse.cz>
      Cc: linux-arch@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190425094802.622094226@linutronix.de
      487f3c7f
  11. 26 4月, 2019 4 次提交
  12. 15 4月, 2019 1 次提交
  13. 13 4月, 2019 1 次提交
  14. 12 4月, 2019 1 次提交
    • C
      drm/i915: Avoid reclaim taints from runtime-pm debug · 2e1e5c55
      Chris Wilson 提交于
      As intel_runtime_pm_get/_put may be called from any blockable context,
      we need to avoid allowing reclaim from our mallocs, as we need to
      avoid tainting any mutexes held by the callers (as they may themselves
      not allow for allocations as they are taken in the shrinker).
      
      <4> [435.339331] WARNING: possible circular locking dependency detected
      <4> [435.339364] 5.1.0-rc4-CI-Trybot_4116+ #1 Tainted: G     U
      <4> [435.339395] ------------------------------------------------------
      <4> [435.339426] gem_caching/1334 is trying to acquire lock:
      <4> [435.339456] 000000004505c39b (wakeref#3){+.+.}, at: intel_engine_pm_put+0x1b/0x40 [i915]
      <4> [435.339788]
      but task is already holding lock:
      <4> [435.339819] 00000000ee77b4ed (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.24+0x0/0x30
      <4> [435.339879]
      which lock already depends on the new lock.
      
      <4> [435.339918]
      the existing dependency chain (in reverse order) is:
      <4> [435.339952]
      -> #1 (fs_reclaim){+.+.}:
      <4> [435.339998]        fs_reclaim_acquire.part.24+0x24/0x30
      <4> [435.340035]        kmem_cache_alloc_trace+0x2a/0x290
      <4> [435.340311]        __print_intel_runtime_pm_wakeref+0x24/0x160 [i915]
      <4> [435.340590]        untrack_intel_runtime_pm_wakeref+0x16e/0x1d0 [i915]
      <4> [435.340869]        intel_runtime_pm_put_unchecked+0xd/0x30 [i915]
      <4> [435.341147]        __intel_wakeref_put_once+0x22/0x40 [i915]
      <4> [435.341508]        i915_request_retire+0x477/0xaf0 [i915]
      <4> [435.341871]        ring_retire_requests+0x86/0x160 [i915]
      <4> [435.342226]        i915_retire_requests+0x58/0xc0 [i915]
      <4> [435.342576]        retire_work_handler+0x5b/0x70 [i915]
      <4> [435.342615]        process_one_work+0x245/0x610
      <4> [435.342646]        worker_thread+0x37/0x380
      <4> [435.342679]        kthread+0x119/0x130
      <4> [435.342714]        ret_from_fork+0x3a/0x50
      <4> [435.342739]
      -> #0 (wakeref#3){+.+.}:
      <4> [435.342788]        lock_acquire+0xa6/0x1c0
      <4> [435.342822]        __mutex_lock+0x8c/0x960
      <4> [435.342853]        atomic_dec_and_mutex_lock+0x33/0x50
      <4> [435.343151]        intel_engine_pm_put+0x1b/0x40 [i915]
      <4> [435.343501]        i915_request_retire+0x477/0xaf0 [i915]
      <4> [435.343851]        ring_retire_requests+0x86/0x160 [i915]
      <4> [435.344202]        i915_retire_requests+0x58/0xc0 [i915]
      <4> [435.344543]        i915_gem_shrink+0xd8/0x5b0 [i915]
      <4> [435.344835]        i915_drop_caches_set+0x17b/0x250 [i915]
      <4> [435.344877]        simple_attr_write+0xb0/0xd0
      <4> [435.344911]        full_proxy_write+0x51/0x80
      <4> [435.344943]        vfs_write+0xbd/0x1b0
      <4> [435.344972]        ksys_write+0x55/0xe0
      <4> [435.345002]        do_syscall_64+0x55/0x190
      <4> [435.345040]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190409174108.19396-1-chris@chris-wilson.co.uk
      2e1e5c55
  15. 08 4月, 2019 5 次提交
  16. 27 3月, 2019 1 次提交
  17. 08 3月, 2019 1 次提交
  18. 14 2月, 2019 2 次提交