Re: [PATCH v5 20/44] drm/tests: Add a few tests around drm_fixed.h
On 8/19/24 13:56, Harry Wentland wrote: > While working on the CTM implementation of VKMS I had to ascertain > myself of a few assumptions. One of those is whether drm_fixed.h > treats its numbers using signed-magnitude or twos-complement. It is > twos-complement. > > In order to make someone else's day easier I am adding the > drm_test_int2fixp test that validates the above assumption. > > I am also adding a test for the new sm2fixp function that converts > from a signed-magnitude fixed point to the twos-complement fixed > point. > > Signed-off-by: Harry Wentland > --- > drivers/gpu/drm/tests/Makefile| 3 +- > drivers/gpu/drm/tests/drm_fixp_test.c | 69 +++ > 2 files changed, 71 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/tests/drm_fixp_test.c > > diff --git a/drivers/gpu/drm/tests/Makefile b/drivers/gpu/drm/tests/Makefile > index 56dab563abd7..bd69df0eee33 100644 > --- a/drivers/gpu/drm/tests/Makefile > +++ b/drivers/gpu/drm/tests/Makefile > @@ -20,6 +20,7 @@ obj-$(CONFIG_DRM_KUNIT_TEST) += \ > drm_modes_test.o \ > drm_plane_helper_test.o \ > drm_probe_helper_test.o \ > - drm_rect_test.o > + drm_rect_test.o \ > + drm_fixp_test.o > > CFLAGS_drm_mm_test.o := $(DISABLE_STRUCTLEAK_PLUGIN) > diff --git a/drivers/gpu/drm/tests/drm_fixp_test.c > b/drivers/gpu/drm/tests/drm_fixp_test.c > new file mode 100644 > index ..f420f173ff66 > --- /dev/null > +++ b/drivers/gpu/drm/tests/drm_fixp_test.c > @@ -0,0 +1,69 @@ ... > +MODULE_AUTHOR("AMD"); > +MODULE_LICENSE("GPL and additional rights"); > \ No newline at end of file Please add the missing MODULE_DESCRIPTION()
Re: [PATCH v5 20/44] drm/tests: Add a few tests around drm_fixed.h
Hi Harry, kernel test robot noticed the following build errors: [auto build test ERROR on drm/drm-next] [also build test ERROR on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.11-rc4 next-20240820] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20240820-050138 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20240819205714.316380-21-harry.wentland%40amd.com patch subject: [PATCH v5 20/44] drm/tests: Add a few tests around drm_fixed.h config: parisc-randconfig-001-20240821 (https://download.01.org/0day-ci/archive/20240821/202408211157.n8ubzpfl-...@intel.com/config) compiler: hppa-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240821/202408211157.n8ubzpfl-...@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 | Closes: https://lore.kernel.org/oe-kbuild-all/202408211157.n8ubzpfl-...@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/tests/drm_fixp_test.c:6: drivers/gpu/drm/tests/drm_fixp_test.c: In function 'drm_test_sm2fixp': >> drivers/gpu/drm/tests/drm_fixp_test.c:11:66: error: integer overflow in >> expression of type 'long long int' results in '9223372036854775807' >> [-Werror=overflow] 11 | KUNIT_EXPECT_EQ(test, 0x7fffll, ((1LL << 63) - 1)); | ^ include/kunit/test.h:725:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION' 725 | const typeof(right) __right = (right); \ |^ include/kunit/test.h:920:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION' 920 | KUNIT_BINARY_INT_ASSERTION(test, \ | ^~ include/kunit/test.h:917:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG' 917 | KUNIT_EXPECT_EQ_MSG(test, left, right, NULL) | ^~~ drivers/gpu/drm/tests/drm_fixp_test.c:11:9: note: in expansion of macro 'KUNIT_EXPECT_EQ' 11 | KUNIT_EXPECT_EQ(test, 0x7fffll, ((1LL << 63) - 1)); | ^~~ cc1: all warnings being treated as errors vim +11 drivers/gpu/drm/tests/drm_fixp_test.c 8 9 static void drm_test_sm2fixp(struct kunit *test) 10 { > 11 KUNIT_EXPECT_EQ(test, 0x7fffll, ((1LL << 63) - 1)); 12 13 /* 1 */ 14 KUNIT_EXPECT_EQ(test, drm_int2fixp(1), drm_sm2fixp(1ull << DRM_FIXED_POINT)); 15 16 /* -1 */ 17 KUNIT_EXPECT_EQ(test, drm_int2fixp(-1), drm_sm2fixp((1ull << 63) | (1ull << DRM_FIXED_POINT))); 18 19 /* 0.5 */ 20 KUNIT_EXPECT_EQ(test, drm_fixp_from_fraction(1, 2), drm_sm2fixp(1ull << (DRM_FIXED_POINT - 1))); 21 22 /* -0.5 */ 23 KUNIT_EXPECT_EQ(test, drm_fixp_from_fraction(-1, 2), drm_sm2fixp((1ull << 63) | (1ull << (DRM_FIXED_POINT - 1; 24 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v5 36/44] drm/amd/display: add 3x4 matrix colorop
Hi Harry, kernel test robot noticed the following build errors: [auto build test ERROR on drm/drm-next] [also build test ERROR on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.11-rc4 next-20240821] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20240820-050138 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20240819205714.316380-37-harry.wentland%40amd.com patch subject: [PATCH v5 36/44] drm/amd/display: add 3x4 matrix colorop config: parisc-randconfig-001-20240821 (https://download.01.org/0day-ci/archive/20240821/202408211502.ev7fxurd-...@intel.com/config) compiler: hppa-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240821/202408211502.ev7fxurd-...@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 | Closes: https://lore.kernel.org/oe-kbuild-all/202408211502.ev7fxurd-...@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/drm/drm_print.h:31, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:29, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:29, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:43, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:25: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c: In function '__set_dm_plane_colorop_3x4_matrix': >> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: error: format '%ld' >> expects argument of type 'long int', but argument 3 has type 'size_t' {aka >> 'unsigned int'} [-Werror=format=] 41 | #define dev_fmt(fmt) "amdgpu: " fmt | ^~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt' 156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:470:9: note: in expansion of macro 'dev_warn' 470 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) | ^~~~ include/drm/drm_print.h:480:9: note: in expansion of macro '__drm_printk' 480 | __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1247:25: note: in expansion of macro 'drm_warn' 1247 | drm_warn(dev, "blob->length (%ld) isn't equal to drm_color_ctm_3x4 (%ld)\n", | ^~~~ >> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: error: format '%ld' >> expects argument of type 'long int', but argument 4 has type 'unsigned int' >> [-Werror=format=] 41 | #define dev_fmt(fmt) "amdgpu: " fmt | ^~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt' 156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:470:9: note: in expansion of macro 'dev_warn' 470 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) | ^~~~ include/drm/drm_print.h:480:9: note: in expansion of macro '__drm_printk' 480 | __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1247:25: note: in expansion of macro 'drm_warn' 1247 | drm_warn(dev, "b
Re: [PATCH v5 28/44] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block
Hi Harry, kernel test robot noticed the following build warnings: [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.11-rc4 next-20240820] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20240820-050138 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20240819205714.316380-29-harry.wentland%40amd.com patch subject: [PATCH v5 28/44] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block config: x86_64-randconfig-003-20240821 (https://download.01.org/0day-ci/archive/20240821/202408211241.xavubshv-...@intel.com/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240821/202408211241.xavubshv-...@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 | Closes: https://lore.kernel.org/oe-kbuild-all/202408211241.xavubshv-...@intel.com/ All warnings (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1232:42: >> warning: variable 'shaper_size' is uninitialized when used here >> [-Wuninitialized] 1232 | return __set_output_tf(tf, shaper_lut, shaper_size, false); |^~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1214:22: note: initialize the variable 'shaper_size' to silence this warning 1214 | uint32_t shaper_size; | ^ | = 0 1 warning generated. vim +/shaper_size +1232 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c 1205 1206 static int 1207 __set_colorop_in_shaper_1d_curve(struct dc_plane_state *dc_plane_state, 1208 struct drm_colorop_state *colorop_state) 1209 { 1210 struct dc_transfer_func *tf = &dc_plane_state->in_shaper_func; 1211 struct drm_colorop *colorop = colorop_state->colorop; 1212 struct drm_device *drm = colorop->dev; 1213 const struct drm_color_lut *shaper_lut; 1214 uint32_t shaper_size; 1215 1216 if (colorop->type != DRM_COLOROP_1D_CURVE && 1217 colorop_state->curve_1d_type != DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF) 1218 return -EINVAL; 1219 1220 if (colorop_state->bypass) { 1221 tf->type = TF_TYPE_BYPASS; 1222 tf->tf = TRANSFER_FUNCTION_LINEAR; 1223 return 0; 1224 } 1225 1226 drm_dbg(drm, "Shaper colorop with ID: %d\n", colorop->base.id); 1227 1228 if (colorop->type == DRM_COLOROP_1D_CURVE) { 1229 tf->type = TF_TYPE_DISTRIBUTED_POINTS; 1230 tf->tf = amdgpu_colorop_tf_to_dc_tf(colorop_state->curve_1d_type); 1231 tf->sdr_ref_white_level = SDR_WHITE_LEVEL_INIT_VALUE; > 1232 return __set_output_tf(tf, shaper_lut, shaper_size, > false); 1233 } 1234 1235 return -EINVAL; 1236 } 1237 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v5 36/44] drm/amd/display: add 3x4 matrix colorop
Hi Harry, kernel test robot noticed the following build warnings: [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.11-rc4 next-20240820] [cannot apply to drm-exynos/exynos-drm-next] [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/Harry-Wentland/drm-Add-helper-for-conversion-from-signed-magnitude/20240820-050138 base: git://anongit.freedesktop.org/drm/drm drm-next patch link: https://lore.kernel.org/r/20240819205714.316380-37-harry.wentland%40amd.com patch subject: [PATCH v5 36/44] drm/amd/display: add 3x4 matrix colorop config: arm-randconfig-002-20240821 (https://download.01.org/0day-ci/archive/20240821/202408211016.tkund7h3-...@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240821/202408211016.tkund7h3-...@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 | Closes: https://lore.kernel.org/oe-kbuild-all/202408211016.tkund7h3-...@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/drm/drm_print.h:31, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ring.h:29, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_ctx.h:29, from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:43, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:25: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c: In function '__set_dm_plane_colorop_3x4_matrix': >> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: warning: format '%ld' >> expects argument of type 'long int', but argument 3 has type 'size_t' {aka >> 'unsigned int'} [-Wformat=] 41 | #define dev_fmt(fmt) "amdgpu: " fmt | ^~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt' 156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:470:9: note: in expansion of macro 'dev_warn' 470 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) | ^~~~ include/drm/drm_print.h:480:9: note: in expansion of macro '__drm_printk' 480 | __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1247:25: note: in expansion of macro 'drm_warn' 1247 | drm_warn(dev, "blob->length (%ld) isn't equal to drm_color_ctm_3x4 (%ld)\n", | ^~~~ >> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: warning: format '%ld' >> expects argument of type 'long int', but argument 4 has type 'unsigned int' >> [-Wformat=] 41 | #define dev_fmt(fmt) "amdgpu: " fmt | ^~ include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt' 156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:470:9: note: in expansion of macro 'dev_warn' 470 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) | ^~~~ include/drm/drm_print.h:480:9: note: in expansion of macro '__drm_printk' 480 | __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1247:25: note: in expansion of macro 'drm_warn' 1247 |
Re: [PATCH v5 03/44] drm/vkms: Add kunit tests for VKMS LUT handling
On 8/19/24 13:56, Harry Wentland wrote: > Debugging LUT math is much easier when we can unit test > it. Add kunit functionality to VKMS and add tests for > - get_lut_index > - lerp_u16 > > v5: > - Bring back static for lerp_u16 and get_lut_index (Arthur) > > v4: > - Test the critical points of the lerp function (Pekka) > > v3: > - Use include way of testing static functions (Arthur) note version information is usually after the "---" so that it not part of the final git history > > Signed-off-by: Harry Wentland > Cc: Arthur Grillo > --- > drivers/gpu/drm/vkms/Kconfig | 5 + > drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + > drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 163 ++ > drivers/gpu/drm/vkms/vkms_composer.c | 4 + > 4 files changed, 176 insertions(+) > create mode 100644 drivers/gpu/drm/vkms/tests/.kunitconfig > create mode 100644 drivers/gpu/drm/vkms/tests/vkms_color_tests.c > > diff --git a/drivers/gpu/drm/vkms/Kconfig b/drivers/gpu/drm/vkms/Kconfig > index b9ecdebecb0b..c1f8b343ff0e 100644 > --- a/drivers/gpu/drm/vkms/Kconfig > +++ b/drivers/gpu/drm/vkms/Kconfig > @@ -13,3 +13,8 @@ config DRM_VKMS > a VKMS. > > If M is selected the module will be called vkms. > + > +config DRM_VKMS_KUNIT_TESTS > + tristate "Tests for VKMS" if !KUNIT_ALL_TESTS > + depends on DRM_VKMS && KUNIT > + default KUNIT_ALL_TESTS > diff --git a/drivers/gpu/drm/vkms/tests/.kunitconfig > b/drivers/gpu/drm/vkms/tests/.kunitconfig > new file mode 100644 > index ..70e378228cbd > --- /dev/null > +++ b/drivers/gpu/drm/vkms/tests/.kunitconfig > @@ -0,0 +1,4 @@ > +CONFIG_KUNIT=y > +CONFIG_DRM=y > +CONFIG_DRM_VKMS=y > +CONFIG_DRM_VKMS_KUNIT_TESTS=y > diff --git a/drivers/gpu/drm/vkms/tests/vkms_color_tests.c > b/drivers/gpu/drm/vkms/tests/vkms_color_tests.c > new file mode 100644 > index ..fc73e48aa57c > --- /dev/null > +++ b/drivers/gpu/drm/vkms/tests/vkms_color_tests.c ... > +kunit_test_suite(vkms_color_test_suite); > + > +MODULE_LICENSE("GPL"); > \ No newline at end of file Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning when built with make W=1. Recently, multiple developers have been eradicating these warnings treewide, and very few are left, so please don't introduce a new one :) Please add the missing MODULE_DESCRIPTION() /jeff
[ANNOUNCE] weston 13.0.92
Hi all, This is the beta release for Weston 14.0.0. Changelog since the alpha release: Derek Foreman (1): drm: Remove unnecessary parameter from drm_output_state_alloc() Marius Vlad (1): build: bump to version 13.0.92 for the beta release git tag: 13.0.92 https://gitlab.freedesktop.org/wayland/weston/-/releases/13.0.92/downloads/weston-13.0.92.tar.xz SHA256: bdabae02683199c1cfa9bee30c83ea1d351310c5d21de02d03d1c73e9656fd62 weston-13.0.92.tar.xz SHA512: 9329aa3ec9801585030cbd507c1ebeb4fb5559f451ba584ae6e152b6982090f0985cf62a714237bce4d4e52557fcde283fabc9aa48fa9c0a4430399226dde3ce weston-13.0.92.tar.xz PGP: https://gitlab.freedesktop.org/wayland/weston/-/releases/13.0.92/downloads/weston-13.0.92.tar.xz.sig signature.asc Description: PGP signature