Changeset 98034 in vbox
- Timestamp:
- Jan 9, 2023 6:41:48 PM (23 months ago)
- Location:
- trunk/src/VBox/Additions/linux/drm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_drv.h
r97556 r98034 241 241 #else 242 242 # define VBOX_DRM_TO_PCI_DEV(_dev) _dev->pdev 243 #endif 244 245 /** Field "num_pages" of struct ttm_resource was renamed to "size" in 6.2 and 246 * now represents number of bytes. This macro handles this change. Input 247 * argument is a pointer to struct ttm_resource. */ 248 #if RTLNX_VER_MIN(6,2,0) 249 # define VBOX_BO_RESOURCE_NUM_PAGES(_resource) PFN_UP(_resource->size) 250 #else 251 # define VBOX_BO_RESOURCE_NUM_PAGES(_resource) _resource->num_pages 243 252 #endif 244 253 -
trunk/src/VBox/Additions/linux/drm/vbox_fb.c
r96407 r98034 51 51 #include <VBoxVideo.h> 52 52 53 #if RTLNX_VER_MIN(6,2,0) 54 # define VBOX_FBDEV_INFO(_helper) _helper.info 55 #else 56 # define VBOX_FBDEV_INFO(_helper) _helper.fbdev 57 #endif 58 53 59 #if RTLNX_VER_MAX(4,7,0) && !RTLNX_RHEL_MAJ_PREREQ(7,4) 54 60 /** … … 303 309 304 310 #if RTLNX_VER_MIN(5,14,0) || RTLNX_RHEL_RANGE(8,6, 8,99) 305 ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.resource->num_pages, &bo->kmap);311 ret = ttm_bo_kmap(&bo->bo, 0, VBOX_BO_RESOURCE_NUM_PAGES(bo->bo.resource), &bo->kmap); 306 312 #elif RTLNX_VER_MIN(5,12,0) || RTLNX_RHEL_MAJ_PREREQ(8,5) 307 313 ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &bo->kmap); … … 316 322 } 317 323 324 #if RTLNX_VER_MIN(6,2,0) 325 info = drm_fb_helper_alloc_info(helper); 326 #else 318 327 info = drm_fb_helper_alloc_fbi(helper); 328 #endif 319 329 if (IS_ERR(info)) 320 330 return -PTR_ERR(info); … … 396 406 397 407 #ifdef CONFIG_FB_DEFERRED_IO 398 if (fbdev->helper.fbdev && fbdev->helper.fbdev->fbdefio) 399 fb_deferred_io_cleanup(fbdev->helper.fbdev); 400 #endif 401 408 if (VBOX_FBDEV_INFO(fbdev->helper) && VBOX_FBDEV_INFO(fbdev->helper)->fbdefio) 409 fb_deferred_io_cleanup(VBOX_FBDEV_INFO(fbdev->helper)); 410 #endif 411 412 #if RTLNX_VER_MIN(6,2,0) 413 drm_fb_helper_unregister_info(&fbdev->helper); 414 #else 402 415 drm_fb_helper_unregister_fbi(&fbdev->helper); 416 #endif 403 417 404 418 if (afb->obj) { … … 483 497 void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr) 484 498 { 485 struct fb_info *fbdev = vbox->fbdev->helper.fbdev;499 struct fb_info *fbdev = VBOX_FBDEV_INFO(vbox->fbdev->helper); 486 500 487 501 fbdev->fix.smem_start = fbdev->apertures->ranges[0].base + gpu_addr; -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r96407 r98034 866 866 867 867 #if RTLNX_VER_MIN(5,14,0) || RTLNX_RHEL_RANGE(8,6, 8,99) 868 ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.resource->num_pages, &uobj_map);868 ret = ttm_bo_kmap(&bo->bo, 0, VBOX_BO_RESOURCE_NUM_PAGES(bo->bo.resource), &uobj_map); 869 869 #elif RTLNX_VER_MIN(5,12,0) || RTLNX_RHEL_MAJ_PREREQ(8,5) 870 870 ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &uobj_map);
Note:
See TracChangeset
for help on using the changeset viewer.