2 * SPDX-License-Identifier: MIT
4 * Copyright © 2019 Intel Corporation
7 #include <drm/drm_file.h>
12 unsigned long igt_mmap_node(struct drm_i915_private
*i915
,
13 struct drm_vma_offset_node
*node
,
21 /* Pretend to open("/dev/dri/card0") */
22 file
= mock_drm_getfile(i915
->drm
.primary
, O_RDWR
);
26 err
= drm_vma_node_allow(node
, file
->private_data
);
32 addr
= vm_mmap(file
, addr
, drm_vma_node_size(node
) << PAGE_SHIFT
,
33 prot
, flags
, drm_vma_node_offset_addr(node
));
35 drm_vma_node_revoke(node
, file
->private_data
);