Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3730886rwe; Mon, 17 Apr 2023 02:41:03 -0700 (PDT) X-Google-Smtp-Source: AKy350b0owNs0ZvUJ+uFPb7yDVCHhHl2HelGSY9BBWcUhYmgGaRYGCwv7S1lF3uZa6xTnUJ1DAYK X-Received: by 2002:a17:90a:d496:b0:247:35c7:bd67 with SMTP id s22-20020a17090ad49600b0024735c7bd67mr11755459pju.46.1681724463482; Mon, 17 Apr 2023 02:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681724463; cv=none; d=google.com; s=arc-20160816; b=ueL/ANFILQb960IOsmaGcbAw4O7o5Fyvq0BOyr+MM7P+2YlGD0En8Ez/XjzSUZLHU3 oOVrluA3tFegvrLtnuvyU4ZQz/yX02oLniqhPIsJIOxhQRL+fphbHVskA+8KYkhjeWCm 4m34erTW73xWCONXR7jhNmVy+rwhQMpEVurktuUKS94Jrfs9bUsFhwL1QvSXNqnRz6j6 wnr8VhS4evMsT7LcjMLrpLBSu9+vxdqf8o7Yhz26sn6j/JmjjLnjqhrPZ3L7oGNB+CG2 BiMbBi7NTPJJ4FPBqo4J/CMJeG4CI+g09mkRUA9ih7MLavbL+g4ydjM3AVHqc40ir2t7 lKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ZozA7MZ/y/4iKOl2TeZkQx7oEXefDUw2m6z73qNdQrc=; b=B7nMlqccplHj1CNKkKvsKCuPRlowNNAJM6BLVftpjJrMyN7N42rZl9702RnITF1Qb1 eA0g9ZIJhnW5gKUZdhMA3FNVcCqP0rPANdzG2VqTwUulev59QB2UziNOwZ/eBb66f87m oUTGHrOmiK3cmGw4MSMgtB+p+CQ8v1Hdks3ADoe5KeVfSWb3Dz0tkYHdrc9+5EUMp56L 0OvZVYKdPU73wzyeswWQxEj0y8lvxGKwnl+jInfSGw8neD4QVnVoXwJ+mgjsEC2Gjl1W iizxnZF9SYwY2yHCwmS+IwU67Edhx0415ea2yM9qzBfzI1Acrf2AFwOtPiy1zzMt/ORP cH+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HpKED/0j"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu16-20020a17090b389000b002471589f0d9si12739920pjb.95.2023.04.17.02.40.52; Mon, 17 Apr 2023 02:41:03 -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=pass header.i=@redhat.com header.s=mimecast20190719 header.b="HpKED/0j"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230130AbjDQJjV (ORCPT + 99 others); Mon, 17 Apr 2023 05:39:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230405AbjDQJjH (ORCPT ); Mon, 17 Apr 2023 05:39:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A2959C8 for ; Mon, 17 Apr 2023 02:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681724160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZozA7MZ/y/4iKOl2TeZkQx7oEXefDUw2m6z73qNdQrc=; b=HpKED/0jeCvoOmaSFaaIz3CJib9ma5+q6U1XSDr790pQZa/LgBMleb0O+QbML3kA4PGJF9 9EY4sHmeKoq/kIvqqhtuzS9qkbuii31oAeY6IWM4xhJTZgzaDnQCGvVzq3XMKLJiMsdbPN jaVROCc4MfH0Ud/xTuB60B45cHMnens= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-MfDADmVCNIuxQSgX-JDeog-1; Mon, 17 Apr 2023 05:29:54 -0400 X-MC-Unique: MfDADmVCNIuxQSgX-JDeog-1 Received: by mail-wm1-f71.google.com with SMTP id bd16-20020a05600c1f1000b003f172e02edbso1848966wmb.4 for ; Mon, 17 Apr 2023 02:29:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681723793; x=1684315793; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZozA7MZ/y/4iKOl2TeZkQx7oEXefDUw2m6z73qNdQrc=; b=BX0iWSYJj+O3a4p+pCbRhcwR/LIjD6r5xfj4XZhilDe1kK62ZHjC63CAsMA26nNqSu p35U7PA0Ks81oUnv9CMvx86xnfYcscVGxZZQZD8gxxTTa58+rFg8o4mWZ07QBZoEmhMz P6mhdOIxqOPNTBtej3IUv9egKSF1WlEkk/AKwguJ0gUBrTLmw9/Rct8//iFyoctOfaK1 WZ6k9Cyq0MUwf0ohTg9A5Y6ONzf0/FH8JhW1yBUgmDEE2NBVn3Qq+rOIDYMNbonAMqJW NaSs95X79LLCpmS55KjRtc8vOPwAdupQrY3ZfQ//GWkJBcIUsVP93d0RfyaCy/JPGFRL uH8w== X-Gm-Message-State: AAQBX9eBdXgVMmPXlzP2pvOG6dTqoEzWmhDBV5q+Z4gyoZ6fdL0B2RCP rzZserMqCi/HEwvFPsJxK98STsF7hYFCveR3RiZLW3MiGAP8tkU0VOLAoXcz5hM5fUXak3LxexX NT4f2lYUs0f31/38g5dL1tsq5 X-Received: by 2002:a05:600c:231a:b0:3f0:4e04:b8f8 with SMTP id 26-20020a05600c231a00b003f04e04b8f8mr9631422wmo.39.1681723793326; Mon, 17 Apr 2023 02:29:53 -0700 (PDT) X-Received: by 2002:a05:600c:231a:b0:3f0:4e04:b8f8 with SMTP id 26-20020a05600c231a00b003f04e04b8f8mr9631412wmo.39.1681723792968; Mon, 17 Apr 2023 02:29:52 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id m10-20020a05600c3b0a00b003ef5e5f93f5sm15041116wms.19.2023.04.17.02.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 02:29:52 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , Pierre Asselin Cc: jfalempe@redhat.com, daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, hdegoede@redhat.com, ardb@kernel.org Subject: Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated In-Reply-To: <60b7cad3-8923-98b1-2c0f-71bfabd0b2e9@suse.de> 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> <23d45518-3565-e915-c6d4-45dabe82ea4c@suse.de> <87zg76evh3.fsf@minerva.mail-host-address-is-not-set> <60b7cad3-8923-98b1-2c0f-71bfabd0b2e9@suse.de> Date: Mon, 17 Apr 2023 11:29:51 +0200 Message-ID: <87v8hueu0g.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Thomas Zimmermann writes: [...] >> >> stride = DIV_ROUND_UP(si->lfb_width * bits_per_pixel, 8) > > I'd rather keep the code as-is until we get an actual bug report. > Ok. After all if the pixel format is chosen correctly, the reported line length should match anyways. So is really a corner case what Pierre had. > For example, DRM framebuffer sizes are often multiples of 64. Creating a > framebuffer of 800x600 will create a framebuffer with > stride/pitch/linelength of 832. I can imagine that some BIOSes out > there do something similar with the system framebuffer. Messing with the > stride would break them. > I see, is not that simple then. Thanks a lot for the clarification. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat