[Bug 94987] fullscreen flickering with google-chrome (youtube and not only)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 19 08:25:30 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94987

--- Comment #13 from Chris Wilson <chris at chris-wilson.co.uk> ---
Drat. Best idea I had so far.

Likely no effect, but do please try:

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6ce2c31..1b296e2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -54,6 +54,9 @@ static bool cpu_cache_is_coherent(struct drm_device *dev,

 static bool cpu_write_needs_clflush(struct drm_i915_gem_object *obj)
 {
+       if (obj->base.write_domain == I915_GEM_DOMAIN_CPU)
+               return false;
+
        if (!cpu_cache_is_coherent(obj->base.dev, obj->cache_level))
                return true;

@@ -1080,7 +1083,6 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
         * perspective, requiring manual detiling by the client.
         */
        if (obj->tiling_mode == I915_TILING_NONE &&
-           obj->base.write_domain != I915_GEM_DOMAIN_CPU &&
            cpu_write_needs_clflush(obj)) {
                ret = i915_gem_gtt_pwrite_fast(dev, obj, args, file);
                /* Note that the gtt paths might fail with non-page-backed user
@@ -3926,10 +3928,8 @@ out:
         * object is now coherent at its new cache level (with respect
         * to the access domain).
         */
-       if (obj->cache_dirty &&
-           obj->base.write_domain != I915_GEM_DOMAIN_CPU &&
-           cpu_write_needs_clflush(obj)) {
-               if (i915_gem_clflush_object(obj, true))
+       if (cpu_write_needs_clflush(obj)) {
+               if (i915_gem_clflush_object(obj, obj->cache_dirty))
                        i915_gem_chipset_flush(obj->base.dev);
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20160419/ffb412ae/attachment.html>


More information about the intel-gfx-bugs mailing list