* Re: [PATCH v6 03/10] drm/bridge: it6505: add AUX operation for HDCP KSV list read
[not found] <20241016-upstream-v6-v6-3-4d93a0c46de1@ite.com.tw>
@ 2024-10-19 23:30 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-19 23:30 UTC (permalink / raw)
To: Hermes Wu via B4 Relay, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, AngeloGioacchino Del Regno, Pin-yen Lin
Cc: llvm, oe-kbuild-all, dri-devel, linux-kernel, Kenneth Hung,
Pet Weng, Hermes Wu
Hi Hermes,
kernel test robot noticed the following build errors:
[auto build test ERROR on b8128f7815ff135f0333c1b46dcdf1543c41b860]
url: https://github.com/intel-lab-lkp/linux/commits/Hermes-Wu-via-B4-Relay/drm-bridge-it6505-Change-definition-of-AUX_FIFO_MAX_SIZE/20241016-155607
base: b8128f7815ff135f0333c1b46dcdf1543c41b860
patch link: https://lore.kernel.org/r/20241016-upstream-v6-v6-3-4d93a0c46de1%40ite.com.tw
patch subject: [PATCH v6 03/10] drm/bridge: it6505: add AUX operation for HDCP KSV list read
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20241020/202410200756.KlsPLE8A-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bfe84f7085d82d06d61c632a7bad1e692fd159e4)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241020/202410200756.KlsPLE8A-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/202410200756.KlsPLE8A-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/bridge/ite-it6505.c:13:
In file included from include/linux/i2c.h:19:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:8:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
548 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
561 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/gpu/drm/bridge/ite-it6505.c:13:
In file included from include/linux/i2c.h:19:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:8:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
574 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/gpu/drm/bridge/ite-it6505.c:13:
In file included from include/linux/i2c.h:19:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:8:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
585 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from drivers/gpu/drm/bridge/ite-it6505.c:13:
In file included from include/linux/i2c.h:19:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:21:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/gpu/drm/bridge/ite-it6505.c:1004:40: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1004 | it6505_write(it6505, REG_AUX_CMD_REQ, FIELD_GET(M_AUX_REQ_CMD, cmd));
| ^
7 warnings and 1 error 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]
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [m]:
- RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
vim +/FIELD_GET +1004 drivers/gpu/drm/bridge/ite-it6505.c
956
957 static ssize_t it6505_aux_operation(struct it6505 *it6505,
958 enum aux_cmd_type cmd,
959 unsigned int address, u8 *buffer,
960 size_t size, enum aux_cmd_reply *reply)
961 {
962 int i, ret;
963 bool aux_write_check = false;
964
965 if (!it6505_get_sink_hpd_status(it6505))
966 return -EIO;
967
968 /* set AUX user mode */
969 it6505_set_bits(it6505, REG_AUX_CTRL, AUX_USER_MODE, AUX_USER_MODE);
970
971 aux_op_start:
972 /* HW AUX FIFO supports only EDID and DCPD KSV FIFO area */
973 if (cmd == CMD_AUX_I2C_EDID_READ || cmd == CMD_AUX_GET_KSV_LIST) {
974 /* AUX EDID FIFO has max length of AUX_FIFO_MAX_SIZE bytes. */
975 size = min_t(size_t, size, AUX_FIFO_MAX_SIZE);
976 /* Enable AUX FIFO read back and clear FIFO */
977 it6505_set_bits(it6505, REG_AUX_CTRL,
978 AUX_EN_FIFO_READ | CLR_EDID_FIFO,
979 AUX_EN_FIFO_READ | CLR_EDID_FIFO);
980
981 it6505_set_bits(it6505, REG_AUX_CTRL,
982 AUX_EN_FIFO_READ | CLR_EDID_FIFO,
983 AUX_EN_FIFO_READ);
984 } else {
985 /* The DP AUX transmit buffer has 4 bytes. */
986 size = min_t(size_t, size, 4);
987 it6505_set_bits(it6505, REG_AUX_CTRL, AUX_NO_SEGMENT_WR,
988 AUX_NO_SEGMENT_WR);
989 }
990
991 /* Start Address[7:0] */
992 it6505_write(it6505, REG_AUX_ADR_0_7, (address >> 0) & 0xFF);
993 /* Start Address[15:8] */
994 it6505_write(it6505, REG_AUX_ADR_8_15, (address >> 8) & 0xFF);
995 /* WriteNum[3:0]+StartAdr[19:16] */
996 it6505_write(it6505, REG_AUX_ADR_16_19,
997 ((address >> 16) & 0x0F) | ((size - 1) << 4));
998
999 if (cmd == CMD_AUX_NATIVE_WRITE)
1000 regmap_bulk_write(it6505->regmap, REG_AUX_OUT_DATA0, buffer,
1001 size);
1002
1003 /* Aux Fire */
> 1004 it6505_write(it6505, REG_AUX_CMD_REQ, FIELD_GET(M_AUX_REQ_CMD, cmd));
1005
1006 ret = it6505_aux_wait(it6505);
1007 if (ret < 0)
1008 goto aux_op_err;
1009
1010 ret = it6505_read(it6505, REG_AUX_ERROR_STS);
1011 if (ret < 0)
1012 goto aux_op_err;
1013
1014 switch ((ret >> 6) & 0x3) {
1015 case 0:
1016 *reply = REPLY_ACK;
1017 break;
1018 case 1:
1019 *reply = REPLY_DEFER;
1020 ret = -EAGAIN;
1021 goto aux_op_err;
1022 case 2:
1023 *reply = REPLY_NACK;
1024 ret = -EIO;
1025 goto aux_op_err;
1026 case 3:
1027 ret = -ETIMEDOUT;
1028 goto aux_op_err;
1029 }
1030
1031 /* Read back Native Write data */
1032 if (cmd == CMD_AUX_NATIVE_WRITE) {
1033 aux_write_check = true;
1034 cmd = CMD_AUX_NATIVE_READ;
1035 goto aux_op_start;
1036 }
1037
1038 if (cmd == CMD_AUX_I2C_EDID_READ || cmd == CMD_AUX_GET_KSV_LIST) {
1039 for (i = 0; i < size; i++) {
1040 ret = it6505_read(it6505, REG_AUX_DATA_FIFO);
1041 if (ret < 0)
1042 goto aux_op_err;
1043 buffer[i] = ret;
1044 }
1045 } else {
1046 for (i = 0; i < size; i++) {
1047 ret = it6505_read(it6505, REG_AUX_DATA_0_7 + i);
1048 if (ret < 0)
1049 goto aux_op_err;
1050
1051 if (aux_write_check && buffer[size - 1 - i] != ret) {
1052 ret = -EINVAL;
1053 goto aux_op_err;
1054 }
1055
1056 buffer[size - 1 - i] = ret;
1057 }
1058 }
1059
1060 ret = i;
1061
1062 aux_op_err:
1063 if (cmd == CMD_AUX_I2C_EDID_READ || cmd == CMD_AUX_GET_KSV_LIST) {
1064 /* clear AUX FIFO */
1065 it6505_set_bits(it6505, REG_AUX_CTRL,
1066 AUX_EN_FIFO_READ | CLR_EDID_FIFO,
1067 AUX_EN_FIFO_READ | CLR_EDID_FIFO);
1068 it6505_set_bits(it6505, REG_AUX_CTRL,
1069 AUX_EN_FIFO_READ | CLR_EDID_FIFO, 0x00);
1070 }
1071
1072 /* Leave AUX user mode */
1073 it6505_set_bits(it6505, REG_AUX_CTRL, AUX_USER_MODE, 0);
1074
1075 return ret;
1076 }
1077
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread