Re: [PATCH v6 21/44] drm/vkms: Add tests for CTM handling

2024-10-05 Thread kernel test robot
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.12-rc1 next-20241004]
[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/20241004-040629
base:   git://anongit.freedesktop.org/drm/drm drm-next
patch link:
https://lore.kernel.org/r/20241003200129.1732122-22-harry.wentland%40amd.com
patch subject: [PATCH v6 21/44] drm/vkms: Add tests for CTM handling
config: csky-randconfig-r112-20241005 
(https://download.01.org/0day-ci/archive/20241005/202410051850.cgjobkkg-...@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0
reproduce: 
(https://download.01.org/0day-ci/archive/20241005/202410051850.cgjobkkg-...@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/202410051850.cgjobkkg-...@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/vkms/tests/vkms_color_test.c:34:29: sparse: sparse: symbol 
'test_linear_lut' was not declared. Should it be static?
>> drivers/gpu/drm/vkms/tests/vkms_color_test.c:193:32: sparse: sparse: symbol 
>> 'test_matrix_3x4_50_desat' was not declared. Should it be static?
>> drivers/gpu/drm/vkms/tests/vkms_color_test.c:259:32: sparse: sparse: symbol 
>> 'test_matrix_3x4_bt709_enc' was not declared. Should it be static?

vim +/test_matrix_3x4_50_desat +193 drivers/gpu/drm/vkms/tests/vkms_color_test.c

   192  
 > 193  const struct drm_color_ctm_3x4 test_matrix_3x4_50_desat = { {
   194  FIXPT_HALF, FIXPT_QUARTER, FIXPT_QUARTER, 0,
   195  FIXPT_QUARTER, FIXPT_HALF, FIXPT_QUARTER, 0,
   196  FIXPT_QUARTER, FIXPT_QUARTER, FIXPT_HALF, 0
   197  } };
   198  
   199  static void vkms_color_ctm_3x4_50_desat(struct kunit *test)
   200  {
   201  struct pixel_argb_s32 ref, out;
   202  
   203  /* full white */
   204  ref.a = 0x;
   205  ref.r = 0x;
   206  ref.g = 0x;
   207  ref.b = 0x;
   208  
   209  memcpy(&out, &ref, sizeof(out));
   210  apply_3x4_matrix(&out, &test_matrix_3x4_50_desat);
   211  
   212  KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out));
   213  
   214  /* full black */
   215  ref.a = 0x;
   216  ref.r = 0x0;
   217  ref.g = 0x0;
   218  ref.b = 0x0;
   219  
   220  memcpy(&out, &ref, sizeof(out));
   221  apply_3x4_matrix(&out, &test_matrix_3x4_50_desat);
   222  
   223  KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out));
   224  
   225  /* 50% grey */
   226  ref.a = 0x;
   227  ref.r = 0x8000;
   228  ref.g = 0x8000;
   229  ref.b = 0x8000;
   230  
   231  memcpy(&out, &ref, sizeof(out));
   232  apply_3x4_matrix(&out, &test_matrix_3x4_50_desat);
   233  
   234  KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out));
   235  
   236  /* full red to 50% desat */
   237  ref.a = 0x;
   238  ref.r = 0x8000;
   239  ref.g = 0x4000;
   240  ref.b = 0x4000;
   241  
   242  out.a = 0x;
   243  out.r = 0x;
   244  out.g = 0x0;
   245  out.b = 0x0;
   246  
   247  apply_3x4_matrix(&out, &test_matrix_3x4_50_desat);
   248  
   249  KUNIT_EXPECT_MEMEQ(test, &ref, &out, sizeof(out));
   250  }
   251  
   252  /*
   253   * BT.709 encoding matrix
   254   *
   255   * Values printed from within IGT when converting
   256   * igt_matrix_3x4_bt709_enc to the fixed-point format expected
   257   * by DRM/KMS.
   258   */
 > 259  const struct drm_color_ctm_3x4 test_matrix_3x4_bt709_enc = { {
   260  0x366cf400ull, 0xb7175900ull, 
0x000127bb300ull, 0,
   261  0x80001993b3a0ull, 0x80005609fe80ull, 
0x6f9db200ull, 0,
   262  0x9d70a400ull, 0x80008f011100ull, 
0x8e6f9330ull, 0
   263  } };
   264  

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


