GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
365 Discussions

Issue with I²C Access Sample Code on External Monitor via Type-C Connection (0x6E 0x80 0xBE Response

Niki28
Beginner
396 Views

I found a demo sample code.

==>https://github.com/intel/drivers.gpu.control-library/tree/master/Samples/I2C_AUX_Samples

 

Laptop: ThinkBook 16p Gen4

CPU: 13th Gen Intel Core i9-13900
OS: Windows 11
Connection: Type-C cable to an external monitor (Type-C Alt Mode)

the read operation returns 0x6E 0x80 0xBE, which seems to indicate an invalid response or an unsupported command.

Please help me identify if there are any errors in the code.

If it is a driver or panel issue, the ctlInit function should return an error, and the program wouldn't even reach the write and read functions for I²C.

Thanks

======================================================================

code:

ctl_i2c_access_args_t I2CArgs = { 0 }; // I2C Access
I2CArgs.Size = sizeof(ctl_i2c_access_args_t);
I2CArgs.OpType = CTL_OPERATION_TYPE_WRITE;
I2CArgs.Address = 0x6E; // Address used for demonstration purpose
I2CArgs.Offset = 0x51; // Offset used for demonstration purpose
I2CArgs.DataSize = 4;
I2CArgs.Data[0] = 0x82;
I2CArgs.Data[1] = 0x01;
I2CArgs.Data[2] = 0x10;
I2CArgs.Data[3] = 0xAC;

EXIT_ON_MEM_ALLOC_FAILURE(hDisplayOutput, "hDisplayOutput");

Result = ctlI2CAccess(hDisplayOutput, &I2CArgs);

if (CTL_RESULT_SUCCESS != Result)
{
printf("ctlI2CAccess for I2C write returned failure code: 0x%X\n", Result);
STORE_AND_RESET_ERROR(Result);
}

// I2C READ : 82 01 10 AC at adddress 6E and subaddress 51
I2CArgs.Size = sizeof(ctl_i2c_access_args_t);
I2CArgs.OpType = CTL_OPERATION_TYPE_READ;
I2CArgs.Address = 0x6E; // Address used for demonstration purpose
I2CArgs.Offset = 0x51; // Offset used for demonstration purpose
I2CArgs.DataSize = 11;
// I2CArgs.Flags = CTL_I2C_FLAG_ATOMICI2C; // Need to set this to do Atomic I2C call

Result = ctlI2CAccess(hDisplayOutput, &I2CArgs);
LOG_AND_EXIT_ON_ERROR(Result, "ctlI2CAccess for I2C read");

// Print the data
for (uint32_t j = 0; j < I2CArgs.DataSize; j++)
{
printf("Read data[%d] = : 0x%X\n", j, I2CArgs.Data[j]);
}

 

attach the result pic

result.png

0 Kudos
0 Replies
Reply