xref: /linux/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright © 2016 Intel Corporation
5  */
6 
7 #ifndef __MOCK_DMABUF_H__
8 #define __MOCK_DMABUF_H__
9 
10 #include <linux/dma-buf.h>
11 
12 struct mock_dmabuf {
13 	int npages;
14 	struct page *pages[];
15 };
16 
17 static inline struct mock_dmabuf *to_mock(struct dma_buf *buf)
18 {
19 	return buf->priv;
20 }
21 
22 #endif /* !__MOCK_DMABUF_H__ */
23