Re: [PATCH v6 36/44] drm/amd/display: add 3x4 matrix colorop

2024-10-05 Thread kernel test robot
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.12-rc1 next-20241004]
[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/20241004-040629
base:   git://anongit.freedesktop.org/drm/drm drm-next
patch link:
https://lore.kernel.org/r/20241003200129.1732122-37-harry.wentland%40amd.com
patch subject: [PATCH v6 36/44] drm/amd/display: add 3x4 matrix colorop
config: i386-randconfig-063-20241005 
(https://download.01.org/0day-ci/archive/20241005/202410051812.tvvprkdr-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20241005/202410051812.tvvprkdr-...@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/202410051812.tvvprkdr-...@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 '%lu' 
>> expects argument of type 'long unsigned 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:522:9: note: in expansion of macro 'dev_warn'
 522 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, 
##__VA_ARGS__)
 | ^~~~
   include/drm/drm_print.h:532:9: note: in expansion of macro '__drm_printk'
 532 | __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 (%lu) isn't 
equal to drm_color_ctm_3x4 (%lu)\n",
 | ^~~~
>> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:41:22: error: format '%lu' 
>> expects argument of type 'long unsigned 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:522:9: note: in expansion of macro 'dev_warn'
 522 | dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, 
##__VA_ARGS__)
 | ^~~~
   include/drm/drm_print.h:532:9: note: in expansion of macro '__drm_printk'
 532 | __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 | d

Re: [PATCH v6 03/44] drm/vkms: Add kunit tests for VKMS LUT handling

2024-10-05 Thread kernel test robot
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.12-rc1 next-20241004]
[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/20241004-040629
base:   git://anongit.freedesktop.org/drm/drm drm-next
patch link:
https://lore.kernel.org/r/20241003200129.1732122-4-harry.wentland%40amd.com
patch subject: [PATCH v6 03/44] drm/vkms: Add kunit tests for VKMS LUT handling
config: csky-randconfig-r112-20241005 
(https://download.01.org/0day-ci/archive/20241005/202410051655.9wef2chw-...@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0
reproduce: 
(https://download.01.org/0day-ci/archive/20241005/202410051655.9wef2chw-...@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/202410051655.9wef2chw-...@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/vkms/tests/vkms_color_test.c:33:29: sparse: sparse: symbol 
>> 'test_linear_lut' was not declared. Should it be static?

vim +/test_linear_lut +33 drivers/gpu/drm/vkms/tests/vkms_color_test.c

32  
  > 33  const struct vkms_color_lut test_linear_lut = {
34  .base = test_linear_array,
35  .lut_length = TEST_LUT_SIZE,
36  .channel_value2index_ratio = 0xf000fll
37  };
38  
39  

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


Re: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block

2024-10-05 Thread kernel test robot
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.12-rc1 next-20241004]
[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/20241004-040629
base:   git://anongit.freedesktop.org/drm/drm drm-next
patch link:
https://lore.kernel.org/r/20241003200129.1732122-30-harry.wentland%40amd.com
patch subject: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in 
BLND block
config: x86_64-randconfig-122-20241005 
(https://download.01.org/0day-ci/archive/20241005/202410052207.g19vlhrt-...@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 
3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20241005/202410052207.g19vlhrt-...@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/202410052207.g19vlhrt-...@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1296:46: 
>> error: variable 'blend_size' is uninitialized when used here 
>> [-Werror,-Wuninitialized]
1296 | return __set_input_tf(NULL, tf, blend_lut, 
blend_size);
 |^~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1278:21: 
note: initialize the variable 'blend_size' to silence this warning
1278 | uint32_t blend_size;
 |^
 | = 0
   1 error generated.


vim +/blend_size +1296 
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c

  1273  
  1274  struct dc_transfer_func *tf = &dc_plane_state->blend_tf;
  1275  struct drm_colorop *colorop = colorop_state->colorop;
  1276  struct drm_device *drm = colorop->dev;
  1277  const struct drm_color_lut *blend_lut;
  1278  uint32_t blend_size;
  1279  
  1280  if (colorop->type != DRM_COLOROP_1D_CURVE &&
  1281  colorop_state->curve_1d_type != 
DRM_COLOROP_1D_CURVE_SRGB_EOTF)
  1282  return -EINVAL;
  1283  
  1284  if (colorop_state->bypass) {
  1285  tf->type = TF_TYPE_BYPASS;
  1286  tf->tf = TRANSFER_FUNCTION_LINEAR;
  1287  return 0;
  1288  }
  1289  
  1290  drm_dbg(drm, "Blend colorop with ID: %d\n", colorop->base.id);
  1291  
  1292  if (colorop->type == DRM_COLOROP_1D_CURVE) {
  1293  tf->type = TF_TYPE_DISTRIBUTED_POINTS;
  1294  tf->tf = 
amdgpu_colorop_tf_to_dc_tf(colorop_state->curve_1d_type);
  1295  tf->sdr_ref_white_level = SDR_WHITE_LEVEL_INIT_VALUE;
> 1296  return __set_input_tf(NULL, tf, blend_lut, blend_size);
  1297  }
  1298  
  1299  return -EINVAL;
  1300  }
  1301  

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


Re: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block

2024-10-05 Thread kernel test robot
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-misc/drm-misc-next 
linus/master v6.12-rc1 next-20241004]
[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/20241004-040629
base:   git://anongit.freedesktop.org/drm/drm drm-next
patch link:
https://lore.kernel.org/r/20241003200129.1732122-30-harry.wentland%40amd.com
patch subject: [PATCH v6 29/44] drm/amd/display: Add support for sRGB EOTF in 
BLND block
config: x86_64-allyesconfig 
(https://download.01.org/0day-ci/archive/20241005/202410052046.3g21jba1-...@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 
3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20241005/202410052046.3g21jba1-...@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/202410052046.3g21jba1-...@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1296:46: 
>> warning: variable 'blend_size' is uninitialized when used here 
>> [-Wuninitialized]
1296 | return __set_input_tf(NULL, tf, blend_lut, 
blend_size);
 |^~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:1278:21: 
note: initialize the variable 'blend_size' to silence this warning
1278 | uint32_t blend_size;
 |^
 | = 0
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MODVERSIONS
   Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y]
   Selected by [y]:
   - RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=y] || GCC_PLUGINS [=n]) && 
MODULES [=y]


vim +/blend_size +1296 
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c

  1273  
  1274  struct dc_transfer_func *tf = &dc_plane_state->blend_tf;
  1275  struct drm_colorop *colorop = colorop_state->colorop;
  1276  struct drm_device *drm = colorop->dev;
  1277  const struct drm_color_lut *blend_lut;
  1278  uint32_t blend_size;
  1279  
  1280  if (colorop->type != DRM_COLOROP_1D_CURVE &&
  1281  colorop_state->curve_1d_type != 
DRM_COLOROP_1D_CURVE_SRGB_EOTF)
  1282  return -EINVAL;
  1283  
  1284  if (colorop_state->bypass) {
  1285  tf->type = TF_TYPE_BYPASS;
  1286  tf->tf = TRANSFER_FUNCTION_LINEAR;
  1287  return 0;
  1288  }
  1289  
  1290  drm_dbg(drm, "Blend colorop with ID: %d\n", colorop->base.id);
  1291  
  1292  if (colorop->type == DRM_COLOROP_1D_CURVE) {
  1293  tf->type = TF_TYPE_DISTRIBUTED_POINTS;
  1294  tf->tf = 
amdgpu_colorop_tf_to_dc_tf(colorop_state->curve_1d_type);
  1295  tf->sdr_ref_white_level = SDR_WHITE_LEVEL_INIT_VALUE;
> 1296  return __set_input_tf(NULL, tf, blend_lut, blend_size);
  1297  }
  1298  
  1299  return -EINVAL;
  1300  }
  1301  

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