VirtualBox

Changeset 79025 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jun 6, 2019 2:33:47 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131177
Message:

Linux/host and guest drivers: support more openSUSE 15.0 and 15.1 kernels.

Location:
trunk/src/VBox/Additions/linux/drm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.c

    r77850 r79025  
    323323        .master_drop = vbox_master_drop,
    324324#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
    325 # if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) && !defined(RHEL_75)
     325# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) && !defined(RHEL_75) \
     326  && !defined(OPENSUSE_151)
    326327        .set_busid = drm_pci_set_busid,
    327328# endif
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r77850 r79025  
    7171# if RHEL_MAJOR == 7 && RHEL_MINOR >= 0
    7272#  define RHEL_70
     73# endif
     74#endif
     75
     76#if defined(CONFIG_SUSE_VERSION)
     77# if CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 1
     78#  define OPENSUSE_151
    7379# endif
    7480#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r77957 r79025  
    606606#endif
    607607
    608 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
     608#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && !defined(OPENSUSE_151)
    609609static void ttm_bo_put(struct ttm_buffer_object *bo)
    610610{
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r78067 r79025  
    501501                sum += edid[i];
    502502        edid[EDID_SIZE - 1] = (0x100 - (sum & 0xFF)) & 0xFF;
    503 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
     503#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || defined(OPENSUSE_151)
    504504        drm_connector_update_edid_property(connector, (struct edid *)edid);
    505505#else
     
    676676#endif
    677677
    678 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
     678#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || defined(OPENSUSE_151)
    679679        drm_connector_attach_encoder(connector, encoder);
    680680#else
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r77850 r79025  
    211211};
    212212
    213 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76)
     213#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76) \
     214  && !defined(OPENSUSE_151)
    214215static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
    215216                                         unsigned long size,
     
    228229
    229230        tt->func = &vbox_tt_backend_func;
    230 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76)
     231#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76) \
     232  && !defined(OPENSUSE_151)
    231233        if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
    232234#else
     
    241243
    242244#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
    243 # if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
     245# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) \
     246  && !defined(OPENSUSE_151)
    244247static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
    245248{
     
    275278        .io_mem_free = &vbox_ttm_io_mem_free,
    276279#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL_75)
    277 # if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
     280# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) \
     281  && !defined(OPENSUSE_151)
    278282        .io_mem_pfn = ttm_bo_default_io_mem_pfn,
    279283# endif
     
    299303                return ret;
    300304#endif
    301 
    302305        ret = ttm_bo_device_init(&vbox->ttm.bdev,
    303306#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
     
    421424        ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size,
    422425                          ttm_bo_type_device, &vboxbo->placement,
    423 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && !defined(RHEL_76)
     426#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && !defined(RHEL_76) \
     427  && !defined(OPENSUSE_151)
    424428                          align >> PAGE_SHIFT, false, NULL, acc_size,
    425429#else
     
    450454int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
    451455{
    452 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
     456#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76) \
     457  || defined(OPENSUSE_151)
    453458        struct ttm_operation_ctx ctx = { false, false };
    454459#endif
     
    468473                PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
    469474
    470 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
     475#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) \
     476  && !defined(OPENSUSE_151)
    471477        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
    472478#else
     
    486492int vbox_bo_unpin(struct vbox_bo *bo)
    487493{
    488 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
     494#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76) \
     495  || defined(OPENSUSE_151)
    489496        struct ttm_operation_ctx ctx = { false, false };
    490497#endif
     
    502509                PLACEMENT_FLAGS(bo->placements[i]) &= ~TTM_PL_FLAG_NO_EVICT;
    503510
    504 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
     511#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) \
     512  && !defined(OPENSUSE_151)
    505513        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
    506514#else
     
    520528int vbox_bo_push_sysram(struct vbox_bo *bo)
    521529{
    522 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
     530#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76) \
     531  || defined(OPENSUSE_151)
    523532        struct ttm_operation_ctx ctx = { false, false };
    524533#endif
     
    541550                PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
    542551
    543 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
     552#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76) \
     553  && !defined(OPENSUSE_151)
    544554        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
    545555#else
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette