<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Cursor sprite sometimes not showed since linux 5.2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111541#c25">Comment # 25</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Cursor sprite sometimes not showed since linux 5.2"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111541">bug 111541</a>
              from <span class="vcard"><a class="email" href="mailto:mikko.rapeli@iki.fi" title="Mikko Rapeli <mikko.rapeli@iki.fi>"> <span class="fn">Mikko Rapeli</span></a>
</span></b>
        <pre>The patch doesn't seem to apply to 5.2 stable tree, so I tried to backport it
like this. I hope this is correct.

--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1908,7 +1908,11 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
                list_add(&obj->userfault_link, &dev_priv->mm.userfault_list);
        GEM_BUG_ON(!obj->userfault_count);

-       i915_vma_set_ggtt_write(vma);
+       if (write) {
+               GEM_BUG_ON(!i915_gem_object_has_pinned_pages(obj));
+               i915_vma_set_ggtt_write(vma);
+               obj->mm.dirty = true;
+       }

 err_fence:
        i915_vma_unpin_fence(vma);</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>