VirtualBox

Ignore:
Timestamp:
Sep 20, 2023 2:14:26 PM (17 months ago)
Author:
vboxsync
Message:

Main,FE/Qt: Add the QEMU RAM based framebuffer device as a possible graphics controller for ARM platforms. Allows getting graphics output on guests like OpenSuse 15.4 and Oracle Linux 9 which don't have a compatible VSVGA3 device driver, bugref:10386

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp

    r101191 r101200  
    413413
    414414        /*
     415         * VGA.
     416         */
     417        ComPtr<IGraphicsAdapter> pGraphicsAdapter;
     418        hrc = pMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam());           H();
     419        GraphicsControllerType_T enmGraphicsController;
     420        hrc = pGraphicsAdapter->COMGETTER(GraphicsControllerType)(&enmGraphicsController);   H();
     421
     422        /*
    415423         * Devices
    416424         */
     
    482490        InsertConfigInteger(pCfg,  "MmioBase", 0x09020000);
    483491        InsertConfigInteger(pCfg,  "DmaEnabled",        1);
    484         InsertConfigInteger(pCfg,  "QemuRamfbSupport",  0);
    485         InsertConfigNode(pInst,    "LUN#0",           &pLunL0);
    486         InsertConfigString(pLunL0, "Driver",          "MainDisplay");
     492        InsertConfigInteger(pCfg,  "QemuRamfbSupport",  enmGraphicsController == GraphicsControllerType_QemuRamFB ? 1 : 0);
     493        if (enmGraphicsController == GraphicsControllerType_QemuRamFB)
     494        {
     495            InsertConfigNode(pInst,    "LUN#0",           &pLunL0);
     496            InsertConfigString(pLunL0, "Driver",          "MainDisplay");
     497        }
    487498
    488499        vrc = RTFdtNodeAddF(hFdt, "fw-cfg@%RX32", 0x09020000);                              VRC();
     
    637648        vrc = RTFdtNodeFinalize(hFdt);                                                      VRC();
    638649
    639         InsertConfigNode(pDevices, "vga", &pDev);
    640         InsertConfigNode(pDev,     "0", &pInst);
    641         InsertConfigInteger(pInst, "Trusted",           1);
    642         InsertConfigInteger(pInst, "PCIBusNo",          0);
    643         InsertConfigInteger(pInst, "PCIDeviceNo",       2);
    644         InsertConfigInteger(pInst, "PCIFunctionNo",     0);
    645         InsertConfigNode(pInst,    "Config", &pCfg);
    646         InsertConfigInteger(pCfg,  "VRamSize",          32 * _1M);
    647         InsertConfigInteger(pCfg,  "MonitorCount",         1);
    648         i_attachStatusDriver(pInst, DeviceType_Graphics3D);
    649         InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
    650         InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
    651         InsertConfigInteger(pCfg, "VMSVGAPciId", true);
    652         InsertConfigInteger(pCfg, "VMSVGA3dEnabled", false);
    653         InsertConfigInteger(pCfg, "VmSvga3", true);
    654         InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", false);
    655 
    656         /* Attach the display. */
    657         InsertConfigNode(pInst,    "LUN#0", &pLunL0);
    658         InsertConfigString(pLunL0, "Driver",               "MainDisplay");
    659         InsertConfigNode(pLunL0,   "Config", &pCfg);
    660 
     650        if (   enmGraphicsController != GraphicsControllerType_QemuRamFB
     651            && enmGraphicsController != GraphicsControllerType_Null)
     652        {
     653            InsertConfigNode(pDevices, "vga", &pDev);
     654            InsertConfigNode(pDev,     "0", &pInst);
     655            InsertConfigInteger(pInst, "Trusted",           1);
     656            InsertConfigInteger(pInst, "PCIBusNo",          0);
     657            InsertConfigInteger(pInst, "PCIDeviceNo",       2);
     658            InsertConfigInteger(pInst, "PCIFunctionNo",     0);
     659            InsertConfigNode(pInst,    "Config", &pCfg);
     660            InsertConfigInteger(pCfg,  "VRamSize",          32 * _1M);
     661            InsertConfigInteger(pCfg,  "MonitorCount",         1);
     662            i_attachStatusDriver(pInst, DeviceType_Graphics3D);
     663            InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
     664            InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
     665            InsertConfigInteger(pCfg, "VMSVGAPciId", true);
     666            InsertConfigInteger(pCfg, "VMSVGA3dEnabled", false);
     667            InsertConfigInteger(pCfg, "VmSvga3", true);
     668            InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", false);
     669
     670            /* Attach the display. */
     671            InsertConfigNode(pInst,    "LUN#0", &pLunL0);
     672            InsertConfigString(pLunL0, "Driver",               "MainDisplay");
     673            InsertConfigNode(pLunL0,   "Config", &pCfg);
     674        }
    661675
    662676        InsertConfigNode(pDevices, "VMMDev",          &pDev);
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