VirtualBox

Changeset 74615 in vbox for trunk


Ignore:
Timestamp:
Oct 4, 2018 3:44:01 PM (6 years ago)
Author:
vboxsync
Message:

Additions/linux/vboxvideo: fix building on various EL 7 minor releases.
bugref:4567: Linux kernel driver maintenance

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

Legend:

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

    r74581 r74615  
    205205        .mmap = vbox_mmap,
    206206        .poll = drm_poll,
    207 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_73)
     207#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
    208208        .fasync = drm_fasync,
    209209#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r74581 r74615  
    5959#  define RHEL_73
    6060# endif
     61# if RHEL_MAJOR == 7 && RHEL_MINOR >= 2
     62#  define RHEL_72
     63# endif
    6164# if RHEL_MAJOR == 7 && RHEL_MINOR >= 1
    6265#  define RHEL_71
     66# endif
     67# if RHEL_MAJOR == 7 && RHEL_MINOR >= 0
     68#  define RHEL_70
    6369# endif
    6470#endif
     
    8086
    8187#include <drm/drmP.h>
    82 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
     88#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_72)
    8389#include <drm/drm_gem.h>
    8490#endif
     
    262268#endif
    263269
    264 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && !defined(RHEL_73)
     270#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && !defined(RHEL_71)
    265271#define CRTC_FB(crtc) ((crtc)->fb)
    266272#else
     
    293299        struct ttm_bo_kmap_obj kmap;
    294300        struct drm_gem_object gem;
    295 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_73)
     301#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
    296302        u32 placements[3];
    297303#else
     
    368374struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj);
    369375struct drm_gem_object *vbox_gem_prime_import_sg_table(struct drm_device *dev,
    370 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_73)
     376#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
    371377                                                      size_t size,
    372378#else
  • trunk/src/VBox/Additions/linux/drm/vbox_irq.c

    r69083 r74615  
    200200
    201201        vbox_update_mode_hints(vbox);
    202 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(RHEL_73)
     202#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(RHEL_71)
    203203        ret = drm_irq_install(vbox->dev, vbox->dev->pdev->irq);
    204204#else
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r74581 r74615  
    474474        struct vbox_private *vbox = dev->dev_private;
    475475
    476 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(RHEL_73)
     476#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(RHEL_71)
    477477        if (vbox->fbdev)
    478478                drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper);
     
    563563static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
    564564{
    565 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_73)
     565#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
    566566        return bo->bo.addr_space_offset;
    567567#else
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r74581 r74615  
    4040#include <linux/export.h>
    4141#include <drm/drm_crtc_helper.h>
    42 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
     42#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_72)
    4343#include <drm/drm_plane_helper.h>
    4444#endif
     
    381381}
    382382
    383 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && !defined(RHEL_73)
     383#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && !defined(RHEL_72)
    384384static struct drm_encoder *drm_encoder_find(struct drm_device *dev, u32 id)
    385385{
     
    588588        vbox_set_edid(connector, preferred_width, preferred_height);
    589589
    590 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_73)
     590#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_72)
    591591        if (vbox_connector->vbox_crtc->x_hint != -1)
    592592                drm_object_property_set_value(&connector->base,
     
    620620
    621621        vbox_connector = to_vbox_connector(connector);
    622 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && !defined(RHEL_73)
     622#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && !defined(RHEL_72)
    623623        drm_sysfs_connector_remove(connector);
    624624#else
     
    692692        connector->doublescan_allowed = 0;
    693693
    694 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_73)
     694#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_72)
    695695        drm_mode_create_suggested_offset_properties(dev);
    696696        drm_object_attach_property(&connector->base,
     
    699699                                   dev->mode_config.suggested_y_property, 0);
    700700#endif
    701 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && !defined(RHEL_73)
     701#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && !defined(RHEL_72)
    702702        drm_sysfs_connector_add(connector);
    703703#else
  • trunk/src/VBox/Additions/linux/drm/vbox_prime.c

    r69325 r74615  
    5151
    5252struct drm_gem_object *vbox_gem_prime_import_sg_table(struct drm_device *dev,
    53 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_73)
     53#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
    5454                                                      size_t size,
    5555#else
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r72641 r74615  
    3636#include <ttm/ttm_page_alloc.h>
    3737
    38 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_73)
     38#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
    3939#define PLACEMENT_FLAGS(placement) (placement)
    4040#else
     
    299299                                 vbox->ttm.bo_global_ref.ref.object,
    300300                                 &vbox_bo_driver,
    301 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) || defined(RHEL_73)
     301#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) || defined(RHEL_71)
    302302                                 dev->anon_inode->i_mapping,
    303303#endif
     
    351351{
    352352        u32 c = 0;
    353 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_73)
     353#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(RHEL_72)
    354354        bo->placement.fpfn = 0;
    355355        bo->placement.lpfn = 0;
     
    373373        bo->placement.num_placement = c;
    374374        bo->placement.num_busy_placement = c;
    375 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
     375#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_72)
    376376        for (i = 0; i < c; ++i) {
    377377                bo->placements[i].fpfn = 0;
     
    400400
    401401        vboxbo->bo.bdev = &vbox->ttm.bdev;
    402 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && !defined(RHEL_73)
     402#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && !defined(RHEL_71)
    403403        vboxbo->bo.bdev->dev_mapping = dev->dev_mapping;
    404404#endif
     
    416416                          align >> PAGE_SHIFT, false, acc_size,
    417417#endif
    418 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
     418#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_72)
    419419                          NULL,
    420420#endif
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