VirtualBox

Changeset 75402 in vbox


Ignore:
Timestamp:
Nov 12, 2018 4:50:53 PM (6 years ago)
Author:
vboxsync
Message:

Addiitons/linux/vboxvideo: make vboxvideo work with EL7.6 standard kernel.
bugref:4567: Linux kernel driver maintenance.
Contributed by Robert Conde. Many thanks!

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

Legend:

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

    r74882 r75402  
    4747
    4848#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
     49# if RHEL_MAJOR == 7 && RHEL_MINOR >= 6
     50#  define RHEL_76
     51# endif
    4952# if RHEL_MAJOR == 7 && RHEL_MINOR >= 5
    5053#  define RHEL_75
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r74986 r75402  
    357357        if (enc_id)
    358358#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) || \
    359     (defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15)
     359    (defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15) || \
     360                defined(RHEL_76)
    360361                return drm_encoder_find(connector->dev, NULL, enc_id);
    361362#else
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r74810 r75402  
    205205};
    206206
    207 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
     207#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76)
    208208static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
    209209                                         unsigned long size,
     
    222222
    223223        tt->func = &vbox_tt_backend_func;
    224 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
     224#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)) && !defined(RHEL_76)
    225225        if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
    226226#else
     
    235235
    236236#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
    237 # if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
     237# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
    238238static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
    239239{
     
    269269        .io_mem_free = &vbox_ttm_io_mem_free,
    270270#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL_75)
    271 # if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
     271# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
    272272        .io_mem_pfn = ttm_bo_default_io_mem_pfn,
    273273# endif
     
    408408                          align >> PAGE_SHIFT, false, acc_size,
    409409#endif
    410 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_72)
     410#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_72)) && !defined(RHEL_76)
    411411                          NULL, NULL, vbox_bo_ttm_destroy);
    412412#else
     
    432432int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
    433433{
    434 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
     434#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
    435435        struct ttm_operation_ctx ctx = { false, false };
    436436#endif
     
    450450                PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
    451451
    452 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
     452#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
    453453        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
    454454#else
     
    468468int vbox_bo_unpin(struct vbox_bo *bo)
    469469{
    470 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
     470#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
    471471        struct ttm_operation_ctx ctx = { false, false };
    472472#endif
     
    484484                PLACEMENT_FLAGS(bo->placements[i]) &= ~TTM_PL_FLAG_NO_EVICT;
    485485
    486 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
     486#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
    487487        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
    488488#else
     
    502502int vbox_bo_push_sysram(struct vbox_bo *bo)
    503503{
    504 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
     504#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)) || defined(RHEL_76)
    505505        struct ttm_operation_ctx ctx = { false, false };
    506506#endif
     
    523523                PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
    524524
    525 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
     525#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)) && !defined(RHEL_76)
    526526        ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
    527527#else
Note: See TracChangeset for help on using the changeset viewer.

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