1 | /*
|
---|
2 | * Copyright (C) 2017-2019 Oracle Corporation
|
---|
3 | * This file is based on qxl_prime.c
|
---|
4 | * Copyright 2017 Canonical
|
---|
5 | *
|
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
7 | * copy of this software and associated documentation files (the "Software"),
|
---|
8 | * to deal in the Software without restriction, including without limitation
|
---|
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
10 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
11 | * Software is furnished to do so, subject to the following conditions:
|
---|
12 | *
|
---|
13 | * The above copyright notice and this permission notice shall be included in
|
---|
14 | * all copies or substantial portions of the Software.
|
---|
15 | *
|
---|
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
22 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
23 | *
|
---|
24 | * Authors: Andreas Pokorny
|
---|
25 | */
|
---|
26 |
|
---|
27 | #include "vbox_drv.h"
|
---|
28 |
|
---|
29 | /*
|
---|
30 | * Based on qxl_prime.c:
|
---|
31 | * Empty Implementations as there should not be any other driver for a virtual
|
---|
32 | * device that might share buffers with vboxvideo
|
---|
33 | */
|
---|
34 |
|
---|
35 | int vbox_gem_prime_pin(struct drm_gem_object *obj)
|
---|
36 | {
|
---|
37 | WARN_ONCE(1, "not implemented");
|
---|
38 | return -ENOSYS;
|
---|
39 | }
|
---|
40 |
|
---|
41 | void vbox_gem_prime_unpin(struct drm_gem_object *obj)
|
---|
42 | {
|
---|
43 | WARN_ONCE(1, "not implemented");
|
---|
44 | }
|
---|
45 |
|
---|
46 | struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
|
---|
47 | {
|
---|
48 | WARN_ONCE(1, "not implemented");
|
---|
49 | return ERR_PTR(-ENOSYS);
|
---|
50 | }
|
---|
51 |
|
---|
52 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
|
---|
53 | struct drm_gem_object *vbox_gem_prime_import_sg_table(
|
---|
54 | struct drm_device *dev, size_t size, struct sg_table *table)
|
---|
55 | #else
|
---|
56 | struct drm_gem_object *vbox_gem_prime_import_sg_table(
|
---|
57 | struct drm_device *dev, struct dma_buf_attachment *attach,
|
---|
58 | struct sg_table *table)
|
---|
59 | #endif
|
---|
60 | {
|
---|
61 | WARN_ONCE(1, "not implemented");
|
---|
62 | return ERR_PTR(-ENOSYS);
|
---|
63 | }
|
---|
64 |
|
---|
65 | void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
|
---|
66 | {
|
---|
67 | WARN_ONCE(1, "not implemented");
|
---|
68 | return ERR_PTR(-ENOSYS);
|
---|
69 | }
|
---|
70 |
|
---|
71 | void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
|
---|
72 | {
|
---|
73 | WARN_ONCE(1, "not implemented");
|
---|
74 | }
|
---|
75 |
|
---|
76 | int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *area)
|
---|
77 | {
|
---|
78 | WARN_ONCE(1, "not implemented");
|
---|
79 | return -ENOSYS;
|
---|
80 | }
|
---|