Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2239214rwb; Mon, 19 Sep 2022 01:47:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Ild4ftTFLoqYkaE8GuqaebPEmFE8YWc9DEfU+R21PPLill+iuG5G7NtJhdsLH5qFnHlOJ X-Received: by 2002:a05:6402:3587:b0:451:30ca:c067 with SMTP id y7-20020a056402358700b0045130cac067mr14717179edc.195.1663577267336; Mon, 19 Sep 2022 01:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663577267; cv=none; d=google.com; s=arc-20160816; b=dV5cEDIGMa2gCkjXCcNvysriqAL+w/yVal+rrgAwoBTSQ6kIeDIKyLhRAMuokVcx6O MOrgm6sQ/vCy8BGXBgLQp03TohZwT3XcOQ5Yxk28/CxSpO+0bXbz6UxMN2EnOrx8qCMv 6ShIQ8XJIS05zx1lmHxxo2xh2eA4bFgjaYBjfWPz1QtfNCfh3C4FuvDI85e9SDVHpGm7 TXRBxsMj+gj8Rxrb2TvD44W4gwei78yVGFIbUjXEgLskuq2WM6VaUmLsa1mDDaYbC1U5 M0AzavqWYmhsraUufBNFn7OwUE9kzlkjVoVgVh3+bpFCtQf55A92s0G7AVzG0X5rCM3g patw== 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=1VZDD1hptbM/uPXhe71uaw2rLOE+rqB+LqQ9BvgaNdc=; b=Eg/XVhOFfOZIdstRVE5irBuPgf9XxoeQphn4yJxI6jx6Pql6Qj2up50Rwsjl+LjaRV 0s8Su0u+rcT32dPF2BcWJytvnSj7XE22km+vVZ5pP5YOTaSBv6ufS1tegBTPvoHeBHP1 p+uxXEXcFpXaL0ae+gCFOoPjQ7l39P5FhZNuipaqu38iLEoTCXgfBxadtUkFxA7neSjj Wk9gGWoE3gTFU/URsUnpqAkMyui45wlBU5qoD5ST7X8XMEDF8ioKZHpwq9DOyJB2ztTl 8MqxSu4ue1yHCL4BUXbeHo+mhz9W2xQGNkh5z+Q1VK79B+XBRCyp3QBrL1fuGxkHiiU3 hZ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b="H95/2FAd"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=qidDwg3t; 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=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a05640240c200b0045181429f39si11412615edb.55.2022.09.19.01.47.21; Mon, 19 Sep 2022 01:47:47 -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=@cerno.tech header.s=fm2 header.b="H95/2FAd"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=qidDwg3t; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbiISIZ3 (ORCPT + 99 others); Mon, 19 Sep 2022 04:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbiISIZ1 (ORCPT ); Mon, 19 Sep 2022 04:25:27 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B3A1D323 for ; Mon, 19 Sep 2022 01:25:26 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DBD015C031E; Mon, 19 Sep 2022 04:25:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 19 Sep 2022 04:25:23 -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=fm2; t=1663575923; x= 1663662323; bh=1VZDD1hptbM/uPXhe71uaw2rLOE+rqB+LqQ9BvgaNdc=; b=H 95/2FAdzAx7yhJh1aSOpg72Tda7CBZQ9snwvbqfYGJXrCZy3dkQ/Ffh/yHUbObSH 8tmiGdgIl37ZDaqx8iMD+BhizqgdrMX0DzZaDSqKqoC1n9T1Ua1uobkd9KRXY/Sh HTb47Mt3SAdfYkip4A95t2Lx52L1SllDpjs1cZuEXWt1jhDf8FpnA0QXTSv5ccOx bvmf04QjSGXaqB7GLAgENFOweI9lfz8j4GSQqw7kMppD5Z6LqvG6Jupkk5qwZJDu WY/Pl1ZwIqpuRLckzeK4uv1Ljpa0bEB14BJOZzdgBOv77aip4gM7GIcBRHPQd8p/ Bu9a+5y7GM0J1fR+J9/oA== 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=fm2; t=1663575923; x= 1663662323; bh=1VZDD1hptbM/uPXhe71uaw2rLOE+rqB+LqQ9BvgaNdc=; b=q idDwg3tBIx7V5YRwUK9uzI/WDvLba75dU/ln7eAU88WXhYM4GyNe+Gm+Wt8xdcyv WlhKbTECkPp10oqLmRbHr3MtNVWiGvPl07uGFpaqBkmjflv8y39UT2qDh87Gmu8c UQmiBY4mOxLu7ADhKmlSWqB3dWD29H0uFMcs7VijLSYKdLavpvSI5qc4ruiE+3zq TvjVUZMRAzA4mKukSpzIxJGCCaWFFeOjnuTAvktIOzZ/+wm6eWfU0FWTHszqFNdW BQJwSx09O6CZC9SFbWl/WY6UPlxPbCGs/C3B9wQ3CmOWTQMkCwteR5c2kBIpQqXD A9iJhkLWvHl54QwXc/heQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvjedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtqhertddttddunecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepleelfeeileelteetfedvieekfeefffevhfdtvefgheevudevheejvddv ieeltdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Sep 2022 04:25:22 -0400 (EDT) Date: Mon, 19 Sep 2022 10:25:19 +0200 From: Maxime Ripard To: =?utf-8?B?Sm9zw6kgRXhww7NzaXRv?= Cc: javierm@redhat.com, davidgow@google.com, dlatypov@google.com, tzimmermann@suse.de, daniel@ffwll.ch, airlied@linux.ie, maarten.lankhorst@linux.intel.com, jani.nikula@linux.intel.com, maira.canal@usp.br, isabbasso@riseup.net, magalilemes00@gmail.com, tales.aparecida@gmail.com, geert@linux-m68k.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, =?utf-8?B?TWHDrXJh?= Canal Subject: Re: [PATCH v4 3/3] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8() Message-ID: <20220919082519.s5d7llmynot76xsx@houat> References: <20220919071531.105124-1-jose.exposito89@gmail.com> <20220919071531.105124-4-jose.exposito89@gmail.com> <20220919073645.uf64enluhiwd2b2i@houat> <20220919081801.GA144802@elementary> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220919081801.GA144802@elementary> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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 On Mon, Sep 19, 2022 at 10:18:01AM +0200, Jos=E9 Exp=F3sito wrote: > Hi Maxime, >=20 > Thanks for looking into the patches. >=20 > On Mon, Sep 19, 2022 at 09:36:45AM +0200, Maxime Ripard wrote: > > Hi, > >=20 > > On Mon, Sep 19, 2022 at 09:15:31AM +0200, Jos=E9 Exp=F3sito wrote: > > > Extend the existing test cases to test the conversion from XRGB8888 to > > > grayscale. > > >=20 > > > Tested-by: Ma=EDra Canal > > > Reviewed-by: David Gow > > > Signed-off-by: Jos=E9 Exp=F3sito > > > --- > > > .../gpu/drm/tests/drm_format_helper_test.c | 62 +++++++++++++++++= ++ > > > 1 file changed, 62 insertions(+) > > >=20 > > > diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers= /gpu/drm/tests/drm_format_helper_test.c > > > index 09d358b54da0..71722e828abe 100644 > > > --- a/drivers/gpu/drm/tests/drm_format_helper_test.c > > > +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c > > > @@ -37,6 +37,11 @@ struct convert_to_xrgb2101010_result { > > > const u32 expected[TEST_BUF_SIZE]; > > > }; > > > =20 > > > +struct convert_to_gray8_result { > > > + unsigned int dst_pitch; > > > + const u8 expected[TEST_BUF_SIZE]; > > > +}; > > > + > > > > > > [...] > > > > > > static struct kunit_case drm_format_helper_test_cases[] =3D { > > > KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb332, convert_xrgb8888_g= en_params), > > > KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb565, convert_xrgb8888_g= en_params), > > > KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb888_test, convert_xrgb8= 888_gen_params), > > > KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_xrgb2101010_test, convert_= xrgb8888_gen_params), > > > + KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_gray8_test, convert_xrgb88= 88_gen_params), > >=20 > > The trailing test feels redundant, >=20 > Why do you feel like it is redundant? Under the hood, most conversion > functions reuse the same code, but the *_line() function is unique and > I think that it is worth testing it. Sure, I wasn't commenting on the code itself, but the trailing "test" in the test name: drm_test_fb_xrgb8888_to_gray8_test ^ Which is redundant since we already have "test" in the prefix. Maxime