Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 28768C7619A for ; Wed, 12 Apr 2023 16:18:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23C1210E30F; Wed, 12 Apr 2023 16:18:21 +0000 (UTC) Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51B0C88A3E for ; Wed, 12 Apr 2023 16:18:19 +0000 (UTC) Received: from mail.panix.com (localhost [127.0.0.1]) by mailbackend.panix.com (Postfix) with ESMTPA id 4PxSYj2B8gz3yPF; Wed, 12 Apr 2023 12:18:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1681316297; bh=EfKelFtoShfAhHqsoxi/BGgvCZiUEnz4TLFlAjiSo44=; h=In-Reply-To:References:Date:Subject:From:To:Cc; b=hf6+uHU714xRrWJOVS+5WY97gm61cgZRYHW15DTVO2hg9igUgERCcz5Bhmp/C7uPX oSPSd9Wp+NF7fC7Z5/HYWmHOjsr7ywut0ijR6zFNreDKYW5Oxa3ZRMBhr2IuTg/ytn vEPfmuMYEc7SnSE9tg2qYCLLIsN4/lappkOk/F/Q= X-Panix-Received: from 166.84.1.2 (SquirrelMail authenticated user pa@panix.com) by mail.panix.com with HTTP; Wed, 12 Apr 2023 12:18:17 -0400 Message-ID: <2e07f818ccdff7023a060e732d7c4ef6.squirrel@mail.panix.com> In-Reply-To: <20230412150225.3757223-1-javierm@redhat.com> References: <20230412150225.3757223-1-javierm@redhat.com> Date: Wed, 12 Apr 2023 12:18:17 -0400 Subject: Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated From: "Pierre Asselin" To: "Javier Martinez Canillas" User-Agent: SquirrelMail/1.4.23-p1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jocelyn Falempe , Pierre Asselin , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Hans de Goede , Thomas Zimmermann , Ard Biesheuvel Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > The commit f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection") > fixed format selection, by calculating the bits-per-pixel instead of just > using the reported color depth. > > But unfortunately this broke some modes because the stride is always set > to the reported line length (in bytes), which could not match the actual > stride if the calculated bits-per-pixel doesn't match the reported depth. > > Fixes: f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection") > Reported-by: Pierre Asselin > Signed-off-by: Javier Martinez Canillas > --- > > drivers/firmware/sysfb_simplefb.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/sysfb_simplefb.c > b/drivers/firmware/sysfb_simplefb.c > index 82c64cb9f531..5dc23e57089f 100644 > --- a/drivers/firmware/sysfb_simplefb.c > +++ b/drivers/firmware/sysfb_simplefb.c > > [patch elided] NOOOOOO ! The 1024x768x32 screen is all garbled. (gfxpayload=keep, gfxpayload=1024x768x32 or vga=0x318). The other modes work as before (but the dmesg has less information; I'll investigate.)