diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-22 10:36:23 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-27 04:02:37 -0500 |
commit | f02ad907cd9e7fe3a6405d2d005840912f1ed258 (patch) | |
tree | c842c3afc455524d5a6c1c1658052e00ee2ea0b9 /drivers/gpu/drm/drm_atomic_helper.c | |
parent | b486e0e6d599b9ca8667fb9a7d49b7383ee963c7 (diff) |
drm/atomic-helpers: Recover full cursor plane behaviour
Cursor plane updates have historically been fully async and mutliple
updates batched together for the next vsync. And userspace relies upon
that. Since implementing a full queue of async atomic updates is a bit
of work lets just recover the cursor specific behaviour with a hint
flag and some hacks to drop the vblank wait.
v2: Fix kerneldoc, reported by Wu Fengguang.
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 6112ec261c3b..d0c3611402da 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
@@ -909,6 +909,11 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev, | |||
909 | if (!crtc->state->enable) | 909 | if (!crtc->state->enable) |
910 | continue; | 910 | continue; |
911 | 911 | ||
912 | /* Legacy cursor ioctls are completely unsynced, and userspace | ||
913 | * relies on that (by doing tons of cursor updates). */ | ||
914 | if (old_state->legacy_cursor_update) | ||
915 | continue; | ||
916 | |||
912 | if (!framebuffer_changed(dev, old_state, crtc)) | 917 | if (!framebuffer_changed(dev, old_state, crtc)) |
913 | continue; | 918 | continue; |
914 | 919 | ||
@@ -1335,6 +1340,9 @@ retry: | |||
1335 | if (ret != 0) | 1340 | if (ret != 0) |
1336 | goto fail; | 1341 | goto fail; |
1337 | 1342 | ||
1343 | if (plane == crtc->cursor) | ||
1344 | state->legacy_cursor_update = true; | ||
1345 | |||
1338 | /* Driver takes ownership of state on successful commit. */ | 1346 | /* Driver takes ownership of state on successful commit. */ |
1339 | return 0; | 1347 | return 0; |
1340 | fail: | 1348 | fail: |
@@ -1410,6 +1418,9 @@ retry: | |||
1410 | plane_state->src_h = 0; | 1418 | plane_state->src_h = 0; |
1411 | plane_state->src_w = 0; | 1419 | plane_state->src_w = 0; |
1412 | 1420 | ||
1421 | if (plane == plane->crtc->cursor) | ||
1422 | state->legacy_cursor_update = true; | ||
1423 | |||
1413 | ret = drm_atomic_commit(state); | 1424 | ret = drm_atomic_commit(state); |
1414 | if (ret != 0) | 1425 | if (ret != 0) |
1415 | goto fail; | 1426 | goto fail; |