From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [RFC 1/3] drm/i915: Wrap context schedule notification
Date: Tue, 9 May 2017 15:09:34 +0100 [thread overview]
Message-ID: <20170509140936.19060-2-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20170509140936.19060-1-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
No functional change just something which will be handy in the
following patch.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/intel_lrc.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 319d9a8f37ca..4c37e94c4d3d 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -306,6 +306,18 @@ execlists_context_status_change(struct drm_i915_gem_request *rq,
status, rq);
}
+static inline void
+execlists_context_schedule_in(struct drm_i915_gem_request *rq)
+{
+ execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
+}
+
+static inline void
+execlists_context_schedule_out(struct drm_i915_gem_request *rq)
+{
+ execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
+}
+
static void
execlists_update_context_pdps(struct i915_hw_ppgtt *ppgtt, u32 *reg_state)
{
@@ -345,16 +357,14 @@ static void execlists_submit_ports(struct intel_engine_cs *engine)
GEM_BUG_ON(port[0].count > 1);
if (!port[0].count)
- execlists_context_status_change(port[0].request,
- INTEL_CONTEXT_SCHEDULE_IN);
+ execlists_context_schedule_in(port[0].request);
desc[0] = execlists_update_context(port[0].request);
GEM_DEBUG_EXEC(port[0].context_id = upper_32_bits(desc[0]));
port[0].count++;
if (port[1].request) {
GEM_BUG_ON(port[1].count);
- execlists_context_status_change(port[1].request,
- INTEL_CONTEXT_SCHEDULE_IN);
+ execlists_context_schedule_in(port[1].request);
desc[1] = execlists_update_context(port[1].request);
GEM_DEBUG_EXEC(port[1].context_id = upper_32_bits(desc[1]));
port[1].count = 1;
@@ -581,9 +591,7 @@ static void intel_lrc_irq_handler(unsigned long data)
if (--port[0].count == 0) {
GEM_BUG_ON(status & GEN8_CTX_STATUS_PREEMPTED);
GEM_BUG_ON(!i915_gem_request_completed(port[0].request));
- execlists_context_status_change(port[0].request,
- INTEL_CONTEXT_SCHEDULE_OUT);
-
+ execlists_context_schedule_out(port[0].request);
trace_i915_gem_request_out(port[0].request);
i915_gem_request_put(port[0].request);
port[0] = port[1];
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-05-09 14:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 14:09 [RFC 0/3] Engine utilization tracking Tvrtko Ursulin
2017-05-09 14:09 ` Tvrtko Ursulin [this message]
2017-05-09 14:09 ` [RFC 2/3] drm/i915: Engine busy time tracking Tvrtko Ursulin
2017-05-10 12:41 ` Joonas Lahtinen
2017-05-09 14:09 ` [RFC 3/3] drm/i915: Export engine busy stats in debugfs Tvrtko Ursulin
2017-05-09 18:17 ` Dmitry Rogozhkin
2017-05-10 8:30 ` Tvrtko Ursulin
2017-05-10 15:57 ` Dmitry Rogozhkin
2017-05-09 14:26 ` [RFC 0/3] Engine utilization tracking Chris Wilson
2017-05-09 15:16 ` Tvrtko Ursulin
2017-05-09 15:29 ` Chris Wilson
2017-05-09 15:51 ` Tvrtko Ursulin
2017-05-09 18:11 ` Dmitry Rogozhkin
2017-05-10 8:38 ` Tvrtko Ursulin
2017-05-10 15:50 ` Dmitry Rogozhkin
2017-05-10 19:45 ` Daniel Vetter
2017-05-12 17:40 ` Dmitry Rogozhkin
2017-05-10 12:31 ` Chris Wilson
2017-05-09 14:51 ` ✓ Fi.CI.BAT: success for " Patchwork
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=20170509140936.19060-2-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox