VirtualBox

Changeset 104846 in vbox for trunk/src


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

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r104786 r104846  
    7272#endif
    7373
    74 #include <VBox/graphics.h> /* For VRAM ranges. */
     74#include <VBox/param.h> /* For VRAM ranges. */
     75#ifdef VBOX_WITH_VMSVGA
     76/* Make sure the param.h copy of the SVGA VRAM sizes matches the originals. */
     77AssertCompile(VBOX_SVGA_VRAM_MIN_SIZE    == SVGA_VRAM_MIN_SIZE);
     78AssertCompile(VBOX_SVGA_VRAM_MIN_SIZE_3D == SVGA_VRAM_MIN_SIZE_3D);
     79AssertCompile(VBOX_SVGA_VRAM_MAX_SIZE    == SVGA_VRAM_MAX_SIZE);
     80#endif
    7581
    7682#include <iprt/list.h>
  • trunk/src/VBox/Devices/Graphics/vmsvga_include/svga_reg.h

    r104786 r104846  
    4141
    4242#include "svga_types.h"
    43 
    44 #include <VBox/graphics.h> /* For VRAM ranges. */
    4543
    4644/*
     
    22702268 * Size of SVGA device memory such as frame buffer and FIFO.
    22712269 */
     2270#define SVGA_VRAM_MIN_SIZE             (4 * 640 * 480) /* bytes */
     2271#define SVGA_VRAM_MIN_SIZE_3D       (16 * 1024 * 1024)
     2272#define SVGA_VRAM_MAX_SIZE         (128 * 1024 * 1024)
    22722273#define SVGA_MEMORY_SIZE_MAX      (1024 * 1024 * 1024)
    22732274#define SVGA_FIFO_SIZE_MAX           (2 * 1024 * 1024)
  • 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