dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Arthur Grillo <arthurgrillo@riseup.net>, dri-devel@lists.freedesktop.org
Cc: tzimmermann@suse.de, tales.aparecida@gmail.com,
	javierm@redhat.com, mairacanal@riseup.net, davidgow@google.com,
	oe-kbuild-all@lists.linux.dev, jose.exposito89@gmail.com,
	andrealmeid@riseup.net, arthurgrillo@riseup.net
Subject: Re: [PATCH 6/6] drm/format-helper: Add KUnit tests for drm_fb_memcpy()
Date: Tue, 25 Jul 2023 22:14:37 +0800	[thread overview]
Message-ID: <202307252148.wr2nafKj-lkp@intel.com> (raw)
In-Reply-To: <20230721182316.560649-7-arthurgrillo@riseup.net>

Hi Arthur,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.5-rc3 next-20230725]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Arthur-Grillo/drm-format-helper-Test-default-pitch-fallback/20230722-022649
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20230721182316.560649-7-arthurgrillo%40riseup.net
patch subject: [PATCH 6/6] drm/format-helper: Add KUnit tests for drm_fb_memcpy()
config: nios2-randconfig-r093-20230723 (https://download.01.org/0day-ci/archive/20230725/202307252148.wr2nafKj-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230725/202307252148.wr2nafKj-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307252148.wr2nafKj-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/tests/drm_format_helper_test.c:856:36: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __le32 const [usertype] *buf @@     got unsigned int [usertype] *[assigned] buf @@
   drivers/gpu/drm/tests/drm_format_helper_test.c:856:36: sparse:     expected restricted __le32 const [usertype] *buf
   drivers/gpu/drm/tests/drm_format_helper_test.c:856:36: sparse:     got unsigned int [usertype] *[assigned] buf
   drivers/gpu/drm/tests/drm_format_helper_test.c:1058:34: sparse: sparse: symbol 'fb_build_fourcc_list_cases' was not declared. Should it be static?
>> drivers/gpu/drm/tests/drm_format_helper_test.c:1566:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] * @@     got restricted __le32 [usertype] * @@
   drivers/gpu/drm/tests/drm_format_helper_test.c:1566:27: sparse:     expected unsigned int [usertype] *
   drivers/gpu/drm/tests/drm_format_helper_test.c:1566:27: sparse:     got restricted __le32 [usertype] *
   drivers/gpu/drm/tests/drm_format_helper_test.c:1576:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] * @@     got restricted __le32 [usertype] * @@
   drivers/gpu/drm/tests/drm_format_helper_test.c:1576:29: sparse:     expected unsigned int [usertype] *
   drivers/gpu/drm/tests/drm_format_helper_test.c:1576:29: sparse:     got restricted __le32 [usertype] *

vim +1566 drivers/gpu/drm/tests/drm_format_helper_test.c

  1539	
  1540	static void drm_test_fb_memcpy(struct kunit *test)
  1541	{
  1542		const struct multi_plane_op_case *params = test->param_value;
  1543		const struct fb_memcpy_result *result = &params->memcpy_result;
  1544		size_t dst_size[DRM_FORMAT_MAX_PLANES] = { 0 };
  1545		u32 *buf[DRM_FORMAT_MAX_PLANES] = { 0 };
  1546		u32 *src_cp[DRM_FORMAT_MAX_PLANES] = { 0 };
  1547		u32 *expected[DRM_FORMAT_MAX_PLANES] = { 0 };
  1548		struct iosys_map dst[DRM_FORMAT_MAX_PLANES];
  1549		struct iosys_map src[DRM_FORMAT_MAX_PLANES];
  1550	
  1551		struct drm_framebuffer fb = {
  1552			.format = drm_format_info(params->format),
  1553		};
  1554	
  1555		memcpy(fb.pitches, params->src_pitches, DRM_FORMAT_MAX_PLANES * sizeof(int));
  1556	
  1557		for (size_t i = 0; i < fb.format->num_planes; i++) {
  1558			dst_size[i] = conversion_buf_size(params->format, result->dst_pitches[i],
  1559							  &params->clip, i);
  1560			KUNIT_ASSERT_GT(test, dst_size[i], 0);
  1561	
  1562			buf[i] = kunit_kzalloc(test, dst_size[i], GFP_KERNEL);
  1563			KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf[i]);
  1564			iosys_map_set_vaddr(&dst[i], buf[i]);
  1565	
> 1566			src_cp[i] = cpubuf_to_le32(test, params->src[i], TEST_BUF_SIZE);
  1567			iosys_map_set_vaddr(&src[i], src_cp[i]);
  1568		}
  1569	
  1570		if (result->dst_pitches[0] == TEST_USE_DEFAULT_PITCH)
  1571			drm_fb_memcpy(dst, NULL, src, &fb, &params->clip);
  1572		else
  1573			drm_fb_memcpy(dst, result->dst_pitches, src, &fb, &params->clip);
  1574	
  1575		for (size_t i = 0; i < fb.format->num_planes; i++) {
  1576			expected[i] = cpubuf_to_le32(test, result->expected[i], TEST_BUF_SIZE);
  1577			KUNIT_EXPECT_MEMEQ_MSG(test, buf[i], expected[i], dst_size[i],
  1578					       "Failed expectation on plane %zu", i);
  1579		}
  1580	}
  1581	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-07-25 14:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 18:23 [PATCH 0/6] Increase code coverage on drm_format_helper.c Arthur Grillo
2023-07-21 18:23 ` [PATCH 1/6] drm/format-helper: Test default pitch fallback Arthur Grillo
2023-08-05 12:56   ` Maira Canal
2023-08-09 14:54   ` André Almeida
2023-07-21 18:23 ` [PATCH 2/6] drm/format-helper: Add KUnit tests for drm_fb_swab() Arthur Grillo
2023-08-05 13:02   ` Maira Canal
2023-08-09 14:57   ` André Almeida
2023-07-21 18:23 ` [PATCH 3/6] drm/format-helper: Add KUnit tests for drm_fb_clip_offset() Arthur Grillo
2023-08-05 13:16   ` Maira Canal
2023-08-09 15:28   ` André Almeida
2023-07-21 18:23 ` [PATCH 4/6] drm/format-helper: Add KUnit tests for drm_fb_build_fourcc_list() Arthur Grillo
2023-08-05 13:21   ` Maira Canal
2023-08-09 15:54   ` André Almeida
2023-07-21 18:23 ` [PATCH 5/6] drm/format-helper-test: Add multi-plane support to conversion_buf_size() Arthur Grillo
2023-08-05 13:22   ` Maira Canal
2023-08-09 16:16   ` André Almeida
2023-07-21 18:23 ` [PATCH 6/6] drm/format-helper: Add KUnit tests for drm_fb_memcpy() Arthur Grillo
2023-07-25 14:14   ` kernel test robot [this message]
2023-08-05 13:26   ` Maira Canal
2023-08-09 20:01     ` Arthur Grillo

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=202307252148.wr2nafKj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrealmeid@riseup.net \
    --cc=arthurgrillo@riseup.net \
    --cc=davidgow@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jose.exposito89@gmail.com \
    --cc=mairacanal@riseup.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tales.aparecida@gmail.com \
    --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