All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v3] drm/i915: Queue page flip work via a low latency, unbound workqueue
Date: Tue, 20 Sep 2016 14:58:19 +0300	[thread overview]
Message-ID: <1474372699-22841-1-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1473872835-11882-1-git-send-email-imre.deak@intel.com>

While user space has control over the scheduling priority of its page
flipping thread, the corresponding work the driver schedules for MMIO
flips always runs from the generic system workqueue which has some
scheduling overhead due it being CPU bound. This would hinder an
application that wants more stringent guarantees over flip timing (to
avoid missing a flip at the next frame count).

Fix this by scheduling the work from the unbound system workqueue
which provides for minimal scheduling latency.

v2:
- Use an unbound workqueue instead of a high-prio one. (Tvrtko, Chris)
v3:
- Use the system unbound wq instead of a dedicated one. (Maarten)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97775
Testcase: igt/kms_cursor_legacy
CC: Chris Wilson <chris@chris-wilson.co.uk>
CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
CC: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7bb7874..8da9f3c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12266,7 +12266,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 
 		work->flip_queued_req = i915_gem_active_get(&obj->last_write,
 							    &obj->base.dev->struct_mutex);
-		schedule_work(&work->mmio_work);
+		queue_work(system_unbound_wq, &work->mmio_work);
 	} else {
 		request = i915_gem_request_alloc(engine, engine->last_context);
 		if (IS_ERR(request)) {
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-09-20 11:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 14:09 [PATCH] drm/i915: Queue page flip work with high priority Imre Deak
2016-09-12 14:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-09-13 10:24 ` [PATCH] " Tvrtko Ursulin
2016-09-13 10:31   ` Imre Deak
2016-09-13 11:12     ` Tvrtko Ursulin
2016-09-14 11:02       ` Imre Deak
2016-09-13 10:32   ` Chris Wilson
2016-09-13 10:48     ` Imre Deak
2016-09-14 17:07 ` [PATCH v2] drm/i915: Queue page flip work via a low latency, unbound workqueue Imre Deak
2016-09-15  8:44   ` Maarten Lankhorst
2016-09-15 11:30     ` Imre Deak
2016-09-20 11:58   ` Imre Deak [this message]
2016-09-20 12:51     ` [PATCH v3] " Chris Wilson
2016-09-20 12:56       ` Maarten Lankhorst
2016-09-14 17:54 ` ✗ Fi.CI.BAT: failure for drm/i915: Queue page flip work with high priority (rev2) Patchwork
2016-09-15  7:20 ` ✗ Fi.CI.BAT: warning " Patchwork
2016-09-20 12:24 ` ✗ Fi.CI.BAT: warning for drm/i915: Queue page flip work with high priority (rev3) Patchwork
2016-09-21 13:48   ` Imre Deak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474372699-22841-1-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.