VirtualBox

Changeset 71947 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Apr 20, 2018 2:59:20 PM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/drm: update drm driver to work with EL7.5, standard kernel.
No bugref.

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

Legend:

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

    r69524 r71947  
    273273        .master_drop = vbox_master_drop,
    274274#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
    275 # if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
     275# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) && !defined(RHEL_75)
    276276        .set_busid = drm_pci_set_busid,
    277277# endif
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r69748 r71947  
    5050
    5151#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
     52# if RHEL_MAJOR == 7 && RHEL_MINOR >= 5
     53#  define RHEL_75
     54# endif
    5255# if RHEL_MAJOR == 7 && RHEL_MINOR >= 4
    53 #  define RHEL_73
    5456#  define RHEL_74
    55 # elif RHEL_MAJOR == 7 && RHEL_MINOR >= 3
     57# endif
     58# if RHEL_MAJOR == 7 && RHEL_MINOR >= 3
    5659#  define RHEL_73
    5760# endif
     
    6366#endif
    6467#include <drm/drm_fb_helper.h>
    65 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     68#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    6669#include <drm/drm_encoder.h>
    6770#endif
     
    160163
    161164int vbox_driver_load(struct drm_device *dev, unsigned long flags);
    162 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     165#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    163166void vbox_driver_unload(struct drm_device *dev);
    164167#else
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r69748 r71947  
    318318        info->fix.smem_len = size;
    319319
    320 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     320#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    321321        drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
    322322#else
     
    401401        drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
    402402#endif
    403 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     403#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    404404        ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs);
    405405#else
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r68334 r71947  
    173173        int ret;
    174174
    175 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     175#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    176176        drm_helper_mode_fill_fb_struct(dev, &vbox_fb->base, mode_cmd);
    177177#else
     
    405405}
    406406
    407 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     407#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    408408void vbox_driver_unload(struct drm_device *dev)
    409409#else
     
    427427        kfree(vbox);
    428428        dev->dev_private = NULL;
    429 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
     429#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) && !defined(RHEL_75)
    430430        return 0;
    431431#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r71946 r71947  
    7070        height = mode->vdisplay ? mode->vdisplay : 480;
    7171        crtc_id = vbox_crtc->crtc_id;
    72 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     72#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    7373        bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
    7474        pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
     
    9494                VBoxVideoSetModeRegisters(
    9595                        width, height, pitch * 8 / bpp,
    96 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     96#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    9797                        CRTC_FB(crtc)->format->cpp[0] * 8,
    9898#else
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r68336 r71947  
    268268        .io_mem_reserve = &vbox_ttm_io_mem_reserve,
    269269        .io_mem_free = &vbox_ttm_io_mem_free,
    270 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
     270#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL_75)
    271271        .io_mem_pfn = ttm_bo_default_io_mem_pfn,
    272272#endif
    273273#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)) \
    274274    || defined(RHEL_74)
     275# ifndef RHEL_75
    275276        .lru_tail = &ttm_bo_default_lru_tail,
    276277        .swap_lru_tail = &ttm_bo_default_swap_lru_tail,
     278# endif
    277279#endif
    278280};
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