VirtualBox

Changeset 100653 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jul 19, 2023 2:35:39 PM (19 months ago)
Author:
vboxsync
Message:

Additions: Linux: vboxvideo: additional fixes for RHEL 9.3 kernel, bugref:10381.

This commit accumulates fixes for REHEL 9.3 kernel which needed
after it received DRM backports from vanilla kernel 5.19, 6.2 and 6.3.
Also fixes lost-in-time mutex_lock in vbox_crtc_page_flip.

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

Legend:

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

    r100025 r100653  
    173173#endif
    174174
    175 #if RTLNX_VER_MIN(6,3,0)
     175#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    176176# include <drm/ttm/ttm_bo.h>
    177177#else
     
    250250 * now represents number of bytes. This macro handles this change. Input
    251251 * argument is a pointer to struct ttm_resource. */
    252 #if RTLNX_VER_MIN(6,2,0)
     252#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    253253# define VBOX_BO_RESOURCE_NUM_PAGES(_resource) PFN_UP(_resource->size)
    254254#else
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r100436 r100653  
    5151#include <VBoxVideo.h>
    5252
    53 #if RTLNX_VER_MIN(6,2,0)
     53#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    5454# define VBOX_FBDEV_INFO(_helper) _helper.info
    5555#else
     
    326326        }
    327327
    328 #if RTLNX_VER_MIN(6,2,0)
     328#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    329329        info = drm_fb_helper_alloc_info(helper);
    330330#else
     
    350350        info->fbops = &vboxfb_ops;
    351351
    352 #if RTLNX_VER_MAX(6,3,0)
     352#if RTLNX_VER_MAX(6,3,0) && !RTLNX_RHEL_MAJ_PREREQ(9,3)
    353353        /*
    354354         * This seems to be done for safety checking that the framebuffer
     
    379379
    380380#ifdef CONFIG_FB_DEFERRED_IO
    381 # if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99)
     381# if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    382382        info->fix.smem_len = info->screen_size;
    383383# endif
     
    416416#endif
    417417
    418 #if RTLNX_VER_MIN(6,2,0)
     418#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    419419        drm_fb_helper_unregister_info(&fbdev->helper);
    420420#else
     
    464464        spin_lock_init(&fbdev->dirty_lock);
    465465
    466 #if RTLNX_VER_MIN(6,3,0)
     466#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    467467        drm_fb_helper_prepare(dev, &fbdev->helper, 32, &vbox_fb_helper_funcs);
    468468#elif RTLNX_VER_MIN(3,17,0) || RTLNX_RHEL_MIN(7,2)
     
    493493        drm_helper_disable_unused_functions(dev);
    494494
    495 #if RTLNX_VER_MIN(6,3,0)
     495#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    496496        ret = drm_fb_helper_initial_config(&fbdev->helper);
    497497#else
     
    512512        struct fb_info *fbdev = VBOX_FBDEV_INFO(vbox->fbdev->helper);
    513513
    514 #if RTLNX_VER_MIN(6,3,0)
     514#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    515515    fbdev->fix.smem_start =
    516516pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->fbdev->helper.dev), 0) + gpu_addr;
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r98868 r100653  
    3737#include <drm/drm_crtc_helper.h>
    3838
    39 #if RTLNX_VER_MIN(6,3,0)
     39#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    4040# include <drm/drm_modeset_helper.h>
    4141#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r100025 r100653  
    4040#include <linux/export.h>
    4141#include <drm/drm_crtc_helper.h>
    42 #if RTLNX_VER_MIN(6,3,0)
     42#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    4343# include <drm/drm_modeset_helper_vtables.h>
    4444# include <drm/drm_modeset_helper.h>
     
    317317                return rc;
    318318
     319        mutex_lock(&vbox->hw_mutex);
    319320        vbox_do_modeset(crtc, &crtc->mode);
    320321        mutex_unlock(&vbox->hw_mutex);
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r100025 r100653  
    3535#include "vbox_drv.h"
    3636
    37 #if RTLNX_VER_MIN(6,3,0)
     37#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    3838# include <drm/ttm/ttm_tt.h>
    3939#endif
     
    629629#endif
    630630
    631 #if RTLNX_VER_MIN(6,1,0)
     631#if RTLNX_VER_MIN(6,1,0) || RTLNX_RHEL_MAJ_PREREQ(9,3)
    632632        ret = ttm_bo_init_validate(&vbox->ttm.bdev, &vboxbo->bo,
    633633#else
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