Skip to contentSkip to conversation

drm: i915: Wait for fences on new fb, not old

PATCH Applied Daniel Stone 6 participants 6 messages Oct 21, 2016 – Oct 24, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: i915: Wait for fences on new fb, not old

The previous code would wait for fences on the framebuffer from the old plane state to complete, rather than the new, so you would see tearing everywhere. Fix this to wait on the new state before we make it active.

Fixes 94f050246b42 ("drm/i915: nonblocking commit")
Cc Daniel Vetter <[email protected]>
Cc Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index e5ad101..1bdef9e 100644
@@ -14292,7 +14292,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 
 	for_each_plane_in_state(state, plane, plane_state, i) {
 		struct intel_plane_state *intel_plane_state =
-			to_intel_plane_state(plane_state);
+			to_intel_plane_state(plane->state);
 
 		if (!intel_plane_state->wait_req)
 			continue;
Signature · 1 line
2.9.3
#1 lore raw

✗ Fi.CI.BAT: failure for drm: i915: Wait for fences on new fb, not old

== Series Details ==

== Series Details ==

Series: drm: i915: Wait for fences on new fb, not old
URL : https://patchwork.freedesktop.org/series/14168/
State : failure

== Summary ==

Series 14168v1 drm: i915: Wait for fences on new fb, not old
https://patchwork.freedesktop.org/api/1.0/series/14168/revisions/1/mbox/

Test drv_module_reload_basic:

                dmesg-warn -> PASS       (fi-skl-6770hq)
Test gem_ringfill:
        Subgroup basic-default-hang:
                pass       -> TIMEOUT    (fi-hsw-4770r)
        Subgroup basic-default-interruptible:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_storedw_loop:
        Subgroup basic-blt:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-bsd:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-bsd1:
                skip       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-bsd2:
                skip       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-default:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-render:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-vebox:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_sync:
        Subgroup basic-all:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-each:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-many-each:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-store-all:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-store-each:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_tiled_blits:
        Subgroup basic:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_tiled_fence_blits:
        Subgroup basic:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_tiled_pread_basic:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_workarounds:
        Subgroup basic-read:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gvt_basic:
        Subgroup invalid-placeholder-test:
                skip       -> INCOMPLETE (fi-hsw-4770r)
Test kms_addfb_basic:
        Subgroup addfb25-bad-modifier:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-framebuffer-vs-set-tiling:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-modifier-no-flag:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-x-tiled:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-x-tiled-mismatch:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-y-tiled:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-y-tiled-small:
                skip       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup addfb25-yf-tiled:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-0:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-1024:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-128:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-256:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-32:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-63:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-65536:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bad-pitch-999:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-x-tiled:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-y-tiled:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bo-too-small:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup bo-too-small-due-to-tiling:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup clobberred-modifier:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup framebuffer-vs-set-tiling:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup invalid-get-prop:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup invalid-get-prop-any:

WARNING: Long output truncated

Results at /archive/results/CI_IGT_test/Patchwork_2790/

45ce7992e2d3211009c035db41745e1f12bbf6e8 drm-intel-nightly: 2016y-10m-21d-14h-52m-49s UTC integration manifest a8cbad1 drm: i915: Wait for fences on new fb, not old

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Re: ✗ Fi.CI.BAT: failure for drm: i915: Wait for fences on new fb, not old

Hi,

Quoted 11 lines · Patchwork

Test gem_ringfill:

        Subgroup basic-default-hang:
                pass       -> TIMEOUT    (fi-hsw-4770r)
        Subgroup basic-default-interruptible:
                pass       -> INCOMPLETE (fi-hsw-4770r)
Test gem_storedw_loop:
        Subgroup basic-blt:
                pass       -> INCOMPLETE (fi-hsw-4770r)
        Subgroup basic-bsd:
                pass       -> INCOMPLETE (fi-hsw-4770r)

Pretty sure this isn't my doing, but lacking access to the full logs I can't say for sure what's actually happened here.

Cheers,
Daniel

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: ✗ Fi.CI.BAT: failure for drm: i915: Wait for fences on new fb, not old

Quoted 5 lines

Subject: Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm: i915: Wait for fences on new fb, not old

On Friday, 21 October 2016, Patchwork <[email protected] <mailto:[email protected]> > wrote:

Quoted 11 lines
	Test gem_ringfill:
	        Subgroup basic-default-hang:
	                pass       -> TIMEOUT    (fi-hsw-4770r)
	        Subgroup basic-default-interruptible:
	                pass       -> INCOMPLETE (fi-hsw-4770r)
	Test gem_storedw_loop:
	        Subgroup basic-blt:
	                pass       -> INCOMPLETE (fi-hsw-4770r)
	        Subgroup basic-bsd:
	                pass       -> INCOMPLETE (fi-hsw-4770r)

Might be:
Results for igt@gem_ringfill@basic-default-hang
Result: timeout

Stdout
An internal exception that should have been handled was not:
Test run time exceeded timeout value (600 seconds)

And rest are just incomplete because of that one.

Quoted 2 lines

Pretty sure this isn't my doing, but lacking access to the full logs I can't say for

Yep, soon should be also externally visible.

Quoted 4 lines

sure what's actually happened here.

Cheers,
Daniel

Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Re: ✗ Fi.CI.BAT: failure for drm: i915: Wait for fences on new fb, not old

In reply to Daniel Stone
Quoted 10 lines · Daniel Stone
   Hi,

   On Friday, 21 October 2016, Patchwork
   <[1][email protected]> wrote:

     Test gem_ringfill:
             Subgroup basic-default-hang:
                     pass       -> TIMEOUT    (fi-hsw-4770r)
             Subgroup basic-default-interruptible:
                     pass       -> INCOMPLETE (fi-hsw-4770r)
Quoted 8 lines
     Test gem_storedw_loop:
             Subgroup basic-blt:
                     pass       -> INCOMPLETE (fi-hsw-4770r)
             Subgroup basic-bsd:
                     pass       -> INCOMPLETE (fi-hsw-4770r)

   Pretty sure this isn't my doing, but lacking access to the full logs I
   can't say for sure what's actually happened here.

It's not. It smells like someone used the wrong spin_lock_irq within an irq context handler (or spin_lock_irq within spin_lock_irqsave). Haven't spotted the culprit yet and I may very well be barking up the wrong tree.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
In reply to Daniel Stone
Quoted 9 lines · Daniel Stone

The previous code would wait for fences on the framebuffer from the old plane state to complete, rather than the new, so you would see tearing everywhere. Fix this to wait on the new state before we make it active.

Fixes 94f050246b42 ("drm/i915: nonblocking commit")
Cc Daniel Vetter <[email protected]>
Cc Maarten Lankhorst <[email protected]>

Queued for -next, thanks for the patch.
-Daniel

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index e5ad101..1bdef9e 100644
@@ -14292,7 +14292,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 
 	for_each_plane_in_state(state, plane, plane_state, i) {
 		struct intel_plane_state *intel_plane_state =
-			to_intel_plane_state(plane_state);
+			to_intel_plane_state(plane->state);
 
 		if (!intel_plane_state->wait_req)
 			continue;
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch