<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 - Rendering glitches in tk applications with psr enabled on Thinkpad X1 Carbon 2nd gen (Haswell)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=96533">96533</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Rendering glitches in tk applications with psr enabled on Thinkpad X1 Carbon 2nd gen (Haswell)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>benjamin.poirier@gmail.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=124539" name="attach_124539" title="dmesg with drm debug messages">attachment 124539</a> <a href="attachment.cgi?id=124539&action=edit" title="dmesg with drm debug messages">[details]</a></span>
dmesg with drm debug messages

Since updating to 4.6 I noticed rendering glitches in tk applications. I
bisected the issue to
9b58e35 drm/i915: Enable PSR by default on Haswell and Broadwell. (v4.6-rc1)

One way to reproduce the issue is to run
        git gui blame --line=4132 v4.6 net/core/dev.c
in a linux kernel git tree,
Click on line 4132
Scroll up and down in the bottom window (the commit log) using the mouse
wheel. Notice that blank lines are not properly refreshed and there is ghost
content from what was there before scrolling. Moving the window fixes the
render.
If you don't have a mouse wheel available ATM, click on lines 4131 and
4132 in alternance and notice that the color highlighting in the
column that has line numbers is not properly updated (if you move the
window, it is updated).

I noticed similar issues in gitk.

I've further tested with 5fb50cc from drm-intel-nightly and the problem
remains.
i915.enable_psr=0 works around the issue
i915.enable_psr=2 and =3 do not work around the issue

root@f1:~# cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink_Support: no
Source_OK: no
Enabled: no
Active: no
Busy frontbuffer bits: 0x000
Re-enable work scheduled: no
Main link in standby mode: no
HW Enabled & Active bit: no
Performance_Counter: 0

The platform is
        Lenovo ThinkPad X1 Carbon 2nd, model 20A7CTO1WW
I can see the problem both on the laptop screen or with external monitors.
I am running openbox on Xorg, distro is openSUSE Tumbleweed.
I tried running kms_psr_sink_crc from intel-gpu-tools but it doesn't seem like
it was able to complete:
        IGT-Version: 1.15-NOT-GIT (x86_64) (Linux: 4.6.0-1-default x86_64)
        Test requirement not met in function main, file kms_psr_sink_crc.c:522:
        Test requirement: !(!psr_possible(&data))
        Last errno: 2, No such file or directory
        Subtest psr_basic: SKIP
        Subtest primary_page_flip: SKIP
        Subtest primary_mmap_gtt: SKIP
        Subtest primary_mmap_gtt_waiting: SKIP
        Subtest primary_mmap_cpu: SKIP
        Subtest primary_blt: SKIP
        Subtest primary_render: SKIP
        Subtest sprite_mmap_gtt: SKIP
        Subtest sprite_mmap_gtt_waiting: SKIP
        Subtest sprite_mmap_cpu: SKIP
        Subtest sprite_blt: SKIP
        Subtest sprite_render: SKIP
        Subtest sprite_plane_move: SKIP
        Subtest sprite_plane_onoff: SKIP
        Subtest cursor_mmap_gtt: SKIP
        Subtest cursor_mmap_gtt_waiting: SKIP
        Subtest cursor_mmap_cpu: SKIP
        Subtest cursor_blt: SKIP
        Subtest cursor_render: SKIP
        Subtest cursor_plane_move: SKIP
        Subtest cursor_plane_onoff: SKIP
        Subtest dpms_off_psr_active: SKIP
        Subtest dpms_off_psr_exit: SKIP
        Subtest suspend_psr_active: SKIP
        Subtest suspend_psr_exit: SKIP

Please let me know if you need more info.</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>