virtualbox/modify_for_4_8_bo_move.patch

36 lines
1.3 KiB
Diff

Index: VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_ttm.c
===================================================================
--- VirtualBox-5.1.4.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
+++ VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_ttm.c
@@ -221,7 +221,11 @@ static int vbox_bo_move(struct ttm_buffe
struct ttm_mem_reg *new_mem)
{
int r;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
+#else
+ r = ttm_bo_move_memcpy(bo, evict, interruptible, no_wait_gpu, new_mem);
+#endif
return r;
}
Index: VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_drv.c
===================================================================
--- VirtualBox-5.1.4.orig/src/VBox/Additions/linux/drm/vbox_drv.c
+++ VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_drv.c
@@ -244,9 +244,14 @@ static int vbox_master_set(struct drm_de
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
static void vbox_master_drop(struct drm_device *dev,
struct drm_file *file_priv,
bool from_release)
+#else
+static void vbox_master_drop(struct drm_device *dev,
+ struct drm_file *file_priv)
+#endif
{
struct vbox_private *vbox = dev->dev_private;
vbox->initial_mode_queried = false;