VirtualBox

Changeset 104851 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 5, 2024 10:58:41 AM (8 months ago)
Author:
vboxsync
Message:

Main: Addressed @todos in IPlatformProperties::getSupportedVRAMRange(). bugref:​10693

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp

    r104846 r104851  
    856856            break;
    857857
    858 /** @todo r=bird: I think this is wrong.  The VMSVGA variant is the one that
    859  *        is trying to be the most compatible with the original HW (same PCI
    860  *        IDs etc). So, I don't see why we're subjecting VBoxSVGA to the SVGA
    861  *        limitations and the original VMSVGA variant to the VBox/VGA ones.
    862  *
    863  *        Other than the higher minimum values compared to VGA_VRAM_MIN,
    864  *        I'm not sure we need to care too much about restricting the MAX to
    865  *        128MB for either VMSVGA nor VBoxSVGA.  We should be using
    866  *        VGA_VRAM_MAX for all three. */
    867858        case GraphicsControllerType_VBoxSVGA:
    868859#ifdef VBOX_WITH_VMSVGA
     
    873864# endif
    874865                cbMin = VBOX_SVGA_VRAM_MIN_SIZE;
    875             cbMax = VBOX_SVGA_VRAM_MAX_SIZE;
     866            /* We don't want to limit ourselves to VBOX_SVGA_VRAM_MAX_SIZE,
     867             * so we use VGA_VRAM_MAX (as we do for VBoxVGA + VMSVGA) here as well. */
     868            cbMax = VGA_VRAM_MAX;
    876869            break;
    877870#else
     
    893886    cbMax    = (ULONG)(RT_ALIGN_64(cbMax, cbStride) / _1M);
    894887    cbStride = (ULONG)cbStride / _1M;
    895 
    896     /** @todo r=bird: Why this? Why do these have to be powers of two?
    897      * The algorithm could be better, use ASMBitLastSetU32 next time. */
    898 #define MAKE_POWER_OF_TWO(a_MB) \
    899     while (!RT_IS_POWER_OF_TWO(a_MB)) \
    900         a_MB = a_MB + 1; \
    901 
    902     MAKE_POWER_OF_TWO(cbMin);
    903     MAKE_POWER_OF_TWO(cbMax);
    904     MAKE_POWER_OF_TWO(cbStride);
    905 
    906 #undef MAKE_POWER_OF_TWO
    907888
    908889    /* Finally, clamp the values to our schema definitions before returning. */
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