VirtualBox

Changeset 88274 in vbox


Ignore:
Timestamp:
Mar 24, 2021 12:49:44 PM (4 years ago)
Author:
vboxsync
Message:

GAs: Linux: make vboxvideo work w/ 5.12-rc4 kernel, bugref:9976.

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

Legend:

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

    r88212 r88274  
    318318            DRIVER_PRIME,
    319319#else  /* >= 5.4.0 && RHEL >= 8.3 */
    320         .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
     320                .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
    321321#endif /* <  5.4.0 */
    322322
    323323#if RTLNX_VER_MAX(4,19,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3)
    324     /* Legacy hooks, but still supported. */
     324        /* Legacy hooks, but still supported. */
    325325        .load = vbox_driver_load,
    326326        .unload = vbox_driver_unload,
     
    351351#if RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,3)
    352352        .dumb_destroy = vbox_dumb_destroy,
    353 #else
     353#elif RTLNX_VER_MAX(5,12,0)
    354354        .dumb_destroy = drm_gem_dumb_destroy,
    355355#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r87092 r88274  
    175175#include <drm/ttm/ttm_placement.h>
    176176#include <drm/ttm/ttm_memory.h>
    177 #include <drm/ttm/ttm_module.h>
     177#if RTLNX_VER_MAX(5,12,0)
     178# include <drm/ttm/ttm_module.h>
     179#endif
    178180#if RTLNX_VER_MIN(5,10,0)
    179181# include <drm/ttm/ttm_resource.h>
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r87092 r88274  
    302302        }
    303303
     304#if RTLNX_VER_MIN(5,12,0)
     305        ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &bo->kmap);
     306#else
    304307        ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
     308#endif
     309
    305310        vbox_bo_unreserve(bo);
    306311        if (ret) {
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r87092 r88274  
    857857        dst = vbox->cursor_data;
    858858
     859#if RTLNX_VER_MIN(5,12,0)
     860        ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &uobj_map);
     861#else
    859862        ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &uobj_map);
     863#endif
    860864        if (ret) {
    861865                vbox->cursor_data_size = 0;
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r88207 r88274  
    212212        mem->bus.addr = NULL;
    213213        mem->bus.offset = 0;
     214# if RTLNX_VER_MAX(5,12,0)
    214215        mem->size = mem->num_pages << PAGE_SHIFT;
     216# endif
    215217        mem->start = 0;
    216218        mem->bus.is_iomem = false;
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