VirtualBox

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

Last change on this file since 85704 was 85704, checked in by vboxsync, 5 years ago

Add/linux/vboxvideo: Use RTLNX_VER_* macros (just copied them over into vbox_drv.h).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.0 KB
Line 
1/* $Id: vbox_drv.h 85704 2020-08-11 19:05:24Z vboxsync $ */
2/** @file
3 * VirtualBox Additions Linux kernel video driver
4 */
5
6/*
7 * Copyright (C) 2013-2020 Oracle Corporation
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 <airlied@redhat.com>
32 * Michael Thayer <michael.thayer@oracle.com,
33 * Hans de Goede <hdegoede@redhat.com>
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/** @define 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/** @def VBOX_RHEL_MAJ_PREREQ
139 * Require a minium minor release number for the given RedHat release.
140 * @param a_iMajor RHEL_MAJOR must _equal_ this.
141 * @param a_iMinor RHEL_MINOR must be greater or equal to this.
142 */
143#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
144# define VBOX_RHEL_MAJ_PREREQ(a_iMajor, a_iMinor) ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor))
145# if RHEL_MAJOR == 8 && RHEL_MINOR >= 2
146# define RHEL_82
147# endif
148# if RHEL_MAJOR == 8 && RHEL_MINOR >= 1
149# define RHEL_81
150# endif
151# if RHEL_MAJOR == 8 && RHEL_MINOR >= 0
152# define RHEL_80
153# endif
154# if RHEL_MAJOR == 7 && RHEL_MINOR >= 7
155# define RHEL_77
156# endif
157# if RHEL_MAJOR == 7 && RHEL_MINOR >= 6
158# define RHEL_76
159# endif
160# if RHEL_MAJOR == 7 && RHEL_MINOR >= 5
161# define RHEL_75
162# endif
163# if RHEL_MAJOR == 7 && RHEL_MINOR >= 4
164# define RHEL_74
165# endif
166# if RHEL_MAJOR == 7 && RHEL_MINOR >= 3
167# define RHEL_73
168# endif
169# if RHEL_MAJOR == 7 && RHEL_MINOR >= 2
170# define RHEL_72
171# endif
172# if RHEL_MAJOR == 7 && RHEL_MINOR >= 1
173# define RHEL_71
174# endif
175# if RHEL_MAJOR == 7 && RHEL_MINOR >= 0
176# define RHEL_70
177# endif
178#else
179# define VBOX_RHEL_MAJ_PREREQ(a_iMajor, a_iMinor) 0
180#endif
181
182#if defined(CONFIG_SUSE_VERSION)
183# if CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 1
184# define OPENSUSE_151
185# endif
186# if CONFIG_SUSE_VERSION == 12 && CONFIG_SUSE_PATCHLEVEL >= 5
187# define OPENSUSE_125
188# endif
189#endif
190
191#if RTLNX_VER_MAX(3,14,0) || defined(RHEL_71)
192#define U8_MAX ((u8)~0U)
193#define S8_MAX ((s8)(U8_MAX>>1))
194#define S8_MIN ((s8)(-S8_MAX - 1))
195#define U16_MAX ((u16)~0U)
196#define S16_MAX ((s16)(U16_MAX>>1))
197#define S16_MIN ((s16)(-S16_MAX - 1))
198#define U32_MAX ((u32)~0U)
199#define S32_MAX ((s32)(U32_MAX>>1))
200#define S32_MIN ((s32)(-S32_MAX - 1))
201#define U64_MAX ((u64)~0ULL)
202#define S64_MAX ((s64)(U64_MAX>>1))
203#define S64_MIN ((s64)(-S64_MAX - 1))
204#endif
205
206#if RTLNX_VER_MAX(5,5,0)
207#include <drm/drmP.h>
208#else /* >= 5.5.0 */
209#include <drm/drm_file.h>
210#include <drm/drm_drv.h>
211#include <drm/drm_device.h>
212#include <drm/drm_ioctl.h>
213#include <drm/drm_fourcc.h>
214#include <drm/drm_irq.h>
215#include <drm/drm_vblank.h>
216#endif /* >= 5.5.0 */
217#if RTLNX_VER_MIN(4,11,0) || defined(RHEL_75)
218#include <drm/drm_encoder.h>
219#endif
220#include <drm/drm_fb_helper.h>
221#if RTLNX_VER_MIN(3,18,0) || defined(RHEL_72)
222#include <drm/drm_gem.h>
223#endif
224
225#include <drm/ttm/ttm_bo_api.h>
226#include <drm/ttm/ttm_bo_driver.h>
227#include <drm/ttm/ttm_placement.h>
228#include <drm/ttm/ttm_memory.h>
229#include <drm/ttm/ttm_module.h>
230
231#include "vboxvideo_guest.h"
232#include "vboxvideo_vbe.h"
233#include "hgsmi_ch_setup.h"
234
235#include "product-generated.h"
236
237#if RTLNX_VER_MAX(4,12,0) && !defined(RHEL_75)
238static inline void drm_gem_object_put_unlocked(struct drm_gem_object *obj)
239{
240 drm_gem_object_unreference_unlocked(obj);
241}
242#endif
243
244#if RTLNX_VER_MAX(4,12,0) && !defined(RHEL_75)
245static inline void drm_gem_object_put(struct drm_gem_object *obj)
246{
247 drm_gem_object_unreference(obj);
248}
249#endif
250
251#define DRIVER_AUTHOR VBOX_VENDOR
252
253#define DRIVER_NAME "vboxvideo"
254#define DRIVER_DESC VBOX_PRODUCT " Graphics Card"
255#define DRIVER_DATE "20130823"
256
257#define DRIVER_MAJOR 1
258#define DRIVER_MINOR 0
259#define DRIVER_PATCHLEVEL 0
260
261#define VBOX_MAX_CURSOR_WIDTH 64
262#define VBOX_MAX_CURSOR_HEIGHT 64
263#define CURSOR_PIXEL_COUNT (VBOX_MAX_CURSOR_WIDTH * VBOX_MAX_CURSOR_HEIGHT)
264#define CURSOR_DATA_SIZE (CURSOR_PIXEL_COUNT * 4 + CURSOR_PIXEL_COUNT / 8)
265
266#define VBOX_MAX_SCREENS 32
267
268#define GUEST_HEAP_OFFSET(vbox) ((vbox)->full_vram_size - \
269 VBVA_ADAPTER_INFORMATION_SIZE)
270#define GUEST_HEAP_SIZE VBVA_ADAPTER_INFORMATION_SIZE
271#define GUEST_HEAP_USABLE_SIZE (VBVA_ADAPTER_INFORMATION_SIZE - \
272 sizeof(HGSMIHOSTFLAGS))
273#define HOST_FLAGS_OFFSET GUEST_HEAP_USABLE_SIZE
274
275/** How frequently we refresh if the guest is not providing dirty rectangles. */
276#define VBOX_REFRESH_PERIOD (HZ / 2)
277
278#if RTLNX_VER_MAX(3,13,0) && !defined(RHEL_72)
279static inline void *devm_kcalloc(struct device *dev, size_t n, size_t size,
280 gfp_t flags)
281{
282 return devm_kzalloc(dev, n * size, flags);
283}
284#endif
285
286struct vbox_fbdev;
287
288struct vbox_private {
289 struct drm_device *dev;
290
291 u8 __iomem *guest_heap;
292 u8 __iomem *vbva_buffers;
293 struct gen_pool *guest_pool;
294 struct VBVABUFFERCONTEXT *vbva_info;
295 bool any_pitch;
296 u32 num_crtcs;
297 /** Amount of available VRAM, including space used for buffers. */
298 u32 full_vram_size;
299 /** Amount of available VRAM, not including space used for buffers. */
300 u32 available_vram_size;
301 /** Array of structures for receiving mode hints. */
302 VBVAMODEHINT *last_mode_hints;
303
304 struct vbox_fbdev *fbdev;
305
306 int fb_mtrr;
307
308 struct {
309#if RTLNX_VER_MAX(5,0,0) && !defined(RHEL_77) && !defined(RHEL_81)
310 struct drm_global_reference mem_global_ref;
311 struct ttm_bo_global_ref bo_global_ref;
312#endif
313 struct ttm_bo_device bdev;
314 bool mm_initialised;
315 } ttm;
316
317 struct mutex hw_mutex; /* protects modeset and accel/vbva accesses */
318 /**
319 * We decide whether or not user-space supports display hot-plug
320 * depending on whether they react to a hot-plug event after the initial
321 * mode query.
322 */
323 bool initial_mode_queried;
324 /**
325 * Do we know that the current user can send us dirty rectangle information?
326 * If not, do periodic refreshes until we do know.
327 */
328 bool need_refresh_timer;
329 /**
330 * As long as the user is not sending us dirty rectangle information,
331 * refresh the whole screen at regular intervals.
332 */
333 struct delayed_work refresh_work;
334 struct work_struct hotplug_work;
335 u32 input_mapping_width;
336 u32 input_mapping_height;
337 /**
338 * Is user-space using an X.Org-style layout of one large frame-buffer
339 * encompassing all screen ones or is the fbdev console active?
340 */
341 bool single_framebuffer;
342 u32 cursor_width;
343 u32 cursor_height;
344 u32 cursor_hot_x;
345 u32 cursor_hot_y;
346 size_t cursor_data_size;
347 u8 cursor_data[CURSOR_DATA_SIZE];
348};
349
350#undef CURSOR_PIXEL_COUNT
351#undef CURSOR_DATA_SIZE
352
353#if RTLNX_VER_MAX(4,19,0)
354int vbox_driver_load(struct drm_device *dev, unsigned long flags);
355#else
356int vbox_driver_load(struct drm_device *dev);
357#endif
358#if RTLNX_VER_MIN(4,11,0) || defined(RHEL_75)
359void vbox_driver_unload(struct drm_device *dev);
360#else
361int vbox_driver_unload(struct drm_device *dev);
362#endif
363void vbox_driver_lastclose(struct drm_device *dev);
364
365struct vbox_gem_object;
366
367#ifndef VGA_PORT_HGSMI_HOST
368#define VGA_PORT_HGSMI_HOST 0x3b0
369#define VGA_PORT_HGSMI_GUEST 0x3d0
370#endif
371
372struct vbox_connector {
373 struct drm_connector base;
374 char name[32];
375 struct vbox_crtc *vbox_crtc;
376 struct {
377 u32 width;
378 u32 height;
379 bool disconnected;
380 } mode_hint;
381};
382
383struct vbox_crtc {
384 struct drm_crtc base;
385 bool blanked;
386 bool disconnected;
387 unsigned int crtc_id;
388 u32 fb_offset;
389 bool cursor_enabled;
390 u32 x_hint;
391 u32 y_hint;
392};
393
394struct vbox_encoder {
395 struct drm_encoder base;
396};
397
398struct vbox_framebuffer {
399 struct drm_framebuffer base;
400 struct drm_gem_object *obj;
401};
402
403struct vbox_fbdev {
404 struct drm_fb_helper helper;
405 struct vbox_framebuffer afb;
406 int size;
407 struct ttm_bo_kmap_obj mapping;
408 int x1, y1, x2, y2; /* dirty rect */
409 spinlock_t dirty_lock;
410};
411
412#define to_vbox_crtc(x) container_of(x, struct vbox_crtc, base)
413#define to_vbox_connector(x) container_of(x, struct vbox_connector, base)
414#define to_vbox_encoder(x) container_of(x, struct vbox_encoder, base)
415#define to_vbox_framebuffer(x) container_of(x, struct vbox_framebuffer, base)
416
417int vbox_mode_init(struct drm_device *dev);
418void vbox_mode_fini(struct drm_device *dev);
419
420#if RTLNX_VER_MAX(3,3,0)
421#define DRM_MODE_FB_CMD drm_mode_fb_cmd
422#else
423#define DRM_MODE_FB_CMD drm_mode_fb_cmd2
424#endif
425
426#if RTLNX_VER_MAX(3,15,0) && !defined(RHEL_71)
427#define CRTC_FB(crtc) ((crtc)->fb)
428#else
429#define CRTC_FB(crtc) ((crtc)->primary->fb)
430#endif
431
432void vbox_enable_accel(struct vbox_private *vbox);
433void vbox_disable_accel(struct vbox_private *vbox);
434void vbox_report_caps(struct vbox_private *vbox);
435
436void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
437 struct drm_clip_rect *rects,
438 unsigned int num_rects);
439
440int vbox_framebuffer_init(struct drm_device *dev,
441 struct vbox_framebuffer *vbox_fb,
442#if RTLNX_VER_MIN(4,5,0) || defined(RHEL_73)
443 const struct DRM_MODE_FB_CMD *mode_cmd,
444#else
445 struct DRM_MODE_FB_CMD *mode_cmd,
446#endif
447 struct drm_gem_object *obj);
448
449int vbox_fbdev_init(struct drm_device *dev);
450void vbox_fbdev_fini(struct drm_device *dev);
451void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr);
452
453struct vbox_bo {
454 struct ttm_buffer_object bo;
455 struct ttm_placement placement;
456 struct ttm_bo_kmap_obj kmap;
457 struct drm_gem_object gem;
458#if RTLNX_VER_MAX(3,18,0) && !defined(RHEL_72)
459 u32 placements[3];
460#else
461 struct ttm_place placements[3];
462#endif
463 int pin_count;
464};
465
466#define gem_to_vbox_bo(gobj) container_of((gobj), struct vbox_bo, gem)
467
468static inline struct vbox_bo *vbox_bo(struct ttm_buffer_object *bo)
469{
470 return container_of(bo, struct vbox_bo, bo);
471}
472
473#define to_vbox_obj(x) container_of(x, struct vbox_gem_object, base)
474
475int vbox_dumb_create(struct drm_file *file,
476 struct drm_device *dev,
477 struct drm_mode_create_dumb *args);
478#if RTLNX_VER_MAX(3,12,0) && !defined(RHEL_73)
479int vbox_dumb_destroy(struct drm_file *file,
480 struct drm_device *dev, u32 handle);
481#endif
482
483void vbox_gem_free_object(struct drm_gem_object *obj);
484int vbox_dumb_mmap_offset(struct drm_file *file,
485 struct drm_device *dev,
486 u32 handle, u64 *offset);
487
488#define DRM_FILE_PAGE_OFFSET (0x10000000ULL >> PAGE_SHIFT)
489
490int vbox_mm_init(struct vbox_private *vbox);
491void vbox_mm_fini(struct vbox_private *vbox);
492
493int vbox_bo_create(struct drm_device *dev, int size, int align,
494 u32 flags, struct vbox_bo **pvboxbo);
495
496int vbox_gem_create(struct drm_device *dev,
497 u32 size, bool iskernel, struct drm_gem_object **obj);
498
499int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr);
500int vbox_bo_unpin(struct vbox_bo *bo);
501
502static inline int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait)
503{
504 int ret;
505
506#if RTLNX_VER_MIN(4,7,0) || defined(RHEL_74)
507 ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
508#else
509 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
510#endif
511 if (ret) {
512 if (ret != -ERESTARTSYS && ret != -EBUSY)
513 DRM_ERROR("reserve failed %p\n", bo);
514 return ret;
515 }
516 return 0;
517}
518
519static inline void vbox_bo_unreserve(struct vbox_bo *bo)
520{
521 ttm_bo_unreserve(&bo->bo);
522}
523
524void vbox_ttm_placement(struct vbox_bo *bo, int domain);
525int vbox_bo_push_sysram(struct vbox_bo *bo);
526int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
527
528/* vbox_prime.c */
529int vbox_gem_prime_pin(struct drm_gem_object *obj);
530void vbox_gem_prime_unpin(struct drm_gem_object *obj);
531struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj);
532#if RTLNX_VER_MAX(3,18,0) && !defined(RHEL_72)
533struct drm_gem_object *vbox_gem_prime_import_sg_table(
534 struct drm_device *dev, size_t size, struct sg_table *table);
535#else
536struct drm_gem_object *vbox_gem_prime_import_sg_table(
537 struct drm_device *dev, struct dma_buf_attachment *attach,
538 struct sg_table *table);
539#endif
540void *vbox_gem_prime_vmap(struct drm_gem_object *obj);
541void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
542int vbox_gem_prime_mmap(struct drm_gem_object *obj,
543 struct vm_area_struct *area);
544
545/* vbox_irq.c */
546int vbox_irq_init(struct vbox_private *vbox);
547void vbox_irq_fini(struct vbox_private *vbox);
548void vbox_report_hotplug(struct vbox_private *vbox);
549irqreturn_t vbox_irq_handler(int irq, void *arg);
550
551/* vbox_hgsmi.c */
552void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size,
553 u8 channel, u16 channel_info);
554void hgsmi_buffer_free(struct gen_pool *guest_pool, void *buf);
555int hgsmi_buffer_submit(struct gen_pool *guest_pool, void *buf);
556
557static inline void vbox_write_ioport(u16 index, u16 data)
558{
559 outw(index, VBE_DISPI_IOPORT_INDEX);
560 outw(data, VBE_DISPI_IOPORT_DATA);
561}
562
563#endif /* !GA_INCLUDED_SRC_linux_drm_vbox_drv_h */
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