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 9652AC54EE9 for ; Mon, 19 Sep 2022 08:25:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiISIZa (ORCPT ); Mon, 19 Sep 2022 04:25:30 -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> 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