1. 08 2月, 2020 1 次提交
  2. 01 2月, 2020 1 次提交
  3. 18 12月, 2019 2 次提交
  4. 10 12月, 2019 3 次提交
  5. 01 11月, 2019 1 次提交
  6. 17 8月, 2019 1 次提交
  7. 12 8月, 2019 1 次提交
  8. 03 8月, 2019 1 次提交
    • 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
  9. 02 8月, 2019 2 次提交
  10. 25 7月, 2019 1 次提交
  11. 24 7月, 2019 1 次提交
  12. 14 7月, 2019 3 次提交
  13. 11 7月, 2019 1 次提交
  14. 01 7月, 2019 1 次提交
  15. 22 6月, 2019 1 次提交
  16. 11 6月, 2019 2 次提交
  17. 09 6月, 2019 1 次提交
  18. 28 5月, 2019 1 次提交
  19. 24 5月, 2019 1 次提交
  20. 20 4月, 2019 1 次提交
  21. 24 3月, 2019 1 次提交
  22. 08 3月, 2019 1 次提交
  23. 17 1月, 2019 1 次提交
  24. 04 10月, 2018 1 次提交
  25. 27 7月, 2018 1 次提交
    • J
      drm/i915/guc: Move the pin bias value from GuC to GGTT · dd18cedf
      Jakub Bartmiński 提交于
      Removing the pin bias from GuC allows us to not check for GuC every time
      we pin a context, which fixes the assertion error on unresolved GuC
      platform default in mock contexts selftest.
      
      It also seems that we were using uninitialized WOPCM variables when
      setting the GuC pin bias. The pin bias has to be set after the WOPCM,
      but before the call to i915_gem_contexts_init where the first contexts
      are pinned.
      
      v2:
      This also makes it so that there's no need to set GuC variables from
      within the WOPCM init function or to move the WOPCM init, while keeping
      the correct initialization order. Also for mock tests the pin bias is
      left at 0 and we make sure that the pin bias with GuC will not be
      smaller than without GuC.
      
      v3:
      Avoid unused i915 in intel_guc_ggtt_offset if debug is disabled.
      
      v4:
      Squash with WOPCM init reordering.
      Moved the i915_ggtt_pin_bias helper to this patch, and made some
      functions use it instead of directly dereferencing i915->ggtt.
      
      v5:
      Since we now don't use wopcm.guc.base for the pin bias there's no need to
      validate it. It also has already been verified in WOPCM init.
      
      v6:
      Deleted the now unnecessarily introduced includes from previous versions.
      Dropped naming changes from dev_priv to i915 for better patch readability.
      
      v7:
      Changed some comments to make more sense in the context they're in.
      
      v8:
      Moved and renamed the function which now returns the wopcm.guc.size to
      intel_guc.c:intel_guc_reserved_gtt_size to avoid any possible confusion
      with the pin_bias in ggtt, which should be used for pinning.
      Fixed patch not applying or the most recent upstream.
      
      Fixes: f7dc0157 ("drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init")
      Testcase: igt/drv_selftest/mock_contexts #GuC
      Signed-off-by: NJakub Bartmiński <jakub.bartminski@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      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/20180727141148.30874-3-jakub.bartminski@intel.com
      dd18cedf
  26. 29 6月, 2018 1 次提交
  27. 29 3月, 2018 3 次提交
  28. 21 3月, 2018 1 次提交
  29. 19 3月, 2018 1 次提交
  30. 14 3月, 2018 2 次提交
    • J
      drm/i915: Implement dynamic GuC WOPCM offset and size calculation · 6b0478fb
      Jackie Li 提交于
      Hardware may have specific restrictions on GuC WOPCM offset and size. On
      Gen9, the value of the GuC WOPCM size register needs to be larger than the
      value of GuC WOPCM offset register + a Gen9 specific offset (144KB) for
      reserved GuC WOPCM. Fail to enforce such a restriction on GuC WOPCM size
      will lead to GuC firmware execution failures. On the other hand, with
      current static GuC WOPCM offset and size values (512KB for both offset and
      size), the GuC WOPCM size verification will fail on Gen9 even if it can be
      fixed by lowering the GuC WOPCM offset by calculating its value based on
      HuC firmware size (which is likely less than 200KB on Gen9), so that we can
      have a GuC WOPCM size value which is large enough to pass the GuC WOPCM
      size check.
      
      This patch updates the reserved GuC WOPCM size for RC6 context on Gen9 to
      24KB to strictly align with the Gen9 GuC WOPCM layout. It also adds support
      to verify the GuC WOPCM size aganist the Gen9 hardware restrictions. To
      meet all above requirements, let's provide dynamic partitioning of the
      WOPCM that will be based on platform specific HuC/GuC firmware sizes.
      
      v2:
       - Removed intel_wopcm_init (Ville/Sagar/Joonas)
       - Renamed and Moved the intel_wopcm_partition into intel_guc (Sagar)
       - Removed unnecessary function calls (Joonas)
       - Init GuC WOPCM partition as soon as firmware fetching is completed
      
      v3:
       - Fixed indentation issues (Chris)
       - Removed layering violation code (Chris/Michal)
       - Created separat files for GuC wopcm code  (Michal)
       - Used inline function to avoid code duplication (Michal)
      
      v4:
       - Preset the GuC WOPCM top during early GuC init (Chris)
       - Fail intel_uc_init_hw() as soon as GuC WOPCM partitioning failed
      
      v5:
       - Moved GuC DMA WOPCM register updating code into intel_wopcm.c
       - Took care of the locking status before writing to GuC DMA
         Write-Once registers. (Joonas)
      
      v6:
       - Made sure the GuC WOPCM size to be multiple of 4K (4K aligned)
      
      v8:
       - Updated comments and fixed naming issues (Sagar/Joonas)
       - Updated commit message to include more description about the hardware
         restriction on GuC WOPCM size (Sagar)
      
      v9:
       - Minor changes variable names and code comments (Sagar)
       - Added detailed GuC WOPCM layout drawing (Sagar/Michal)
       - Refined macro definitions to be reader friendly (Michal)
       - Removed redundent check to valid flag (Michal)
       - Unified first parameter for exported GuC WOPCM functions (Michal)
       - Refined the name and parameter list of hardware restriction checking
         functions (Michal)
      
      v10:
       - Used shorter function name for internal functions (Joonas)
       - Moved init-ealry function into c file (Joonas)
       - Consolidated and removed redundant size checks (Joonas/Michal)
       - Removed unnecessary unlikely() from code which is only called once
         during boot (Joonas)
       - More fixes to kernel-doc format and content (Michal)
       - Avoided the use of PAGE_MASK for 4K pages (Michal)
       - Added error log messages to error paths (Michal)
      
      v11:
       - Replaced intel_guc_wopcm with more generic intel_wopcm and attached
         intel_wopcm to drm_i915_private instead intel_guc (Michal)
       - dynamic calculation of GuC non-wopcm memory start (a.k.a WOPCM Top
         offset from GuC WOPCM base) (Michal)
       - Moved WOPCM marco definitions into .c source file (Michal)
       - Exported WOPCM layout diagram as kernel-doc (Michal)
      
      v12:
       - Updated naming, function kernel-doc to align with new changes (Michal)
      
      v13:
       - Updated the ordering of s-o-b/cc/r-b tags (Sagar)
       - Corrected one tense error in comment (Sagar)
       - Corrected typos and removed spurious comments (Joonas)
      
      Bspec: 12690
      Signed-off-by: NJackie Li <yaodong.li@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
      Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: John Spotswood <john.a.spotswood@intel.com>
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com> (v8)
      Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v9)
      Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> (v11)
      Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v12)
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1520987574-19351-2-git-send-email-yaodong.li@intel.com
      6b0478fb
    • J
      drm/i915/guc: Rename guc_ggtt_offset to intel_guc_ggtt_offset · 3c009e3c
      Jackie Li 提交于
      GuC related exported functions should start with "intel_guc_" prefix and
      pass intel_guc as the first parameter since its GuC related. Current
      guc_ggtt_offset() failed to follow this code convention and this is a
      problem for future patches that needs to access intel_guc data to verify
      the GGTT offset against the GuC WOPCM top.
      
      This patch renames the guc_ggtt_offset to intel_guc_ggtt_offset and updates
      the related code to pass intel_guc pointer to this function call, so that
      we can have a unified coding style for GuC code and also enable the future
      patches to get GuC related data from intel_guc to do the offset
      verification. Meanwhile, this patch also moves the GUC_GGTT_TOP from
      intel_guc_regs.h to intel_guc.h since it is not GuC register related
      definition.
      
      v8:
       - Fixed coding style issues and moved GUC_GGTT_TOP to intel_guc.h (Sagar)
       - Updated commit message to explain to reason and motivation to add
         intel_guc as the first parameter of intel_guc_ggtt_offset (Chris)
      
      v9:
       - Fixed code alignment issue due to line break (Chris)
      
      v10:
       - Removed unnecessary comments, redundant code and avoided reuse variable
         to avoid potential issues (Joonas)
      
      v13:
       - Updated the ordering of s-o-b/cc/r-b tags (Sagar)
      Signed-off-by: NJackie Li <yaodong.li@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com> (v8)
      Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v9)
      Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> (v11)
      Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v12)
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1520987574-19351-1-git-send-email-yaodong.li@intel.com
      3c009e3c