linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Intel Graphics" <intel-gfx@lists.freedesktop.org>,
	DRI <dri-devel@lists.freedesktop.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux Next Mailing List" <linux-next@vger.kernel.org>,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>
Subject: linux-next: manual merge of the drm-misc tree with Linus' tree
Date: Fri, 6 Jan 2023 10:50:42 +1100	[thread overview]
Message-ID: <20230106105042.6d7ccb97@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 9517 bytes --]

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 ARGB8888")
  56119bfb3914 ("drm/format-helper: Add conversion from XRGB8888 to ARGB2101010")
  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.

-- 
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);
  
  	drm_fb_xrgb8888_to_rgb565(&dst, &result->dst_pitch, &src, &fb, &params->clip, false);
+ 	buf = le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / sizeof(__le16));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
 +	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
  
+ 	buf = dst.vaddr; /* restore original value of buf */
  	drm_fb_xrgb8888_to_rgb565(&dst, &result->dst_pitch, &src, &fb, &params->clip, true);
+ 	buf = le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / sizeof(__le16));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected_swab, dst_size), 0);
 +	KUNIT_EXPECT_MEMEQ(test, buf, result->expected_swab, dst_size);
  }
  
+ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
+ {
+ 	const struct convert_xrgb8888_case *params = test->param_value;
+ 	const struct convert_to_xrgb1555_result *result = &params->xrgb1555_result;
+ 	size_t dst_size;
+ 	u16 *buf = NULL;
+ 	__le32 *xrgb8888 = NULL;
+ 	struct iosys_map dst, src;
+ 
+ 	struct drm_framebuffer fb = {
+ 		.format = drm_format_info(DRM_FORMAT_XRGB8888),
+ 		.pitches = { params->pitch, 0, 0 },
+ 	};
+ 
+ 	dst_size = conversion_buf_size(DRM_FORMAT_XRGB1555, result->dst_pitch,
+ 				       &params->clip);
+ 	KUNIT_ASSERT_GT(test, dst_size, 0);
+ 
+ 	buf = kunit_kzalloc(test, dst_size, GFP_KERNEL);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
+ 	iosys_map_set_vaddr(&dst, buf);
+ 
+ 	xrgb8888 = cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
+ 	iosys_map_set_vaddr(&src, xrgb8888);
+ 
+ 	drm_fb_xrgb8888_to_xrgb1555(&dst, &result->dst_pitch, &src, &fb, &params->clip);
+ 	buf = le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / sizeof(__le16));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
++	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
+ }
+ 
+ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
+ {
+ 	const struct convert_xrgb8888_case *params = test->param_value;
+ 	const struct convert_to_argb1555_result *result = &params->argb1555_result;
+ 	size_t dst_size;
+ 	u16 *buf = NULL;
+ 	__le32 *xrgb8888 = NULL;
+ 	struct iosys_map dst, src;
+ 
+ 	struct drm_framebuffer fb = {
+ 		.format = drm_format_info(DRM_FORMAT_XRGB8888),
+ 		.pitches = { params->pitch, 0, 0 },
+ 	};
+ 
+ 	dst_size = conversion_buf_size(DRM_FORMAT_ARGB1555, result->dst_pitch,
+ 				       &params->clip);
+ 	KUNIT_ASSERT_GT(test, dst_size, 0);
+ 
+ 	buf = kunit_kzalloc(test, dst_size, GFP_KERNEL);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
+ 	iosys_map_set_vaddr(&dst, buf);
+ 
+ 	xrgb8888 = cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
+ 	iosys_map_set_vaddr(&src, xrgb8888);
+ 
+ 	drm_fb_xrgb8888_to_argb1555(&dst, &result->dst_pitch, &src, &fb, &params->clip);
+ 	buf = le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / sizeof(__le16));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
++	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
+ }
+ 
+ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
+ {
+ 	const struct convert_xrgb8888_case *params = test->param_value;
+ 	const struct convert_to_rgba5551_result *result = &params->rgba5551_result;
+ 	size_t dst_size;
+ 	u16 *buf = NULL;
+ 	__le32 *xrgb8888 = NULL;
+ 	struct iosys_map dst, src;
+ 
+ 	struct drm_framebuffer fb = {
+ 		.format = drm_format_info(DRM_FORMAT_XRGB8888),
+ 		.pitches = { params->pitch, 0, 0 },
+ 	};
+ 
+ 	dst_size = conversion_buf_size(DRM_FORMAT_RGBA5551, result->dst_pitch,
+ 				       &params->clip);
+ 	KUNIT_ASSERT_GT(test, dst_size, 0);
+ 
+ 	buf = kunit_kzalloc(test, dst_size, GFP_KERNEL);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
+ 	iosys_map_set_vaddr(&dst, buf);
+ 
+ 	xrgb8888 = cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
+ 	iosys_map_set_vaddr(&src, xrgb8888);
+ 
+ 	drm_fb_xrgb8888_to_rgba5551(&dst, &result->dst_pitch, &src, &fb, &params->clip);
+ 	buf = le16buf_to_cpu(test, (__force const __le16 *)buf, dst_size / sizeof(__le16));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
++	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
+ }
+ 
  static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
  {
  	const struct convert_xrgb8888_case *params = test->param_value;
@@@ -407,10 -688,45 +688,45 @@@
  	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
  	iosys_map_set_vaddr(&src, xrgb8888);
  
+ 	/*
+ 	 * 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, &params->clip);
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
 +	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
  }
  
+ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
+ {
+ 	const struct convert_xrgb8888_case *params = test->param_value;
+ 	const struct convert_to_argb8888_result *result = &params->argb8888_result;
+ 	size_t dst_size;
+ 	u32 *buf = NULL;
+ 	__le32 *xrgb8888 = NULL;
+ 	struct iosys_map dst, src;
+ 
+ 	struct drm_framebuffer fb = {
+ 		.format = drm_format_info(DRM_FORMAT_XRGB8888),
+ 		.pitches = { params->pitch, 0, 0 },
+ 	};
+ 
+ 	dst_size = conversion_buf_size(DRM_FORMAT_ARGB8888,
+ 				       result->dst_pitch, &params->clip);
+ 	KUNIT_ASSERT_GT(test, dst_size, 0);
+ 
+ 	buf = kunit_kzalloc(test, dst_size, GFP_KERNEL);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
+ 	iosys_map_set_vaddr(&dst, buf);
+ 
+ 	xrgb8888 = cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
+ 	iosys_map_set_vaddr(&src, xrgb8888);
+ 
+ 	drm_fb_xrgb8888_to_argb8888(&dst, &result->dst_pitch, &src, &fb, &params->clip);
+ 	buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
++	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
+ }
+ 
  static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
  {
  	const struct convert_xrgb8888_case *params = test->param_value;
@@@ -438,8 -754,39 +754,39 @@@
  	iosys_map_set_vaddr(&src, xrgb8888);
  
  	drm_fb_xrgb8888_to_xrgb2101010(&dst, &result->dst_pitch, &src, &fb, &params->clip);
- 	buf = le32buf_to_cpu(test, buf, dst_size / sizeof(u32));
+ 	buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
++	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
+ }
+ 
+ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
+ {
+ 	const struct convert_xrgb8888_case *params = test->param_value;
+ 	const struct convert_to_argb2101010_result *result = &params->argb2101010_result;
+ 	size_t dst_size;
+ 	u32 *buf = NULL;
+ 	__le32 *xrgb8888 = NULL;
+ 	struct iosys_map dst, src;
+ 
+ 	struct drm_framebuffer fb = {
+ 		.format = drm_format_info(DRM_FORMAT_XRGB8888),
+ 		.pitches = { params->pitch, 0, 0 },
+ 	};
+ 
+ 	dst_size = conversion_buf_size(DRM_FORMAT_ARGB2101010,
+ 				       result->dst_pitch, &params->clip);
+ 	KUNIT_ASSERT_GT(test, dst_size, 0);
+ 
+ 	buf = kunit_kzalloc(test, dst_size, GFP_KERNEL);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
+ 	iosys_map_set_vaddr(&dst, buf);
+ 
+ 	xrgb8888 = cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE);
+ 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
+ 	iosys_map_set_vaddr(&src, xrgb8888);
+ 
+ 	drm_fb_xrgb8888_to_argb2101010(&dst, &result->dst_pitch, &src, &fb, &params->clip);
+ 	buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
 -	KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
 +	KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
  }
  
  static struct kunit_case drm_format_helper_test_cases[] = {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-01-05 23:50 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 23:50 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-25 23:29 linux-next: manual merge of the drm-misc tree with Linus' tree Stephen Rothwell
2024-02-06  0:59 Stephen Rothwell
2024-02-06  1:06 ` Stephen Rothwell
2024-02-06 11:28   ` Michael Walle
2024-02-06 11:34     ` Dario Binacchi
2023-11-14  0:42 Stephen Rothwell
2023-11-14  0:36 Stephen Rothwell
2023-11-14  0:31 Stephen Rothwell
2023-11-14  0:25 Stephen Rothwell
2023-09-25  1:41 Stephen Rothwell
2023-09-20  1:12 Stephen Rothwell
2023-09-13  1:09 Stephen Rothwell
2023-09-13  9:04 ` Uwe Kleine-König
2023-07-12 23:58 Stephen Rothwell
2023-05-23  0:43 Stephen Rothwell
2023-05-15  1:14 Stephen Rothwell
2023-03-14  0:19 Stephen Rothwell
2023-01-19  1:13 Stephen Rothwell
2022-11-03 23:15 Stephen Rothwell
2022-10-05  0:43 Stephen Rothwell
2022-06-29  1:06 Stephen Rothwell
2022-06-10  0:44 Stephen Rothwell
2021-11-16 22:29 Stephen Rothwell
2021-10-28  2:48 Stephen Rothwell
2021-01-21  1:24 Stephen Rothwell
2020-10-27  1:26 Stephen Rothwell
2020-10-27  1:20 Stephen Rothwell
2020-10-27  1:16 Stephen Rothwell
2020-08-26  0:01 Stephen Rothwell
2020-09-02  3:11 ` Stephen Rothwell
2020-06-29  1:14 Stephen Rothwell
2020-06-26  1:43 Stephen Rothwell
2020-06-17  0:46 Stephen Rothwell
2020-04-16  1:25 Stephen Rothwell
2020-04-15  1:46 Stephen Rothwell
2019-12-16  0:51 Stephen Rothwell
2019-12-16  0:46 Stephen Rothwell
2019-05-21  0:51 Stephen Rothwell
2019-05-23  0:27 ` Stephen Rothwell
2019-05-23  8:10 ` Maxime Ripard
2019-05-23  9:34   ` Stephen Rothwell
2019-05-23 11:53 ` Maxime Ripard
2019-05-23 13:04   ` Stephen Rothwell
2019-05-23 13:11     ` Daniel Vetter
2019-05-23 14:16       ` Stephen Rothwell
2019-05-23 16:10   ` Rob Herring
2019-05-24  7:12     ` Maxime Ripard
2019-01-11  0:14 Stephen Rothwell
2018-03-20  1:08 Stephen Rothwell
2018-03-23  0:43 ` Stephen Rothwell
2018-03-15  3:14 Stephen Rothwell
2018-03-23  0:45 ` Stephen Rothwell
2017-09-22  2:24 Stephen Rothwell
2017-08-02  2:23 Stephen Rothwell
2017-08-10  2:06 ` Stephen Rothwell
2017-07-19  1:30 Stephen Rothwell
2016-09-23  1:35 Stephen Rothwell
2016-06-07  1:32 Stephen Rothwell
2016-03-31  0:15 Stephen Rothwell
2016-03-29 23:49 Stephen Rothwell
2015-12-16  0:38 Stephen Rothwell
2015-12-14  1:12 Stephen Rothwell
2015-12-14  7:09 ` Thomas Hellstrom
2015-09-12  3:15 Stephen Rothwell
2015-08-14  2:06 Stephen Rothwell
2015-08-03  2:11 Stephen Rothwell
2015-07-30  3:04 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230106105042.6d7ccb97@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mairacanal@riseup.net \
    --cc=skhan@linuxfoundation.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).