<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>we are developing a custom hypervisor backend for GVT which (from
      the mediators perspective) behaves like XEN.</p>
    <p>Currently, we are working with the Linux Kernel v5.4.41 and we
      are trying to pass a custom EDID to a given vGPU.</p>
    <p>The code flow roughly looks like this:</p>
    <code>vgpu = intel_gvt_ops->vgpu_create();</code>
    <p><code>port = intel_vgpu_port(vgpu, port);</code><code><br>
      </code></p>
    <p><code>edid_data = intel_vgpu_edid_block(port);</code></p>
    <p><code>memcpy(edid_data, custom_edid, EDID_SIZE);</code><br>
    </p>
    <p>We are wondering how the <code>set_edid</code> callback of the <code>intel_gvt_mpt</code>
      is meant to be used to receive the correct port where the virtual
      display is attached. In v5.4.41 it seems, the default port is
      PORT_B and the mediator only calls <code>set_edid</code> on
      certain platforms where it is a different port. Is this correct?</p>
    <p>Is there any other method to receive the correct port?</p>
    <p>It seems that in v5.4.41 the mediator misses to call <code>set_edid</code>
      if the platform <span class="blob-code-inner blob-code-marker"
        data-code-marker="-"><span class="pl-c1"><code>IS_COFFEELAKE</code>,
          which leads to a crash because we then assume the default
          PORT_B where no memory is allocated for the EDID data.<br>
        </span></span></p>
    <p>Also in some later commits [1] the behavior is changed and the <code>set_edid</code>
      callback is always called passing PORT_D. Does that mean that the
      virtual display is always attached at PORT_D on newer versions of
      GVT?<br>
    </p>
    <p>Greetings,</p>
    <p>Stefan</p>
    <p><br>
    </p>
    <p>[1]
<a class="moz-txt-link-freetext" href="https://github.com/torvalds/linux/commit/0178f4ce3c3be4d9784c88ed512816eb653a717b">https://github.com/torvalds/linux/commit/0178f4ce3c3be4d9784c88ed512816eb653a717b</a><br>
    </p>
  </body>
</html>