VirtualBox

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


Ignore:
Timestamp:
Feb 14, 2020 11:35:05 AM (5 years ago)
Author:
vboxsync
Message:

GA/Linux: ticketref:19145 kernel 5.5-rc1/rc2 - we need changes, portions contributed by Larry Finger

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

Legend:

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

    r82968 r83073  
    3737#include <linux/vt_kern.h>
    3838
    39 #include <drm/drmP.h>
    4039#include <drm/drm_crtc_helper.h>
    4140
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r82968 r83073  
    4949#include <linux/io.h>
    5050#include <linux/string.h>
     51#include <linux/pci.h>
    5152
    5253#if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
     
    104105#endif
    105106
     107#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)
    106108#include <drm/drmP.h>
     109#else /* >= KERNEL_VERSION(5, 5, 0) */
     110#include <drm/drm_file.h>
     111#include <drm/drm_drv.h>
     112#include <drm/drm_device.h>
     113#include <drm/drm_ioctl.h>
     114#include <drm/drm_fourcc.h>
     115#include <drm/drm_irq.h>
     116#include <drm/drm_vblank.h>
     117#endif /* >= KERNEL_VERSION(5, 5, 0) */
    107118#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
    108119#include <drm/drm_encoder.h>
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r82968 r83073  
    4343#include <linux/init.h>
    4444
    45 #include <drm/drmP.h>
    4645#include <drm/drm_crtc.h>
    4746#include <drm/drm_fb_helper.h>
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r82968 r83073  
    399399                                                    *connector)
    400400{
     401#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
     402        struct drm_encoder *encoder;
     403
     404        /* There is only one encoder per connector */
     405        drm_connector_for_each_possible_encoder(connector, encoder)
     406            return encoder;
     407#else /* KERNEL_VERSION < 5.5 */
    401408        int enc_id = connector->encoder_ids[0];
    402409
    403410        /* pick the encoder ids */
    404411        if (enc_id)
    405 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) || \
    406     (defined(CONFIG_SUSE_VERSION) && \
    407         LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) || \
    408     defined(RHEL_76)
     412# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) || \
     413     (defined(CONFIG_SUSE_VERSION) && \
     414         LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) || \
     415     defined(RHEL_76)
    409416                return drm_encoder_find(connector->dev, NULL, enc_id);
    410 #else
     417# else
    411418                return drm_encoder_find(connector->dev, enc_id);
    412 #endif
    413 
     419# endif
     420#endif /* KERNEL_VERSION < 5.5 */
    414421        return NULL;
    415422}
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r82968 r83073  
    311311                                 dev->anon_inode->i_mapping,
    312312#endif
    313 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
    314                                  DRM_FILE_PAGE_OFFSET, true);
    315 #else
     313#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
     314                                 dev->vma_offset_manager,
     315#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
     316                                 DRM_FILE_PAGE_OFFSET,
     317#endif
    316318                                 true);
    317 #endif
    318319        if (ret) {
    319320                DRM_ERROR("Error initialising bo driver; %d\n", ret);
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