VirtualBox

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


Ignore:
Timestamp:
Oct 20, 2017 10:17:44 AM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/drm: make vboxvideo work with Linux 4.14.
bugref:8524: Additions/linux: play nicely with distribution-installed Additions

Changes needed to build against Linux 4.14, applying them to older versions
too where that will not hurt.

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

Legend:

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

    r68336 r69143  
    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)
    275276        .set_busid = drm_pci_set_busid,
     277# endif
    276278#endif
    277279
     
    308310static int __init vbox_init(void)
    309311{
    310 #ifdef CONFIG_VGA_CONSOLE
     312#ifdef CONFIG_VGA_CONSOLE || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
    311313        if (vgacon_text_force() && vbox_modeset == -1)
    312314                return -EINVAL;
     
    316318                return -EINVAL;
    317319
    318         return drm_pci_init(&driver, &vbox_pci_driver);
     320        return pci_register_driver(&vbox_pci_driver);
    319321}
    320322
    321323static void __exit vbox_exit(void)
    322324{
    323         drm_pci_exit(&driver, &vbox_pci_driver);
     325        pci_unregister_driver(&vbox_pci_driver);
    324326}
    325327
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r68334 r69143  
    339339}
    340340
    341 static void vbox_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
    342                               u16 blue, int regno)
    343 {
    344 }
    345 
    346 static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
    347                               u16 *blue, int regno)
    348 {
    349         *red = regno;
    350         *green = regno;
    351         *blue = regno;
    352 }
    353 
    354341static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
    355         .gamma_set = vbox_fb_gamma_set,
    356         .gamma_get = vbox_fb_gamma_get,
    357342        .fb_probe = vboxfb_create,
    358343};
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