Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1758792rwl; Wed, 12 Apr 2023 18:41:22 -0700 (PDT) X-Google-Smtp-Source: AKy350br+zLMTt1eEe1f87xVYzoh5mxuDVeWqMD/y7k2P2ii9E1NwlKNfiPFXJE7mb5PAGk9KIl6 X-Received: by 2002:a17:90a:e507:b0:247:e4c:d168 with SMTP id t7-20020a17090ae50700b002470e4cd168mr176149pjy.10.1681350082602; Wed, 12 Apr 2023 18:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681350082; cv=none; d=google.com; s=arc-20160816; b=fm3ZOSWFtwfIhhvqPYrmXqDtL/ZcNwsPkn/SIpXr7c3O1NK2EdvRXyqWoSZHDGfKxg b6K2yQU6dXpRTkU3UuYNgipxEBvtC9Kk4xA35OMafLhXwVZf5RFvdMfQ9ub8qQDz5pPG ADay7pNU4rvsMG42eXdv8Wc46HpYZAg0fjJ8lquwWbGT9XobsNYIsUrkgsry0pvCPqFr 87fe2QHUk/JIj3pt8uq+jHmapYA3W7YPhd77eKZooBKSCweQjtWtiZZJykbhHt027UMy Jv6WSoca41HEoUPFKvELEoACDsYuzeE/0+5HRvTgGjhJXBe3s+KHZWDS7xgCiaUEhly/ 1fEw== 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=mg3ULELdmip2ziNDMZNfbM2eh+87lOKxB+yKMXehEUk=; b=BhiI2ec6vuYtc89NNVME6p9UKl3B7/mC1QYkrYDBm8ACSmt0rjoWQQkE8BirPkWGpV t9n0MkSk86DTjeVSqgLrl9IiNjjfUWuZBGfBuwbD+jlb5Xt7syIy+uc1H1Tf5cVFxM86 HNJZuP44KlnCUVpcHKwfxxQeGKEkaAotq4hvTlpMrostYMmA88/eda3sPCd3Rcw31OIi UPXMknNpWRc+ivG5to4Ff0UWPo8mqzbOkUoNpq6l/lqopxSb19vRfEsSoFHAE9/jOhIP Jbu58NQHcC2j6Keli7C0NnxgHrz2lPuTYwpepyAI3mbjyk1iDellACtqvceWl6WXAsYK Z1og== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@panix.com header.s=panix header.b=LrVUQ9SD; 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 q8-20020a17090a1b0800b002469b9db540si582753pjq.23.2023.04.12.18.41.11; Wed, 12 Apr 2023 18:41:22 -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=LrVUQ9SD; 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 S229667AbjDMBeg (ORCPT + 99 others); Wed, 12 Apr 2023 21:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjDMBef (ORCPT ); Wed, 12 Apr 2023 21:34:35 -0400 Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8BD440C4 for ; Wed, 12 Apr 2023 18:34:34 -0700 (PDT) Received: from mail.panix.com (localhost [127.0.0.1]) by mailbackend.panix.com (Postfix) with ESMTPA id 4PxhvY3fGJz2vls; Wed, 12 Apr 2023 21:34:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1681349673; bh=ttP36cvM3SeBuIZNI6FDWxhhzpIFeQ19ryLaTKM7zPw=; h=In-Reply-To:References:Date:Subject:From:To:Cc; b=LrVUQ9SDKQ29apum0gcw9biln6brtDc8tUdwOzymNTTvvMrIeFC5FKQnc1ZNG4FKY rhjiF0kLrZnz3HhN5Z6gv3iCjT3V4A3kwoVcN1PSQIahxAM5MkjKoF0pX0DB6KCstE yKL/oIEX9IQ+N5JJxqT9dF67OyuTQzviZ6n9h8TA= X-Panix-Received: from 166.84.1.2 (SquirrelMail authenticated user pa@panix.com) by mail.panix.com with HTTP; Wed, 12 Apr 2023 21:34:33 -0400 Message-ID: In-Reply-To: <4PxhQn3zK1zcbc@panix1.panix.com> 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> Date: Wed, 12 Apr 2023 21:34:33 -0400 Subject: Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated From: "Pierre Asselin" To: "Pierre Asselin" Cc: pa@panix.com, javierm@redhat.com, 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 > (not tested) Tested. It fixes the regression on my laptop. > diff --git a/drivers/firmware/sysfb_simplefb.c > b/drivers/firmware/sysfb_simplefb.c > index 82c64cb9f531..9f5299d54732 100644 > --- a/drivers/firmware/sysfb_simplefb.c > +++ b/drivers/firmware/sysfb_simplefb.c > @@ -56,10 +56,11 @@ __init bool sysfb_parse_mode(const struct screen_info > *si, > * don't specify alpha channels. > */ > if (si->lfb_depth > 8) { > - bits_per_pixel = max(max3(si->red_size + si->red_pos, > + bits_per_pixel = max3(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); > + si->rsvd_size + si->rsvd_pos, > + si->lfb_depth); > } else { > bits_per_pixel = si->lfb_depth; > }