Files
linux/drivers/gpu/drm/amd/amdgpu
Shashank Sharma b8f67b9ddf drm/amdgpu: change vm->task_info handling
This patch changes the handling and lifecycle of vm->task_info object.
The major changes are:
- vm->task_info is a dynamically allocated ptr now, and its uasge is
  reference counted.
- introducing two new helper funcs for task_info lifecycle management
    - amdgpu_vm_get_task_info: reference counts up task_info before
      returning this info
    - amdgpu_vm_put_task_info: reference counts down task_info
- last put to task_info() frees task_info from the vm.

This patch also does logistical changes required for existing usage
of vm->task_info.

V2: Do not block all the prints when task_info not found (Felix)

V3: Fixed review comments from Felix
   - Fix wrong indentation
   - No debug message for -ENOMEM
   - Add NULL check for task_info
   - Do not duplicate the debug messages (ti vs no ti)
   - Get first reference of task_info in vm_init(), put last
     in vm_fini()

V4: Fixed review comments from Felix
   - fix double reference increment in create_task_info
   - change amdgpu_vm_get_task_info_pasid
   - additional changes in amdgpu_gem.c while porting

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-03-04 15:59:08 -05:00
..
2024-02-12 16:12:00 -05:00
2024-02-27 10:46:59 -05:00
2023-12-14 15:26:21 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2023-02-03 15:37:31 -05:00
2024-02-22 10:27:03 -05:00
2022-05-04 09:53:12 -04:00
2023-08-07 16:35:38 -04:00
2022-05-04 10:43:54 -04:00
2024-02-12 16:12:00 -05:00
2024-02-12 16:12:00 -05:00
2024-02-12 16:12:00 -05:00
2022-05-10 17:53:11 -04:00
2023-03-15 18:45:26 -04:00
2023-03-15 18:45:26 -04:00
2023-08-30 15:00:27 -04:00
2021-10-20 11:43:57 -04:00
2022-03-22 10:53:39 -04:00
2024-02-16 15:42:15 -05:00
2023-12-14 15:26:21 -05:00
2023-08-31 16:34:05 -04:00