<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with I²C Access Sample Code on External Monitor via Type-C Connection (0x6E 0x80 0xBE Response in GPU Compute Software</title>
    <link>https://community.intel.com/t5/GPU-Compute-Software/Issue-with-I-C-Access-Sample-Code-on-External-Monitor-via-Type-C/m-p/1637945#M1611</link>
    <description>&lt;P&gt;I found a demo sample code.&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;A href="https://github.com/intel/drivers.gpu.control-library/tree/master/Samples/I2C_AUX_Samples" target="_blank" rel="noopener"&gt;https://github.com/intel/drivers.gpu.control-library/tree/master/Samples/I2C_AUX_Samples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Laptop:&amp;nbsp;ThinkBook 16p Gen4&lt;/P&gt;&lt;P&gt;CPU:&amp;nbsp;13th Gen Intel Core i9-13900&lt;BR /&gt;OS:&amp;nbsp;Windows 11&lt;BR /&gt;Connection:&amp;nbsp;Type-C cable to an external monitor (Type-C Alt Mode)&lt;/P&gt;&lt;P&gt;the&amp;nbsp;read operation returns 0x6E 0x80 0xBE, which seems to indicate an invalid response or an unsupported command.&lt;/P&gt;&lt;P&gt;Please help me identify if there are any errors in the code.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;======================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ctl_i2c_access_args_t I2CArgs = { 0 }; // I2C Access&lt;BR /&gt;I2CArgs.Size = sizeof(ctl_i2c_access_args_t);&lt;BR /&gt;I2CArgs.OpType = CTL_OPERATION_TYPE_WRITE;&lt;BR /&gt;I2CArgs.Address = 0x6E; // Address used for demonstration purpose&lt;BR /&gt;I2CArgs.Offset = 0x51; // Offset used for demonstration purpose&lt;BR /&gt;I2CArgs.DataSize = 4;&lt;BR /&gt;I2CArgs.Data[0] = 0x82;&lt;BR /&gt;I2CArgs.Data[1] = 0x01;&lt;BR /&gt;I2CArgs.Data[2] = 0x10;&lt;BR /&gt;I2CArgs.Data[3] = 0xAC;&lt;/P&gt;&lt;P&gt;EXIT_ON_MEM_ALLOC_FAILURE(hDisplayOutput, "hDisplayOutput");&lt;/P&gt;&lt;P&gt;Result = ctlI2CAccess(hDisplayOutput, &amp;amp;I2CArgs);&lt;/P&gt;&lt;P&gt;if (CTL_RESULT_SUCCESS != Result)&lt;BR /&gt;{&lt;BR /&gt;printf("ctlI2CAccess for I2C write returned failure code: 0x%X\n", Result);&lt;BR /&gt;STORE_AND_RESET_ERROR(Result);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// I2C READ : 82 01 10 AC at adddress 6E and subaddress 51&lt;BR /&gt;I2CArgs.Size = sizeof(ctl_i2c_access_args_t);&lt;BR /&gt;I2CArgs.OpType = CTL_OPERATION_TYPE_READ;&lt;BR /&gt;I2CArgs.Address = 0x6E; // Address used for demonstration purpose&lt;BR /&gt;I2CArgs.Offset = 0x51; // Offset used for demonstration purpose&lt;BR /&gt;I2CArgs.DataSize = 11;&lt;BR /&gt;// I2CArgs.Flags = CTL_I2C_FLAG_ATOMICI2C; // Need to set this to do Atomic I2C call&lt;/P&gt;&lt;P&gt;Result = ctlI2CAccess(hDisplayOutput, &amp;amp;I2CArgs);&lt;BR /&gt;LOG_AND_EXIT_ON_ERROR(Result, "ctlI2CAccess for I2C read");&lt;/P&gt;&lt;P&gt;// Print the data&lt;BR /&gt;for (uint32_t j = 0; j &amp;lt; I2CArgs.DataSize; j++)&lt;BR /&gt;{&lt;BR /&gt;printf("Read data[%d] = : 0x%X\n", j, I2CArgs.Data[j]);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attach the result pic&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/59747iD53BB10E0B994357/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="result.png" alt="result.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2024 01:44:52 GMT</pubDate>
    <dc:creator>Niki28</dc:creator>
    <dc:date>2024-10-18T01:44:52Z</dc:date>
    <item>
      <title>Issue with I²C Access Sample Code on External Monitor via Type-C Connection (0x6E 0x80 0xBE Response</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/Issue-with-I-C-Access-Sample-Code-on-External-Monitor-via-Type-C/m-p/1637945#M1611</link>
      <description>&lt;P&gt;I found a demo sample code.&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;A href="https://github.com/intel/drivers.gpu.control-library/tree/master/Samples/I2C_AUX_Samples" target="_blank" rel="noopener"&gt;https://github.com/intel/drivers.gpu.control-library/tree/master/Samples/I2C_AUX_Samples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Laptop:&amp;nbsp;ThinkBook 16p Gen4&lt;/P&gt;&lt;P&gt;CPU:&amp;nbsp;13th Gen Intel Core i9-13900&lt;BR /&gt;OS:&amp;nbsp;Windows 11&lt;BR /&gt;Connection:&amp;nbsp;Type-C cable to an external monitor (Type-C Alt Mode)&lt;/P&gt;&lt;P&gt;the&amp;nbsp;read operation returns 0x6E 0x80 0xBE, which seems to indicate an invalid response or an unsupported command.&lt;/P&gt;&lt;P&gt;Please help me identify if there are any errors in the code.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;======================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ctl_i2c_access_args_t I2CArgs = { 0 }; // I2C Access&lt;BR /&gt;I2CArgs.Size = sizeof(ctl_i2c_access_args_t);&lt;BR /&gt;I2CArgs.OpType = CTL_OPERATION_TYPE_WRITE;&lt;BR /&gt;I2CArgs.Address = 0x6E; // Address used for demonstration purpose&lt;BR /&gt;I2CArgs.Offset = 0x51; // Offset used for demonstration purpose&lt;BR /&gt;I2CArgs.DataSize = 4;&lt;BR /&gt;I2CArgs.Data[0] = 0x82;&lt;BR /&gt;I2CArgs.Data[1] = 0x01;&lt;BR /&gt;I2CArgs.Data[2] = 0x10;&lt;BR /&gt;I2CArgs.Data[3] = 0xAC;&lt;/P&gt;&lt;P&gt;EXIT_ON_MEM_ALLOC_FAILURE(hDisplayOutput, "hDisplayOutput");&lt;/P&gt;&lt;P&gt;Result = ctlI2CAccess(hDisplayOutput, &amp;amp;I2CArgs);&lt;/P&gt;&lt;P&gt;if (CTL_RESULT_SUCCESS != Result)&lt;BR /&gt;{&lt;BR /&gt;printf("ctlI2CAccess for I2C write returned failure code: 0x%X\n", Result);&lt;BR /&gt;STORE_AND_RESET_ERROR(Result);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// I2C READ : 82 01 10 AC at adddress 6E and subaddress 51&lt;BR /&gt;I2CArgs.Size = sizeof(ctl_i2c_access_args_t);&lt;BR /&gt;I2CArgs.OpType = CTL_OPERATION_TYPE_READ;&lt;BR /&gt;I2CArgs.Address = 0x6E; // Address used for demonstration purpose&lt;BR /&gt;I2CArgs.Offset = 0x51; // Offset used for demonstration purpose&lt;BR /&gt;I2CArgs.DataSize = 11;&lt;BR /&gt;// I2CArgs.Flags = CTL_I2C_FLAG_ATOMICI2C; // Need to set this to do Atomic I2C call&lt;/P&gt;&lt;P&gt;Result = ctlI2CAccess(hDisplayOutput, &amp;amp;I2CArgs);&lt;BR /&gt;LOG_AND_EXIT_ON_ERROR(Result, "ctlI2CAccess for I2C read");&lt;/P&gt;&lt;P&gt;// Print the data&lt;BR /&gt;for (uint32_t j = 0; j &amp;lt; I2CArgs.DataSize; j++)&lt;BR /&gt;{&lt;BR /&gt;printf("Read data[%d] = : 0x%X\n", j, I2CArgs.Data[j]);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attach the result pic&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/59747iD53BB10E0B994357/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="result.png" alt="result.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 01:44:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/Issue-with-I-C-Access-Sample-Code-on-External-Monitor-via-Type-C/m-p/1637945#M1611</guid>
      <dc:creator>Niki28</dc:creator>
      <dc:date>2024-10-18T01:44:52Z</dc:date>
    </item>
  </channel>
</rss>

