Skip to content
Snippets Groups Projects
  1. Mar 21, 2025
  2. Feb 27, 2025
  3. Feb 17, 2025
  4. Feb 13, 2025
  5. Dec 18, 2024
  6. Dec 10, 2024
  7. Nov 20, 2024
  8. Nov 08, 2024
  9. Nov 04, 2024
  10. Oct 28, 2024
  11. Oct 22, 2024
  12. Sep 26, 2024
  13. Sep 18, 2024
  14. Sep 06, 2024
  15. Aug 29, 2024
  16. Aug 21, 2024
    • SRINIVASAN SHANMUGAM's avatar
      drm/amdgpu: Implement Enforce Isolation Handler for KGD/KFD serialization · afefd6f2
      SRINIVASAN SHANMUGAM authored
      
      This commit introduces the Enforce Isolation Handler designed to enforce
      shader isolation on AMD GPUs, which helps to prevent data leakage
      between different processes.
      
      The handler counts the number of emitted fences for each GFX and compute
      ring. If there are any fences, it schedules the `enforce_isolation_work`
      to be run after a delay of `GFX_SLICE_PERIOD`. If there are no fences,
      it signals the Kernel Fusion Driver (KFD) to resume the runqueue.
      
      The function is synchronized using the `enforce_isolation_mutex`.
      
      This commit also introduces a reference count mechanism
      (kfd_sch_req_count) to keep track of the number of requests to enable
      the KFD scheduler. When a request to enable the KFD scheduler is made,
      the reference count is decremented. When the reference count reaches
      zero, a delayed work is scheduled to enforce isolation after a delay of
      GFX_SLICE_PERIOD.
      
      When a request to disable the KFD scheduler is made, the function first
      checks if the reference count is zero. If it is, it cancels the delayed
      work for enforcing isolation and checks if the KFD scheduler is active.
      If the KFD scheduler is active, it sends a request to stop the KFD
      scheduler and sets the KFD scheduler state to inactive. Then, it
      increments the reference count.
      
      The function is synchronized using the kfd_sch_mutex to ensure that the
      KFD scheduler state and reference count are updated atomically.
      
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
      Suggested-by: default avatarChristian König <christian.koenig@amd.com>
      Suggested-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      afefd6f2
    • SRINIVASAN SHANMUGAM's avatar
      drm/amdgpu: Add enforce_isolation sysfs attribute · e189be9b
      SRINIVASAN SHANMUGAM authored
      
      This commit adds a new sysfs attribute 'enforce_isolation' to control
      the 'enforce_isolation' setting per GPU. The attribute can be read and
      written, and accepts values 0 (disabled) and 1 (enabled).
      
      When 'enforce_isolation' is enabled, reserved VMIDs are allocated for
      each ring. When it's disabled, the reserved VMIDs are freed.
      
      The set function locks a mutex before changing the 'enforce_isolation'
      flag and the VMIDs, and unlocks it afterwards. This ensures that these
      operations are atomic and prevents race conditions and other concurrency
      issues.
      
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
      Suggested-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e189be9b
  17. Aug 16, 2024
    • SRINIVASAN SHANMUGAM's avatar
      drm/amdgpu: Make enforce_isolation setting per GPU · 96595204
      SRINIVASAN SHANMUGAM authored
      
      This commit makes enforce_isolation setting to be per GPU and per
      partition by adding the enforce_isolation array to the adev structure.
      The adev variable is set based on the global enforce_isolation module
      parameter during device initialization.
      
      In amdgpu_ids.c, the adev->enforce_isolation value for the current GPU
      is used to determine whether to enforce isolation between graphics and
      compute processes on that GPU.
      
      In amdgpu_ids.c, the adev->enforce_isolation value for the current GPU
      and partition is used to determine whether to enforce isolation between
      graphics and compute processes on that GPU and partition.
      
      This allows the enforce_isolation setting to be controlled individually
      for each GPU and each partition, which is useful in a system with
      multiple GPUs and partitions where different isolation settings might be
      desired for different GPUs and partitions.
      
      v2: fix loop in amdgpu_vmid_mgr_init() (Alex)
      
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Suggested-by: default avatarChristian König <christian.koenig@amd.com>
      96595204
    • Zhang Zekun's avatar
      drm/amd: Remove unused declarations · 20588d5a
      Zhang Zekun authored
      
      amdgpu_gart_table_vram_pin() and amdgpu_gart_table_vram_unpin() has
      been removed since commit 575e55ee ("drm/amdgpu: recover gart table
      at resume") remain the declarations untouched in the header files.
      
      Besides, amdgpu_dm_display_resume() has also beed removed since
      commit a80aa93d ("drm/amd/display: Unify dm resume sequence into a
      single call"). So, let's remove this unused declarations.
      
      Signed-off-by: default avatarZhang Zekun <zhangzekun11@huawei.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      20588d5a
  18. Aug 13, 2024
  19. Aug 06, 2024
  20. Jun 27, 2024
  21. Jun 19, 2024
  22. Jun 14, 2024
  23. May 20, 2024
  24. May 17, 2024
Loading