VirtualBox

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

Last change on this file was 102874, checked in by vboxsync, 4 months ago

Linux Host and Guest kernel modules: Fix build for older Fedora kernels.

This commit covers build errors for Fedora 34-38 kernels. In short,
we exclude Fedora kernels (identified as RHEL XX.99) from fixes intended
for RHEL kernels.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
RevLine 
[66189]1/*
[98103]2 * Copyright (C) 2017-2023 Oracle and/or its affiliates.
[74820]3 * This file is based on qxl_prime.c
[66189]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
[67405]29/*
30 * Based on qxl_prime.c:
[66189]31 * Empty Implementations as there should not be any other driver for a virtual
[67405]32 * device that might share buffers with vboxvideo
33 */
[66189]34
35int vbox_gem_prime_pin(struct drm_gem_object *obj)
36{
[67405]37 WARN_ONCE(1, "not implemented");
38 return -ENOSYS;
[66189]39}
40
41void vbox_gem_prime_unpin(struct drm_gem_object *obj)
42{
[67405]43 WARN_ONCE(1, "not implemented");
[66189]44}
45
46struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
47{
[67405]48 WARN_ONCE(1, "not implemented");
49 return ERR_PTR(-ENOSYS);
[66189]50}
51
[85705]52#if RTLNX_VER_MAX(3,18,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
[74773]53struct drm_gem_object *vbox_gem_prime_import_sg_table(
54 struct drm_device *dev, size_t size, struct sg_table *table)
[66189]55#else
[74773]56struct drm_gem_object *vbox_gem_prime_import_sg_table(
57 struct drm_device *dev, struct dma_buf_attachment *attach,
58 struct sg_table *table)
[66189]59#endif
60{
[67405]61 WARN_ONCE(1, "not implemented");
62 return ERR_PTR(-ENOSYS);
[66189]63}
64
65void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
66{
[67405]67 WARN_ONCE(1, "not implemented");
68 return ERR_PTR(-ENOSYS);
[66189]69}
70
71void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
72{
[67405]73 WARN_ONCE(1, "not implemented");
[66189]74}
75
[102874]76#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99)
[67405]77int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *area)
[66189]78{
[67405]79 WARN_ONCE(1, "not implemented");
80 return -ENOSYS;
[66189]81}
[101079]82#endif
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use