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 e437f63

Browse files
Additions: Linux: vboxvideo: Fixes for RHEL 9.7 kernel, bugref:10891.
svn:sync-xref-src-repo-rev: r170634
1 parent 42bd4fc commit e437f63

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: vbox_drv.c 110684 2025-08-11 17:18:47Z klaus.espenlaub@oracle.com $ */
1+
/* $Id: vbox_drv.c 111097 2025-09-23 10:57:19Z vadim.galitsyn@oracle.com $ */
22
/** @file
33
* VirtualBox Additions Linux kernel video driver
44
*/
@@ -43,12 +43,16 @@
4343
# include <drm/drm_probe_helper.h>
4444
#endif
4545

46-
#if RTLNX_VER_MIN(6,13,0) && defined(CONFIG_APERTURE_HELPERS)
46+
#if RTLNX_VER_MIN(6,13,0) && defined(CONFIG_APERTURE_HELPERS)||RTLNX_RHEL_RANGE(9,7, 9,99)
4747
# include <linux/aperture.h>
4848
#endif
4949

5050
#if RTLNX_VER_RANGE(5,14,0, 6,13,0) || RTLNX_RHEL_RANGE(8,6, 8,99)
51-
# include <drm/drm_aperture.h>
51+
/** RHEL 9.7 is based on 5.14, however this header is not available
52+
* there due to backports from newer kernels. */
53+
# if !RTLNX_RHEL_RANGE(9,7, 9,99)
54+
# include <drm/drm_aperture.h>
55+
# endif
5256
#endif
5357

5458
#include "version-generated.h"
@@ -98,7 +102,7 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
98102
}
99103
#endif
100104

101-
# if RTLNX_VER_MIN(6,13,0) && defined(CONFIG_APERTURE_HELPERS)
105+
# if RTLNX_VER_MIN(6,13,0) && defined(CONFIG_APERTURE_HELPERS)||RTLNX_RHEL_RANGE(9,7, 9,99)
102106
ret = aperture_remove_conflicting_pci_devices(pdev, driver.name);
103107
# elif RTLNX_VER_RANGE(5,14,0, 6,13,0) || RTLNX_RHEL_RANGE(8,6, 8,99)
104108
# if RTLNX_VER_MIN(5,15,0) || RTLNX_RHEL_RANGE(8,7, 8,99) || RTLNX_RHEL_MIN(9,1) || RTLNX_SUSE_MAJ_PREREQ(15,4)
@@ -395,10 +399,10 @@ static struct drm_driver driver = {
395399
#endif
396400
.name = DRIVER_NAME,
397401
.desc = DRIVER_DESC,
398-
#if RTLNX_VER_MAX(6,14,0)
402+
#if RTLNX_VER_MAX(6,14,0)&& !RTLNX_RHEL_RANGE(9,7, 9,99)
399403
.date = DRIVER_DATE,
400404
#endif
401-
#if RTLNX_VER_MIN(6,15,0)
405+
#if RTLNX_VER_MIN(6,15,0)||RTLNX_RHEL_RANGE(9,7, 9,99)
402406
.fbdev_probe = vboxfb_create,
403407
#endif
404408
.major = DRIVER_MAJOR,
@@ -420,7 +424,7 @@ static struct drm_driver driver = {
420424
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
421425
#endif
422426
.gem_prime_import = drm_gem_prime_import,
423-
#if RTLNX_VER_MAX(6,15,0)
427+
#if RTLNX_VER_MAX(6,15,0)&& !RTLNX_RHEL_RANGE(9,7, 9,99)
424428
.gem_prime_import_sg_table = vbox_gem_prime_import_sg_table,
425429
#endif
426430
#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99) && !RTLNX_SUSE_MAJ_PREREQ(15, 6)

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: vbox_fb.c 110684 2025-08-11 17:18:47Z klaus.espenlaub@oracle.com $ */
1+
/* $Id: vbox_fb.c 111097 2025-09-23 10:57:19Z vadim.galitsyn@oracle.com $ */
22
/** @file
33
* VirtualBox Additions Linux kernel video driver
44
*/
@@ -195,7 +195,12 @@ static void drm_fb_helper_sys_imageblit(struct fb_info *info, const struct fb_im
195195
static struct fb_ops vboxfb_ops = {
196196
.owner = THIS_MODULE,
197197
.fb_check_var = drm_fb_helper_check_var,
198+
#if RTLNX_VER_MAX(6,15,0) && !RTLNX_RHEL_RANGE(9,7, 9,99)
199+
/* We seem do not follow all the procedure of instantiating DRM Client.
200+
* Having this callback set will trigger panic on module load. Comment
201+
* it out for now. */
198202
.fb_set_par = drm_fb_helper_set_par,
203+
#endif
199204
#if RTLNX_VER_MIN(6,5,0) || RTLNX_RHEL_RANGE(9,4, 9,99) || RTLNX_SUSE_MAJ_PREREQ(15, 6)
200205
.fb_read = fb_sys_read,
201206
.fb_write = fb_sys_write,
@@ -413,7 +418,7 @@ int vboxfb_create(struct drm_fb_helper *helper,
413418
return 0;
414419
}
415420

416-
#if RTLNX_VER_MAX(6,15,0)
421+
#if RTLNX_VER_MAX(6,15,0)&& !RTLNX_RHEL_RANGE(9,7, 9,99)
417422
static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
418423
.fb_probe = vboxfb_create,
419424
};
@@ -486,7 +491,7 @@ int vbox_fbdev_init(struct drm_device *dev)
486491
vbox->fbdev = fbdev;
487492
spin_lock_init(&fbdev->dirty_lock);
488493

489-
#if RTLNX_VER_MIN(6,15,0)
494+
#if RTLNX_VER_MIN(6,15,0)||RTLNX_RHEL_RANGE(9,7, 9,99)
490495
drm_fb_helper_prepare(dev, &fbdev->helper, 32, NULL);
491496
#elif RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
492497
drm_fb_helper_prepare(dev, &fbdev->helper, 32, &vbox_fb_helper_funcs);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: vbox_mode.c 110684 2025-08-11 17:18:47Z klaus.espenlaub@oracle.com $ */
1+
/* $Id: vbox_mode.c 111097 2025-09-23 10:57:19Z vadim.galitsyn@oracle.com $ */
22
/** @file
33
* VirtualBox Additions Linux kernel video driver
44
*/
@@ -660,7 +660,7 @@ static int vbox_get_modes(struct drm_connector *connector)
660660
return num_modes;
661661
}
662662

663-
#if RTLNX_VER_MIN(6,15,0)
663+
#if RTLNX_VER_MIN(6,15,0)||RTLNX_RHEL_RANGE(9,7, 9,99)
664664
static enum drm_mode_status vbox_mode_valid(struct drm_connector *connector, const struct drm_display_mode *mode)
665665
#elif RTLNX_VER_MIN(3,14,0) || RTLNX_RHEL_MAJ_PREREQ(7,1)
666666
static enum drm_mode_status vbox_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
4949
return ERR_PTR(-ENOSYS);
5050
}
5151

52-
#if RTLNX_VER_MAX(6,15,0)
52+
#if RTLNX_VER_MAX(6,15,0)&& !RTLNX_RHEL_RANGE(9,7, 9,99)
5353
# if RTLNX_VER_MAX(3,18,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
5454
struct drm_gem_object *vbox_gem_prime_import_sg_table(
5555
struct drm_device *dev, size_t size, struct sg_table *table)

0 commit comments

Comments
(0)

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