From nobody Tue Sep 16 06:07:02 2025 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 D0732C4708E for ; Thu, 5 Jan 2023 23:50:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235792AbjAEXuz (ORCPT ); Thu, 5 Jan 2023 18:50:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235045AbjAEXux (ORCPT ); Thu, 5 Jan 2023 18:50:53 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85DF03C0C6; Thu, 5 Jan 2023 15:50:50 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Np3BX0dFyz4xyp; Fri, 6 Jan 2023 10:50:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1672962645; bh=gBdBSj5Iy4byy5P3B7qjh7Q4ryrNCeA8npWOwiFvaL0=; h=Date:From:To:Cc:Subject:From; b=MNBjSVtvnV1NkMBbtX5EF1PA0V363PEJGPOXNW+uUM8ciQsZumNnB+iGIjVugpWnV 0WktG4s/WjW85fj8W2QB47l08IWqLNm2ZzVN1CvRZVKMNiK3OorjzPzkx5nYYn+pvG DL3tqC+uuG7TVeDFDnzhN4KDYNExI4u+r+OntTCiqnZp3YiS13raK7Lem+LqLM2mRx LszvPVcE1Oz2f0gcuRMvNeAPz7TbzkdF7owEFVYnnpMHWXzin26Yi8NPgBHBSebqwk AbvrAoz1AsqGi9P7pPlWWAYAoo9WQ2RIHUZ7Gd2Sr/jIwlNYgRN9HXNsst+IF4Mxs2 5aF6tiXT/Mrsw== Date: Fri, 6 Jan 2023 10:50:42 +1100 From: Stephen Rothwell To: Daniel Vetter Cc: Intel Graphics , DRI , Linux Kernel Mailing List , Linux Next Mailing List , =?UTF-8?B?TWHDrXJh?= Canal , Shuah Khan , Thomas Zimmermann Subject: linux-next: manual merge of the drm-misc tree with Linus' tree Message-ID: <20230106105042.6d7ccb97@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/QAyr59Alq2_HP3mLSseczH."; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/QAyr59Alq2_HP3mLSseczH. Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Hi all, Today's linux-next merge of the drm-misc tree got a conflict in: drivers/gpu/drm/tests/drm_format_helper_test.c between commit: a52a5451f43b ("kunit: Use KUNIT_EXPECT_MEMEQ macro") from Linus' tree and commits: f21d62c9ce3d ("drm/format-helper: Store RGB565 in little-endian order") 175073d694cd ("drm/format-helper: Add conversion from XRGB8888 to ARGB888= 8") 56119bfb3914 ("drm/format-helper: Add conversion from XRGB8888 to ARGB210= 1010") 10cd592e639e ("drm/format-helper: Add conversion from XRGB8888 to 15-bit = RGB555 formats") from the drm-misc tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc drivers/gpu/drm/tests/drm_format_helper_test.c index 567c71f95edc,f71dc0fe08a1..000000000000 --- a/drivers/gpu/drm/tests/drm_format_helper_test.c +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c @@@ -375,12 -560,108 +560,108 @@@ static void drm_test_fb_xrgb8888_to_rgb iosys_map_set_vaddr(&src, xrgb8888); =20 drm_fb_xrgb8888_to_rgb565(&dst, &result->dst_pitch, &src, &fb, ¶ms->= clip, false); + buf =3D le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / siz= eof(__le16)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); + KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); =20 + buf =3D dst.vaddr; /* restore original value of buf */ drm_fb_xrgb8888_to_rgb565(&dst, &result->dst_pitch, &src, &fb, ¶ms->= clip, true); + buf =3D le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / siz= eof(__le16)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected_swab, dst_size), 0); + KUNIT_EXPECT_MEMEQ(test, buf, result->expected_swab, dst_size); } =20 + static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test) + { + const struct convert_xrgb8888_case *params =3D test->param_value; + const struct convert_to_xrgb1555_result *result =3D ¶ms->xrgb1555_re= sult; + size_t dst_size; + u16 *buf =3D NULL; + __le32 *xrgb8888 =3D NULL; + struct iosys_map dst, src; +=20 + struct drm_framebuffer fb =3D { + .format =3D drm_format_info(DRM_FORMAT_XRGB8888), + .pitches =3D { params->pitch, 0, 0 }, + }; +=20 + dst_size =3D conversion_buf_size(DRM_FORMAT_XRGB1555, result->dst_pitch, + ¶ms->clip); + KUNIT_ASSERT_GT(test, dst_size, 0); +=20 + buf =3D kunit_kzalloc(test, dst_size, GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); + iosys_map_set_vaddr(&dst, buf); +=20 + xrgb8888 =3D cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888); + iosys_map_set_vaddr(&src, xrgb8888); +=20 + drm_fb_xrgb8888_to_xrgb1555(&dst, &result->dst_pitch, &src, &fb, ¶ms= ->clip); + buf =3D le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / siz= eof(__le16)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); ++ KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); + } +=20 + static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test) + { + const struct convert_xrgb8888_case *params =3D test->param_value; + const struct convert_to_argb1555_result *result =3D ¶ms->argb1555_re= sult; + size_t dst_size; + u16 *buf =3D NULL; + __le32 *xrgb8888 =3D NULL; + struct iosys_map dst, src; +=20 + struct drm_framebuffer fb =3D { + .format =3D drm_format_info(DRM_FORMAT_XRGB8888), + .pitches =3D { params->pitch, 0, 0 }, + }; +=20 + dst_size =3D conversion_buf_size(DRM_FORMAT_ARGB1555, result->dst_pitch, + ¶ms->clip); + KUNIT_ASSERT_GT(test, dst_size, 0); +=20 + buf =3D kunit_kzalloc(test, dst_size, GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); + iosys_map_set_vaddr(&dst, buf); +=20 + xrgb8888 =3D cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888); + iosys_map_set_vaddr(&src, xrgb8888); +=20 + drm_fb_xrgb8888_to_argb1555(&dst, &result->dst_pitch, &src, &fb, ¶ms= ->clip); + buf =3D le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / siz= eof(__le16)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); ++ KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); + } +=20 + static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test) + { + const struct convert_xrgb8888_case *params =3D test->param_value; + const struct convert_to_rgba5551_result *result =3D ¶ms->rgba5551_re= sult; + size_t dst_size; + u16 *buf =3D NULL; + __le32 *xrgb8888 =3D NULL; + struct iosys_map dst, src; +=20 + struct drm_framebuffer fb =3D { + .format =3D drm_format_info(DRM_FORMAT_XRGB8888), + .pitches =3D { params->pitch, 0, 0 }, + }; +=20 + dst_size =3D conversion_buf_size(DRM_FORMAT_RGBA5551, result->dst_pitch, + ¶ms->clip); + KUNIT_ASSERT_GT(test, dst_size, 0); +=20 + buf =3D kunit_kzalloc(test, dst_size, GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); + iosys_map_set_vaddr(&dst, buf); +=20 + xrgb8888 =3D cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888); + iosys_map_set_vaddr(&src, xrgb8888); +=20 + drm_fb_xrgb8888_to_rgba5551(&dst, &result->dst_pitch, &src, &fb, ¶ms= ->clip); + buf =3D le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / siz= eof(__le16)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); ++ KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); + } +=20 static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test) { const struct convert_xrgb8888_case *params =3D test->param_value; @@@ -407,10 -688,45 +688,45 @@@ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888); iosys_map_set_vaddr(&src, xrgb8888); =20 + /* + * RGB888 expected results are already in little-endian + * order, so there's no need to convert the test output. + */ drm_fb_xrgb8888_to_rgb888(&dst, &result->dst_pitch, &src, &fb, ¶ms->= clip); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); + KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); } =20 + static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test) + { + const struct convert_xrgb8888_case *params =3D test->param_value; + const struct convert_to_argb8888_result *result =3D ¶ms->argb8888_re= sult; + size_t dst_size; + u32 *buf =3D NULL; + __le32 *xrgb8888 =3D NULL; + struct iosys_map dst, src; +=20 + struct drm_framebuffer fb =3D { + .format =3D drm_format_info(DRM_FORMAT_XRGB8888), + .pitches =3D { params->pitch, 0, 0 }, + }; +=20 + dst_size =3D conversion_buf_size(DRM_FORMAT_ARGB8888, + result->dst_pitch, ¶ms->clip); + KUNIT_ASSERT_GT(test, dst_size, 0); +=20 + buf =3D kunit_kzalloc(test, dst_size, GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); + iosys_map_set_vaddr(&dst, buf); +=20 + xrgb8888 =3D cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888); + iosys_map_set_vaddr(&src, xrgb8888); +=20 + drm_fb_xrgb8888_to_argb8888(&dst, &result->dst_pitch, &src, &fb, ¶ms= ->clip); + buf =3D le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / siz= eof(u32)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); ++ KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); + } +=20 static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) { const struct convert_xrgb8888_case *params =3D test->param_value; @@@ -438,8 -754,39 +754,39 @@@ iosys_map_set_vaddr(&src, xrgb8888); =20 drm_fb_xrgb8888_to_xrgb2101010(&dst, &result->dst_pitch, &src, &fb, &par= ams->clip); - buf =3D le32buf_to_cpu(test, buf, dst_size / sizeof(u32)); + buf =3D le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / siz= eof(u32)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); ++ KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); + } +=20 + static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test) + { + const struct convert_xrgb8888_case *params =3D test->param_value; + const struct convert_to_argb2101010_result *result =3D ¶ms->argb2101= 010_result; + size_t dst_size; + u32 *buf =3D NULL; + __le32 *xrgb8888 =3D NULL; + struct iosys_map dst, src; +=20 + struct drm_framebuffer fb =3D { + .format =3D drm_format_info(DRM_FORMAT_XRGB8888), + .pitches =3D { params->pitch, 0, 0 }, + }; +=20 + dst_size =3D conversion_buf_size(DRM_FORMAT_ARGB2101010, + result->dst_pitch, ¶ms->clip); + KUNIT_ASSERT_GT(test, dst_size, 0); +=20 + buf =3D kunit_kzalloc(test, dst_size, GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); + iosys_map_set_vaddr(&dst, buf); +=20 + xrgb8888 =3D cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888); + iosys_map_set_vaddr(&src, xrgb8888); +=20 + drm_fb_xrgb8888_to_argb2101010(&dst, &result->dst_pitch, &src, &fb, &par= ams->clip); + buf =3D le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / siz= eof(u32)); - KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0); + KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size); } =20 static struct kunit_case drm_format_helper_test_cases[] =3D { --Sig_/QAyr59Alq2_HP3mLSseczH. Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmO3YlIACgkQAVBC80lX 0GwVgwf/Ze6gESdVkvgyFPq02EkSHntBrugZJkS+l24mxqMYW564sK0sDBlWKW7B nfn7F0apo+ZmlGbfHY38kGBmpkvGqQKs4ptpCbwfA2KrbL4UtUIfG0k1groCqlse IL32B1P3F3+uoYISCUxN28UXK6O9RjvtPJ5DbajSMrrB4Dm79U1drU5+zFtPhvXP hZ1XKmaPaf8V0Uu0Dkfpjmc7Vo7lKHHj24ivi1Cw7mxGjUMtLVGOoI3Lrm1txbwV Ng68PSjBV++1qkGDsbkROPsbVxL2fhN+JjqEAQvNMmg/FNxt9jumUM/2WBMKjTea ztmLpKuBaAi8Hc/MFvJDjt/sXEqPUA== =pF8E -----END PGP SIGNATURE----- --Sig_/QAyr59Alq2_HP3mLSseczH.--