VirtualBox

Ignore:
Timestamp:
Jun 5, 2024 2:08:09 AM (8 months ago)
Author:
vboxsync
Message:

include/VBox,Main,DevVGA: Folded VBox/graphics.h into VBox/param.h and restored svga_reg.h to its vanilla state. bugref:10693

File:
1 edited

Legend:

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

    r104820 r104846  
    3434#include <iprt/cpp/utils.h>
    3535
    36 #include <VBox/graphics.h> /* For VRAM ranges. */
     36#include <VBox/param.h> /* For VRAM ranges. */
    3737#include <VBox/settings.h>
    3838
     
    847847    {
    848848        case GraphicsControllerType_VBoxVGA:
    849         {
    850849            cbMin = VGA_VRAM_MIN;
    851850            cbMax = VGA_VRAM_MAX;
    852851            break;
    853         }
    854852
    855853        case GraphicsControllerType_VMSVGA:
    856         {
    857854            cbMin = VGA_VRAM_MIN;
    858855            cbMax = VGA_VRAM_MAX;
    859856            break;
    860         }
    861 
     857
     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. */
    862867        case GraphicsControllerType_VBoxSVGA:
    863         {
    864868#ifdef VBOX_WITH_VMSVGA
    865869# ifdef VBOX_WITH_VMSVGA3D
    866870            if (fAccelerate3DEnabled)
    867                 cbMin = SVGA_VRAM_MIN_SIZE_3D;
     871                cbMin = VBOX_SVGA_VRAM_MIN_SIZE_3D;
    868872            else
    869 # endif /* VBOX_WITH_VMSVGA3D */
    870                 cbMin = SVGA_VRAM_MIN_SIZE;
    871             cbMax = SVGA_VRAM_MAX_SIZE;
     873# endif
     874                cbMin = VBOX_SVGA_VRAM_MIN_SIZE;
     875            cbMax = VBOX_SVGA_VRAM_MAX_SIZE;
     876            break;
    872877#else
    873878            return VBOX_E_NOT_SUPPORTED;
    874879#endif
    875             break;
    876         }
    877880
    878881        case GraphicsControllerType_QemuRamFB:
    879         {
    880882            /* We seem to hardcode 32-bit (4 bytes) as BPP, see RAMFB_BPP in QemuRamfb.c. */
    881883            cbMin = 4 /* BPP in bytes */ * 16    * 16;    /* Values taken from qemu/hw/display/ramfb.c */
    882884            cbMax = 4 /* BPP in bytes */ * 16000 * 12000; /* Values taken from bochs-vbe.h. */
    883885            break;
    884         }
    885886
    886887        default:
     
    893894    cbStride = (ULONG)cbStride / _1M;
    894895
     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. */
    895898#define MAKE_POWER_OF_TWO(a_MB) \
    896899    while (!RT_IS_POWER_OF_TWO(a_MB)) \
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