儲存庫 vbox 的更動 65992
- 時間撮記:
- 2017-3-8 上午11:24:53 (8 年 以前)
- 位置:
- trunk/src/VBox/Additions/linux
- 檔案:
-
- 修改 8 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/linux/drm/vbox_drv.h
r65381 r65992 64 64 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) 65 65 # include <drm/drm_gem.h> 66 #endif 67 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 68 # include <drm/drm_encoder.h> 66 69 #endif 67 70 … … 143 146 144 147 int vbox_driver_load(struct drm_device *dev, unsigned long flags); 148 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 149 void vbox_driver_unload(struct drm_device *dev); 150 #else 145 151 int vbox_driver_unload(struct drm_device *dev); 152 #endif 146 153 void vbox_driver_lastclose(struct drm_device *dev); 147 154 -
trunk/src/VBox/Additions/linux/drm/vbox_fb.c
r65381 r65992 325 325 info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0); 326 326 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 327 330 drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); 331 #endif 328 332 drm_fb_helper_fill_var(info, &fbdev->helper, sizes->fb_width, sizes->fb_height); 329 333 … … 416 420 drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs); 417 421 #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 418 425 ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs, vbox->num_crtcs); 426 #endif 419 427 if (ret) 420 428 goto free; -
trunk/src/VBox/Additions/linux/drm/vbox_main.c
r65381 r65992 177 177 int ret; 178 178 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 179 182 drm_helper_mode_fill_fb_struct(&vbox_fb->base, mode_cmd); 183 #endif 180 184 vbox_fb->obj = obj; 181 185 ret = drm_framebuffer_init(dev, &vbox_fb->base, &vbox_fb_funcs); … … 395 399 } 396 400 401 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 402 void vbox_driver_unload(struct drm_device *dev) 403 #else 397 404 int vbox_driver_unload(struct drm_device *dev) 405 #endif 398 406 { 399 407 struct vbox_private *vbox = dev->dev_private; … … 411 419 kfree(vbox); 412 420 dev->dev_private = NULL; 413 return 0; 421 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) 422 return 0; 423 #endif 414 424 } 415 425 -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r65381 r65992 80 80 height = mode->vdisplay ? mode->vdisplay : 480; 81 81 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; 84 90 pitch = crtc->enabled ? CRTC_FB(crtc)->pitch : width * bpp / 8; 85 #else86 pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;87 91 #endif 88 92 x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint; … … 97 101 && vbox_crtc->fb_offset % (bpp / 8) == 0) 98 102 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, 100 109 vbox_crtc->fb_offset % pitch / bpp * 8 + crtc->x, 101 110 vbox_crtc->fb_offset / pitch + crtc->y); -
trunk/src/VBox/Additions/linux/drm/vbox_ttm.c
r64564 r65992 281 281 .io_mem_reserve = &vbox_ttm_io_mem_reserve, 282 282 .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) 284 284 .lru_tail = &ttm_bo_default_lru_tail, 285 285 .swap_lru_tail = &ttm_bo_default_swap_lru_tail, -
trunk/src/VBox/Additions/linux/sharedfolders/regops.c
r65200 r65992 445 445 } 446 446 447 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25) 447 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 448 static int sf_reg_fault(struct vm_fault *vmf) 449 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25) 448 450 static int sf_reg_fault(struct vm_area_struct *vma, struct vm_fault *vmf) 449 451 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) … … 460 462 uint32_t nread = PAGE_SIZE; 461 463 int err; 464 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 465 struct vm_area_struct *vma = vmf->vma; 466 #endif 462 467 struct file *file = vma->vm_file; 463 468 struct inode *inode = GET_F_DENTRY(file)->d_inode; … … 540 545 .fault = sf_reg_fault 541 546 #else 542 547 .nopage = sf_reg_nopage 543 548 #endif 544 549 }; -
trunk/src/VBox/Additions/linux/sharedfolders/utils.c
r62527 r65992 291 291 [generic_fillattr] */ 292 292 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 293 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 294 int sf_getattr(const struct path *path, struct kstat *kstat, u32 request_mask, unsigned int flags) 295 # else 293 296 int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *kstat) 297 # endif 294 298 { 295 299 int err; 300 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 301 struct dentry *dentry = path->dentry; 302 # endif 296 303 297 304 TRACE(); -
trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h
r62527 r65992 101 101 extern int sf_inode_revalidate(struct dentry *dentry); 102 102 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 103 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 104 extern int sf_getattr(const struct path *path, struct kstat *kstat, 105 u32 request_mask, unsigned int query_flags); 106 # else 103 107 extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, 104 108 struct kstat *kstat); 109 #endif 105 110 extern int sf_setattr(struct dentry *dentry, struct iattr *iattr); 106 111 #endif
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器