VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/drm/vbox_prime.c@ 66189

Last change on this file since 66189 was 66189, checked in by vboxsync, 8 years ago

bugref:4567: Linux kernel driver maintenance: [vboxvideo] Add support for PRIME. Contributed by Andreas Pokorny/Canonical.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/*
2 * Copyright (C) 2017 Oracle Corporation
3 *
4 * This file is part of VirtualBox Open Source Edition (OSE), as
5 * available from http://www.virtualbox.org. This file is free software;
6 * you can redistribute it and/or modify it under the terms of the GNU
7 * General Public License (GPL) as published by the Free Software
8 * Foundation, in version 2 as it comes in the "COPYING" file of the
9 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
10 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
11 * --------------------------------------------------------------------
12
13 * Copyright 2017 Canonical
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining a
16 * copy of this software and associated documentation files (the "Software"),
17 * to deal in the Software without restriction, including without limitation
18 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 * and/or sell copies of the Software, and to permit persons to whom the
20 * Software is furnished to do so, subject to the following conditions:
21 *
22 * The above copyright notice and this permission notice shall be included in
23 * all copies or substantial portions of the Software.
24 *
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
29 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
30 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
31 * OTHER DEALINGS IN THE SOFTWARE.
32 *
33 * Authors: Andreas Pokorny
34 */
35
36#include "vbox_drv.h"
37
38/* Based on qxl_prime.c:
39 * Empty Implementations as there should not be any other driver for a virtual
40 * device that might share buffers with vboxvideo */
41
42int vbox_gem_prime_pin(struct drm_gem_object *obj)
43{
44 WARN_ONCE(1, "not implemented");
45 return -ENOSYS;
46}
47
48void vbox_gem_prime_unpin(struct drm_gem_object *obj)
49{
50 WARN_ONCE(1, "not implemented");
51}
52
53
54struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
55{
56 WARN_ONCE(1, "not implemented");
57 return ERR_PTR(-ENOSYS);
58}
59
60struct drm_gem_object *vbox_gem_prime_import_sg_table(
61 struct drm_device *dev,
62#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
63 size_t size,
64#else
65 struct dma_buf_attachment *attach,
66#endif
67 struct sg_table *table)
68{
69 WARN_ONCE(1, "not implemented");
70 return ERR_PTR(-ENOSYS);
71}
72
73void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
74{
75 WARN_ONCE(1, "not implemented");
76 return ERR_PTR(-ENOSYS);
77}
78
79void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
80{
81 WARN_ONCE(1, "not implemented");
82}
83
84int vbox_gem_prime_mmap(struct drm_gem_object *obj,
85 struct vm_area_struct *area)
86{
87 WARN_ONCE(1, "not implemented");
88 return -ENOSYS;
89}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette