Changeset 104846 in vbox for trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
- Timestamp:
- Jun 5, 2024 2:08:09 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.