Skip to contentSkip to conversation

drm/i915: Use atomic page flip for intel again.

PATCH In review Maarten Lankhorst 3 participants 4 messages Dec 22, 2016 – Jan 23, 2017

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

PATCH 1/1 drm/i915: Use atomic page flip for intel again.

This reverts commit 527b6abe5fd2d2
(Revert "drm/i915: Use atomic commits for legacy page_flips")

and reapplies commit ee042aa40b66d1. ("drm/i915: Use atomic commits for legacy page_flips")

The reason for the revert was because legacy cursor updates were forced to wait for pending page flips and rendering after they were converted to atomic.

Commit f79f26921ee12c6f
(drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3) adds a fastpath to cursor updates, which fixes the stuttering issues. With these changes I feel confident enough to re-enable cursor updates.

Legacy cursor update won't block in the following cases:
- Moving cursor
- Changing cursor fb

The legacy cursor update will still block in the following cases:
- Showing/hiding cursor.
- Cursor size or scaling changes.
- cursor update while cursor is invisible (could be fixed, if it turns out to be important).
- Cursor tiling changes (Not sure we support tiled cursors.)
- Last update was a modeset.

Cc Steven Newbury <[email protected]>
Cc Rafael Ristovski <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>

Testcase: igt/kms_cursor_legacy

---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
index ef5dde5ab1cf..27e77ca714a5 100644
@@ -12152,6 +12152,7 @@ void intel_check_page_flip(struct drm_i915_private *dev_priv, int pipe)
 	spin_unlock(&dev->event_lock);
 }
 
+__maybe_unused
 static int intel_crtc_page_flip(struct drm_crtc *crtc,
 				struct drm_framebuffer *fb,
 				struct drm_pending_vblank_event *event,
@@ -14771,7 +14772,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
 	.set_config = drm_atomic_helper_set_config,
 	.set_property = drm_atomic_helper_crtc_set_property,
 	.destroy = intel_crtc_destroy,
-	.page_flip = intel_crtc_page_flip,
+	.page_flip = drm_atomic_helper_page_flip,
 	.atomic_duplicate_state = intel_crtc_duplicate_state,
 	.atomic_destroy_state = intel_crtc_destroy_state,
 };
Signature · 6 lines
2.7.4

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

✓ Fi.CI.BAT: success for drm/i915: Use atomic page flip for intel again.

== Series Details ==

== Series Details ==

Series: drm/i915: Use atomic page flip for intel again.
URL : https://patchwork.freedesktop.org/series/17129/
State : success

== Summary ==

Series 17129v1 drm/i915: Use atomic page flip for intel again.
https://patchwork.freedesktop.org/api/1.0/series/17129/revisions/1/mbox/

fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:246  pass:218  dwarn:1   dfail:0   fail:0   skip:27 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ilk-650       total:246  pass:194  dwarn:0   dfail:0   fail:0   skip:52 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

5486838e15ec59a57aa9a62f049f383cc3968e3f drm-tip: 2016y-12m-22d-13h-47m-26s UTC integration manifest 5a08f25 drm/i915: Use atomic page flip for intel again.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3371/
_______________________________________________
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 26 lines · Maarten Lankhorst

This reverts commit 527b6abe5fd2d2
(Revert "drm/i915: Use atomic commits for legacy page_flips")

and reapplies commit ee042aa40b66d1. ("drm/i915: Use atomic commits for legacy page_flips")

The reason for the revert was because legacy cursor updates were forced to wait for pending page flips and rendering after they were converted to atomic.

Commit f79f26921ee12c6f
(drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3) adds a fastpath to cursor updates, which fixes the stuttering issues. With these changes I feel confident enough to re-enable cursor updates.

Legacy cursor update won't block in the following cases:
- Moving cursor
- Changing cursor fb

The legacy cursor update will still block in the following cases:
- Showing/hiding cursor.
- Cursor size or scaling changes.
- cursor update while cursor is invisible (could be fixed, if it turns out to be important).
- Cursor tiling changes (Not sure we support tiled cursors.)
- Last update was a modeset.

Quoted 7 lines
Cc Steven Newbury <[email protected]>
Cc Rafael Ristovski <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>

Testcase: igt/kms_cursor_legacy

I'm going to regret this again ;-)

Quoted 28 lines
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
index ef5dde5ab1cf..27e77ca714a5 100644
@@ -12152,6 +12152,7 @@ void intel_check_page_flip(struct drm_i915_private *dev_priv, int pipe)
 	spin_unlock(&dev->event_lock);
 }
 
+__maybe_unused
 static int intel_crtc_page_flip(struct drm_crtc *crtc,
 				struct drm_framebuffer *fb,
 				struct drm_pending_vblank_event *event,
@@ -14771,7 +14772,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
 	.set_config = drm_atomic_helper_set_config,
 	.set_property = drm_atomic_helper_crtc_set_property,
 	.destroy = intel_crtc_destroy,
-	.page_flip = intel_crtc_page_flip,
+	.page_flip = drm_atomic_helper_page_flip,
 	.atomic_duplicate_state = intel_crtc_duplicate_state,
 	.atomic_destroy_state = intel_crtc_destroy_state,
 };
Signature · 1 line
2.7.4
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

Op 27-12-16 om 15:48 schreef Daniel Vetter:

Quoted 34 lines · Maarten Lankhorst
Quoted 26 lines

This reverts commit 527b6abe5fd2d2
(Revert "drm/i915: Use atomic commits for legacy page_flips")

and reapplies commit ee042aa40b66d1. ("drm/i915: Use atomic commits for legacy page_flips")

The reason for the revert was because legacy cursor updates were forced to wait for pending page flips and rendering after they were converted to atomic.

Commit f79f26921ee12c6f
(drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3) adds a fastpath to cursor updates, which fixes the stuttering issues. With these changes I feel confident enough to re-enable cursor updates.

Legacy cursor update won't block in the following cases:
- Moving cursor
- Changing cursor fb

The legacy cursor update will still block in the following cases:
- Showing/hiding cursor.
- Cursor size or scaling changes.
- cursor update while cursor is invisible (could be fixed, if it turns out to be important).
- Cursor tiling changes (Not sure we support tiled cursors.)
- Last update was a modeset.

Quoted 7 lines
Cc Steven Newbury <[email protected]>
Cc Rafael Ristovski <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>

Testcase: igt/kms_cursor_legacy

Quoted 3 lines

I'm going to regret this again ;-)

But we have testcases now! That pass!! So pushed, thanks for review. ;)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx