Re: [PATCH] x86/efi: Add EFI framebuffer earlyprintk support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 10, 2013 at 8:09 PM, Peter Jones <pjones@xxxxxxxxxx> wrote:
> INTN
> GetPixelElementSize (
> IN EFI_PIXEL_BITMASK *PixelBits
> )
> {
>         INTN HighestPixel = -1;
>         INTN BluePixel;
>         INTN RedPixel;
>         INTN GreenPixel;
>         INTN RsvdPixel;
>         BluePixel = FindHighestSetBit (PixelBits->BlueMask);
>         RedPixel = FindHighestSetBit (PixelBits->RedMask);
>         GreenPixel = FindHighestSetBit (PixelBits->GreenMask);
>         RsvdPixel = FindHighestSetBit (PixelBits->ReservedMask);
>         HighestPixel = max (BluePixel, RedPixel);
>         HighestPixel = max (HighestPixel, GreenPixel);
>         HighestPixel = max (HighestPixel, RsvdPixel);
>         return HighestPixel;
> }
> EFI_PHYSICAL_ADDRESS NewPixelAddress;
> EFI_PHYSICAL_ADDRESS CurrentPixelAddress;
> EFI_GRAPHICS_OUTPUT_MODE_INFORMATION OutputInfo;
> INTN PixelElementSize;
>
> switch (OutputInfo.PixelFormat) {
>         case PixelBitMask:
>                 PixelElementSize = GetPixelElementSize (&OutputInfo.PixelInformation);

So this can be less than 32.

>                 break;
>         case PixelBlueGreenRedReserved8BitPerColor:
>         case PixelRedGreenBlueReserved8BitPerColor:
>                 PixelElementSize = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);
>                 break;
> }
>
> Which makes this painfully clear.
>
>> Also, the main question would be, what is the typical value for
>> si->lfb_depth. 32 on almost all EFI systems? All around the map? Depends
>> on what graphics state the EFI bootloader passes us?
>
> Yes, 32 on almost all systems that implement a framebuffer console at
> all.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux