From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD696C77B6E for ; Wed, 12 Apr 2023 16:18:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbjDLQSk (ORCPT ); Wed, 12 Apr 2023 12:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjDLQSe (ORCPT ); Wed, 12 Apr 2023 12:18:34 -0400 Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 708297280 for ; Wed, 12 Apr 2023 09:18:20 -0700 (PDT) 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" Cc: linux-kernel@vger.kernel.org, "Pierre Asselin" , "Jocelyn Falempe" , "Daniel Vetter" , dri-devel@lists.freedesktop.org, "Thomas Zimmermann" , "Javier Martinez Canillas" , "Ard Biesheuvel" , "Hans de Goede" 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.)