xref: /linux/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.h (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
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