drm/bridge: it6505: fix HDCP CTS fail items and add MCCS support
Subsystems (3)
v6 cover drm/bridge: it6505: fix HDCP CTS fail items and add MCCS support
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being initialized
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer with timer_after()
links:
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.
Hermes Wu (10):
drm/bridge: it6505: Change definition of AUX_FIFO_MAX_SIZE drm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT drm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUX
---
Hermes Wu (10):
drm/bridge: it6505: Change definition of AUX_FIFO_MAX_SIZE drm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT drm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUX
drivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)
---
base-commit: b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7
Best regards,
Signature · 1 line
Hermes Wu <[email protected]>
PATCH v6 1/10 drm/bridge: it6505: Change definition of AUX_FIFO_MAX_SIZE
The hardware AUX FIFO is 16 bytes
Change definition of AUX_FIFO_MAX_SIZE to 16
--- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ite-it6505.c +1 -1
@@ -300,7 +300,7 @@#define MAX_CR_LEVEL 0x03#define MAX_EQ_LEVEL 0x03#define AUX_WAIT_TIMEOUT_MS 15 -#define AUX_FIFO_MAX_SIZE 32 +#define AUX_FIFO_MAX_SIZE 16#define PIXEL_CLK_DELAY 1#define PIXEL_CLK_INVERSE 0#define ADJUST_PHASE_THRESHOLD 80000
Signature · 1 line
2.34.1
Re: [PATCH v6 01/10] drm/bridge: it6505: Change definition of AUX_FIFO_MAX_SIZE
Quoted 11 lines · On Wed, Oct 16, 2024 at 03:54:13PM +0800, Hermes Wu via B4 Relay wrote:
From: Hermes Wu <[email protected]>
The hardware AUX FIFO is 16 bytes
Change definition ofAUX_FIFO_MAX_SIZEto 16Fixes b5c84a9edcd4 ("drm/bridge: add it6505 driver")Signed-off-by Hermes Wu <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
PATCH v6 2/10 drm/bridge: it6505: improve AUX operation for edid read
In reply to Hermes WuThe original AUX operation using data registers is limited to 4 bytes. The AUX operation command CMD_AUX_I2C_EDID_READ uses AUX FIFO and is capable of reading 16 bytes.
This improves the speed of EDID read.
--- drivers/gpu/drm/bridge/ite-it6505.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +7 -3
@@ -1076,10 +1076,13 @@ static ssize_t it6505_aux_do_transfer(struct it6505 *it6505, size_t size, enum aux_cmd_reply *reply) { int i, ret_size, ret = 0, request_size; +int fifo_max_size = (cmd ==CMD_AUX_I2C_EDID_READ ) ?AUX_FIFO_MAX_SIZE :4 ;mutex_lock (&it6505->aux_lock); -for (i =0 ; i < size; i +=4 ) { - request_size =min ((int )size - i,4 ); + i =0 ; + do { + request_size = min_t(int, (int)size - i, fifo_max_size); + ret_size = it6505_aux_operation(it6505, cmd, address + i, buffer + i, request_size, reply);
@@ -1088,8 +1091,9 @@ static ssize_t it6505_aux_do_transfer(struct it6505 *it6505, goto aux_op_err; } + i += request_size; ret += ret_size; - } + }while (i < size); aux_op_err:mutex_unlock (&it6505->aux_lock);
Signature · 1 line
2.34.1
Re: [PATCH v6 02/10] drm/bridge: it6505: improve AUX operation for edid read
Quoted 7 lines · On Wed, Oct 16, 2024 at 03:54:14PM +0800, Hermes Wu via B4 Relay wrote:
From: Hermes Wu <[email protected]>
The original AUX operation using data registers is limited to 4 bytes. The AUX operation command
CMD_AUX_I2C_EDID_READuses AUX FIFO and is capable of reading 16 bytes.
This improves the speed of EDID read.
Quoted 5 lines
Signed-off-by Hermes Wu <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Signature · 2 lines
With best wishes Dmitry
PATCH v6 3/10 drm/bridge: it6505: add AUX operation for HDCP KSV list read
In reply to Hermes WuHDCP KSV list readback can choose to use AUX FIFO or general data register.
For some DisplayPort devices, the KSV list must be read in 5 byte boundaries.
The original AUX read command does not support these devices.
The AUX command operation control register "REG_AUX_CMD_REQ" uses b[3:0] as AUX operacion control, and b[7:4] are status bits and read only. To change KSV read operation uses "CMD_AUX_NATIVE_READ" from using the data registers to using AUX FIFO.
The extended command "CMD_AUX_GET_KSV_LIST" is added as "CMD_AUX_NATIVE_READ" with the 0x10 flag which selects AUX FIFO mode.
--- drivers/gpu/drm/bridge/ite-it6505.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +11 -5
@@ -126,6 +126,7 @@#define REG_AUX_OUT_DATA0 0x27#define REG_AUX_CMD_REQ 0x2B +#define M_AUX_REQ_CMD 0x0F#define AUX_BUSY BIT(5)#define REG_AUX_DATA_0_7 0x2C
@@ -324,6 +325,9 @@ enum aux_cmd_type {CMD_AUX_NATIVE_READ =0x0 ,CMD_AUX_NATIVE_WRITE =0x5 ,CMD_AUX_I2C_EDID_READ =0xB , + +/* KSV read with AUX FIFO extend from CMD_AUX_NATIVE_READ*/ + CMD_AUX_GET_KSV_LIST = 0x10, }; enum aux_cmd_reply {
@@ -965,7 +969,8 @@ static ssize_t it6505_aux_operation(struct it6505 *it6505,it6505_set_bits (it6505,REG_AUX_CTRL ,AUX_USER_MODE ,AUX_USER_MODE ); aux_op_start: -if (cmd ==CMD_AUX_I2C_EDID_READ ) { +/* HW AUX FIFO supports only EDID and DCPD KSV FIFO area */ +if (cmd ==CMD_AUX_I2C_EDID_READ || cmd ==CMD_AUX_GET_KSV_LIST ) {/* AUX EDID FIFO has max length of AUX_FIFO_MAX_SIZE bytes. */ size =min_t (size_t, size,AUX_FIFO_MAX_SIZE );/* Enable AUX FIFO read back and clear FIFO */
@@ -996,7 +1001,7 @@ static ssize_t it6505_aux_operation(struct it6505 *it6505, size);/* Aux Fire */ -it6505_write (it6505,REG_AUX_CMD_REQ , cmd); +it6505_write (it6505,REG_AUX_CMD_REQ ,FIELD_GET (M_AUX_REQ_CMD , cmd)); ret =it6505_aux_wait (it6505);if (ret <0 )
@@ -1030,7 +1035,7 @@ static ssize_t it6505_aux_operation(struct it6505 *it6505, goto aux_op_start; } -if (cmd ==CMD_AUX_I2C_EDID_READ ) { +if (cmd ==CMD_AUX_I2C_EDID_READ || cmd ==CMD_AUX_GET_KSV_LIST ) {for (i =0 ; i < size; i++) { ret =it6505_read (it6505,REG_AUX_DATA_FIFO );if (ret <0 )
@@ -1055,7 +1060,7 @@ static ssize_t it6505_aux_operation(struct it6505 *it6505, ret = i; aux_op_err: -if (cmd ==CMD_AUX_I2C_EDID_READ ) { +if (cmd ==CMD_AUX_I2C_EDID_READ || cmd ==CMD_AUX_GET_KSV_LIST ) {/* clear AUX FIFO */ it6505_set_bits(it6505, REG_AUX_CTRL, AUX_EN_FIFO_READ | CLR_EDID_FIFO,
@@ -1076,7 +1081,8 @@ static ssize_t it6505_aux_do_transfer(struct it6505 *it6505, size_t size, enum aux_cmd_reply *reply) { int i, ret_size, ret = 0, request_size; -int fifo_max_size = (cmd ==CMD_AUX_I2C_EDID_READ ) ?AUX_FIFO_MAX_SIZE :4 ; +int fifo_max_size = (cmd ==CMD_AUX_I2C_EDID_READ || cmd ==CMD_AUX_GET_KSV_LIST ) ? +AUX_FIFO_MAX_SIZE :4 ;mutex_lock (&it6505->aux_lock); i =0 ;
Signature · 1 line
2.34.1
kernel test robot
build botRe: [PATCH v6 03/10] drm/bridge: it6505: add AUX operation for HDCP KSV list read
kernel test robot noticed the following build errors:
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/[email protected]/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/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
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
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v6 03/10] drm/bridge: it6505: add AUX operation for HDCP KSV list read
In reply to Hermes Wukernel test robot noticed the following build errors:
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: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241020/[email protected]/config) compiler: m68k-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241020/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_aux_operation':
>> drivers/gpu/drm/bridge/ite-it6505.c:1004:47: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
1004 | it6505_write(it6505, REG_AUX_CMD_REQ, FIELD_GET(M_AUX_REQ_CMD, cmd));
| ^~~~~~~~~Kconfig warnings: (for reference only)
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
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v6 03/10] drm/bridge: it6505: add AUX operation for HDCP KSV list read
In reply to Hermes WuQuoted 22 lines · On Wed, Oct 16, 2024 at 03:54:15PM +0800, Hermes Wu via B4 Relay wrote:
From: Hermes Wu <[email protected]>
HDCP KSV list readback can choose to use AUX FIFO or general data register.
For some DisplayPort devices, the KSV list must be read in 5 byte boundaries.
The original AUX read command does not support these devices.The AUX command operation control register "
REG_AUX_CMD_REQ" uses b[3:0] as AUX operacion control, and b[7:4] are status bits and read only. To change KSV read operation uses "CMD_AUX_NATIVE_READ" from using the data registers to using AUX FIFO.
The extended command "CMD_AUX_GET_KSV_LIST" is added as "CMD_AUX_NATIVE_READ" with the0x10flag which selects AUX FIFO mode.Signed-off-by Hermes Wu <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c static ssize_t it6505_aux_operation(struct it6505 *it6505, · line 1004
Quoted 5 lines
drivers/gpu/drm/bridge/ite-it6505.c +1
-1@@ -996,7 +1001,7 @@ static ssize_t it6505_aux_operation(struct it6505 *it6505, size);/* Aux Fire */ -it6505_write (it6505,REG_AUX_CMD_REQ , cmd); +it6505_write (it6505,REG_AUX_CMD_REQ ,FIELD_GET (M_AUX_REQ_CMD , cmd));
This needs #include <linux/bitfield.h>
Other than that
Quoted 3 lines
drivers/gpu/drm/bridge/ite-it6505.c +0
-0ret =it6505_aux_wait (it6505);if (ret <0 )
Signature · 2 lines
With best wishes Dmitry
PATCH v6 4/10 drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT
In reply to Hermes WuA HDCP source device shall support max downstream to 127 devices. Change definition MAX_HDCP_DOWN_STREAM_COUNT to 127
KSVs shall save for DRM blocked devices check.
This results in struct it6505 growth by ~0.5 KiB.
--- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ite-it6505.c +1 -1
@@ -297,7 +297,7 @@#define MAX_LANE_COUNT 4#define MAX_LINK_RATE HBR#define AUTO_TRAIN_RETRY 3 -#define MAX_HDCP_DOWN_STREAM_COUNT 10 +#define MAX_HDCP_DOWN_STREAM_COUNT 127#define MAX_CR_LEVEL 0x03#define MAX_EQ_LEVEL 0x03#define AUX_WAIT_TIMEOUT_MS 15
Signature · 1 line
2.34.1
Re: [PATCH v6 04/10] drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT
Quoted 5 lines · On Wed, Oct 16, 2024 at 03:54:16PM +0800, Hermes Wu via B4 Relay wrote:
From: Hermes Wu <[email protected]>
A HDCP source device shall support max downstream to 127 devices. Change definition
MAX_HDCP_DOWN_STREAM_COUNTto 127
Quoted 8 lines
KSVs shall save for DRM blocked devices check.
This results in struct it6505 growth by ~0.5 KiB.Signed-off-by Hermes Wu <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line
Signature · 2 lines
With best wishes Dmitry
PATCH v6 5/10 drm/bridge: it6505: fix HDCP Bstatus check
In reply to Hermes WuWhen HDCP is activated,
a DisplayPort source receiving CP_IRQ from the sink shall check Bstatus from DPCD and process the corresponding value
--- drivers/gpu/drm/bridge/ite-it6505.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +9 -3
@@ -2322,14 +2322,20 @@ static int it6505_process_hpd_irq(struct it6505 *it6505)DRM_DEV_DEBUG_DRIVER (dev,"dp_irq_vector = 0x%02x" , dp_irq_vector);if (dp_irq_vector &DP_CP_IRQ ) { -it6505_set_bits (it6505,REG_HDCP_TRIGGER ,HDCP_TRIGGER_CPIRQ , -HDCP_TRIGGER_CPIRQ ); - bstatus =it6505_dpcd_read (it6505,DP_AUX_HDCP_BSTATUS );if (bstatus <0 )return bstatus;DRM_DEV_DEBUG_DRIVER (dev,"Bstatus = 0x%02x" , bstatus); + +/*check BSTATUS when recive CP_IRQ */ +if (bstatus &DP_BSTATUS_R0_PRIME_READY && + it6505->hdcp_status ==HDCP_AUTH_GOING ) +it6505_set_bits (it6505,REG_HDCP_TRIGGER ,HDCP_TRIGGER_CPIRQ , +HDCP_TRIGGER_CPIRQ ); +else if (bstatus & (DP_BSTATUS_REAUTH_REQ |DP_BSTATUS_LINK_FAILURE ) && + it6505->hdcp_status ==HDCP_AUTH_DONE ) +it6505_start_hdcp (it6505); } ret =drm_dp_dpcd_read_link_status (&it6505->aux, link_status);
Signature · 1 line
2.34.1
PATCH v6 6/10 drm/bridge: it6505: fix HDCP encryption when R0 ready
In reply to Hermes WuWhen starting HDCP authentication, HDCP encryption should be enabled when R0'is checked.
Change encryption enables time at R0' ready.
The hardware HDCP engine trigger is changed and the repeater KSV fails will restart HDCP.
--- drivers/gpu/drm/bridge/ite-it6505.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +9 -8
@@ -2091,15 +2091,12 @@ static void it6505_hdcp_wait_ksv_list(struct work_struct *work) ksv_list_check =it6505_hdcp_part2_ksvlist_check (it6505);DRM_DEV_DEBUG_DRIVER (dev,"ksv list ready, ksv list check %s" , ksv_list_check ?"pass" :"fail" ); -if (ksv_list_check) { -it6505_set_bits (it6505,REG_HDCP_TRIGGER , -HDCP_TRIGGER_KSV_DONE ,HDCP_TRIGGER_KSV_DONE ); + +if (ksv_list_check)return ; - } + timeout: -it6505_set_bits (it6505,REG_HDCP_TRIGGER , -HDCP_TRIGGER_KSV_DONE |HDCP_TRIGGER_KSV_FAIL , -HDCP_TRIGGER_KSV_DONE |HDCP_TRIGGER_KSV_FAIL ); +it6505_start_hdcp (it6505); }static void it6505_hdcp_work (struct work_struct *work)
@@ -2472,7 +2469,11 @@ static void it6505_irq_hdcp_ksv_check(struct it6505 *it6505) {struct device *dev = it6505->dev; -DRM_DEV_DEBUG_DRIVER (dev,"HDCP event Interrupt" ); +DRM_DEV_DEBUG_DRIVER (dev,"HDCP repeater R0 event Interrupt" ); +/* 1B01 HDCP encription should start when R0 is ready*/ +it6505_set_bits (it6505,REG_HDCP_TRIGGER , +HDCP_TRIGGER_KSV_DONE ,HDCP_TRIGGER_KSV_DONE ); +schedule_work (&it6505->hdcp_wait_ksv_list); }
Signature · 1 line
2.34.1
PATCH v6 7/10 drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100.
In reply to Hermes WuWhen running the HDCP CTS test with UNIGRAF DPR-100. KSV list must be read from DP_AUX_HDCP_KSV_FIFO in an AUX request, and can not separate with multiple read requests.
The AUX operation command "CMD_AUX_GET_KSV_LIST" reads the KSV list with AUX FIFO and is able to read DP_AUX_HDCP_KSV_FIFO in an AUX request.
Add it6505_get_ksvlist() which uses CMD_AUX_GET_KSV_LIST operation to read the KSV list.
--- drivers/gpu/drm/bridge/ite-it6505.c | 48 +++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +36 -12
@@ -1188,6 +1188,37 @@ static int it6505_get_edid_block(void *data, u8 *buf, unsigned int block,return 0 ; } +static int it6505_get_ksvlist (struct it6505 *it6505,u8 *buf,size_t len) +{ +struct device *dev = it6505->dev; +enum aux_cmd_reply reply; +int request_size, ret; +int i =0 ; + +do { + request_size =min_t (int, (int )len - i,15 ); + + ret =it6505_aux_do_transfer (it6505,CMD_AUX_GET_KSV_LIST , +DP_AUX_HDCP_KSV_FIFO , + buf + i, request_size, &reply); + +DRM_DEV_DEBUG_DRIVER (dev,"request_size = %d, ret =%d" , request_size, ret); +if (ret <0 ) +return ret; + + i += request_size; + }while (i < len); + +DRM_DEV_DEBUG_DRIVER (dev,"ksv read cnt = %d down_stream_cnt=%d " , i, i /5 ); + +for (i =0 ; i < len; i +=5 ) { +DRM_DEV_DEBUG_DRIVER (dev,"ksv[%d] = %02X%02X%02X%02X%02X" , + i /5 , buf[i], buf[i +1 ], buf[i +2 ], buf[i +3 ], buf[i +4 ]); + } + +return len; +} +static void it6505_variable_config (struct it6505 *it6505) { it6505->link_rate_bw_code =HBR ;
@@ -1969,7 +2000,7 @@ static int it6505_setup_sha1_input(struct it6505 *it6505, u8 *sha1_input) {struct device *dev = it6505->dev;u8 binfo[2 ]; -int down_stream_count, i, err, msg_count =0 ; +int down_stream_count, err, msg_count =0 ; err =it6505_get_dpcd (it6505,DP_AUX_HDCP_BINFO , binfo,ARRAY_SIZE (binfo));
@@ -1994,18 +2025,11 @@ static int it6505_setup_sha1_input(struct it6505 *it6505, u8 *sha1_input) down_stream_count);return 0 ; } + err =it6505_get_ksvlist (it6505, sha1_input, down_stream_count *5 ); +if (err <0 ) +return err; -for (i =0 ; i < down_stream_count; i++) { - err =it6505_get_dpcd (it6505,DP_AUX_HDCP_KSV_FIFO + - (i %3 ) *DRM_HDCP_KSV_LEN , - sha1_input + msg_count, -DRM_HDCP_KSV_LEN ); - -if (err <0 ) -return err; - - msg_count +=5 ; - } + msg_count += down_stream_count *5 ; it6505->hdcp_down_stream_count = down_stream_count; sha1_input[msg_count++] = binfo[0 ];
Signature · 1 line
2.34.1
Re: [PATCH v6 07/10] drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100.
Quoted 9 lines · On Wed, Oct 16, 2024 at 03:54:19PM +0800, Hermes Wu via B4 Relay wrote:
From: Hermes Wu <[email protected]>
When running the HDCP CTS test with UNIGRAF DPR-100. KSV list must be read from
DP_AUX_HDCP_KSV_FIFOin an AUX request, and can not separate with multiple read requests.The AUX operation command "
CMD_AUX_GET_KSV_LIST" reads the KSV list with AUX FIFO and is able to readDP_AUX_HDCP_KSV_FIFOin an AUX request.
Quoted 8 lines
Add
it6505_get_ksvlist()which usesCMD_AUX_GET_KSV_LISToperation to read the KSV list.Signed-off-by Hermes Wu <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 48 +++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-)
Signature · 2 lines
With best wishes Dmitry
PATCH v6 8/10 drm/bridge: it6505: fix HDCP CTS compare V matching
In reply to Hermes WuWhen HDCP negotiation with a repeater device.
Checking SHA V' matching must retry 3 times before restarting HDCP.
--- drivers/gpu/drm/bridge/ite-it6505.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +19 -13
@@ -2057,7 +2057,7 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505) {struct device *dev = it6505->dev;u8 av[5 ][4 ], bv[5 ][4 ]; -int i, err; +int i, err, retry; i =it6505_setup_sha1_input (it6505, it6505->sha1_input);if (i <=0 ) {
@@ -2066,22 +2066,28 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505) }it6505_sha1_digest (it6505, it6505->sha1_input, i, (u8 *)av); +/*1B-05 V' must retry 3 times */ +for (retry =0 ; retry <3 ; retry++) { + err =it6505_get_dpcd (it6505,DP_AUX_HDCP_V_PRIME (0 ), (u8 *)bv, +sizeof (bv)); - err =it6505_get_dpcd (it6505,DP_AUX_HDCP_V_PRIME (0 ), (u8 *)bv, -sizeof (bv)); +if (err <0 ) { +dev_err (dev,"Read V' value Fail %d" , retry); +continue ; + } -if (err <0 ) { -dev_err (dev,"Read V' value Fail" ); -return false; - } +for (i =0 ; i <5 ; i++) { +if (bv[i][3 ] != av[i][0 ] || bv[i][2 ] != av[i][1 ] || + av[i][1 ] != av[i][2 ] || bv[i][0 ] != av[i][3 ]) +break ; -for (i =0 ; i <5 ; i++) -if (bv[i][3 ] != av[i][0 ] || bv[i][2 ] != av[i][1 ] || - bv[i][1 ] != av[i][2 ] || bv[i][0 ] != av[i][3 ]) -return false; +DRM_DEV_DEBUG_DRIVER (dev,"V' all match!! %d, %d" , retry, i); +return true; + } + } -DRM_DEV_DEBUG_DRIVER (dev,"V' all match!!" ); -return true; +DRM_DEV_DEBUG_DRIVER (dev,"V' NOT match!! %d" , retry); +return false; }static void it6505_hdcp_wait_ksv_list (struct work_struct *work)
Signature · 1 line
2.34.1
PATCH v6 9/10 drm/bridge: it6505: fix HDCP CTS KSV list wait timer
In reply to Hermes WuHDCP must disabled encryption and restart authentication after waiting KSV for 5s.
The original method uses a counter in a waitting loop that may wait much longer than it is supposed to.
Use time_after() for KSV wait timeout.
--- drivers/gpu/drm/bridge/ite-it6505.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +10 -10
@@ -2095,12 +2095,13 @@ static void it6505_hdcp_wait_ksv_list(struct work_struct *work) struct it6505 *it6505 = container_of(work, struct it6505, hdcp_wait_ksv_list);struct device *dev = it6505->dev; -unsigned int timeout =5000 ; -u8 bstatus =0 ; +u8 bstatus;bool ksv_list_check; +/* 1B-04 wait ksv list for 5s */ +unsigned long timeout = jiffies + +msecs_to_jiffies (5000 ) +1 ; - timeout /=20 ; -while (timeout >0 ) { +for (;;) {if (!it6505_get_sink_hpd_status (it6505))return ;
@@ -2109,13 +2110,12 @@ static void it6505_hdcp_wait_ksv_list(struct work_struct *work)if (bstatus &DP_BSTATUS_READY )break ; -msleep (20 ); - timeout--; - } +if (time_after (jiffies, timeout)) { +DRM_DEV_DEBUG_DRIVER (dev,"KSV list wait timeout" ); + goto timeout; + } -if (timeout ==0 ) { -DRM_DEV_DEBUG_DRIVER (dev,"timeout and ksv list wait failed" ); - goto timeout; +msleep (20 ); } ksv_list_check =it6505_hdcp_part2_ksvlist_check (it6505);
Signature · 1 line
2.34.1
PATCH v6 10/10 drm/bridge: it6505: add I2C functionality on AUX
In reply to Hermes WuDisplayPort AUX protocol supports I2C transport which is capable of reading EDID or supports MCCS.
In drm_dp_helper, drm_dp_i2c_xfer() packs I2C requests into a sequence of AUX requests.it6505_aux_i2c_operation() is implemented to match drm_dp_i2c_xfer() operactions.it6505_aux_i2c_transfer() adds I2C functionality
for it6505_aux_transfer().
--- drivers/gpu/drm/bridge/ite-it6505.c | 177 +++++++++++++++++++++++++++++++++++- 1 file changed, 175 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/ite-it6505.c +175 -2
@@ -267,6 +267,18 @@#define REG_SSC_CTRL1 0x189#define REG_SSC_CTRL2 0x18A +#define REG_AUX_USER_CTRL 0x190 +#define EN_USER_AUX BIT(0) +#define USER_AUX_DONE BIT(1) +#define AUX_EVENT BIT(4) + +#define REG_AUX_USER_DATA_REC 0x191 +#define M_AUX_IN_REC 0xF0 +#define M_AUX_OUT_REC 0x0F + +#define REG_AUX_USER_REPLY 0x19A +#define REG_AUX_USER_RXB (n) (n + 0x19B) +#define RBR DP_LINK_BW_1_62#define HBR DP_LINK_BW_2_7#define HBR2 DP_LINK_BW_5_4
@@ -302,6 +314,8 @@#define MAX_EQ_LEVEL 0x03#define AUX_WAIT_TIMEOUT_MS 15#define AUX_FIFO_MAX_SIZE 16 +#define AUX_I2C_MAX_SIZE 4 +#define AUX_I2C_DEFER_RETRY 4#define PIXEL_CLK_DELAY 1#define PIXEL_CLK_INVERSE 0#define ADJUST_PHASE_THRESHOLD 80000
@@ -324,7 +338,12 @@enum aux_cmd_type {CMD_AUX_NATIVE_READ =0x0 ,CMD_AUX_NATIVE_WRITE =0x5 , +CMD_AUX_GI2C_ADR =0x08 , +CMD_AUX_GI2C_READ =0x09 , +CMD_AUX_GI2C_WRITE =0x0A ,CMD_AUX_I2C_EDID_READ =0xB , +CMD_AUX_I2C_READ =0x0D , +CMD_AUX_I2C_WRITE =0x0C ,/* KSV read with AUX FIFO extend from CMD_AUX_NATIVE_READ*/ CMD_AUX_GET_KSV_LIST =0x10 ,
@@ -1106,6 +1125,161 @@ static ssize_t it6505_aux_do_transfer(struct it6505 *it6505,return ret; } +static bool it6505_aux_i2c_reply_defer (u8 reply) +{ +if (reply ==DP_AUX_NATIVE_REPLY_DEFER || reply ==DP_AUX_I2C_REPLY_DEFER ) +return true; +return false; +} + +static bool it6505_aux_i2c_reply_nack (u8 reply) +{ +if (reply ==DP_AUX_NATIVE_REPLY_NACK || reply ==DP_AUX_I2C_REPLY_NACK ) +return true; +return false; +} + +static int it6505_aux_i2c_wait (struct it6505 *it6505,u8 *reply) +{ +int err =0 ; +unsigned long timeout; +struct device *dev = it6505->dev; + + timeout = jiffies +msecs_to_jiffies (AUX_WAIT_TIMEOUT_MS ) +1 ; + +do { +if (it6505_read (it6505,REG_AUX_USER_CTRL ) &AUX_EVENT ) +break ; +if (time_after (jiffies, timeout)) { +dev_err (dev,"Timed out waiting AUX I2C, BUSY = %X\n" , +it6505_aux_op_finished (it6505)); + err = -ETIMEDOUT ; + goto end_aux_i2c_wait; + } +usleep_range (300 ,800 ); + }while (!it6505_aux_op_finished (it6505)); + + *reply =it6505_read (it6505,REG_AUX_USER_REPLY ) >>4 ; + +if (*reply ==0 ) + goto end_aux_i2c_wait; + +if (it6505_aux_i2c_reply_defer (*reply)) + err = -EBUSY ; +else if (it6505_aux_i2c_reply_nack (*reply)) + err = -ENXIO ; + +end_aux_i2c_wait: +it6505_set_bits (it6505,REG_AUX_USER_CTRL ,USER_AUX_DONE ,USER_AUX_DONE ); +return err; +} + +static int it6505_aux_i2c_readb (struct it6505 *it6505,u8 *buf,size_t size,u8 *reply) +{ +int ret, i; +int retry; + +for (retry =0 ; retry <AUX_I2C_DEFER_RETRY ; retry++) { +it6505_write (it6505,REG_AUX_CMD_REQ ,CMD_AUX_GI2C_READ ); + + ret =it6505_aux_i2c_wait (it6505, reply); +if (it6505_aux_i2c_reply_defer (*reply)) +continue ; +if (ret >=0 ) +break ; + } + +for (i =0 ; i < size; i++) + buf[i] =it6505_read (it6505,REG_AUX_USER_RXB (0 + i)); + +return size; +} + +static int it6505_aux_i2c_writeb (struct it6505 *it6505,u8 *buf,size_t size,u8 *reply) +{ +int i, ret; +int retry; + +for (i =0 ; i < size; i++) +it6505_write (it6505,REG_AUX_OUT_DATA0 + i, buf[i]); + +for (retry =0 ; retry <AUX_I2C_DEFER_RETRY ; retry++) { +it6505_write (it6505,REG_AUX_CMD_REQ ,CMD_AUX_GI2C_WRITE ); + + ret =it6505_aux_i2c_wait (it6505, reply); +if (it6505_aux_i2c_reply_defer (*reply)) +continue ; +if (ret >=0 ) +break ; + } +return size; +} + +static ssize_t it6505_aux_i2c_operation (struct it6505 *it6505, +struct drm_dp_aux_msg *msg) +{ +int ret; +ssize_t request_size, data_cnt =0 ; +u8 *buffer = msg->buffer; + +/* set AUX user mode */ +it6505_set_bits (it6505,REG_AUX_CTRL , +AUX_USER_MODE |AUX_NO_SEGMENT_WR ,AUX_USER_MODE ); +it6505_set_bits (it6505,REG_AUX_USER_CTRL ,EN_USER_AUX ,EN_USER_AUX ); +/* clear AUX FIFO */ +it6505_set_bits (it6505,REG_AUX_CTRL , +AUX_EN_FIFO_READ |CLR_EDID_FIFO , +AUX_EN_FIFO_READ |CLR_EDID_FIFO ); + +it6505_set_bits (it6505,REG_AUX_CTRL , +AUX_EN_FIFO_READ |CLR_EDID_FIFO ,0x00 ); + +it6505_write (it6505,REG_AUX_ADR_0_7 ,0x00 ); +it6505_write (it6505,REG_AUX_ADR_8_15 , msg->address <<1 ); + +if (msg->size ==0 ) { +/* IIC Start/STOP dummy write */ +it6505_write (it6505,REG_AUX_ADR_16_19 , msg->request); +it6505_write (it6505,REG_AUX_CMD_REQ ,CMD_AUX_GI2C_ADR ); + ret =it6505_aux_i2c_wait (it6505, &msg->reply); + goto end_aux_i2c_transfer; + } + +/* IIC data transfer */ + data_cnt =0 ; +do { + request_size =min_t (ssize_t, msg->size - data_cnt,AUX_I2C_MAX_SIZE ); +it6505_write (it6505,REG_AUX_ADR_16_19 , + msg->request | ((request_size -1 ) <<4 )); +if ((msg->request &DP_AUX_I2C_READ ) ==DP_AUX_I2C_READ ) + ret =it6505_aux_i2c_readb (it6505, &buffer[data_cnt], + request_size, &msg->reply); +else + ret =it6505_aux_i2c_writeb (it6505, &buffer[data_cnt], + request_size, &msg->reply); + +if (ret <0 ) + goto end_aux_i2c_transfer; + + data_cnt += request_size; + }while (data_cnt < msg->size); + ret = data_cnt; +end_aux_i2c_transfer: + +it6505_set_bits (it6505,REG_AUX_USER_CTRL ,EN_USER_AUX ,0 ); +it6505_set_bits (it6505,REG_AUX_CTRL ,AUX_USER_MODE ,0 ); +return ret; +} + +static ssize_t it6505_aux_i2c_transfer (struct drm_dp_aux *aux, +struct drm_dp_aux_msg *msg) +{ + struct it6505 *it6505 = container_of(aux, struct it6505, aux); + +guard (mutex)(&it6505->aux_lock); +return it6505_aux_i2c_operation (it6505, msg); +} +static ssize_t it6505_aux_transfer (struct drm_dp_aux *aux,struct drm_dp_aux_msg *msg) {
@@ -1115,9 +1289,8 @@ static ssize_t it6505_aux_transfer(struct drm_dp_aux *aux,int ret;enum aux_cmd_reply reply; -/* IT6505 doesn't support arbitrary I2C read / write. */ if (is_i2c) -return -EINVAL ; +return it6505_aux_i2c_transfer (aux, msg);switch (msg->request) {case DP_AUX_NATIVE_READ :
Signature · 1 line
2.34.1
Re: [PATCH v6 10/10] drm/bridge: it6505: add I2C functionality on AUX
Quoted 12 lines · On Wed, Oct 16, 2024 at 03:54:22PM +0800, Hermes Wu via B4 Relay wrote:
From: Hermes Wu <[email protected]>
DisplayPort AUX protocol supports I2C transport which is capable of reading EDID or supports MCCS.
In
drm_dp_helper,drm_dp_i2c_xfer()packs I2C requests into a sequence of AUX requests.it6505_aux_i2c_operation()is implemented to matchdrm_dp_i2c_xfer()operactions.it6505_aux_i2c_transfer()adds I2C functionality
forit6505_aux_transfer().
Quoted 5 lines
Signed-off-by Hermes Wu <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 177 +++++++++++++++++++++++++++++++++++- 1 file changed, 175 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes Dmitry
Hi Hermes,
Quoted 64 lines · On Wed, Oct 16, 2024 at 3:54 AM Hermes Wu via B4 Relay…
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being initialized
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer withtimer_after()links:
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXChange-Id Iad0c056d72abf2655081357cf40c3b0d3df916b5Signed-off-by Hermes Wu <[email protected]>---
Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXdrivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)
Quoted 9 lines
---
base-commit:b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7Best regards,
--
Hermes Wu <[email protected]>
I'm not sure if this requires a re-spin, but you are supposed to collect the reviewed-by tags you received when you send out a new version. i.e., put the "Reviewed-by:" lines you received before your "Signed-off-by:" line.
Regards,
Pin-yen
Quoted 85 lines
-----Original Message-----
From: Pin-yen Lin <[email protected]>
Sent: Thursday, October 17, 2024 5:52 AM
To: Hermes Wu (吳佳宏) <[email protected]>
Cc: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Robert Foss <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; AngeloGioacchino Del Regno <[email protected]>; [email protected]; [email protected]; Kenneth Hung (洪家倫) <[email protected]>; Pet Weng (翁玉芬) <[email protected]>
Subject: Re: [PATCH v6 00/10] drm/bridge: it6505: fix HDCP CTS fail items and add MCCS supportHi Hermes,
Quoted 73 lines · On Wed, Oct 16, 2024 at 3:54 AM Hermes Wu via B4 Relay…
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being
initialized
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer withtimer_after()https://urldefense.com/v3/__https://lore.kernel.org/all/20240926075134
[email protected]/__;!!HtnLE8A!H06km5WNa8VgoR25MvWuNAGYuJG ScCXQx0tQwni_NPHKwOqT4hNpaCrFZPPMVKeqBXXHTRoGj1C2pZb7YFr4mw$
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXChange-Id Iad0c056d72abf2655081357cf40c3b0d3df916b5Signed-off-by Hermes Wu <[email protected]>---
Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXdrivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)---
base-commit:b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7
Quoted 7 lines
Quoted 5 lines
Best regards,
--
Hermes Wu <[email protected]>I'm not sure if this requires a re-spin, but you are supposed to collect the reviewed-by tags you received when you send out a new version. i.e., put the "Reviewed-by:" lines you received before your "Signed-off-by:" line.
only cover-letter or all patches? need "RESEND" for same v6 patch header?
Quoted 2 lines
Regards,
Pin-yen
BR,
Hermes
Hi,
Quoted 92 lines · On Wed, Oct 16, 2024 at 10:10 PM <[email protected]> wrote:
Quoted 92 lines
-----Original Message-----
From: Pin-yen Lin <[email protected]>
Sent: Thursday, October 17, 2024 5:52 AM
To: Hermes Wu (吳佳宏) <[email protected]>
Cc: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Robert Foss <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; AngeloGioacchino Del Regno <[email protected]>; [email protected]; [email protected]; Kenneth Hung (洪家倫) <[email protected]>; Pet Weng (翁玉芬) <[email protected]>
Subject: Re: [PATCH v6 00/10] drm/bridge: it6505: fix HDCP CTS fail items and add MCCS supportHi Hermes,
Quoted 78 lines · On Wed, Oct 16, 2024 at 3:54 AM Hermes Wu via B4 Relay…
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being
initialized
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer withtimer_after()https://urldefense.com/v3/__https://lore.kernel.org/all/20240926075134
[email protected]/__;!!HtnLE8A!H06km5WNa8VgoR25MvWuNAGYuJG ScCXQx0tQwni_NPHKwOqT4hNpaCrFZPPMVKeqBXXHTRoGj1C2pZb7YFr4mw$
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXChange-Id Iad0c056d72abf2655081357cf40c3b0d3df916b5Signed-off-by Hermes Wu <[email protected]>---
Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXdrivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)---
base-commit:b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7Best regards,
--
Hermes Wu <[email protected]>
Quoted 3 lines
Quoted 1 line
I'm not sure if this requires a re-spin, but you are supposed to collect the reviewed-by tags you received when you send out a new version. i.e., put the "Reviewed-by:" lines you received before your "Signed-off-by:" line.
only cover-letter or all patches? need "RESEND" for same v6 patch header?
You should add the review tags to the individual patches that have not changed since the previous review. For this series, I think you can wait a few days and collect feedbacks from the community first.
Quoted 8 lines
Quoted 3 lines
Regards,
Pin-yenBR,
Hermes
Pin-yen
Hi,
Quoted 110 lines
Hi,
Quoted 107 lines · On Wed, Oct 16, 2024 at 10:10 PM <[email protected]> wrote:
Quoted 107 lines
-----Original Message-----
From: Pin-yen Lin <[email protected]>
Sent: Thursday, October 17, 2024 5:52 AM
To: Hermes Wu (吳佳宏) <[email protected]>
Cc: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Robert Foss <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; AngeloGioacchino Del Regno <[email protected]>; [email protected]; [email protected]; Kenneth Hung (洪家倫) <[email protected]>; Pet Weng (翁玉芬) <[email protected]>
Subject: Re: [PATCH v6 00/10] drm/bridge: it6505: fix HDCP CTS fail items and add MCCS supportHi Hermes,
Quoted 82 lines · On Wed, Oct 16, 2024 at 3:54 AM Hermes Wu via B4 Relay…
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being
initialized
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer withtimer_after()links:
https://urldefense.com/v3/__https://lore.kernel.org/all/20240926074
[email protected]/__;!!HtnLE8A!H06km5WNa8VgoR25MvWuN AGYuJGScCXQx0tQwni_NPHKwOqT4hNpaCrFZPPMVKeqBXXHTRoGj1C2pZazumE8vA$https://urldefense.com/v3/__https://lore.kernel.org/all/20240926075
134 [email protected]/__;!!HtnLE8A!H06km5WNa8VgoR25MvWuNAGY uJG ScCXQx0tQwni_NPHKwOqT4hNpaCrFZPPMVKeqBXXHTRoGj1C2pZb7YFr4mw$
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXChange-Id Iad0c056d72abf2655081357cf40c3b0d3df916b5Signed-off-by Hermes Wu <[email protected]>---
Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXdrivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)---
base-commit:b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7Best regards,
--
Hermes Wu <[email protected]>
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
I'm not sure if this requires a re-spin, but you are supposed to collect the reviewed-by tags you received when you send out a new version. i.e., put the "Reviewed-by:" lines you received before your "Signed-off-by:" line.
only cover-letter or all patches? need "RESEND" for same v6 patch header?
You should add the review tags to the individual patches that have not changed since the previous review. For this series, I think you can wait a few days and collect feedbacks from the community first.
Quoted 1 line
ok,
thanks.
Quoted 10 lines
Quoted 7 lines
Quoted 2 lines
Regards,
Pin-yenBR,
HermesPin-yen
BR,
Hermes
Quoted 11 lines · On Wed, Oct 16, 2024 at 03:54:12PM +0800, Hermes Wu via B4 Relay wrote:
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being initialized
I have reviewed the patches that I could review, but I lack deep HDCP knowledge, so I can not review patches 5, 6, 8, 9. Hopefully somebody else can step up.
Quoted 61 lines
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer withtimer_after()links:
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXChange-Id Iad0c056d72abf2655081357cf40c3b0d3df916b5Signed-off-by Hermes Wu <[email protected]>---
Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXdrivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)---
base-commit:b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7Best regards,
Signature · 1 line
Hermes Wu <[email protected]>
Signature · 2 lines
With best wishes Dmitry
hi
Quoted 13 lines
-----Original Message-----
From: Dmitry Baryshkov <[email protected]>
Sent: Sunday, October 20, 2024 9:57 PM
To: Hermes Wu (吳佳宏) <[email protected]>
Cc: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Robert Foss <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; AngeloGioacchino Del Regno <[email protected]>; Pin-yen Lin <[email protected]>; [email protected]; [email protected]; Kenneth Hung (洪家倫) <[email protected]>; Pet Weng (翁玉芬) <[email protected]>
Subject: Re: [PATCH v6 00/10] drm/bridge: it6505: fix HDCP CTS fail items and add MCCS supportQuoted 5 lines · On Wed, Oct 16, 2024 at 03:54:12PM +0800, Hermes Wu via B4 Relay wrote:
This is a v6 patch-set.
There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed.
Quoted 9 lines
Quoted 6 lines
The DisplayPort AUX protocol supports I2C transport.
In Order to support MCCS via the aux channel, the aux-i2c operation is added.
v5->v6:
-keep the commit message wrapped at 72-75 chars. -[10/10] fix return variable being used without being initializedI have reviewed the patches that I could review, but I lack deep HDCP knowledge, so I can not review patches 5, 6, 8, 9. Hopefully somebody else can step up.
thank you.
Quoted 65 lines
Quoted 55 lines
v4->v5:
-add more messages for changes.
-[2/10] modified AUX transfer data size judgment.
change for-loop to do-while.
-[7/10] change for-loop to do-while. -[9/10] change wait timer withtimer_after()https://urldefense.com/v3/__https://lore.kernel.org/all/20240926075134
[email protected]/__;!!HtnLE8A!HOwy05_egTbj5U7vrjfPhJC21VK _Jxll8UWNOcGEzNSDxnKQjE6QSLhamd-IROE-SxGOrzFS_SLfixtORjLLBTc_Yg8R$
v3->v4:
-split changes into patches.
v2->v3:
-split aux read KSV function to a patch.
-[1/3] new in v3
-[2/3] add description of patch
v1->v2:
- ignored.Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXChange-Id Iad0c056d72abf2655081357cf40c3b0d3df916b5Signed-off-by Hermes Wu <[email protected]>---
Hermes Wu (10):
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEdrm/bridge: it6505: improve AUX operation for edid read drm/bridge: it6505: add AUX operation for HDCP KSV list read drm/bridge: it6505: Change definitionMAX_HDCP_DOWN_STREAM_COUNTdrm/bridge: it6505: fix HDCP Bstatus check
drm/bridge: it6505: fix HDCP encryption when R0 ready drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. drm/bridge: it6505: fix HDCP CTS compare V matching drm/bridge: it6505: fix HDCP CTS KSV list wait timer drm/bridge: it6505: add I2C functionality on AUXdrivers/gpu/drm/bridge/ite-it6505.c | 334 ++++++++++++++++++++++++++++++------ 1 file changed, 277 insertions(+), 57 deletions(-)Quoted 9 lines
---
base-commit:b8128f7815ff135f0333c1b46dcdf1543c41b860
change-id: 20241015-upstream-v6-9f4b015fecf7Best regards,
--
Hermes Wu <[email protected]>
Quoted 4 lines
--
With best wishes
Dmitry
BR,
Hermes