summaryrefslogtreecommitdiff
path: root/compote.h
diff options
context:
space:
mode:
Diffstat (limited to 'compote.h')
-rw-r--r--compote.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/compote.h b/compote.h
index 4c5bb18..b7811fb 100644
--- a/compote.h
+++ b/compote.h
@@ -35,4 +35,13 @@ int compote_context_ioctl(compote_context_t *ctx, int command, void *arg);
int compote_mo_new(compote_context_t *ctx, compote_mo_t **mop, uint64_t nbytes);
void compote_mo_del(compote_context_t *ctx, compote_mo_t **mop);
+static inline uint64_t compote_mo_gpu_addr(compote_mo_t *mo)
+{
+ if (mo == NULL || mo->ptr == NULL) {
+ return -1UL;
+ }
+
+ return (unsigned long)mo->ptr;
+}
+
#endif // COMPOTE_H