Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp484436rwe; Wed, 19 Apr 2023 01:29:08 -0700 (PDT) X-Google-Smtp-Source: AKy350ab5I+8XmN1iSwmCAC2yfWoJHxSpI0t97oEO+slShlIpgIPZuPlFgTfEMDh2RfK5G4wMDqn X-Received: by 2002:a05:6808:10c7:b0:364:4eb7:e868 with SMTP id s7-20020a05680810c700b003644eb7e868mr3046806ois.10.1681892948569; Wed, 19 Apr 2023 01:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681892948; cv=none; d=google.com; s=arc-20160816; b=hjvDauEQuTRS3VlwH3kdqG3ivzZutvUOm0O7dwB0RaeTcrfa3ju2lFp8WnosQAhd0i 0UtTZkdufsu4KAAj8m7sJuwdsCRM2QdeutGDHjXhyErilNWmjLxV1B3y/c2WcjUR1W6z +xPGY2ii3ac2NFT2yo23izzu1Ibwvrl9/7wIGSS6QG3TKZE13ir9cJ9FD0cGO8UV0uaJ il85spcKJXV8lNZZKtZt5nPpRYhHyCqm8pxUkiF74MK6jVQYutXAgSrlAySEz474mbsu 00lXKoAGNfnhbX6kCwWoeOiuWPx7qWjTGeJ0uei4oXnqspgG4T2xh7DYa/1pjbOKu8z8 CW5w== 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=blyeMnej/ZWQUIzL86aP9w1eTIPSx+cVSXGKg3I9FIM=; b=PTaZ5C5THqYHs8a/GoL+41DSuN9gi6pap4uXTr4lBUuy4qLd4kutIwaywejMO+APDM 2lIQoUEzAqsKogHCzs4ouquu0uZPRzgTwbH8tDv4Z72N6khvMechgQBeURnr08BIAlbL MaYKsOwk3kK0Sj+Ti3N6tmQE5wy5kf7U6vduvC42AaBi7XXpN/5P1MGXSYfEjaAJZTh+ LUJyvJw6Aen886x8t0xQ3DqBwqnl8l21Q3N5Yr7gFYEkdxSBZTK1KHQB5hEOhQEq8wmL Q+nw3VFfa4Q2LoefRKBVMLwHQ0cjViUSU0wBWzaGKPUX5wqU8h4ZwLmpIYFPULI4jAm3 cyXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UzTXZZkv; 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 m22-20020a056808025600b003875a1250basi13538691oie.181.2023.04.19.01.28.55; Wed, 19 Apr 2023 01:29:08 -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=UzTXZZkv; 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 S232311AbjDSIWA (ORCPT + 99 others); Wed, 19 Apr 2023 04:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232408AbjDSIV5 (ORCPT ); Wed, 19 Apr 2023 04:21:57 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC187DA2 for ; Wed, 19 Apr 2023 01:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681892472; 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=blyeMnej/ZWQUIzL86aP9w1eTIPSx+cVSXGKg3I9FIM=; b=UzTXZZkvNyn0NaO1pAmNp/E0V0YT9fJgs0nVSHq+CImcBiMt32nkYOVXJiv6Fj8+OgCGek ZhwkIhn8DAFDZ3elwP4XFiQPNlgVC+l/0zYWSgpxWdhzKYy5kI/UBIuSHobhSOQ0QJPW+Y 7gspV0TRXwnxpBoHLjfuE/HfDEfSjSo= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-2CtxDBDOP1-j2P46SM7D5w-1; Wed, 19 Apr 2023 04:21:11 -0400 X-MC-Unique: 2CtxDBDOP1-j2P46SM7D5w-1 Received: by mail-wr1-f69.google.com with SMTP id e10-20020adfa44a000000b002f6c0c4884fso1931360wra.11 for ; Wed, 19 Apr 2023 01:21:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681892470; x=1684484470; 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=blyeMnej/ZWQUIzL86aP9w1eTIPSx+cVSXGKg3I9FIM=; b=S7Iozmd6K0qSN/wsL5yAABWRo0Kxi5YamcfLhhCencTjwmqOuC8Ilji6x4sX4bceFO y5otEyqONhB7Ih514AAEZO71Fx2JhgK+9OwnaQ9Z01FvCZ/x/jEo7c93ycDeXwi4e8dc SGIsQWi4Mt67TKlCrfnLqh11Xp5e/blKOfl0Uz7KPqG69Q9UZXMp4LfLOqfy0OrlIxgn gSPKN2UVgbwcXkv0WIZK3L95fZsrAIJRM+dOLsu8wIQuZnDS3e8ZOEzW+DW71jAsIF+e MTfjIXH/Re0b2CmKm5FHyjMmvog1VMP0GaVnBInfjb++W0RBbWYEWgoyZbvyXy3cRC6e 3CRA== X-Gm-Message-State: AAQBX9dH9NJou5qmQBHpxum5aiQp6d6/rggXzoNCUgi1OjrIq8Cjgb3o lFNedtRG4L8ojY4KmhHXzeD1H19BTmySwrneTACtRbTygrYAv9uNwleU4bvaf3bgX5v15oumnS9 8NeUpZT/3eZtggr2QnzvFCww2 X-Received: by 2002:a1c:f612:0:b0:3f1:70cf:a2d9 with SMTP id w18-20020a1cf612000000b003f170cfa2d9mr8744687wmc.9.1681892470211; Wed, 19 Apr 2023 01:21:10 -0700 (PDT) X-Received: by 2002:a1c:f612:0:b0:3f1:70cf:a2d9 with SMTP id w18-20020a1cf612000000b003f170cfa2d9mr8744663wmc.9.1681892469870; Wed, 19 Apr 2023 01:21:09 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id k25-20020a7bc419000000b003f1736fdfedsm1416894wmi.10.2023.04.19.01.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 01:21:09 -0700 (PDT) From: Javier Martinez Canillas To: Pierre Asselin , dri-devel@lists.freedesktop.org Cc: Pierre Asselin , Thomas Zimmermann , Daniel Vetter , Ard Biesheuvel , Hans de Goede , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] firmware/sysfb: Fix VESA format selection In-Reply-To: <20230419044834.10816-1-pa@panix.com> References: <20230419044834.10816-1-pa@panix.com> Date: Wed, 19 Apr 2023 10:21:07 +0200 Message-ID: <87bkjki8p8.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 Pierre Asselin writes: Hello Pierre, > Some legacy BIOSes report no reserved bits in their 32-bit rgb mode, > breaking the calculation of bits_per_pixel in commit f35cd3fa7729 > [firmware/sysfb: Fix EFI/VESA format selection]. However they report > lfb_depth correctly for those modes. Keep the computation but > set bits_per_pixel to lfb_depth if the latter is larger. > > v2 fixes the warnings from a max3() macro with arguments of different > types; split the bits_per_pixel assignment to avoid uglyfing the code > with too many typecasts. > > Link: https://lore.kernel.org/r/4Psm6B6Lqkz1QXM@panix3.panix.com > Link: https://lore.kernel.org/r/20230412150225.3757223-1-javierm@redhat.com > Fixes: f35cd3fa7729 [firmware/sysfb: Fix EFI/VESA format selection] The convention is f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection") > Signed-off-by: Pierre Asselin > --- [...] > + bits_per_pixel= max(bits_per_pixel, (u32)si->lfb_depth); You are missing a space here. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat