- Timestamp:
- Aug 4, 2023 6:12:46 PM (17 months ago)
- Location:
- trunk/src/VBox/Additions/linux/drm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_fb.c
r100677 r100800 198 198 .fb_set_par = drm_fb_helper_set_par, 199 199 #if RTLNX_VER_MIN(6,5,0) 200 __FB_DEFAULT_SYS_OPS_DRAW,200 FB_DEFAULT_SYS_OPS, 201 201 #else 202 202 .fb_fillrect = drm_fb_helper_sys_fillrect, … … 375 375 #endif 376 376 377 #if RTLNX_VER_MIN(6,5,0) 378 info->screen_buffer = (char *)bo->kmap.virtual; 379 info->fix.smem_start = page_to_phys(vmalloc_to_page(bo->kmap.virtual)); 380 #endif 377 381 info->screen_base = (char __iomem *)bo->kmap.virtual; 378 382 info->screen_size = size; … … 383 387 # endif 384 388 info->fbdefio = &vbox_defio; 389 # if RTLNX_VER_MIN(5,19,0) 390 ret = fb_deferred_io_init(info); 391 if (ret) 392 { 393 DRM_ERROR("failed to initialize deferred io: %d\n", ret); 394 return ret; 395 } 396 # endif 385 397 fb_deferred_io_init(info); 386 398 #endif … … 513 525 514 526 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3) 515 fbdev->fix.smem_start = 516 pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->fbdev->helper.dev), 0) + gpu_addr; 527 fbdev->fix.smem_start = pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->fbdev->helper.dev), 0) + gpu_addr; 517 528 #else 518 529 fbdev->fix.smem_start = fbdev->apertures->ranges[0].base + gpu_addr; -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r100677 r100800 870 870 dst = vbox->cursor_data; 871 871 872 #if RTLNX_VER_MIN(6,4,0) 873 /* Make sure bo is in SYSTEM (main) memory, so we can access it directly. */ 874 ret = vbox_bo_pin(bo, VBOX_MEM_TYPE_SYSTEM, NULL); 875 if (ret) 876 { 877 DRM_ERROR("cannot pin bo to main memory\n"); 878 goto out_bo_unpin; 879 } 880 #endif 881 872 882 #if RTLNX_VER_MIN(5,14,0) || RTLNX_RHEL_RANGE(8,6, 8,99) 873 883 ret = ttm_bo_kmap(&bo->bo, 0, VBOX_BO_RESOURCE_NUM_PAGES(bo->bo.resource), &uobj_map); … … 901 911 out_unmap_bo: 902 912 ttm_bo_kunmap(&uobj_map); 913 #if RTLNX_VER_MIN(6,4,0) 914 out_bo_unpin: 915 vbox_bo_unpin(bo); 916 #endif 903 917 out_unreserve_bo: 904 918 vbox_bo_unreserve(bo); -
trunk/src/VBox/Additions/linux/drm/vbox_ttm.c
r100677 r100800 364 364 struct ttm_place *hop) 365 365 { 366 # if RTLNX_VER_MIN(6,4,0) 367 if (!bo->resource) 368 { 369 if (new_mem->mem_type != TTM_PL_SYSTEM) 370 { 371 hop->mem_type = TTM_PL_SYSTEM; 372 hop->flags = TTM_PL_FLAG_TEMPORARY; 373 return -EMULTIHOP; 374 } 375 ttm_bo_move_null(bo, new_mem); 376 return 0; 377 } 378 # endif 366 379 return ttm_bo_move_memcpy(bo, ctx, new_mem); 367 380 } … … 577 590 .free = vbox_gem_free_object, 578 591 .print_info = drm_gem_ttm_print_info, 592 # if RTLNX_VER_MIN(6,5,0) 593 .vmap = drm_gem_ttm_vmap, 594 .vunmap = drm_gem_ttm_vunmap, 595 # endif 579 596 # if RTLNX_VER_MIN(5,14,0) || RTLNX_RHEL_RANGE(8,6, 8,99) 580 597 .mmap = drm_gem_ttm_mmap,
Note:
See TracChangeset
for help on using the changeset viewer.