Skip to content
Snippets Groups Projects
  1. Mar 19, 2025
  2. Mar 18, 2025
  3. Mar 14, 2025
  4. Feb 06, 2025
  5. Jan 13, 2025
  6. Nov 12, 2024
    • Shashank Sharma's avatar
      drm/amdgpu: bypass SRIOV check for shadow size info · c6d2ba90
      Shashank Sharma authored
      
      Currently, the shadow FW space size and alignment information is
      protected under a flag (adev->gfx.cp_gfx_shadow) which gets set
      only in case of SRIOV setups.
      if (amdgpu_sriov_vf(adev))
          adev->gfx.cp_gfx_shadow = true;
      
      But we need this information for GFX Userqueues, so that user can
      create these objects while creating userqueue. This patch series
      creates a method to get this information bypassing the dependency
      on this check.
      
      This patch:
      - adds a new input parameter flag to the gfx.funcs->get_gfx_shadow_info
      fptr definition, so that it can accommodate the information without the
      check (adev->gfx.cp_gfx_shadow) on request.
      - updates the existing definition of amdgpu_gfx_get_gfx_shadow_info to
      adjust with this new flag.
      
      Next patch in the series is adding a UAPI which will consume this info.
      
      V2: split this patch from the new UAPI patch
      
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian Koenig <christian.koenig@amd.com>
      Cc: Arvind Yadav <arvind.yadav@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarShashank Sharma <shashank.sharma@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      c6d2ba90
  7. Nov 08, 2024
  8. Nov 04, 2024
  9. Sep 26, 2024
  10. Aug 28, 2024
  11. Aug 23, 2024
  12. 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
  13. Aug 16, 2024
  14. Jul 23, 2024
  15. Jul 10, 2024
  16. Jun 05, 2024
  17. May 23, 2024
  18. May 13, 2024
  19. May 03, 2024
  20. Apr 26, 2024
  21. Mar 20, 2024
  22. Feb 22, 2024
  23. Nov 09, 2023
  24. Oct 05, 2023
  25. Sep 11, 2023
  26. Aug 31, 2023
  27. Aug 30, 2023
  28. Jun 30, 2023
  29. Jun 09, 2023
Loading