<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - i915 driver tracks relative_constants_mode incorrectly when using execlists"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92448">92448</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>i915 driver tracks relative_constants_mode incorrectly when using execlists
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/Intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>david.s.gordon@intel.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>'relative_constants_mode' has always been tracked per-device, but whereas this
was adequate in legacy ringbuffer mode, it's wrong in execlists (or GuC) mode,
as the INSTPM register is saved and restored with the logical context, and the
per-context value could therefore get out of sync with the tracked value.

The test case (if anyone wants to write it) would be to create two separate
logical contexts, submit a render batch with a non-default mode in the first
context, submit a render batch with the default mode in the other context, then
submit a second batch in the first context, but this time selecting the default
mode. The driver will fail to insert the instructions to reset INSTPM into the
first context's ringbuffer, as it will compare the mode required for the new
batch with the last mode set (which will be in a different context). The batch
will then be executed with the incorrect mode setting.

The bug has been there since the first implementation of execlists:

ba8b7ccb1 drm/i915/bdw: Workload submission mechanism for Execlists</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>