All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] drm/atomic: Abuse legacy cursor update flag for legacy gamma update too
@ 2018-02-13  9:12 Maarten Lankhorst
  2018-02-13  9:16 ` Chris Wilson
  2018-02-19 14:34 ` Daniel Vetter
  0 siblings, 2 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2018-02-13  9:12 UTC (permalink / raw)
  To: dri-devel

Programs like redshift set the legacy gamma for X.org every 5 seconds.
Because atomic commits wait for vblank completion, we get a frame drop
every 5 seconds because of the legacy gamma update.

Work around this by setting the legacy_cursor_update flag, to force
legacy gamma updates not to be synced against vblank.

Reported-by: Tholin #intel-gfx
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ae3cbfe9e01c..f37ab26ef4d2 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3806,6 +3806,9 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
 	if (!state)
 		return -ENOMEM;
 
+	/* Don't wait for vblank after updating gamma. */
+	state->legacy_cursor_update = true;
+
 	blob = drm_property_create_blob(dev,
 					sizeof(struct drm_color_lut) * size,
 					NULL);
-- 
2.16.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-19 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13  9:12 [RFC] drm/atomic: Abuse legacy cursor update flag for legacy gamma update too Maarten Lankhorst
2018-02-13  9:16 ` Chris Wilson
2018-02-13  9:33   ` Maarten Lankhorst
2018-02-13 13:29     ` Ville Syrjälä
2018-02-19 14:34 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.