From 6f89660efea64e9a38d2aa958c8dbf47fcfcef6f0f860aed9eb5cbf2f6a7a7a4 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 2 Oct 2019 22:12:15 +0000 Subject: [PATCH] Accepting request 734678 from home:lwfinger:branches:Virtualization - Update file "fixes_for_5.4.patch" to handle removal of DRIVER_PRIME and rework of struct ttm_buffer_object. These are needed for Kernel_HEAD_standard. OBS-URL: https://build.opensuse.org/request/show/734678 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=507 --- fixes_for_5.4.patch | 37 +++++++++++++++++++++++++++++++++++++ virtualbox.changes | 6 ++++++ 2 files changed, 43 insertions(+) diff --git a/fixes_for_5.4.patch b/fixes_for_5.4.patch index 394069b..d02a488 100644 --- a/fixes_for_5.4.patch +++ b/fixes_for_5.4.patch @@ -70,3 +70,40 @@ Index: VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c RTDECL(RTTHREAD) RTThreadSelf(void) { +Index: VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_drv.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Additions/linux/drm/vbox_drv.c ++++ VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_drv.c +@@ -271,11 +271,13 @@ static void vbox_master_drop(struct drm_ + + static struct drm_driver driver = { + .driver_features = +- DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) ++ DRIVER_PRIME | ++#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) + DRIVER_IRQ_SHARED | + #endif +- DRIVER_PRIME, ++ DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, + .dev_priv_size = 0, + + .load = vbox_driver_load, +Index: VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_main.c +=================================================================== +--- VirtualBox-6.0.12.orig/src/VBox/Additions/linux/drm/vbox_main.c ++++ VirtualBox-6.0.12/src/VBox/Additions/linux/drm/vbox_main.c +@@ -619,8 +619,12 @@ static inline u64 vbox_bo_mmap_offset(st + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70) + return bo->bo.addr_space_offset; + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) ++ return drm_vma_node_offset_addr(&bo->bo.base.vma_node); ++#else + return drm_vma_node_offset_addr(&bo->bo.vma_node); + #endif ++#endif + } + + int diff --git a/virtualbox.changes b/virtualbox.changes index 099b48b..ca4b1e3 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 2 19:08:58 UTC 2019 - Larry Finger + +- Update file "fixes_for_5.4.patch" to handle removal of DRIVER_PRIME and rework of + struct ttm_buffer_object. + ------------------------------------------------------------------- Thu Sep 26 14:46:23 UTC 2019 - Larry Finger