Skip to contentSkip to conversation

drm/atomic: Call ww_acquire_done after drm_modeset_lock_all

PATCH In review Maarten Lankhorst 4 participants 6 messages Feb 21, 2018 – Mar 5, 2018

Subsystems (2)
lore
Share & tools
lore

Maarten Lankhorst

author maintainer
#0 lore raw

PATCH 1/1 drm/atomic: Call ww_acquire_done after drm_modeset_lock_all

After we acquired all generic modeset locks in drm_modeset_lock_all, it's unsafe acquire any other so just mark acquisition as done.

Atomic drivers shouldn't use drm_modeset_lock_all.

---
 drivers/gpu/drm/drm_modeset_lock.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_modeset_lock.c +1 -0
index 963e23db0fe7..8a5100685875 100644
@@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
 		kfree(ctx);
 		return;
 	}
+	ww_acquire_done(&ctx->ww_ctx);
 
 	WARN_ON(config->acquire_ctx);
 
Signature · 6 lines
2.16.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

✓ Fi.CI.BAT: success for drm/atomic: Call ww_acquire_done after drm_modeset_lock_all

== Series Details ==

== Series Details ==

Series: drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
URL : https://patchwork.freedesktop.org/series/38711/
State : success

== Summary ==

Series 38711v1 drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
https://patchwork.freedesktop.org/api/1.0/series/38711/revisions/1/mbox/

Test gem_mmap_gtt:

        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575
Test kms_chamelium:
        Subgroup dp-crc-fast:
                pass       -> DMESG-WARN (fi-kbl-7500u) fdo#103841
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                fail       -> PASS       (fi-ivb-3520m)
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
                fail       -> PASS       (fi-ivb-3520m)
        Subgroup suspend-read-crc-pipe-c:
                fail       -> PASS       (fi-ivb-3520m)

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:425s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:372s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:483s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:285s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:474s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:477s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:462s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:452s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:556s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:415s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:283s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:504s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:386s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:406s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:456s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:409s
fi-kbl-7500u     total:288  pass:262  dwarn:2   dfail:0   fail:0   skip:24  time:453s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:492s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:449s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:493s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:586s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:424s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:500s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:518s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:485s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:484s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:408s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:428s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:521s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:393s

42d073db2a8593a8d1832037ffe0988403031568 drm-tip: 2018y-02m-21d-14h-03m-58s UTC integration manifest f0281441bf56 drm/atomic: Call ww_acquire_done after drm_modeset_lock_all

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8108/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Maarten Lankhorst
Quoted 6 lines · Maarten Lankhorst

After we acquired all generic modeset locks in drm_modeset_lock_all, it's unsafe acquire any other so just mark acquisition as done.

Atomic drivers shouldn't use drm_modeset_lock_all.

Also, I'm pretty much expecting to regret this like all the other ww_acquire_done patches I've acked, but where's the fun in not trying :-)

Cheers, Daniel

Quoted 23 lines
---
 drivers/gpu/drm/drm_modeset_lock.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_modeset_lock.c +1 -0
index 963e23db0fe7..8a5100685875 100644
@@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
 		kfree(ctx);
 		return;
 	}
+	ww_acquire_done(&ctx->ww_ctx);
 
 	WARN_ON(config->acquire_ctx);
 
Signature · 6 lines
2.16.1

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

After we acquired all generic modeset locks in drm_modeset_lock_all, it's unsafe acquire any other so just mark acquisition as done.

Quoted 9 lines
Quoted 3 lines

Atomic drivers shouldn't use drm_modeset_lock_all.

Also, I'm pretty much expecting to regret this like all the other ww_acquire_done patches I've acked, but where's the fun in not trying :-)

This shouldn't really hurt anything, other than throw DEBUG warnings if DEBUG_MUTEXES is on.

Harry

Quoted 18 lines

Cheers, Daniel

Quoted 16 lines
---
 drivers/gpu/drm/drm_modeset_lock.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_modeset_lock.c +1 -0
index 963e23db0fe7..8a5100685875 100644
@@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
 		kfree(ctx);
 		return;
 	}
+	ww_acquire_done(&ctx->ww_ctx);
 
 	WARN_ON(config->acquire_ctx);
 
Quoted 8 lines
Quoted 7 lines
Signature · 6 lines
2.16.1

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

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

author maintainer
#4 lore raw

Op 21-02-18 om 20:39 schreef Harry Wentland:

Quoted 37 lines · Daniel Vetter
Quoted 12 lines · Maarten Lankhorst
Quoted 6 lines

After we acquired all generic modeset locks in drm_modeset_lock_all, it's unsafe acquire any other so just mark acquisition as done.

Atomic drivers shouldn't use drm_modeset_lock_all.

Also, I'm pretty much expecting to regret this like all the other ww_acquire_done patches I've acked, but where's the fun in not trying :-)

This shouldn't really hurt anything, other than throw DEBUG warnings if DEBUG_MUTEXES is on.

Harry

Quoted 18 lines

Cheers, Daniel

Quoted 16 lines
---
 drivers/gpu/drm/drm_modeset_lock.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_modeset_lock.c +1 -0
index 963e23db0fe7..8a5100685875 100644
@@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
 		kfree(ctx);
 		return;
 	}
+	ww_acquire_done(&ctx->ww_ctx);
 
 	WARN_ON(config->acquire_ctx);
 
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Signature · 6 lines
2.16.1

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

Thanks, pushed.

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

#5 lore raw

✗ Fi.CI.IGT: warning for drm/atomic: Call ww_acquire_done after drm_modeset_lock_all

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
URL : https://patchwork.freedesktop.org/series/38711/
State : warning

== Summary ==

Test kms_flip:

        Subgroup 2x-plain-flip-ts-check:
                pass       -> FAIL       (shard-hsw) fdo#100368 +1
        Subgroup dpms-vs-vblank-race-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#103060
Test perf:
        Subgroup enable-disable:
                pass       -> FAIL       (shard-apl) fdo#103715
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-primscrn-pri-indfb-draw-mmap-gtt:
                pass       -> FAIL       (shard-apl) fdo#101623
Test kms_sysfs_edid_timing:
                warn       -> FAIL       (shard-hsw) fdo#100047
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-c-frame-sequence:
                fail       -> PASS       (shard-apl) fdo#103481
Test kms_chv_cursor_fail:
        Subgroup pipe-b-256x256-bottom-edge:
                pass       -> DMESG-WARN (shard-snb)
Test kms_atomic_transition:
        Subgroup 1x-modeset-transitions-nonblocking-fencing:
                fail       -> PASS       (shard-apl) fdo#103207
Test drv_suspend:
        Subgroup fence-restore-untiled:
                pass       -> SKIP       (shard-snb)

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103207 https://bugs.freedesktop.org/show_bug.cgi?id=103207

shard-apl        total:3300 pass:1729 dwarn:1   dfail:0   fail:15  skip:1553 time:11773s
shard-hsw        total:3464 pass:1764 dwarn:1   dfail:0   fail:6   skip:1693 time:11927s
shard-snb        total:3464 pass:1352 dwarn:2   dfail:0   fail:3   skip:2107 time:6611s

Blacklisted hosts:
shard-kbl total:3464 pass:1940 dwarn:18 dfail:4 fail:13 skip:1489 time:9659s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8108/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx