libeg/screen.c
VOID egDumpGOPVideoModes(VOID)
{
    EFI_STATUS  Status;
    UINT32      MaxMode;
    UINT32      Mode;
    UINTN       SizeOfInfo;
    EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
    CHAR16      *PixelFormatDesc;

    if (GraphicsOutput == NULL) {
        return;
    }

    // get dump
    MaxMode = GraphicsOutput->Mode->MaxMode;
    Mode = GraphicsOutput->Mode->Mode;

    for (Mode = 0; Mode < MaxMode; Mode++) {
        Status = GraphicsOutput->QueryMode(GraphicsOutput, Mode, &SizeOfInfo, &Info);
        if (Status == EFI_SUCCESS) {

            switch (Info->PixelFormat) {
                case PixelRedGreenBlueReserved8BitPerColor:
                    PixelFormatDesc = L"8bit RGB";
                    break;

                case PixelBlueGreenRedReserved8BitPerColor:
                    PixelFormatDesc = L"8bit BGR";
                    break;

                case PixelBitMask:
                    PixelFormatDesc = L"BITMASK";
                    break;

                case PixelBltOnly:
                    PixelFormatDesc = L"NO FB";
                    break;

                default:
                    PixelFormatDesc = L"invalid";
                    break;
            }
        }
    }
}
// Fetches all the available video modes from the GraphicsOutput module
// compatible with the GOP Graphics card.
Fetches all the available video modes from the GraphicsOutput module
compatible with the GOP Graphics card.
Fetches all the available video modes from the GraphicsOutput module compatible with the GOP Graphics card .
VOID egDumpGOPVideoModes(VOID)
{
    EFI_STATUS  Status;
    UINT32      MaxMode;
    UINT32      Mode;
    UINTN       SizeOfInfo;
    EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
    CHAR16      *PixelFormatDesc;
    if (GraphicsOutput == NULL) {
        return;
    }
    MaxMode = GraphicsOutput->Mode->MaxMode;
    Mode = GraphicsOutput->Mode->Mode;
    for (Mode = 0; Mode < MaxMode; Mode++) {
        Status = GraphicsOutput->QueryMode(GraphicsOutput, Mode, &SizeOfInfo, &Info);
        if (Status == EFI_SUCCESS) {
            switch (Info->PixelFormat) {
                case PixelRedGreenBlueReserved8BitPerColor:
                    PixelFormatDesc = L"8bit RGB";
                    break;
                case PixelBlueGreenRedReserved8BitPerColor:
                    PixelFormatDesc = L"8bit BGR";
                    break;
                case PixelBitMask:
                    PixelFormatDesc = L"BITMASK";
                    break;
                case PixelBltOnly:
                    PixelFormatDesc = L"NO FB";
                    break;
                default:
                    PixelFormatDesc = L"invalid";
                    break;
            }
        }
    }
}
VOID egDumpGOPVideoModes ( VOID ) { EFI_STATUS Status ; UINT32 MaxMode ; UINT32 Mode ; UINTN SizeOfInfo ; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION * Info ; CHAR16 * PixelFormatDesc ; if ( GraphicsOutput == NULL ) { return ; } MaxMode = GraphicsOutput -> Mode -> MaxMode ; Mode = GraphicsOutput -> Mode -> Mode ; for ( Mode = 0 ; Mode < MaxMode ; Mode ++ ) { Status = GraphicsOutput -> QueryMode ( GraphicsOutput , Mode , & SizeOfInfo , & Info ) ; if ( Status == EFI_SUCCESS ) { switch ( Info -> PixelFormat ) { case PixelRedGreenBlueReserved8BitPerColor : PixelFormatDesc = L" " ; break ; case PixelBlueGreenRedReserved8BitPerColor : PixelFormatDesc = L" " ; break ; case PixelBitMask : PixelFormatDesc = L" " ; break ; case PixelBltOnly : PixelFormatDesc = L" " ; break ; default : PixelFormatDesc = L" " ; break ; } } } }
Fetches all the available video modes from the GraphicsOutput module
compatible with the GOP Graphics card.
Fetches all the available video modes from the GraphicsOutput module compatible with the GOP Graphics card .
// get dump