From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFC51C433EF for ; Thu, 17 Feb 2022 20:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244362AbiBQUfB (ORCPT ); Thu, 17 Feb 2022 15:35:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236689AbiBQUe7 (ORCPT ); Thu, 17 Feb 2022 15:34:59 -0500 Received: from mx1.smtp.larsendata.com (mx1.smtp.larsendata.com [91.221.196.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C84A0F94DE for ; Thu, 17 Feb 2022 12:34:42 -0800 (PST) Received: from mail01.mxhotel.dk (mail01.mxhotel.dk [91.221.196.236]) by mx1.smtp.larsendata.com (Halon) with ESMTPS id 1366a9bc-9031-11ec-baa1-0050568c148b; Thu, 17 Feb 2022 20:34:59 +0000 (UTC) Received: from ravnborg.org (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sam@ravnborg.org) by mail01.mxhotel.dk (Postfix) with ESMTPSA id B1800194B4A; Thu, 17 Feb 2022 21:34:40 +0100 (CET) Date: Thu, 17 Feb 2022 21:34:36 +0100 X-Report-Abuse-To: abuse@mxhotel.dk From: Sam Ravnborg To: Geert Uytterhoeven Cc: Thomas Zimmermann , Linux Fbdev development list , David Airlie , Helge Deller , Javier Martinez Canillas , Linux Kernel Mailing List , Linux/m68k , DRI Development Subject: Re: [PATCH 2/8] drm/fb-helper: Add support for DRM_FORMAT_C[124] Message-ID: References: <20220215165226.2738568-1-geert@linux-m68k.org> <20220215165226.2738568-3-geert@linux-m68k.org> <4fff0c08-adab-c1d5-4a7e-1513cb2bf7ca@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, > > > + switch (fb->format->depth) { > > > > The depth field is deprecated. It's probably better to use > > fb->format->format and test against 4CC codes. > > The reason I checked for depth instead of a 4CC code is that the only > thing that matters here is the number of bits per pixel. Hence this > function won't need any changes to support R1, R2, R4, and D1 later. > When we get here, we already know that we are using a format that > is supported by the fbdev helper code, and thus passed the 4CC > checks elsewhere. > > Alternatively, we could introduce drm_format_info_bpp() earlier in > the series, and use that? The drm_format_info_bpp() is very descriptive, so yes it would be good to use it here also. Sam