From nobody Sat May 10 11:51:18 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1496078743872180.84927117807229; Mon, 29 May 2017 10:25:43 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coresystems.de) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1dFOPW-0002on-4p; Mon, 29 May 2017 19:24:54 +0200 Received: from das-labor.org ([188.40.89.130]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1dFOPL-0002mi-Je for seabios@seabios.org; Mon, 29 May 2017 19:24:51 +0200 From: Patrick Rudolph Authentication-Results: das-labor.org; dkim=permerror (bad message/signature format) To: seabios@seabios.org Date: Mon, 29 May 2017 19:25:10 +0200 Message-ID: <20170529172514.8308-2-siro@das-labor.org> In-Reply-To: <20170529172514.8308-1-siro@das-labor.org> References: <20170529172514.8308-1-siro@das-labor.org> X-Spam-Score: -2.7 (--) Subject: [SeaBIOS] [PATCH 1/5] SeaVGABios/cbvga: Advertise correct pixel format X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Accumulate the pixel format's bits instead relying on coreboot's bits_per_pixel, which says nothing about the active pixel format. Allows VBE to correctly advertise XRGB8 and BGRX8 framebuffer formats, commonly used by coreboot. Fixes at least Windows Bootloader and gfxboot. Signed-off-by: Patrick Rudolph --- vgasrc/cbvga.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index b8216a9..39ffdbb 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -1,6 +1,7 @@ // Simple framebuffer vgabios for use with coreboot native vga init. // // Copyright (C) 2014 Kevin O'Connor +// Copyright (C) 2017 Patrick Rudolph // // This file may be distributed under the terms of the GNU LGPLv3 license. =20 @@ -164,7 +165,8 @@ cbvga_setup(void) } =20 u64 addr =3D GET_FARVAR(0, cbfb->physical_address); - u8 bpp =3D GET_FARVAR(0, cbfb->bits_per_pixel); + u8 bpp =3D cbfb->blue_mask_size + cbfb->green_mask_size + + cbfb->red_mask_size + cbfb->reserved_mask_size; u32 xlines =3D GET_FARVAR(0, cbfb->x_resolution); u32 ylines =3D GET_FARVAR(0, cbfb->y_resolution); u32 linelength =3D GET_FARVAR(0, cbfb->bytes_per_line); --=20 2.9.3 _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios