VirtualBox

儲存庫 vbox 的更動 65992


忽略:
時間撮記:
2017-3-8 上午11:24:53 (8 年 以前)
作者:
vboxsync
訊息:

Additions/linux: Linux 4.11 compile fixes

位置:
trunk/src/VBox/Additions/linux
檔案:
修改 8 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r65381 r65992  
    6464#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
    6565# include <drm/drm_gem.h>
     66#endif
     67#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     68# include <drm/drm_encoder.h>
    6669#endif
    6770
     
    143146
    144147int vbox_driver_load(struct drm_device *dev, unsigned long flags);
     148#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     149void vbox_driver_unload(struct drm_device *dev);
     150#else
    145151int vbox_driver_unload(struct drm_device *dev);
     152#endif
    146153void vbox_driver_lastclose(struct drm_device *dev);
    147154
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r65381 r65992  
    325325    info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
    326326
     327#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     328    drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
     329#else
    327330    drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
     331#endif
    328332    drm_fb_helper_fill_var(info, &fbdev->helper, sizes->fb_width, sizes->fb_height);
    329333
     
    416420    drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
    417421#endif
     422#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     423    ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs);
     424#else
    418425    ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs, vbox->num_crtcs);
     426#endif
    419427    if (ret)
    420428        goto free;
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r65381 r65992  
    177177    int ret;
    178178
     179#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     180    drm_helper_mode_fill_fb_struct(dev, &vbox_fb->base, mode_cmd);
     181#else
    179182    drm_helper_mode_fill_fb_struct(&vbox_fb->base, mode_cmd);
     183#endif
    180184    vbox_fb->obj = obj;
    181185    ret = drm_framebuffer_init(dev, &vbox_fb->base, &vbox_fb_funcs);
     
    395399}
    396400
     401#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     402void vbox_driver_unload(struct drm_device *dev)
     403#else
    397404int vbox_driver_unload(struct drm_device *dev)
     405#endif
    398406{
    399407    struct vbox_private *vbox = dev->dev_private;
     
    411419    kfree(vbox);
    412420    dev->dev_private = NULL;
    413     return 0;
     421#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
     422    return 0;
     423#endif
    414424}
    415425
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r65381 r65992  
    8080    height = mode->vdisplay ? mode->vdisplay : 480;
    8181    crtc_id = vbox_crtc->crtc_id;
    82     bpp = crtc->enabled ? CRTC_FB(crtc)->bits_per_pixel : 32;
    83 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
     82#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     83    bpp   = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
     84    pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
     85#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)
     86    bpp   = crtc->enabled ? CRTC_FB(crtc)->bits_per_pixel : 32;
     87    pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
     88#else
     89    bpp   = crtc->enabled ? CRTC_FB(crtc)->bits_per_pixel : 32;
    8490    pitch = crtc->enabled ? CRTC_FB(crtc)->pitch : width * bpp / 8;
    85 #else
    86     pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
    8791#endif
    8892    x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint;
     
    97101        && vbox_crtc->fb_offset % (bpp / 8) == 0)
    98102        VBoxVideoSetModeRegisters(width, height, pitch * 8 / bpp,
    99                           CRTC_FB(crtc)->bits_per_pixel, 0,
     103#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     104                          CRTC_FB(crtc)->format->cpp[0] * 8,
     105#else
     106                          CRTC_FB(crtc)->bits_per_pixel,
     107#endif
     108                          0,
    100109                          vbox_crtc->fb_offset % pitch / bpp * 8 + crtc->x,
    101110                          vbox_crtc->fb_offset / pitch + crtc->y);
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r64564 r65992  
    281281    .io_mem_reserve = &vbox_ttm_io_mem_reserve,
    282282    .io_mem_free = &vbox_ttm_io_mem_free,
    283 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
     283#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
    284284    .lru_tail = &ttm_bo_default_lru_tail,
    285285    .swap_lru_tail = &ttm_bo_default_swap_lru_tail,
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r65200 r65992  
    445445}
    446446
    447 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
     447#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     448static int sf_reg_fault(struct vm_fault *vmf)
     449#elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
    448450static int sf_reg_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
    449451#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     
    460462    uint32_t nread = PAGE_SIZE;
    461463    int err;
     464#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     465    struct vm_area_struct *vma = vmf->vma;
     466#endif
    462467    struct file *file = vma->vm_file;
    463468    struct inode *inode = GET_F_DENTRY(file)->d_inode;
     
    540545    .fault = sf_reg_fault
    541546#else
    542      .nopage = sf_reg_nopage
     547    .nopage = sf_reg_nopage
    543548#endif
    544549};
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r62527 r65992  
    291291   [generic_fillattr] */
    292292#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     293# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     294int sf_getattr(const struct path *path, struct kstat *kstat, u32 request_mask, unsigned int flags)
     295# else
    293296int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *kstat)
     297# endif
    294298{
    295299    int err;
     300# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     301    struct dentry *dentry = path->dentry;
     302# endif
    296303
    297304    TRACE();
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r62527 r65992  
    101101extern int  sf_inode_revalidate(struct dentry *dentry);
    102102#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     103# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     104extern int  sf_getattr(const struct path *path, struct kstat *kstat,
     105                       u32 request_mask, unsigned int query_flags);
     106# else
    103107extern int  sf_getattr(struct vfsmount *mnt, struct dentry *dentry,
    104108                       struct kstat *kstat);
     109#endif
    105110extern int  sf_setattr(struct dentry *dentry, struct iattr *iattr);
    106111#endif
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette