From: Matthew Brost <matthew.brost@intel.com>
To: <intel-xe@lists.freedesktop.org>
Subject: [Intel-xe] [PATCH 2/3] drm/gpuva: Add drm_gpuva_for_each_op_reverse
Date: Wed, 16 Aug 2023 21:31:47 -0700 [thread overview]
Message-ID: <20230817043148.740495-3-matthew.brost@intel.com> (raw)
In-Reply-To: <20230817043148.740495-1-matthew.brost@intel.com>
Xe will make use of this, add helper to walk op list in reverse.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
include/drm/drm_gpuva_mgr.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/drm/drm_gpuva_mgr.h b/include/drm/drm_gpuva_mgr.h
index c6678b1dc5d2..455eef90db21 100644
--- a/include/drm/drm_gpuva_mgr.h
+++ b/include/drm/drm_gpuva_mgr.h
@@ -616,6 +616,16 @@ struct drm_gpuva_ops {
#define drm_gpuva_for_each_op_from_reverse(op, ops) \
list_for_each_entry_from_reverse(op, &(ops)->list, entry)
+/**
+ * drm_gpuva_for_each_op_reverse - iterator to walk over &drm_gpuva_ops in reverse
+ * @op: &drm_gpuva_op to assign in each iteration step
+ * @ops: &drm_gpuva_ops to walk
+ *
+ * This iterator walks over all ops within a given list of operations in reverse
+ */
+#define drm_gpuva_for_each_op_reverse(op, ops) \
+ list_for_each_entry_reverse(op, &(ops)->list, entry)
+
/**
* drm_gpuva_first_op - returns the first &drm_gpuva_op from &drm_gpuva_ops
* @ops: the &drm_gpuva_ops to get the fist &drm_gpuva_op from
--
2.34.1
next prev parent reply other threads:[~2023-08-17 4:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 4:31 [Intel-xe] [PATCH 0/3] Fix array of binds Matthew Brost
2023-08-17 4:31 ` [Intel-xe] [PATCH 1/3] drm/xe: Fixup unwind on VM ops errors Matthew Brost
2023-08-22 23:33 ` Rodrigo Vivi
2023-08-17 4:31 ` Matthew Brost [this message]
2023-08-22 23:34 ` [Intel-xe] [PATCH 2/3] drm/gpuva: Add drm_gpuva_for_each_op_reverse Rodrigo Vivi
2023-08-17 4:31 ` [Intel-xe] [PATCH 3/3] drm/xe: Fix array of binds Matthew Brost
2023-08-22 23:38 ` Rodrigo Vivi
2023-08-31 14:43 ` Matthew Brost
2023-08-23 12:51 ` Thomas Hellström
2023-08-24 10:38 ` Thomas Hellström
2023-08-24 14:16 ` Matthew Brost
2023-08-17 4:34 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-08-17 4:34 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-17 4:35 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-17 4:39 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-17 4:40 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-17 4:40 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-17 5:17 ` [Intel-xe] ✓ CI.BAT: success " Patchwork
2023-08-18 4:08 ` [Intel-xe] [PATCH 0/3] " Zanoni, Paulo R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230817043148.740495-3-matthew.brost@intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox