[vbox-dev] Fixes for kernel v5.5
Frank Batschulat
frank.batschulat at oracle.com
Thu Jan 2 10:04:59 GMT 2020
On 24.12.19 02:36, Larry Finger wrote:
> Index: VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_ttm.c
> ===================================================================
> --- VirtualBox-6.0.14.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
> +++ VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_ttm.c
> @@ -34,6 +34,10 @@
> */
> #include "vbox_drv.h"
> #include <ttm/ttm_page_alloc.h>
> +#include <linux/pci.h>
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
> +#include <drm/drm_fourcc.h>
> +#endif
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
> #define PLACEMENT_FLAGS(placement) (placement)
> @@ -310,11 +314,12 @@ int vbox_mm_init(struct vbox_private *vb
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) || defined(RHEL_71)
> dev->anon_inode->i_mapping,
> #endif
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
> - DRM_FILE_PAGE_OFFSET, true);
> -#else
> - true);
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
> + NULL,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
> + DRM_FILE_PAGE_OFFSET,
> #endif
> + true);
Btw, this is not an appropriate fix.
https://elixir.bootlin.com/linux/v5.5-rc4/source/drivers/gpu/drm/ttm/ttm_bo.c#L1696
int ttm_bo_device_init(struct ttm_bo_device *bdev,
struct ttm_bo_driver *driver,
struct address_space *mapping,
struct drm_vma_offset_manager *vma_manager,
bool need_dma32)
{
struct ttm_bo_global *glob = &ttm_bo_glob;
int ret;
if (WARN_ON(vma_manager == NULL))
return -EINVAL;
^^^^^^^^^^^^^^^^^^^^^^^^^
we have to do more then that.
--
frankB
Oracle Virtualbox Development
More information about the vbox-dev
mailing list