Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1269080lfc; Wed, 1 Jun 2022 13:41:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg6+c8WgZiNEsyT0u4qYHGFD7SAVuXk9xsqTG32yJ0Sse3ert/zcjKb0yabCC3JhgUiHU9 X-Received: by 2002:a17:90a:6941:b0:1e2:f37a:f889 with SMTP id j1-20020a17090a694100b001e2f37af889mr19730740pjm.160.1654116066996; Wed, 01 Jun 2022 13:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654116066; cv=none; d=google.com; s=arc-20160816; b=YF7ukFGVHiG4wQ18+9Pn5Hx6raCHuBb6B2YZViBGeNmH/UDK+ajgH1cOn0O6vRlb7D kOUgqPc7kJriKbUfJal1OLgb0Rr89YVdJHwZybwrI9Ryw48d5vm3UaUGjDcg2nhRerab Qk1uEWwmlhatx1SIc5TaeszAuxJG7kDy63vmHb+hXz+gsNNHNjurrX7xDc09pD8R3MEy HhRbD7sXsWZkkwBfHjQNBb7ddUFWZRQQX0qfAkOeHcTL6WPllwmS7SDZvZIl/6+owXWa w+4Cv49fvAP87u9JOE3QXeqJoeBTwkWIjllIcXBQStf/bx6VvC3B3Zgozsi0eW5NYSwx OS3w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=HUT5YSA0RJcKsWMT2WGJiiWtnO6QuCOi5gIB32Sx+LE=; b=XBWgyVI6XHvPTtaCjdRxptyVl+OA91azCH4zJd2Cw4+E2iTjVVHHp9xkGyDEbpFg0d iU6tcd1k5rbBcbDPajTFvnRMnXs0/BSGvB8nZzEXB4kSTWeKBfHEdENz6hOml6u46S/2 l012ihUsGQvfyX9FQLhtYArBe5DU1O9vHT19k7P9B/CoCtVjGbZ9FoO0HZak/W/FZVEV QxDn5J3KuLTB8nAc9QNLu7PXUBEqXukDsigon53f8Y9qCeAmP3qtVyyF7oWHdCJY8PCg 1u/i6gAR9JRDEdC7VvKgMQOFIDJbwO6JLqqQONtqz4mg0gSiTsExjnPqUqA7yZVE/xYI c9fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (expired) header.i=@cerno.tech header.s=fm3 header.b=WsrzmFFC; dkim=neutral (expired) header.i=@messagingengine.com header.s=fm1 header.b=YwmGfhxw; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q26-20020a63981a000000b003faec4c8202si3005123pgd.292.2022.06.01.13.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:41:06 -0700 (PDT) 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; dkim=neutral (expired) header.i=@cerno.tech header.s=fm3 header.b=WsrzmFFC; dkim=neutral (expired) header.i=@messagingengine.com header.s=fm1 header.b=YwmGfhxw; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EB14C27B4A5; Wed, 1 Jun 2022 12:48:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236387AbiE3NMJ (ORCPT + 99 others); Mon, 30 May 2022 09:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbiE3NMH (ORCPT ); Mon, 30 May 2022 09:12:07 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5507332EE7 for ; Mon, 30 May 2022 06:12:04 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D21E25C0053; Mon, 30 May 2022 09:12:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 30 May 2022 09:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1653916321; x= 1654002721; bh=HUT5YSA0RJcKsWMT2WGJiiWtnO6QuCOi5gIB32Sx+LE=; b=W srzmFFC2nG2ACXrgigNjV+Vff6y5F3Uvpe5W7XXGJaRusOfKDo/o2qVVdfvdKrF2 eG/qBJ2jk1e+/ISErAQ1nCffWdUiTqDb3Lq+ovt4OZIv3LXEeOiVEEqEkJoyGqrU 72oTRjOy06P2szX5xn8Y00WG+NHDJKVbE9SnDphO8KjN4kdCiKrmwHLvReAg6x4C 1lvgQtTIkk0EiuvsEssfcZ5vsBRiPni8r5y5E5THPbv3hoNM5+0BqrsNviCULJV8 j79EdvYbpm67GV+0AO5vOeEwG+B7Gp8hyjLmcfBPNk/1tBGZqtJA3HqSVZYb1p/P uTcofsaXtX3JeN3LtBMAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1653916321; x= 1654002721; bh=HUT5YSA0RJcKsWMT2WGJiiWtnO6QuCOi5gIB32Sx+LE=; b=Y wmGfhxw4tXrnr6zanebuNDFDcbJSXQvIfBX/I2lNgNFuawqz9WkOn+fM6ljWxjbP Kt2jIrdHL7a/Ivdxy8dup+noB42RvWQ2/mQQql4ToBeeoucI9kxBCib1ydeIha8F cI2mvQT7n5rrKU2bittNd1GuaQIVl9riv5cVoeHwKHz3k3BTR4FYLn6bU3d4VQWZ 5dyCEtEwCINFiFyhEnMylO9Wuf/+iSA9moKY6QxlQl9n9ltyksrvRfKs6/hG1RNK 0iZ/rIFKxuOdN8cU/FHi9+9o6USC6Xm2v47jvWVI1age6cR+rWRZUBXpfk3WfBB4 f2hvZ9hEjtU/Ik/hFXz0A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrkeeigdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtudenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelteehtefgffehteduhfeiuddtffeivdegffejteffteffvdekiedvheel jeettdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 May 2022 09:12:00 -0400 (EDT) Date: Mon, 30 May 2022 15:11:58 +0200 From: Maxime Ripard To: =?utf-8?B?Sm9zw6kgRXhww7NzaXRv?= Cc: javierm@redhat.com, tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332() Message-ID: <20220530131158.kqq2mohxoh52xpeg@penduick> References: <20220530102017.471865-1-jose.exposito89@gmail.com> <20220530102017.471865-2-jose.exposito89@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220530102017.471865-2-jose.exposito89@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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, On Mon, May 30, 2022 at 12:20:17PM +0200, Jos? Exp?sito wrote: > Test the conversion from XRGB8888 to RGB332. > > What is tested? > > - Different values for the X in XRGB8888 to make sure it is ignored > - Different clip values: Single pixel and full and partial buffer > - Well know colors: White, black, red, green, blue, magenta, yellow > and cyan > - Other colors: Randomly picked > - Destination pitch > > Suggested-by: Javier Martinez Canillas > Signed-off-by: Jos? Exp?sito It looks mostly good to me, but I think we should Cc kunit-dev@googlegroups.com to have their feedback. > --- > drivers/gpu/drm/Kconfig | 12 ++ > drivers/gpu/drm/Makefile | 3 + > drivers/gpu/drm/drm_format_helper_test.c | 166 +++++++++++++++++++++++ > 3 files changed, 181 insertions(+) > create mode 100644 drivers/gpu/drm/drm_format_helper_test.c > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index e88c497fa010..d92be6faef15 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -76,6 +76,18 @@ config DRM_KMS_HELPER > help > CRTC helpers for KMS drivers. > > +config DRM_FORMAR_HELPER_TEST > + bool "drm_format_helper tests" if !KUNIT_ALL_TESTS > + depends on DRM && KUNIT=y > + select DRM_KMS_HELPER > + default KUNIT_ALL_TESTS > + help > + KUnit tests for the drm_format_helper APIs. This option is not > + useful for distributions or general kernels, but only for kernel > + developers working on DRM and associated drivers. > + > + If in doubt, say "N". > + AFAIK, kunit test cases are supposed to have a .kunitconfig too to enable the kunit tests easily. Maxime