VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/drm/vbox_drv.h@ 96407

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 16.8 KB
Line 
1/* $Id: vbox_drv.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * VirtualBox Additions Linux kernel video driver
4 */
5
6/*
7 * Copyright (C) 2013-2022 Oracle and/or its affiliates.
8 * This file is based on ast_drv.h
9 * Copyright 2012 Red Hat Inc.
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the
13 * "Software"), to deal in the Software without restriction, including
14 * without limitation the rights to use, copy, modify, merge, publish,
15 * distribute, sub license, and/or sell copies of the Software, and to
16 * permit persons to whom the Software is furnished to do so, subject to
17 * the following conditions:
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
22 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
23 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
25 * USE OR OTHER DEALINGS IN THE SOFTWARE.
26 *
27 * The above copyright notice and this permission notice (including the
28 * next paragraph) shall be included in all copies or substantial portions
29 * of the Software.
30 *
31 * Authors: Dave Airlie <[email protected]>
32 * Michael Thayer <[email protected],
33 * Hans de Goede <[email protected]>
34 */
35
36#ifndef GA_INCLUDED_SRC_linux_drm_vbox_drv_h
37#define GA_INCLUDED_SRC_linux_drm_vbox_drv_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include <linux/version.h>
43
44/* iprt/linux/version.h copy - start */
45/** @def RTLNX_VER_MIN
46 * Evaluates to true if the linux kernel version is equal or higher to the
47 * one specfied. */
48#define RTLNX_VER_MIN(a_Major, a_Minor, a_Patch) \
49 (LINUX_VERSION_CODE >= KERNEL_VERSION(a_Major, a_Minor, a_Patch))
50
51/** @def RTLNX_VER_MAX
52 * Evaluates to true if the linux kernel version is less to the one specfied
53 * (exclusive). */
54#define RTLNX_VER_MAX(a_Major, a_Minor, a_Patch) \
55 (LINUX_VERSION_CODE < KERNEL_VERSION(a_Major, a_Minor, a_Patch))
56
57/** @def RTLNX_VER_RANGE
58 * Evaluates to true if the linux kernel version is equal or higher to the given
59 * minimum version and less (but not equal) to the maximum version (exclusive). */
60#define RTLNX_VER_RANGE(a_MajorMin, a_MinorMin, a_PatchMin, a_MajorMax, a_MinorMax, a_PatchMax) \
61 ( LINUX_VERSION_CODE >= KERNEL_VERSION(a_MajorMin, a_MinorMin, a_PatchMin) \
62 && LINUX_VERSION_CODE < KERNEL_VERSION(a_MajorMax, a_MinorMax, a_PatchMax) )
63
64
65/** @def RTLNX_RHEL_MIN
66 * Require a minium RedHat release.
67 * @param a_iMajor The major release number (RHEL_MAJOR).
68 * @param a_iMinor The minor release number (RHEL_MINOR).
69 * @sa RTLNX_RHEL_MAX, RTLNX_RHEL_RANGE, RTLNX_RHEL_MAJ_PREREQ
70 */
71#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
72# define RTLNX_RHEL_MIN(a_iMajor, a_iMinor) \
73 ((RHEL_MAJOR) > (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor)))
74#else
75# define RTLNX_RHEL_MIN(a_iMajor, a_iMinor) (0)
76#endif
77
78/** @def RTLNX_RHEL_MAX
79 * Require a maximum RedHat release, true for all RHEL versions below it.
80 * @param a_iMajor The major release number (RHEL_MAJOR).
81 * @param a_iMinor The minor release number (RHEL_MINOR).
82 * @sa RTLNX_RHEL_MIN, RTLNX_RHEL_RANGE, RTLNX_RHEL_MAJ_PREREQ
83 */
84#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
85# define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) \
86 ((RHEL_MAJOR) < (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) < (a_iMinor)))
87#else
88# define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) (0)
89#endif
90
91/** @def RTLNX_RHEL_RANGE
92 * Check that it's a RedHat kernel in the given version range.
93 * The max version is exclusive, the minimum inclusive.
94 * @sa RTLNX_RHEL_MIN, RTLNX_RHEL_MAX, RTLNX_RHEL_MAJ_PREREQ
95 */
96#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
97# define RTLNX_RHEL_RANGE(a_iMajorMin, a_iMinorMin, a_iMajorMax, a_iMinorMax) \
98 (RTLNX_RHEL_MIN(a_iMajorMin, a_iMinorMin) && RTLNX_RHEL_MAX(a_iMajorMax, a_iMinorMax))
99#else
100# define RTLNX_RHEL_RANGE(a_iMajorMin, a_iMinorMin, a_iMajorMax, a_iMinorMax) (0)
101#endif
102
103/** @def RTLNX_RHEL_MAJ_PREREQ
104 * Require a minimum minor release number for the given RedHat release.
105 * @param a_iMajor RHEL_MAJOR must _equal_ this.
106 * @param a_iMinor RHEL_MINOR must be greater or equal to this.
107 * @sa RTLNX_RHEL_MIN, RTLNX_RHEL_MAX
108 */
109#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
110# define RTLNX_RHEL_MAJ_PREREQ(a_iMajor, a_iMinor) ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor))
111#else
112# define RTLNX_RHEL_MAJ_PREREQ(a_iMajor, a_iMinor) (0)
113#endif
114
115
116/** @def RTLNX_SUSE_MAJ_PREREQ
117 * Require a minimum minor release number for the given SUSE release.
118 * @param a_iMajor CONFIG_SUSE_VERSION must _equal_ this.
119 * @param a_iMinor CONFIG_SUSE_PATCHLEVEL must be greater or equal to this.
120 */
121#if defined(CONFIG_SUSE_VERSION) && defined(CONFIG_SUSE_PATCHLEVEL)
122# define RTLNX_SUSE_MAJ_PREREQ(a_iMajor, a_iMinor) ((CONFIG_SUSE_VERSION) == (a_iMajor) && (CONFIG_SUSE_PATCHLEVEL) >= (a_iMinor))
123#else
124# define RTLNX_SUSE_MAJ_PREREQ(a_iMajor, a_iMinor) (0)
125#endif
126/* iprt/linux/version.h copy - end */
127
128#if RTLNX_VER_MAX(4,5,0)
129# include <linux/types.h>
130# include <linux/spinlock_types.h>
131#endif
132
133#include <linux/genalloc.h>
134#include <linux/io.h>
135#include <linux/string.h>
136#include <linux/pci.h>
137
138
139#if RTLNX_VER_MAX(3,14,0) || RTLNX_RHEL_MAJ_PREREQ(7,1)
140#define U8_MAX ((u8)~0U)
141#define S8_MAX ((s8)(U8_MAX>>1))
142#define S8_MIN ((s8)(-S8_MAX - 1))
143#define U16_MAX ((u16)~0U)
144#define S16_MAX ((s16)(U16_MAX>>1))
145#define S16_MIN ((s16)(-S16_MAX - 1))
146#define U32_MAX ((u32)~0U)
147#define S32_MAX ((s32)(U32_MAX>>1))
148#define S32_MIN ((s32)(-S32_MAX - 1))
149#define U64_MAX ((u64)~0ULL)
150#define S64_MAX ((s64)(U64_MAX>>1))
151#define S64_MIN ((s64)(-S64_MAX - 1))
152#endif
153
154#if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3) || RTLNX_SUSE_MAJ_PREREQ(15,3)
155# include <drm/drm_file.h>
156# include <drm/drm_drv.h>
157# include <drm/drm_device.h>
158# include <drm/drm_ioctl.h>
159# include <drm/drm_fourcc.h>
160# if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_MAJ_PREREQ(9,1)
161# include <drm/drm_irq.h>
162# endif
163# include <drm/drm_vblank.h>
164#else /* < 5.5.0 || RHEL < 8.3 || SLES < 15-SP3 */
165# include <drm/drmP.h>
166#endif
167#if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
168# include <drm/drm_encoder.h>
169#endif
170#include <drm/drm_fb_helper.h>
171#if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2)
172# include <drm/drm_gem.h>
173#endif
174
175#include <drm/ttm/ttm_bo_api.h>
176#include <drm/ttm/ttm_bo_driver.h>
177#include <drm/ttm/ttm_placement.h>
178#if RTLNX_VER_MAX(5,13,0) && !RTLNX_RHEL_RANGE(8,6, 8,99)
179# include <drm/ttm/ttm_memory.h>
180#endif
181#if RTLNX_VER_MAX(5,12,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
182# include <drm/ttm/ttm_module.h>
183#endif
184#if RTLNX_VER_MIN(5,10,0)
185# include <drm/ttm/ttm_resource.h>
186#endif
187
188#if RTLNX_VER_MIN(6,0,0)
189# include <drm/drm_framebuffer.h>
190#endif
191
192#include "vboxvideo_guest.h"
193#include "vboxvideo_vbe.h"
194#include "hgsmi_ch_setup.h"
195
196#include "product-generated.h"
197
198#if RTLNX_VER_MAX(4,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,5)
199static inline void drm_gem_object_put_unlocked(struct drm_gem_object *obj)
200{
201 drm_gem_object_unreference_unlocked(obj);
202}
203#endif
204
205#if RTLNX_VER_MAX(4,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,5)
206static inline void drm_gem_object_put(struct drm_gem_object *obj)
207{
208 drm_gem_object_unreference(obj);
209}
210#endif
211
212#define DRIVER_AUTHOR VBOX_VENDOR
213
214#define DRIVER_NAME "vboxvideo"
215#define DRIVER_DESC VBOX_PRODUCT " Graphics Card"
216#define DRIVER_DATE "20130823"
217
218#define DRIVER_MAJOR 1
219#define DRIVER_MINOR 0
220#define DRIVER_PATCHLEVEL 0
221
222#define VBOX_MAX_CURSOR_WIDTH 64
223#define VBOX_MAX_CURSOR_HEIGHT 64
224#define CURSOR_PIXEL_COUNT (VBOX_MAX_CURSOR_WIDTH * VBOX_MAX_CURSOR_HEIGHT)
225#define CURSOR_DATA_SIZE (CURSOR_PIXEL_COUNT * 4 + CURSOR_PIXEL_COUNT / 8)
226
227#define VBOX_MAX_SCREENS 32
228
229#define GUEST_HEAP_OFFSET(vbox) ((vbox)->full_vram_size - \
230 VBVA_ADAPTER_INFORMATION_SIZE)
231#define GUEST_HEAP_SIZE VBVA_ADAPTER_INFORMATION_SIZE
232#define GUEST_HEAP_USABLE_SIZE (VBVA_ADAPTER_INFORMATION_SIZE - \
233 sizeof(HGSMIHOSTFLAGS))
234#define HOST_FLAGS_OFFSET GUEST_HEAP_USABLE_SIZE
235
236/** Field "pdev" of struct drm_device was removed in 5.14. This macro
237 * transparently handles this change. Input argument is a pointer
238 * to struct drm_device. */
239#if RTLNX_VER_MIN(5,14,0) || RTLNX_RHEL_RANGE(8,6, 8,99)
240# define VBOX_DRM_TO_PCI_DEV(_dev) to_pci_dev(_dev->dev)
241#else
242# define VBOX_DRM_TO_PCI_DEV(_dev) _dev->pdev
243#endif
244
245/** How frequently we refresh if the guest is not providing dirty rectangles. */
246#define VBOX_REFRESH_PERIOD (HZ / 2)
247
248#if RTLNX_VER_MAX(3,13,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
249static inline void *devm_kcalloc(struct device *dev, size_t n, size_t size,
250 gfp_t flags)
251{
252 return devm_kzalloc(dev, n * size, flags);
253}
254#endif
255
256struct vbox_fbdev;
257
258struct vbox_private {
259 struct drm_device *dev;
260
261 u8 __iomem *guest_heap;
262 u8 __iomem *vbva_buffers;
263 struct gen_pool *guest_pool;
264 struct VBVABUFFERCONTEXT *vbva_info;
265 bool any_pitch;
266 u32 num_crtcs;
267 /** Amount of available VRAM, including space used for buffers. */
268 u32 full_vram_size;
269 /** Amount of available VRAM, not including space used for buffers. */
270 u32 available_vram_size;
271 /** Array of structures for receiving mode hints. */
272 VBVAMODEHINT *last_mode_hints;
273
274 struct vbox_fbdev *fbdev;
275
276 int fb_mtrr;
277
278 struct {
279#if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1)
280 struct drm_global_reference mem_global_ref;
281 struct ttm_bo_global_ref bo_global_ref;
282#endif
283#if RTLNX_VER_MIN(5,13,0) || RTLNX_RHEL_RANGE(8,6, 8,99)
284 struct ttm_device bdev;
285#else
286 struct ttm_bo_device bdev;
287#endif
288 bool mm_initialised;
289 } ttm;
290
291 struct mutex hw_mutex; /* protects modeset and accel/vbva accesses */
292 /**
293 * We decide whether or not user-space supports display hot-plug
294 * depending on whether they react to a hot-plug event after the initial
295 * mode query.
296 */
297 bool initial_mode_queried;
298 /**
299 * Do we know that the current user can send us dirty rectangle information?
300 * If not, do periodic refreshes until we do know.
301 */
302 bool need_refresh_timer;
303 /**
304 * As long as the user is not sending us dirty rectangle information,
305 * refresh the whole screen at regular intervals.
306 */
307 struct delayed_work refresh_work;
308 struct work_struct hotplug_work;
309 u32 input_mapping_width;
310 u32 input_mapping_height;
311 /**
312 * Is user-space using an X.Org-style layout of one large frame-buffer
313 * encompassing all screen ones or is the fbdev console active?
314 */
315 bool single_framebuffer;
316 u32 cursor_width;
317 u32 cursor_height;
318 u32 cursor_hot_x;
319 u32 cursor_hot_y;
320 size_t cursor_data_size;
321 u8 cursor_data[CURSOR_DATA_SIZE];
322};
323
324#undef CURSOR_PIXEL_COUNT
325#undef CURSOR_DATA_SIZE
326
327#if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3)
328int vbox_driver_load(struct drm_device *dev);
329#else
330int vbox_driver_load(struct drm_device *dev, unsigned long flags);
331#endif
332#if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
333void vbox_driver_unload(struct drm_device *dev);
334#else
335int vbox_driver_unload(struct drm_device *dev);
336#endif
337void vbox_driver_lastclose(struct drm_device *dev);
338
339struct vbox_gem_object;
340
341#ifndef VGA_PORT_HGSMI_HOST
342#define VGA_PORT_HGSMI_HOST 0x3b0
343#define VGA_PORT_HGSMI_GUEST 0x3d0
344#endif
345
346struct vbox_connector {
347 struct drm_connector base;
348 char name[32];
349 struct vbox_crtc *vbox_crtc;
350 struct {
351 u32 width;
352 u32 height;
353 bool disconnected;
354 } mode_hint;
355};
356
357struct vbox_crtc {
358 struct drm_crtc base;
359 bool blanked;
360 bool disconnected;
361 unsigned int crtc_id;
362 u32 fb_offset;
363 bool cursor_enabled;
364 u32 x_hint;
365 u32 y_hint;
366};
367
368struct vbox_encoder {
369 struct drm_encoder base;
370};
371
372struct vbox_framebuffer {
373 struct drm_framebuffer base;
374 struct drm_gem_object *obj;
375};
376
377struct vbox_fbdev {
378 struct drm_fb_helper helper;
379 struct vbox_framebuffer afb;
380 int size;
381 struct ttm_bo_kmap_obj mapping;
382 int x1, y1, x2, y2; /* dirty rect */
383 spinlock_t dirty_lock;
384};
385
386#define to_vbox_crtc(x) container_of(x, struct vbox_crtc, base)
387#define to_vbox_connector(x) container_of(x, struct vbox_connector, base)
388#define to_vbox_encoder(x) container_of(x, struct vbox_encoder, base)
389#define to_vbox_framebuffer(x) container_of(x, struct vbox_framebuffer, base)
390
391int vbox_mode_init(struct drm_device *dev);
392void vbox_mode_fini(struct drm_device *dev);
393
394#if RTLNX_VER_MAX(3,3,0)
395# define DRM_MODE_FB_CMD drm_mode_fb_cmd
396#else
397# define DRM_MODE_FB_CMD drm_mode_fb_cmd2
398#endif
399
400#if RTLNX_VER_MAX(3,15,0) && !RTLNX_RHEL_MAJ_PREREQ(7,1)
401# define CRTC_FB(crtc) ((crtc)->fb)
402#else
403# define CRTC_FB(crtc) ((crtc)->primary->fb)
404#endif
405
406void vbox_enable_accel(struct vbox_private *vbox);
407void vbox_disable_accel(struct vbox_private *vbox);
408void vbox_report_caps(struct vbox_private *vbox);
409
410void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
411 struct drm_clip_rect *rects,
412 unsigned int num_rects);
413
414int vbox_framebuffer_init(struct drm_device *dev,
415 struct vbox_framebuffer *vbox_fb,
416#if RTLNX_VER_MIN(4,5,0) || RTLNX_RHEL_MAJ_PREREQ(7,3)
417 const struct DRM_MODE_FB_CMD *mode_cmd,
418#else
419 struct DRM_MODE_FB_CMD *mode_cmd,
420#endif
421 struct drm_gem_object *obj);
422
423int vbox_fbdev_init(struct drm_device *dev);
424void vbox_fbdev_fini(struct drm_device *dev);
425void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr);
426
427struct vbox_bo {
428 struct ttm_buffer_object bo;
429 struct ttm_placement placement;
430 struct ttm_bo_kmap_obj kmap;
431 struct drm_gem_object gem;
432#if RTLNX_VER_MAX(3,18,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
433 u32 placements[3];
434#else
435 struct ttm_place placements[3];
436#endif
437 int pin_count;
438};
439
440#define gem_to_vbox_bo(gobj) container_of((gobj), struct vbox_bo, gem)
441
442static inline struct vbox_bo *vbox_bo(struct ttm_buffer_object *bo)
443{
444 return container_of(bo, struct vbox_bo, bo);
445}
446
447#define to_vbox_obj(x) container_of(x, struct vbox_gem_object, base)
448
449int vbox_dumb_create(struct drm_file *file,
450 struct drm_device *dev,
451 struct drm_mode_create_dumb *args);
452#if RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,3)
453int vbox_dumb_destroy(struct drm_file *file,
454 struct drm_device *dev, u32 handle);
455#endif
456
457void vbox_gem_free_object(struct drm_gem_object *obj);
458int vbox_dumb_mmap_offset(struct drm_file *file,
459 struct drm_device *dev,
460 u32 handle, u64 *offset);
461
462#define DRM_FILE_PAGE_OFFSET (0x10000000ULL >> PAGE_SHIFT)
463
464int vbox_mm_init(struct vbox_private *vbox);
465void vbox_mm_fini(struct vbox_private *vbox);
466
467int vbox_bo_create(struct drm_device *dev, int size, int align,
468 u32 flags, struct vbox_bo **pvboxbo);
469
470int vbox_gem_create(struct drm_device *dev,
471 u32 size, bool iskernel, struct drm_gem_object **obj);
472
473#define VBOX_MEM_TYPE_VRAM 0x1
474#define VBOX_MEM_TYPE_SYSTEM 0x2
475
476int vbox_bo_pin(struct vbox_bo *bo, u32 mem_type, u64 *gpu_addr);
477int vbox_bo_unpin(struct vbox_bo *bo);
478
479static inline int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait)
480{
481 int ret;
482
483#if RTLNX_VER_MIN(4,7,0) || RTLNX_RHEL_MAJ_PREREQ(7,4)
484 ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
485#else
486 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
487#endif
488 if (ret) {
489 if (ret != -ERESTARTSYS && ret != -EBUSY)
490 DRM_ERROR("reserve failed %p\n", bo);
491 return ret;
492 }
493 return 0;
494}
495
496static inline void vbox_bo_unreserve(struct vbox_bo *bo)
497{
498 ttm_bo_unreserve(&bo->bo);
499}
500
501void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type);
502int vbox_bo_push_sysram(struct vbox_bo *bo);
503int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
504
505/* vbox_prime.c */
506int vbox_gem_prime_pin(struct drm_gem_object *obj);
507void vbox_gem_prime_unpin(struct drm_gem_object *obj);
508struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj);
509#if RTLNX_VER_MAX(3,18,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
510struct drm_gem_object *vbox_gem_prime_import_sg_table(
511 struct drm_device *dev, size_t size, struct sg_table *table);
512#else
513struct drm_gem_object *vbox_gem_prime_import_sg_table(
514 struct drm_device *dev, struct dma_buf_attachment *attach,
515 struct sg_table *table);
516#endif
517void *vbox_gem_prime_vmap(struct drm_gem_object *obj);
518void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
519int vbox_gem_prime_mmap(struct drm_gem_object *obj,
520 struct vm_area_struct *area);
521
522/* vbox_irq.c */
523int vbox_irq_init(struct vbox_private *vbox);
524void vbox_irq_fini(struct vbox_private *vbox);
525void vbox_report_hotplug(struct vbox_private *vbox);
526#if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_MAJ_PREREQ(9,1)
527irqreturn_t vbox_irq_handler(int irq, void *arg);
528#endif
529
530/* vbox_hgsmi.c */
531void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size,
532 u8 channel, u16 channel_info);
533void hgsmi_buffer_free(struct gen_pool *guest_pool, void *buf);
534int hgsmi_buffer_submit(struct gen_pool *guest_pool, void *buf);
535
536static inline void vbox_write_ioport(u16 index, u16 data)
537{
538 outw(index, VBE_DISPI_IOPORT_INDEX);
539 outw(data, VBE_DISPI_IOPORT_DATA);
540}
541
542#endif /* !GA_INCLUDED_SRC_linux_drm_vbox_drv_h */
Note: See TracBrowser for help on using the repository browser.

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