Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp831618pxb; Thu, 17 Feb 2022 16:03:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjkbEmINVqgFLmZTn+esmgwrw8JQb98hev+UyVA+otJNNm20X+1zltXB4rmeWycxY2D0lz X-Received: by 2002:a17:90a:e7c3:b0:1b9:c189:bc3 with SMTP id kb3-20020a17090ae7c300b001b9c1890bc3mr9707597pjb.202.1645142638019; Thu, 17 Feb 2022 16:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645142638; cv=none; d=google.com; s=arc-20160816; b=B1acXMbSBYU2asoJtSF8UShwXn6lv1zrhN6VsGmPYmkyBxQ3p/AXcpw1XNV1W/aJFI XjGjEkQGmYv+GyMbXLvjg49b/cvYUc0GqP8LVrI6/H+MWT19jT7etGANAC+PUBsAMiBN X/U6L+oznwvrKczt2YfYI/K4zlsOA5ujDvQZA51aZFOWqHUXQ5AdUwCfyC+wSu5ytAbI x0/4wElwEKSiT588mNQ6zeQkMdlyjbDGAy8eqbGDLemfPSS6CDsGsDClOY4fCHVhmBkD LFsEydp4sKrgQwNjufNZWAMX4Mlz46iZ7SEBc9IlYJTJ8fah8FdWNJJb8IbS0UwuktMc l31g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=JtvomYyQINJ/n17fnVEfDkRcqhx40GcknsacTFYJ7+k=; b=QG55PwMKkLGCPUgQ3cdvYxn+C516Hj3NIcPd+u5BKkAzkiMoRR2dJd0uYqwiDiBRLV Q0kNst8Gw/iD0vfaA/WYYiH6KLN8aOxv/uvW7tBS0q5wuBgc/Z4LCjBHCkXYENK3eyRI oFNFIv5kBNJKzz14oWc66/uyZL+yoH2Tw7qI/WpcTmfG0eRyXUhfkzxqFKCddA6sD0oH 71loKBLttbVXhf2EFVjxRgP4CeX7WDsWvYCn4TMFzoOVaHzH3xgCfw+aX+fItdJrb77q /LjoxoZqLtMXE0Ok1he1fz5+J8+6gzM3jh/eJhUAauksBMGAv3tCcDyx3uO4h8OGJswc CVnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x18si2019487pjh.155.2022.02.17.16.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 16:03:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F21532BED7; Thu, 17 Feb 2022 15:31:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243419AbiBQUfA (ORCPT + 99 others); Thu, 17 Feb 2022 15:35:00 -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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 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