Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a5ced8c

Browse files
Additions: Linux: vboxvideo: Initial support for kernel 6.18 (and extra fix for 6.17), bugref:10991, bugref:10950.
svn:sync-xref-src-repo-rev: r170955
1 parent 2e2c0a4 commit a5ced8c

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

‎src/VBox/Additions/linux/drm/vbox_drv.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: vbox_drv.h 110684 2025-08-11 17:18:47Z klaus.espenlaub@oracle.com $ */
1+
/* $Id: vbox_drv.h 111398 2025-10-14 16:35:32Z vadim.galitsyn@oracle.com $ */
22
/** @file
33
* VirtualBox Additions Linux kernel video driver
44
*/
@@ -302,6 +302,10 @@ struct vbox_private {
302302
} ttm;
303303

304304
struct mutex hw_mutex; /* protects modeset and accel/vbva accesses */
305+
#if RTLNX_VER_MIN(6,18,0)
306+
/** Replacement for struct drm_device .struct_mutex. */
307+
struct mutex struct_mutex;
308+
#endif
305309
/**
306310
* We decide whether or not user-space supports display hot-plug
307311
* depending on whether they react to a hot-plug event after the initial

‎src/VBox/Additions/linux/drm/vbox_main.c‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: vbox_main.c 110684 2025-08-11 17:18:47Z klaus.espenlaub@oracle.com $ */
1+
/* $Id: vbox_main.c 111398 2025-10-14 16:35:32Z vadim.galitsyn@oracle.com $ */
22
/** @file
33
* VirtualBox Additions Linux kernel video driver
44
*/
@@ -181,7 +181,8 @@ int vbox_framebuffer_init(struct drm_device *dev,
181181
int ret;
182182

183183
#if RTLNX_VER_MIN(6,17,0)
184-
drm_helper_mode_fill_fb_struct(dev, &vbox_fb->base, NULL, mode_cmd);
184+
const struct drm_format_info *format = drm_get_format_info(dev, mode_cmd->pixel_format, 0);
185+
drm_helper_mode_fill_fb_struct(dev, &vbox_fb->base, format, mode_cmd);
185186
#elif RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
186187
drm_helper_mode_fill_fb_struct(dev, &vbox_fb->base, mode_cmd);
187188
#else
@@ -484,7 +485,9 @@ int vbox_driver_load(struct drm_device *dev, unsigned long flags)
484485
vbox->dev = dev;
485486

486487
mutex_init(&vbox->hw_mutex);
487-
488+
#if RTLNX_VER_MIN(6,18,0)
489+
mutex_init(&vbox->struct_mutex);
490+
#endif
488491
ret = vbox_hw_init(vbox);
489492
if (ret)
490493
return ret;
@@ -678,8 +681,16 @@ vbox_dumb_mmap_offset(struct drm_file *file,
678681
struct drm_gem_object *obj;
679682
int ret = 0;
680683
struct vbox_bo *bo;
684+
struct mutex *struct_mutex;
685+
686+
#if RTLNX_VER_MIN(6,18,0)
687+
struct vbox_private *vbox = dev->dev_private;
688+
struct_mutex = &vbox->struct_mutex;
689+
#else
690+
struct_mutex = &dev->struct_mutex;
691+
#endif
681692

682-
mutex_lock(&dev->struct_mutex);
693+
mutex_lock(struct_mutex);
683694
#if RTLNX_VER_MIN(4,7,0) || RTLNX_RHEL_MAJ_PREREQ(7,4)
684695
obj = drm_gem_object_lookup(file, handle);
685696
#else
@@ -704,6 +715,6 @@ vbox_dumb_mmap_offset(struct drm_file *file,
704715
drm_gem_object_put(obj);
705716

706717
out_unlock:
707-
mutex_unlock(&dev->struct_mutex);
718+
mutex_unlock(struct_mutex);
708719
return ret;
709720
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /