diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 22:55:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 22:55:52 +0000 |
commit | cd47c2446f1a9dee96610f298989848f8986a8be (patch) | |
tree | 02c30d62a9164987d0aaba2f72c58a50053205d6 /src/VBox/Additions/linux/drm | |
parent | Releasing progress-linux version 7.0.14-dfsg-4~progress7.99u1. (diff) | |
download | virtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.tar.xz virtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.zip |
Merging upstream version 7.0.16-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Additions/linux/drm')
-rwxr-xr-x | src/VBox/Additions/linux/drm/files_vboxvideo_drv | 1 | ||||
-rw-r--r-- | src/VBox/Additions/linux/drm/vbox_drv.c | 6 | ||||
-rw-r--r-- | src/VBox/Additions/linux/drm/vbox_drv.h | 2 | ||||
-rw-r--r-- | src/VBox/Additions/linux/drm/vbox_ttm.c | 20 |
4 files changed, 24 insertions, 5 deletions
diff --git a/src/VBox/Additions/linux/drm/files_vboxvideo_drv b/src/VBox/Additions/linux/drm/files_vboxvideo_drv index 04092484..46fdf366 100755 --- a/src/VBox/Additions/linux/drm/files_vboxvideo_drv +++ b/src/VBox/Additions/linux/drm/files_vboxvideo_drv @@ -38,6 +38,7 @@ FILES_VBOXVIDEO_DRM_NOBIN=" \ ${PATH_ROOT}/include/VBox/Graphics/HGSMIDefs.h=>hgsmi_defs.h \ ${PATH_ROOT}/include/VBox/Graphics/VBoxVideoErr.h=>vbox_err.h \ ${PATH_ROOT}/include/VBox/Graphics/VBoxVideoVBE.h=>vboxvideo_vbe.h \ + ${PATH_ROOT}/include/VBox/VBoxLnxModInline.h=>VBox/VBoxLnxModInline.h \ ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp=>hgsmi_base.c \ ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp=>modesetting.c \ ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp=>vbva_base.c \ diff --git a/src/VBox/Additions/linux/drm/vbox_drv.c b/src/VBox/Additions/linux/drm/vbox_drv.c index 3e4cbc60..7d2561dd 100644 --- a/src/VBox/Additions/linux/drm/vbox_drv.c +++ b/src/VBox/Additions/linux/drm/vbox_drv.c @@ -63,6 +63,8 @@ # define VBOX_VIDEO_NOMODESET() 0 #endif /* !CONFIG_VGA_CONSOLE */ +#include <VBox/VBoxLnxModInline.h> + static int vbox_modeset = -1; MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); @@ -413,6 +415,10 @@ static struct drm_driver driver = { static int __init vbox_init(void) { + /* Check if modue loading was disabled. */ + if (!vbox_mod_should_load()) + return -EINVAL; + printk("vboxvideo: loading version " VBOX_VERSION_STRING " r" __stringify(VBOX_SVN_REV) "\n"); if (VBOX_VIDEO_NOMODESET()) { diff --git a/src/VBox/Additions/linux/drm/vbox_drv.h b/src/VBox/Additions/linux/drm/vbox_drv.h index 8eb9f83e..aaaef937 100644 --- a/src/VBox/Additions/linux/drm/vbox_drv.h +++ b/src/VBox/Additions/linux/drm/vbox_drv.h @@ -538,9 +538,7 @@ int vbox_gem_prime_mmap(struct drm_gem_object *obj, int vbox_irq_init(struct vbox_private *vbox); void vbox_irq_fini(struct vbox_private *vbox); void vbox_report_hotplug(struct vbox_private *vbox); -#if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_MAJ_PREREQ(9,1) && !RTLNX_SUSE_MAJ_PREREQ(15,5) irqreturn_t vbox_irq_handler(int irq, void *arg); -#endif /* vbox_hgsmi.c */ void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size, diff --git a/src/VBox/Additions/linux/drm/vbox_ttm.c b/src/VBox/Additions/linux/drm/vbox_ttm.c index d020aa3f..d5c64ceb 100644 --- a/src/VBox/Additions/linux/drm/vbox_ttm.c +++ b/src/VBox/Additions/linux/drm/vbox_ttm.c @@ -532,10 +532,15 @@ void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type) #endif bo->placement.placement = bo->placements; +#if RTLNX_VER_MAX(6,9,0) bo->placement.busy_placement = bo->placements; +#endif if (mem_type & VBOX_MEM_TYPE_VRAM) { -#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) +#if RTLNX_VER_MIN(6,9,0) + bo->placements[c].mem_type = TTM_PL_VRAM; + PLACEMENT_FLAGS(bo->placements[c++]) = TTM_PL_FLAG_DESIRED; +#elif RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) bo->placements[c].mem_type = TTM_PL_VRAM; PLACEMENT_FLAGS(bo->placements[c++]) = 0; #elif RTLNX_VER_MIN(5,10,0) @@ -548,7 +553,11 @@ void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type) #endif } if (mem_type & VBOX_MEM_TYPE_SYSTEM) { -#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) + +#if RTLNX_VER_MIN(6,9,0) + bo->placements[c].mem_type = TTM_PL_SYSTEM; + PLACEMENT_FLAGS(bo->placements[c++]) = TTM_PL_FLAG_DESIRED; +#elif RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) bo->placements[c].mem_type = TTM_PL_SYSTEM; PLACEMENT_FLAGS(bo->placements[c++]) = 0; #elif RTLNX_VER_MIN(5,10,0) @@ -561,7 +570,10 @@ void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type) #endif } if (!c) { -#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) +#if RTLNX_VER_MIN(6,9,0) + bo->placements[c].mem_type = TTM_PL_SYSTEM; + PLACEMENT_FLAGS(bo->placements[c++]) = TTM_PL_FLAG_DESIRED; +#elif RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) bo->placements[c].mem_type = TTM_PL_SYSTEM; PLACEMENT_FLAGS(bo->placements[c++]) = 0; #elif RTLNX_VER_MIN(5,10,0) @@ -575,7 +587,9 @@ void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type) } bo->placement.num_placement = c; +#if RTLNX_VER_MAX(6,9,0) bo->placement.num_busy_placement = c; +#endif #if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2) for (i = 0; i < c; ++i) { |