summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
index 0ce540203db1..3d77abfcd4a6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
@@ -65,4 +65,14 @@ int amdgpu_bo_list_create(struct amdgpu_device *adev,
unsigned num_entries,
struct amdgpu_bo_list **list);
+#define amdgpu_bo_list_for_each_entry(e, list) \
+ for (e = &(list)->array[0]; \
+ e != &(list)->array[(list)->num_entries]; \
+ ++e)
+
+#define amdgpu_bo_list_for_each_userptr_entry(e, list) \
+ for (e = &(list)->array[(list)->first_userptr]; \
+ e != &(list)->array[(list)->num_entries]; \
+ ++e)
+
#endif