- Timestamp:
- Jun 5, 2024 2:08:09 AM (8 months ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.h
r104786 r104846 72 72 #endif 73 73 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. */ 77 AssertCompile(VBOX_SVGA_VRAM_MIN_SIZE == SVGA_VRAM_MIN_SIZE); 78 AssertCompile(VBOX_SVGA_VRAM_MIN_SIZE_3D == SVGA_VRAM_MIN_SIZE_3D); 79 AssertCompile(VBOX_SVGA_VRAM_MAX_SIZE == SVGA_VRAM_MAX_SIZE); 80 #endif 75 81 76 82 #include <iprt/list.h> -
trunk/src/VBox/Devices/Graphics/vmsvga_include/svga_reg.h
r104786 r104846 41 41 42 42 #include "svga_types.h" 43 44 #include <VBox/graphics.h> /* For VRAM ranges. */45 43 46 44 /* … … 2270 2268 * Size of SVGA device memory such as frame buffer and FIFO. 2271 2269 */ 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) 2272 2273 #define SVGA_MEMORY_SIZE_MAX (1024 * 1024 * 1024) 2273 2274 #define SVGA_FIFO_SIZE_MAX (2 * 1024 * 1024) -
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r104820 r104846 34 34 #include <iprt/cpp/utils.h> 35 35 36 #include <VBox/ graphics.h> /* For VRAM ranges. */36 #include <VBox/param.h> /* For VRAM ranges. */ 37 37 #include <VBox/settings.h> 38 38 … … 847 847 { 848 848 case GraphicsControllerType_VBoxVGA: 849 {850 849 cbMin = VGA_VRAM_MIN; 851 850 cbMax = VGA_VRAM_MAX; 852 851 break; 853 }854 852 855 853 case GraphicsControllerType_VMSVGA: 856 {857 854 cbMin = VGA_VRAM_MIN; 858 855 cbMax = VGA_VRAM_MAX; 859 856 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. */ 862 867 case GraphicsControllerType_VBoxSVGA: 863 {864 868 #ifdef VBOX_WITH_VMSVGA 865 869 # ifdef VBOX_WITH_VMSVGA3D 866 870 if (fAccelerate3DEnabled) 867 cbMin = SVGA_VRAM_MIN_SIZE_3D;871 cbMin = VBOX_SVGA_VRAM_MIN_SIZE_3D; 868 872 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; 872 877 #else 873 878 return VBOX_E_NOT_SUPPORTED; 874 879 #endif 875 break;876 }877 880 878 881 case GraphicsControllerType_QemuRamFB: 879 {880 882 /* We seem to hardcode 32-bit (4 bytes) as BPP, see RAMFB_BPP in QemuRamfb.c. */ 881 883 cbMin = 4 /* BPP in bytes */ * 16 * 16; /* Values taken from qemu/hw/display/ramfb.c */ 882 884 cbMax = 4 /* BPP in bytes */ * 16000 * 12000; /* Values taken from bochs-vbe.h. */ 883 885 break; 884 }885 886 886 887 default: … … 893 894 cbStride = (ULONG)cbStride / _1M; 894 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. */ 895 898 #define MAKE_POWER_OF_TWO(a_MB) \ 896 899 while (!RT_IS_POWER_OF_TWO(a_MB)) \
Note:
See TracChangeset
for help on using the changeset viewer.