Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1191044rwl; Wed, 12 Apr 2023 09:22:18 -0700 (PDT) X-Google-Smtp-Source: AKy350YuHJD4L3f55YEDonF24c+tvA9J8TnnhT0UP22ko3mAReS3J+nM0dpO5jy6kBsaVh1vr6PV X-Received: by 2002:a17:907:6088:b0:94e:732f:a594 with SMTP id ht8-20020a170907608800b0094e732fa594mr2279705ejc.23.1681316538122; Wed, 12 Apr 2023 09:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681316538; cv=none; d=google.com; s=arc-20160816; b=ZiXmSj2lcgefpO1httD5zM4R22gGsDNrE9je7iegMS9VG/sfkXakY1tLAR2R1SHw+k MCCtPWOeSbi4js2HuFb4SAyag4YWJRrd3NN4PKVcJELx84ha7Fl546oz/2QGdBTUuyH9 4L5Rr1zBH3yVka4L5MgOyLgbrtU2pZP2dRPIkRy6eRCx7lTGIeFjLwMzbq1oZnpDR8vt 6J5Xdxm9dZhYhCxABcvaqBlguqgYRm47cYaCQVKbqwpN0VfK9jkn5waLFho1JfVT9+d3 GbXegOxT02S8Jpry9yyM7Ja0UsXBK2mLj1xlUdpy4j8fFa6OYq5Dl9+R3zJ9fBGCbztQ JQFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:importance:content-transfer-encoding :mime-version:user-agent:cc:to:from:subject:date:references :in-reply-to:message-id:dkim-signature; bh=tTiC26LtLVcD78f9XrnMVdYwdC4wqXG9eUTWrm40yaw=; b=RMBr/tuBVxGhXiRGQDE7/WeFpgR4Ftd7KybQNcW/5IXx5qe/33O4EvG3aTXDs9t2Kt yDD2q1ifc5yEMVtriJaohRgxif/5nQYqhUJTxgwSn4/RJfLSYB9kp4Eiyvrc65JjEsoP XEyhXvxry8eYX3bntSa9m6A5vuQR70mHDlKDA7sXi6d3zrNY4ybzODHbzu1bavwz7ctI hAVIsCpyoX74aALxq6uPPMcL823yUuqt/1FrELk55t27W2GFBHlgHKBYm0n+9aYras/I Rba6+Ht7WLukkiSTix+hREM0zYLg5u98VIwYrXIxWdMqryWSYIlNBuQVAlJ0sKNiIJ2W ZMrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@panix.com header.s=panix header.b=hf6+uHU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=panix.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a1709070b1200b0094b5cda1875si5501623ejl.675.2023.04.12.09.21.53; Wed, 12 Apr 2023 09:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@panix.com header.s=panix header.b=hf6+uHU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=panix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjDLQSh (ORCPT + 99 others); Wed, 12 Apr 2023 12:18:37 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.)