diff options
Diffstat (limited to 'compote.h')
-rw-r--r-- | compote.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |