Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2759908rwl; Thu, 13 Apr 2023 10:25:59 -0700 (PDT) X-Google-Smtp-Source: AKy350amUNC4rdbyfvukFHopp6RICteQ5zN4LF1KPzv23ZzI/6IocJHaB9kjdhT6yRc+o8Pd430b X-Received: by 2002:a17:902:c408:b0:1a0:4046:23f2 with SMTP id k8-20020a170902c40800b001a0404623f2mr3661993plk.56.1681406758716; Thu, 13 Apr 2023 10:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681406758; cv=none; d=google.com; s=arc-20160816; b=r8KV9wffyQuKCZKsNR4sA2ee44l7rPWNIvtdZzPQg1eg/CsxoSXpvJfqVjFvXYcbMI D/cc4Kuon2C9vxtMELxhHCcgLCNqSwVKjRGpLKZT/CVzuAtMZ9JXEEaY3GpygoBrg3+s ztaHJ/tJ8XJNTM9bDo1l4A4u825SsvejEVEUjQWId1U8RvDo7mqX1QPc04XZANB93ICE YD9kkVXufZkVOJ1ilnGmZX4UpXglHVWUvH2DuMTd0arpoA6wQqGtfyj+L+/Mxvh2wKq1 jJwM8thHbuO3g1gdzbvp4/22cS3gqAT0FXbd+1kmiTtdnN79iVtf8sRC+uPWHaqqyp9b RyrA== 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=J8sgTGVX+RyEqOjyLZivPoE+mR+ZLv+kkh8XkmW1Hd4=; b=lIVzHDSFdo+XvRwzNPjBd9EKdGNyIREhLG0caGfnoKkssB2brkeib7Lup4YfDFmRnZ t0xKuGTR1P7z2/ODUN4Jl/cVDsEnS91/L4AZlzDUbnBq+3BzKdsSNqICDgpnHjeGVBRC VGeIzRIy481dZEkVTNUf7Y6/eRSY3WUPnVpsEUXkdTxcWbMrJbuzyWgF25GElLdGyl86 fbOaNfOzQc7ykQk6rTWDU36gcc6qp71VElbekaY2Q/M/oPalKkiBB5yXV8EA6rgMy8p5 /V+yG7UeAdNMMRL2izjeO74kS9yNba4uVXJ2nVd3fmjTYblqLgm4jdYh0ao3Dlgcml0F U7+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@panix.com header.s=panix header.b=o0XW89jo; 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 w6-20020a170902e88600b001a243522551si2612859plg.432.2023.04.13.10.25.44; Thu, 13 Apr 2023 10:25:58 -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=o0XW89jo; 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 S229866AbjDMRRE (ORCPT + 99 others); Thu, 13 Apr 2023 13:17:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjDMRRC (ORCPT ); Thu, 13 Apr 2023 13:17:02 -0400 Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93914EF2 for ; Thu, 13 Apr 2023 10:17:01 -0700 (PDT) Received: from mail.panix.com (localhost [127.0.0.1]) by mailbackend.panix.com (Postfix) with ESMTPA id 4Py5q03lLmzGnY; Thu, 13 Apr 2023 13:17:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1681406220; bh=EpKPSDY3pI5akJnTcUrdSxzpwgzwbCqQ/pqWVxZ4cNA=; h=In-Reply-To:References:Date:Subject:From:To:Cc; b=o0XW89jo7SzcgI9sm9nXnLB3CXXdcFig5at8ANygia74jHYxc2ALghmqTTqNw3/Sh Jy/5b4v4q0F5fsNlRWCSPPb6EUOemlV4RPuDaaruYBK8RtKER2rLnrE+v+LkJSM0GD unUpvaIlkbmSx6z7MGlc1l1UT4R1kmDJcPsbmw1s= X-Panix-Received: from 166.84.1.3 (SquirrelMail authenticated user pa@panix.com) by mail.panix.com with HTTP; Thu, 13 Apr 2023 13:17:00 -0400 Message-ID: <84b1b88aabf7e70951d7680f05694249.squirrel@mail.panix.com> In-Reply-To: <87o7nsuumt.fsf@minerva.mail-host-address-is-not-set> References: <20230412150225.3757223-1-javierm@redhat.com> <2e07f818ccdff7023a060e732d7c4ef6.squirrel@mail.panix.com> <87jzyhror0.fsf@minerva.mail-host-address-is-not-set> <1afd3044c2aca9322ecf304941c7df66.squirrel@mail.panix.com> <87fs94stgw.fsf@minerva.mail-host-address-is-not-set> <87cz48srs4.fsf@minerva.mail-host-address-is-not-set> <40edb0fdb0eaff434f4872dd677923a6.squirrel@mail.panix.com> <87a5zcsqg8.fsf@minerva.mail-host-address-is-not-set> <9e6fff69b09b36cbdd96499cd0015154.squirrel@mail.panix.com> <4PxhQn3zK1zcbc@panix1.panix.com> <87o7nsuumt.fsf@minerva.mail-host-address-is-not-set> Date: Thu, 13 Apr 2023 13:17:00 -0400 Subject: Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated From: "Pierre Asselin" To: "Javier Martinez Canillas" Cc: "Pierre Asselin" , tzimmermann@suse.de, linux-kernel@vger.kernel.org, jfalempe@redhat.com, hdegoede@redhat.com, dri-devel@lists.freedesktop.org, daniel.vetter@ffwll.ch, ardb@kernel.org 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 > diff --git a/drivers/firmware/sysfb_simplefb.c > b/drivers/firmware/sysfb_simplefb.c > index 82c64cb9f531..0ab8c542b1f5 100644 > --- a/drivers/firmware/sysfb_simplefb.c > +++ b/drivers/firmware/sysfb_simplefb.c > @@ -55,14 +55,10 @@ __init bool sysfb_parse_mode(const struct screen_info > *si, > * ignore simplefb formats with alpha bits, as EFI and VESA > * don't specify alpha channels. > */ > - if (si->lfb_depth > 8) { > - bits_per_pixel = max(max3(si->red_size + si->red_pos, > - si->green_size + si->green_pos, > - si->blue_size + si->blue_pos), > - si->rsvd_size + si->rsvd_pos); > - } else { > + if (si->lfb_depth > 8) > + bits_per_pixel = si->lfb_linelength * 8 / si->lfb_width; > + else > bits_per_pixel = si->lfb_depth; > - } > > for (i = 0; i < ARRAY_SIZE(formats); ++i) { > const struct simplefb_format *f = &formats[i]; > > base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d > -- > 2.40.0 Patch is good on both boxes.