<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 - "Avoid waitboosting" now prevents all GPU boosting (e9af4ea2b9e7)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107111">107111</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"Avoid waitboosting" now prevents all GPU boosting (e9af4ea2b9e7)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>DRI git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>freedesktop@nmacleod.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>Created <span class=""><a href="attachment.cgi?id=140459" name="attach_140459" title="Monitoring script and results">attachment 140459</a> <a href="attachment.cgi?id=140459&action=edit" title="Monitoring script and results">[details]</a></span>
Monitoring script and results

We've had reports of the Kodi GUI "stuttering" since LibreELEC switched from
kernel 4.14.49 to 4.17.3.

I ran a script that monitors /sys/kernel/debug/dri/0/i915_rps_boost_info and
noticed that with 4.17.3 the GPU never boosts out of the "low power" window.
It's the same when watching a video - the GPU is now almost always stuck in the
"low power" window.

git bisecting the kernel between 4.14.49 and 4.17.3 reveals
e9af4ea2b9e7e5d3caa6354be14de06b678ed0fa[1] ("drm/i915: Avoid waitboosting on
the active request") as the bad commit.

In the attached file you can see the script, and also the results of testing
many different LibreELEC/Kodi builds (corresponding to the builds here[2]).

With this script the first 30 seconds of a 4K video (Elysium trailer, on a
Skylake NUC6i5SYH outputting at 1080p) is played from local storage in Kodi. At
the end of the script a summary is output which includes the percentage of
"LOW" (ie. low power) and "!LOW" (ie. high + mixed) window samples. The script
is executed 5 times per build.

What is very clear is that from build 180616 (ie. #0616[3]) onwards - which is
when the LibreELEC kernel switched from 4.14.49 to 4.17.3 - the number of
"!LOW" samples is reduced to almost zero - ie. the GPU no longer boosts,
remaining locked at the "idle" frequency.

To rule out any changes in Kodi that might also be responsible I rebuilt build
180702 replacing only the 4.17.3 kernel with 4.14.49, creating build 180702a,
where now the GPU boosts as expected.

Reverting the bad commit from kernel 4.17.3[4] resulted in build 180702b, and
again the GPU is now boosting as expected.

Kernel 4.18-rc1 also has this non-boosting issue (same as 4.17.3).

With this commit reverted, the reports of "stutter" in Kodi with 4.17.3 (and
now also 4.17.4) are resolved[5, 6, 7].

Can this commit be reverted, or is there a better solution that doesn't hobble
the GPU?

Thanks
Neil

1.
<a href="https://github.com/torvalds/linux/commit/e9af4ea2b9e7e5d3caa6354be14de06b678ed0fa">https://github.com/torvalds/linux/commit/e9af4ea2b9e7e5d3caa6354be14de06b678ed0fa</a>
2. <a href="https://forum.kodi.tv/showthread.php?tid=298462">https://forum.kodi.tv/showthread.php?tid=298462</a>
3. <a href="http://forum.kodi.tv/showthread.php?tid=298462&pid=2744031#pid2744031">http://forum.kodi.tv/showthread.php?tid=298462&pid=2744031#pid2744031</a>
4.
<a href="https://github.com/LibreELEC/LibreELEC.tv/pull/2798/commits/914cadbafd09861f05244d4b985476414760823b">https://github.com/LibreELEC/LibreELEC.tv/pull/2798/commits/914cadbafd09861f05244d4b985476414760823b</a>
5. <a href="https://forum.kodi.tv/showthread.php?tid=298462&pid=2748603#pid2748603">https://forum.kodi.tv/showthread.php?tid=298462&pid=2748603#pid2748603</a>
6. <a href="https://forum.kodi.tv/showthread.php?tid=298462&pid=2748688#pid2748688">https://forum.kodi.tv/showthread.php?tid=298462&pid=2748688#pid2748688</a>
7. <a href="https://forum.kodi.tv/showthread.php?tid=298462&pid=2748696#pid2748696">https://forum.kodi.tv/showthread.php?tid=298462&pid=2748696#pid2748696</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>