1. 26 Apr, 2024 5 commits
  2. 25 Apr, 2024 6 commits
  3. 24 Apr, 2024 21 commits
  4. 23 Apr, 2024 1 commit
  5. 22 Apr, 2024 3 commits
  6. 19 Apr, 2024 3 commits
    • Matt Roper's avatar
      drm/xe: Define all possible engines in media IP descriptors · 62422b7b
      Matt Roper authored
      Rather than trying to identify exactly which engines are available on
      each platform in the IP descriptor, just include the list of all media
      engines that the IP could theoretically support (i.e., 8 VCS + 4 VECS).
      We still rely on the media fuse registers to tell us which specific
      engine instances are actually present on a given platform, so there
      shouldn't be any functional change.  This will help prevent mistakes
      with engine numbering (for example ambiguity about whether the 2nd VCS
      engine on a platform with exactly two engines is numbered "VCS1" or
      "VCS2") and will also future-proof the code a bit more in case new SKUs
      or platform refreshes extend the engine list in the future.
      
      Note that the media fuse register technically has an 8-bit field for
      VECS engine presence starting on Xe2.  However there's still no MMIO
      register range reserved for VE engines above VECS3, so VE0-VE3 is still
      consider the "maximum" VE engine mask that the driver can support for
      now.
      
      Bspec: 52614, 52615, 62567
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240417152621.3357990-2-matthew.d.roper@intel.com
      62422b7b
    • Rodrigo Vivi's avatar
      drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref · 7af6b116
      Rodrigo Vivi authored
      In the past, the noresume function was used by the GEM code to ensure
      wakelocks were held and bump its usage. This is no longer the case
      and this function was totally unused until it started to be used again
      by display with commit 77e619a8 ("drm/i915/display: convert inner
      wakeref get towards get_if_in_use")
      
      However, on the display code, most of the callers are using the
      raw wakeref, rather then the wakelock version. What caused a
      major regression caught by CI.
      
      Another option to this patch is to go with the original plan and
      use the get_if_in_use variant in the display code, what is enough
      to fulfil our needs. Then, an extra patch to delete the unused
      _noresume variant.
      
      v2: Keep grabbing wakelock but only assert for wakeref. (Imre)
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Francois Dugast <francois.dugast@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: 77e619a8 ("drm/i915/display: convert inner wakeref get towards get_if_in_use")
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10875Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240418223756.68427-1-rodrigo.vivi@intel.com
      7af6b116
    • Ashutosh Dixit's avatar
      drm/i915/hwmon: Get rid of devm · 5bc9de06
      Ashutosh Dixit authored
      When both hwmon and hwmon drvdata (on which hwmon depends) are device
      managed resources, the expectation, on device unbind, is that hwmon will be
      released before drvdata. However, in i915 there are two separate code
      paths, which both release either drvdata or hwmon and either can be
      released before the other. These code paths (for device unbind) are as
      follows (see also the bug referenced below):
      
      Call Trace:
      release_nodes+0x11/0x70
      devres_release_group+0xb2/0x110
      component_unbind_all+0x8d/0xa0
      component_del+0xa5/0x140
      intel_pxp_tee_component_fini+0x29/0x40 [i915]
      intel_pxp_fini+0x33/0x80 [i915]
      i915_driver_remove+0x4c/0x120 [i915]
      i915_pci_remove+0x19/0x30 [i915]
      pci_device_remove+0x32/0xa0
      device_release_driver_internal+0x19c/0x200
      unbind_store+0x9c/0xb0
      
      and
      
      Call Trace:
      release_nodes+0x11/0x70
      devres_release_all+0x8a/0xc0
      device_unbind_cleanup+0x9/0x70
      device_release_driver_internal+0x1c1/0x200
      unbind_store+0x9c/0xb0
      
      This means that in i915, if use devm, we cannot gurantee that hwmon will
      always be released before drvdata. Which means that we have a uaf if hwmon
      sysfs is accessed when drvdata has been released but hwmon hasn't.
      
      The only way out of this seems to be do get rid of devm_ and release/free
      everything explicitly during device unbind.
      
      v2: Change commit message and other minor code changes
      v3: Cleanup from i915_hwmon_register on error (Armin Wolf)
      v4: Eliminate potential static analyzer warning (Rodrigo)
          Eliminate fetch_and_zero (Jani)
      v5: Restore previous logic for ddat_gt->hwmon_dev error return (Andi)
      
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240417145646.793223-1-ashutosh.dixit@intel.com
      5bc9de06
  7. 18 Apr, 2024 1 commit