1. 09 8月, 2019 1 次提交
  2. 07 8月, 2019 2 次提交
  3. 06 8月, 2019 1 次提交
  4. 04 8月, 2019 1 次提交
  5. 03 8月, 2019 2 次提交
    • C
      drm/i915: Hide unshrinkable context objects from the shrinker · 1aff1903
      Chris Wilson 提交于
      The shrinker cannot touch objects used by the contexts (logical state
      and ring). Currently we mark those as "pin_global" to let the shrinker
      skip over them, however, if we remove them from the shrinker lists
      entirely, we don't event have to include them in our shrink accounting.
      
      By keeping the unshrinkable objects in our shrinker tracking, we report
      a large number of objects available to be shrunk, and leave the shrinker
      deeply unsatisfied when we fail to reclaim those. The shrinker will
      persist in trying to reclaim the unavailable objects, forcing the system
      into a livelock (not even hitting the dread oomkiller).
      
      v2: Extend unshrinkable protection for perma-pinned scratch and guc
      allocations (Tvrtko)
      v3: Notice that we should be pinned when marking unshrinkable and so the
      link cannot be empty; merge duplicate paths.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802212137.22207-1-chris@chris-wilson.co.uk
      1aff1903
    • M
      drm/i915/uc: Move GuC error log to uc and release it on fini · 32ff76e8
      Michal Wajdeczko 提交于
      When we fail to load GuC and want to abort probe, we hit:
      
      <7> [229.915779] i915 0000:00:02.0: [drm:intel_uc_init_hw [i915]] GuC initialization failed -6
      <7> [229.915813] i915 0000:00:02.0: [drm:i915_gem_init_hw [i915]] Enabling uc failed (-6)
      <4> [229.953354] ------------[ cut here ]------------
      <4> [229.953355] WARN_ON(dev_priv->mm.shrink_count)
      <4> [229.953406] WARNING: CPU: 9 PID: 3287 at drivers/gpu/drm/i915/i915_gem.c:1684 i915_gem_cleanup_early+0xfc/0x110 [i915]
      <4> [229.953464] Call Trace:
      <4> [229.953489]  i915_driver_late_release+0x19/0x60 [i915]
      <4> [229.953514]  i915_driver_probe+0xb82/0x18a0 [i915]
      <4> [229.953519]  ? __pm_runtime_resume+0x4f/0x80
      <4> [229.953545]  i915_pci_probe+0x43/0x1b0 [i915]
      ...
      <4> [229.962951] ------------[ cut here ]------------
      <4> [229.962956] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      <4> [229.962959] WARNING: CPU: 8 PID: 2395 at kernel/locking/mutex.c:912 __mutex_lock+0x750/0x9b0
      <4> [229.963091] Call Trace:
      <4> [229.963129]  ? i915_vma_destroy+0x86/0x350 [i915]
      <4> [229.963166]  ? i915_vma_destroy+0x86/0x350 [i915]
      <4> [229.963201]  i915_vma_destroy+0x86/0x350 [i915]
      <4> [229.963236]  __i915_gem_free_objects+0xb8/0x510 [i915]
      <4> [229.963270]  __i915_gem_free_work+0x5a/0x90 [i915]
      <4> [229.963275]  process_one_work+0x245/0x610
      
      as since commit 6f76098f ("drm/i915/uc: Move uC early functions
      inside the GT ones") we cleanup uc after gem.
      
      Move captured GuC load error log to uc struct and release it
      in intel_uc_fini() instead of intel_uc_driver_late_release()
      
      Note that intel_uc_driver_late_release() is now empty, but
      we can leave it as a placeholder for future code.
      Signed-off-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802184055.31988-5-michal.wajdeczko@intel.com
      32ff76e8
  6. 02 8月, 2019 1 次提交
  7. 25 7月, 2019 1 次提交
  8. 23 7月, 2019 1 次提交
  9. 16 7月, 2019 1 次提交
  10. 14 7月, 2019 2 次提交
  11. 13 7月, 2019 1 次提交
  12. 12 7月, 2019 1 次提交
    • I
      drm/i915/tgl: Add power well support · 656409bb
      Imre Deak 提交于
      The patch adds the new power wells introduced by TGL (GEN 12) and
      maps these to existing/new power domains. The changes for GEN 12 wrt
      to GEN 11 are the following:
      
      - Transcoder#EDP removed from power well#1 (Transcoder#A used in
        low-power mode instead)
      - Transcoder#A is now backed by power well#1 instead of power well#3
      - The DDI#B/C combo PHY ports are now backed by power well#1 instead of
        power well#3
      - New power well#5 added for pipe#D functionality (TODO)
      - 2 additional TC ports (TC#5-6) backed by power well#3, 2 port
        specific IO power wells (only for the non-TBT modes) and 4 port
        specific AUX power wells (2-2 for TBT vs. non-TBT modes)
      - Power well#2 backs now VDSC/joining for pipe#A instead of VDSC for
        eDP and MIPI DSI (TODO)
      
      On TGL Port DDI#C changed to be a combo PHY (native DP/HDMI) and
      BSpec has renamed ports DDI#D-F to TC#4-6 respectively. Thus on ICL we
      have the following naming for ports:
      
      - Combo PHYs (native DP/HDMI):
        DDI#A-B
      - TBT/non-TBT (TC altmode, native DP/HDMI) PHYs:
        DDI#C-F
      
      Starting from GEN 12 we have the following naming for ports:
      - Combo PHYs (native DP/HDMI):
        DDI#A-C
      - TBT/non-TBT (TC altmode, native DP/HDMI) PHYs:
        DDI TC#1-6
      
      To save some space in the power domain enum the power domain naming in
      the driver reflects the above change, that is power domains TC#1-3 are
      added as aliases for DDI#D-F and new power domains are reserved for
      TC#4-6.
      
      v2 (Lucas):
        - Separate out the bits and definitions for TGL from the ICL ones.
          Fix use of TRANSCODER_EDP_VDSC, that is now the correct define since
          we don't define TRANSCODER_A_VDSC power domain to spare a one bit in
          the bitmask (suggested by Ville)
      v3 (Lucas):
        - Fix missing squashes on v2
        - Rebase on renamed TRANSCODER_EDP_VDSC
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190711173115.28296-9-lucas.demarchi@intel.com
      656409bb
  13. 11 7月, 2019 2 次提交
  14. 05 7月, 2019 2 次提交
  15. 03 7月, 2019 1 次提交
  16. 22 6月, 2019 1 次提交
    • C
      drm/i915: Throw away the active object retirement complexity · a93615f9
      Chris Wilson 提交于
      Remove the accumulated optimisations that we have for i915_vma_retire
      and reduce it to the bare essential of tracking the active object
      reference. This allows us to only use atomic operations, and so will be
      able to avoid the struct_mutex requirement.
      
      The principal loss here is the shrinker MRU bumping, so now if we have
      to shrink, we will do so in much more random order and more likely to
      try and shrink recently used objects. That is a nuisance, but shrinking
      active objects is a second step we try to avoid and will always be a
      system-wide performance issue.
      
      The other loss is here is in the automatic pruning of the
      reservation_object when idling. This is not as large an issue as upon
      reservation_object introduction as now adding new fences into the object
      replaces already signaled fences, keeping the array compact. But we do
      lose the auto-expiration of stale fences and unused arrays. That may be
      a noticeable problem for which we need to re-implement autopruning.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190621183801.23252-3-chris@chris-wilson.co.uk
      a93615f9
  17. 17 6月, 2019 3 次提交
  18. 14 6月, 2019 3 次提交
  19. 13 6月, 2019 1 次提交
  20. 12 6月, 2019 2 次提交
  21. 11 6月, 2019 2 次提交
  22. 01 6月, 2019 1 次提交
    • C
      drm/i915: Report all objects with allocated pages to the shrinker · d82b4b26
      Chris Wilson 提交于
      Currently, we try to report to the shrinker the precise number of
      objects (pages) that are available to be reaped at this moment. This
      requires searching all objects with allocated pages to see if they
      fulfill the search criteria, and this count is performed quite
      frequently. (The shrinker tries to free ~128 pages on each invocation,
      before which we count all the objects; counting takes longer than
      unbinding the objects!) If we take the pragmatic view that with
      sufficient desire, all objects are eventually reapable (they become
      inactive, or no longer used as framebuffer etc), we can simply return
      the count of pinned pages maintained during get_pages/put_pages rather
      than walk the lists every time.
      
      The downside is that we may (slightly) over-report the number of
      objects/pages we could shrink and so penalize ourselves by shrinking
      more than required. This is mitigated by keeping the order in which we
      shrink objects such that we avoid penalizing active and frequently used
      objects, and if memory is so tight that we need to free them we would
      need to anyway.
      
      v2: Only expose shrinkable objects to the shrinker; a small reduction in
      not considering stolen and foreign objects.
      v3: Restore the tracking from a "backup" copy from before the gem/ split
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190530203500.26272-2-chris@chris-wilson.co.uk
      d82b4b26
  23. 29 5月, 2019 4 次提交
    • J
      Revert "drm/i915: Expand subslice mask" · a10f361d
      Jani Nikula 提交于
      This reverts commit 1ac159e2 ("drm/i915: Expand subslice mask"),
      which kills ICL due to GEM_BUG_ON() sanity checks before CI even gets a
      chance to do anything.
      
      The commit exposes an issue in commit 1e40d4ae ("drm/i915/cnl:
      Implement WaProgramMgsrForCorrectSliceSpecificMmioReads"), which will
      also need to be addressed.
      
      There's a proposed fix [1], but considering the seeming uncertainty with
      the fix as well as the size of the regressing commit (in this context,
      the one that actually brings down ICL), this warrants a revert to get
      ICL working, and gives us time to get all of this right without
      rushing. Even if this means shooting the messenger.
      
      <3>[    9.426327] intel_sseu_get_subslices:46 GEM_BUG_ON(slice >= sseu->max_slices)
      <4>[    9.426355] ------------[ cut here ]------------
      <2>[    9.426357] kernel BUG at drivers/gpu/drm/i915/gt/intel_sseu.c:46!
      <4>[    9.426371] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
      <4>[    9.426377] CPU: 1 PID: 364 Comm: systemd-udevd Not tainted 5.2.0-rc2-CI-CI_DRM_6159+ #1
      <4>[    9.426385] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019
      <4>[    9.426444] RIP: 0010:intel_sseu_get_subslices+0x8a/0xe0 [i915]
      <4>[    9.426452] Code: d5 76 b7 e0 48 8b 35 9d 24 21 00 49 c7 c0 07 f0 72 a0 b9 2e 00 00 00 48 c7 c2 00 8e 6d a0 48 c7 c7 a5 14 5b a0 e8 36 3c be e0 <0f> 0b 48 c7 c1 80 d5 6f a0 ba 30 00 00 00 48 c7 c6 00 8e 6d a0 48
      <4>[    9.426468] RSP: 0018:ffffc9000037b9c8 EFLAGS: 00010282
      <4>[    9.426475] RAX: 000000000000000f RBX: 0000000000000000 RCX: 0000000000000000
      <4>[    9.426482] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88849e346f98
      <4>[    9.426490] RBP: ffff88848a200000 R08: 0000000000000004 R09: ffff88849d50b000
      <4>[    9.426497] R10: 0000000000000000 R11: ffff88849e346f98 R12: ffff88848a209e78
      <4>[    9.426505] R13: 0000000003000000 R14: ffff88848a20b1a8 R15: 0000000000000000
      <4>[    9.426513] FS:  00007f73d5ae8680(0000) GS:ffff88849fc80000(0000) knlGS:0000000000000000
      <4>[    9.426521] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4>[    9.426527] CR2: 0000561417b01260 CR3: 0000000494764003 CR4: 0000000000760ee0
      <4>[    9.426535] PKRU: 55555554
      <4>[    9.426538] Call Trace:
      <4>[    9.426585]  wa_init_mcr+0xd5/0x110 [i915]
      <4>[    9.426597]  ? lock_acquire+0xa6/0x1c0
      <4>[    9.426645]  icl_gt_workarounds_init+0x21/0x1a0 [i915]
      <4>[    9.426694]  ? i915_driver_load+0xfcf/0x18a0 [i915]
      <4>[    9.426739]  gt_init_workarounds+0x14c/0x230 [i915]
      <4>[    9.426748]  ? _raw_spin_unlock_irq+0x24/0x50
      <4>[    9.426789]  intel_gt_init_workarounds+0x1b/0x30 [i915]
      <4>[    9.426835]  i915_driver_load+0xfd7/0x18a0 [i915]
      <4>[    9.426843]  ? lock_acquire+0xa6/0x1c0
      <4>[    9.426850]  ? __pm_runtime_resume+0x4f/0x80
      <4>[    9.426857]  ? _raw_spin_unlock_irqrestore+0x4c/0x60
      <4>[    9.426863]  ? _raw_spin_unlock_irqrestore+0x4c/0x60
      <4>[    9.426870]  ? lockdep_hardirqs_on+0xe3/0x1b0
      <4>[    9.426915]  i915_pci_probe+0x29/0xa0 [i915]
      <4>[    9.426923]  pci_device_probe+0x9e/0x120
      <4>[    9.426930]  really_probe+0xea/0x3c0
      <4>[    9.426936]  driver_probe_device+0x10b/0x120
      <4>[    9.426942]  device_driver_attach+0x4a/0x50
      <4>[    9.426948]  __driver_attach+0x97/0x130
      <4>[    9.426954]  ? device_driver_attach+0x50/0x50
      <4>[    9.426960]  bus_for_each_dev+0x74/0xc0
      <4>[    9.426966]  bus_add_driver+0x13f/0x210
      <4>[    9.426971]  ? 0xffffffffa083b000
      <4>[    9.426976]  driver_register+0x56/0xe0
      <4>[    9.426982]  ? 0xffffffffa083b000
      <4>[    9.426987]  do_one_initcall+0x58/0x300
      <4>[    9.426994]  ? do_init_module+0x1d/0x1f6
      <4>[    9.427001]  ? rcu_read_lock_sched_held+0x6f/0x80
      <4>[    9.427007]  ? kmem_cache_alloc_trace+0x261/0x290
      <4>[    9.427014]  do_init_module+0x56/0x1f6
      <4>[    9.427020]  load_module+0x24d1/0x2990
      <4>[    9.427032]  ? __se_sys_finit_module+0xd3/0xf0
      <4>[    9.427037]  __se_sys_finit_module+0xd3/0xf0
      <4>[    9.427047]  do_syscall_64+0x55/0x1c0
      <4>[    9.427053]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[    9.427059] RIP: 0033:0x7f73d5609839
      <4>[    9.427064] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
      <4>[    9.427082] RSP: 002b:00007ffdf34477b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      <4>[    9.427091] RAX: ffffffffffffffda RBX: 00005559fd5d7b40 RCX: 00007f73d5609839
      <4>[    9.427099] RDX: 0000000000000000 RSI: 00007f73d52e8145 RDI: 000000000000000f
      <4>[    9.427106] RBP: 00007f73d52e8145 R08: 0000000000000000 R09: 00007ffdf34478d0
      <4>[    9.427114] R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000000
      <4>[    9.427121] R13: 00005559fd5c90f0 R14: 0000000000020000 R15: 00005559fd5d7b40
      <4>[    9.427131] Modules linked in: i915(+) mei_hdcp x86_pkg_temp_thermal coretemp snd_hda_intel crct10dif_pclmul crc32_pclmul snd_hda_codec snd_hwdep e1000e snd_hda_core ghash_clmulni_intel ptp snd_pcm cdc_ether usbnet mii pps_core mei_me mei prime_numbers btusb btrtl btbcm btintel bluetooth ecdh_generic ecc
      <4>[    9.427254] ---[ end trace af3eeb543bd66e66 ]---
      
      [1] http://patchwork.freedesktop.org/patch/msgid/20190528200655.11605-1-chris@chris-wilson.co.uk
      
      References: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6159/fi-icl-u2/pstore0-1517155098_Oops_1.log
      References: 1e40d4ae ("drm/i915/cnl: Implement WaProgramMgsrForCorrectSliceSpecificMmioReads")
      Fixes: 1ac159e2 ("drm/i915: Expand subslice mask")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Cc: Stuart Summers <stuart.summers@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Yunwei Zhang <yunwei.zhang@intel.com>
      Acked-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190529082150.31526-1-jani.nikula@intel.com
      a10f361d
    • S
      drm/i915: Expand subslice mask · 1ac159e2
      Stuart Summers 提交于
      Currently, the subslice_mask runtime parameter is stored as an
      array of subslices per slice. Expand the subslice mask array to
      better match what is presented to userspace through the
      I915_QUERY_TOPOLOGY_INFO ioctl. The index into this array is
      then calculated:
        slice * subslice stride + subslice index / 8
      
      v2: fix spacing in set_sseu_info args
          use set_sseu_info to initialize sseu data when building
          device status in debugfs
          rename variables in intel_engine_types.h to avoid checkpatch
          warnings
      v3: update headers in intel_sseu.h
      v4: add const to some sseu_dev_info variables
          use sseu->eu_stride for EU stride calculations
      v5: address review comments from Tvrtko and Daniele
      v6: remove extra space in intel_sseu_get_subslices
          return the correct subslice enable in for_each_instdone
          add GEM_BUG_ON to ensure user doesn't pass invalid ss_mask size
          use printk formatted string for subslice mask
      v7: remove string.h header and rebase
      
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Acked-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: NDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: NStuart Summers <stuart.summers@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-6-stuart.summers@intel.com
      1ac159e2
    • S
      drm/i915: Refactor sseu helper functions · 0040fd19
      Stuart Summers 提交于
      Move functions to intel_sseu.h and remove inline qualifier.
      Additionally, ensure these are all prefixed with intel_sseu_*
      to match the convention of other functions in i915.
      
      v2: fix spacing from checkpatch warning
      v3: squash helper function changes into a single patch
          break 80 character line to fix checkpatch warning
          move get/set_eus helpers to intel_device_info.c
      v4: Remove intel_ prefix from static functions in
          intel_device_info.c and correctly copy changes
          to stride calculation in those functions.
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Reviewed-by: NDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: NStuart Summers <stuart.summers@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-5-stuart.summers@intel.com
      0040fd19
    • S
      drm/i915: Move calculation of subslices per slice to new function · b5ab1abe
      Stuart Summers 提交于
      Add a new function to return the number of subslices per slice to
      consolidate code usage.
      
      v2: rebase on changes to move sseu struct to intel_sseu.h
      v3: add intel_* prefix to sseu_subslices_per_slice
      
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Reviewed-by: NDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: NStuart Summers <stuart.summers@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-4-stuart.summers@intel.com
      b5ab1abe
  24. 28 5月, 2019 2 次提交
  25. 20 5月, 2019 1 次提交