Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1379894rwl; Wed, 12 Apr 2023 11:54:26 -0700 (PDT) X-Google-Smtp-Source: AKy350abtDtEv88CDo69ZPhRXwHg15fgHTPvxVrcmEg8vNXsm0CcVMoEvBJq+iBFJ7kbZNyE4XZL X-Received: by 2002:a62:4ecd:0:b0:635:6603:2534 with SMTP id c196-20020a624ecd000000b0063566032534mr3560290pfb.14.1681325666647; Wed, 12 Apr 2023 11:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681325666; cv=none; d=google.com; s=arc-20160816; b=TRQTCOr+EeevhVNFzY6aOSAdkPJEzxcqm3kYauGZGSui2H6qfxZuSqVY+0xeiNB+x5 fA+0y5gD2JsUu18DwuEJ3ef4y/59Q7r1O2pkhD80CLFggbSnYJpX7IGEksS7G1FHMPhM i0bykpGkm14u6wEkFSctuBMBEE/TDW5tQkyHYvhS4V0eKRGh2LT5VlISOmgWpq3429CE Btdw55UMLI9jaBhVMkLP4J0ahibf/M+QthwUkshOLKrmt4Ju5fv5YwZHYnZYFkVkP9B2 Er9Lp3ZWvv2E+IK78YHNuHb+T7PDYpQCaS+EkerbFpk7K0oLy5VkudZjriqoXJBgEyi1 2fxA== 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=/qcispo24dAVWxF3aEDf/NeiZc29jVYnwV9oPu3r0e8=; b=rmeeXAiH7UWceDw1qUG7pIDYPW2hMtua88tfMtnzWJn/wOmT4ZYso+OxYnaVudB6PD hA5TSdEr0VNCOS/qcSyl8V7JEEPTU8br+E1Bm+GVnmUPg7cgOaZAYB6JAl3VdoCt1Jdk gbwtKcmcLG4IVQqNY4J2cVJqrLRImV0fg0uLOMxY4AOFlnbK0KsIZcs63Y9VI+Ld8vr/ 9rMBw2Y7jVG/zjWG5ApjhUYy+142Ed1xSHWpd06Um6LX2KaeEy7anUjH/bRgYDaB05ra XSaMsyk7R1ILjuh+MHLrd/BYvKQEPQh7ZCs0kY3BZGeNqMd9p2tmdAueH1lYLUtr4Ywt g1Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@panix.com header.s=panix header.b=emdc5cCZ; 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 u16-20020a634550000000b004ff73120afbsi16559447pgk.103.2023.04.12.11.54.13; Wed, 12 Apr 2023 11:54:26 -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=emdc5cCZ; 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 S230031AbjDLSvc (ORCPT + 99 others); Wed, 12 Apr 2023 14:51:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbjDLSvX (ORCPT ); Wed, 12 Apr 2023 14:51:23 -0400 Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C72B6E9B for ; Wed, 12 Apr 2023 11:51:11 -0700 (PDT) Received: from mail.panix.com (localhost [127.0.0.1]) by mailbackend.panix.com (Postfix) with ESMTPA id 4PxWy64scTzDns; Wed, 12 Apr 2023 14:51:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1681325471; bh=1zojjQh2KHF4lxw3AQTN3IiyhnTTFBbmKUEaatf8U9M=; h=In-Reply-To:References:Date:Subject:From:To:Cc; b=emdc5cCZiwjrEVmxWuvmxiL+UP9dn31dc54FOebWZzQlFMFSj5mAw1a+3wj7woIca PqIRVnwKT73ttNl5B2Y/Hud/8zmt2DD8br4Ub4bHMA9Au+jjs56BCJKe8KnOKkSGlg dt/3PD3YMFYED7+D4j5FknzLaboVlSAYSgQGrSkM= X-Panix-Received: from 166.84.1.2 (SquirrelMail authenticated user pa@panix.com) by mail.panix.com with HTTP; Wed, 12 Apr 2023 14:51:10 -0400 Message-ID: <1afd3044c2aca9322ecf304941c7df66.squirrel@mail.panix.com> In-Reply-To: References: <20230412150225.3757223-1-javierm@redhat.com> <2e07f818ccdff7023a060e732d7c4ef6.squirrel@mail.panix.com> <87jzyhror0.fsf@minerva.mail-host-address-is-not-set> Date: Wed, 12 Apr 2023 14:51:10 -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" , "Jocelyn Falempe" , "Daniel Vetter" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Hans de Goede" , "Thomas Zimmermann" , "Ard Biesheuvel" 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=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 > And can you share the "linelength=" print out from simplefb ? Okay. Three cases, see below. Your patch tries to fix the stride, but what if it's the _depth_ that's wrong ? Grub sets the mode, the pre-regression kernel picks this: format=x8r8g8b8, mode=1024x768x32, linelength=4096 ========== Good ====================================================== grub: gfxpayload=1024x768x24 [ 0.003333] Console: colour dummy device 128x48 [ 0.003333] printk: console [tty0] enabled [ 0.417054] fbcon: Taking over console [ 0.513399] pci 0000:01:05.0: vgaarb: setting as boot VGA device [ 0.513431] pci 0000:01:05.0: vgaarb: bridge control possible [ 0.513455] pci 0000:01:05.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.513490] vgaarb: loaded [ 3.337529] simple-framebuffer simple-framebuffer.0: framebuffer at 0xd8000000, 0x240000 bytes [ 3.337567] simple-framebuffer simple-framebuffer.0: format=r8g8b8, mode=1024x768x24, linelength=3072 [ 3.338000] Console: switching to colour frame buffer device 128x48 [ 3.566490] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered! ========== Bad after patch, typing blind to log in !================== grub: gfxpayload=keep [ 0.003333] Console: colour dummy device 128x48 [ 0.003333] printk: console [tty0] enabled [ 0.423925] fbcon: Taking over console [ 0.520030] pci 0000:01:05.0: vgaarb: setting as boot VGA device [ 0.520061] pci 0000:01:05.0: vgaarb: bridge control possible [ 0.520085] pci 0000:01:05.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.520120] vgaarb: loaded [ 3.290444] simple-framebuffer simple-framebuffer.0: framebuffer at 0xd8000000, 0x240000 bytes [ 3.290483] simple-framebuffer simple-framebuffer.0: format=r8g8b8, mode=1024x768x24, linelength=3072 [ 3.290916] Console: switching to colour frame buffer device 128x48 [ 3.519523] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered! ========== Good, earlier kernel before regression ==================== grub: gfxpayload=keep [ 0.226675] Console: colour dummy device 128x48 [ 0.228643] printk: console [tty0] enabled [ 0.429214] fbcon: Taking over console [ 0.524994] pci 0000:01:05.0: vgaarb: setting as boot VGA device [ 0.525025] pci 0000:01:05.0: vgaarb: bridge control possible [ 0.525049] pci 0000:01:05.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.525082] vgaarb: loaded [ 3.320474] simple-framebuffer simple-framebuffer.0: framebuffer at 0xd8000000, 0x300000 bytes [ 3.320513] simple-framebuffer simple-framebuffer.0: format=x8r8g8b8, mode=1024x768x32, linelength=4096 [ 3.320983] Console: switching to colour frame buffer device 128x48 [ 3.415643] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!