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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B1E8C04A68 for ; Wed, 27 Jul 2022 12:23:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44BEDC59BF; Wed, 27 Jul 2022 12:23:36 +0000 (UTC) Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id D483DC59B1 for ; Wed, 27 Jul 2022 12:23:35 +0000 (UTC) Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4LtCcR1fjCz9t02; Wed, 27 Jul 2022 12:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1658924615; bh=IMaCWTdqXT8YkmIj6Etf3jBLHcW5BWmhqXKF5qlpBSA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mHuoLyqcZ2xXbY2RELFqf1cY+QgEjEymiCpglmSCHOKc39tzCzijgeYHTa4/tq0tc VmNVAWK1C+u7KeWE4YdvXZBzpHuD8TyPzUXYpPTxKc/DKcMmmHIoApipbjwMERomt3 yLx+ezP0lLoAWo9RyjM4rzePTYzdLH2Wjjt6JE/M= X-Riseup-User-ID: 73DB5447F23BB85AD30048B0035AAD72E9B41629F89208D7956C15F022DA05B4 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4LtCcJ63s7z1yWm; Wed, 27 Jul 2022 12:23:28 +0000 (UTC) Message-ID: Date: Wed, 27 Jul 2022 09:23:25 -0300 MIME-Version: 1.0 Subject: Re: [PATCH] drm/tests: Split up test cases in igt_check_drm_format_min_pitch Content-Language: en-US To: Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com, mwen@igalia.com, andrealmeid@riseup.net, siqueirajordao@riseup.net, Trevor Woerner , Daniel Vetter , David Airlie , Javier Martinez Canillas , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , David Gow , Daniel Latypov , brendanhiggins@google.com, Guenter Roeck References: <20220717184336.1197723-1-mairacanal@riseup.net> From: =?UTF-8?Q?Ma=c3=adra_Canal?= In-Reply-To: <20220717184336.1197723-1-mairacanal@riseup.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, kernel test robot , dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all, Friendly ping: is someone available to take this, please? Best Regards, - Maíra Canal On 7/17/22 15:43, Maíra Canal wrote: > The igt_check_drm_format_min_pitch() function had a lot of > KUNIT_EXPECT_* calls, all of which ended up allocating and initializing > various test assertion structures on the stack. > > This behavior was producing -Wframe-larger-than warnings on PowerPC, i386, > and MIPS architectures, such as: > > drivers/gpu/drm/tests/drm_format_test.c: In function 'igt_check_drm_format_min_pitch': > drivers/gpu/drm/tests/drm_format_test.c:271:1: error: the frame size of > 3712 bytes is larger than 2048 bytes > > So, the igt_check_drm_format_min_pitch() test case was split into three > smaller functions: one testing single plane formats, one testing multiple > planes formats, and the other testing tiled formats. > > Reported-by: kernel test robot > Reported-by: Guenter Roeck > Signed-off-by: Maíra Canal > --- > drivers/gpu/drm/tests/drm_format_test.c | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/tests/drm_format_test.c b/drivers/gpu/drm/tests/drm_format_test.c > index 056cb8599d6d..28f2b8f88818 100644 > --- a/drivers/gpu/drm/tests/drm_format_test.c > +++ b/drivers/gpu/drm/tests/drm_format_test.c > @@ -91,7 +91,7 @@ static void igt_check_drm_format_block_height(struct kunit *test) > KUNIT_EXPECT_FALSE(test, drm_format_info_block_height(info, -1)); > } > > -static void igt_check_drm_format_min_pitch(struct kunit *test) > +static void igt_check_drm_format_min_pitch_for_single_plane(struct kunit *test) > { > const struct drm_format_info *info = NULL; > > @@ -175,6 +175,11 @@ static void igt_check_drm_format_min_pitch(struct kunit *test) > (uint64_t)UINT_MAX * 4); > KUNIT_EXPECT_EQ(test, drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)), > (uint64_t)(UINT_MAX - 1) * 4); > +} > + > +static void igt_check_drm_format_min_pitch_for_multiple_planes(struct kunit *test) > +{ > + const struct drm_format_info *info = NULL; > > /* Test 2 planes format */ > info = drm_format_info(DRM_FORMAT_NV12); > @@ -249,6 +254,11 @@ static void igt_check_drm_format_min_pitch(struct kunit *test) > (uint64_t)(UINT_MAX - 1) / 2); > KUNIT_EXPECT_EQ(test, drm_format_info_min_pitch(info, 2, (UINT_MAX - 1) / 2), > (uint64_t)(UINT_MAX - 1) / 2); > +} > + > +static void igt_check_drm_format_min_pitch_for_tiled_format(struct kunit *test) > +{ > + const struct drm_format_info *info = NULL; > > /* Test tiled format */ > info = drm_format_info(DRM_FORMAT_X0L2); > @@ -273,7 +283,9 @@ static void igt_check_drm_format_min_pitch(struct kunit *test) > static struct kunit_case drm_format_tests[] = { > KUNIT_CASE(igt_check_drm_format_block_width), > KUNIT_CASE(igt_check_drm_format_block_height), > - KUNIT_CASE(igt_check_drm_format_min_pitch), > + KUNIT_CASE(igt_check_drm_format_min_pitch_for_single_plane), > + KUNIT_CASE(igt_check_drm_format_min_pitch_for_multiple_planes), > + KUNIT_CASE(igt_check_drm_format_min_pitch_for_tiled_format), > { } > }; >