From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Michel Dänzer" <michel@daenzer.net>,
"Tvrtko Ursulin" <tvrtko.ursulin@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Pekka Paalanen" <ppaalanen@gmail.com>,
"Simon Ser" <contact@emersion.fr>,
"Rob Clark" <robdclark@chromium.org>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
"David Airlie" <airlied@gmail.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org (open list),
linux-media@vger.kernel.org (open list:DMA BUFFER SHARING
FRAMEWORK),
linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER
SHARING FRAMEWORK)
Subject: [PATCH v5 14/14] drm/i915: Add deadline based boost support
Date: Mon, 20 Feb 2023 12:19:01 -0800 [thread overview]
Message-ID: <20230220201916.1822214-15-robdclark@gmail.com> (raw)
In-Reply-To: <20230220201916.1822214-1-robdclark@gmail.com>
From: Rob Clark <robdclark@chromium.org>
v2: rebase
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
drivers/gpu/drm/i915/i915_request.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 7503dcb9043b..44491e7e214c 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -97,6 +97,25 @@ static bool i915_fence_enable_signaling(struct dma_fence *fence)
return i915_request_enable_breadcrumb(to_request(fence));
}
+static void i915_fence_set_deadline(struct dma_fence *fence, ktime_t deadline)
+{
+ struct i915_request *rq = to_request(fence);
+
+ if (i915_request_completed(rq))
+ return;
+
+ if (i915_request_started(rq))
+ return;
+
+ /*
+ * TODO something more clever for deadlines that are in the
+ * future. I think probably track the nearest deadline in
+ * rq->timeline and set timer to trigger boost accordingly?
+ */
+
+ intel_rps_boost(rq);
+}
+
static signed long i915_fence_wait(struct dma_fence *fence,
bool interruptible,
signed long timeout)
@@ -182,6 +201,7 @@ const struct dma_fence_ops i915_fence_ops = {
.signaled = i915_fence_signaled,
.wait = i915_fence_wait,
.release = i915_fence_release,
+ .set_deadline = i915_fence_set_deadline,
};
static void irq_execute_cb(struct irq_work *wrk)
--
2.39.1
prev parent reply other threads:[~2023-02-20 20:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 20:18 [PATCH v5 00/14] dma-fence: Deadline awareness Rob Clark
2023-02-20 20:18 ` [PATCH v5 01/14] dma-buf/dma-fence: Add deadline awareness Rob Clark
2023-02-20 20:18 ` [PATCH v5 02/14] dma-buf/fence-array: Add fence deadline support Rob Clark
2023-02-20 20:18 ` [PATCH v5 03/14] dma-buf/fence-chain: " Rob Clark
2023-02-20 20:18 ` [PATCH v5 04/14] dma-buf/dma-resv: Add a way to set fence deadline Rob Clark
2023-02-20 20:18 ` [PATCH v5 05/14] dma-buf/sync_file: Add SET_DEADLINE ioctl Rob Clark
2023-02-20 20:18 ` [PATCH v5 06/14] dma-buf/sync_file: Support (E)POLLPRI Rob Clark
2023-02-20 20:18 ` [PATCH v5 07/14] dma-buf/sw_sync: Add fence deadline support Rob Clark
2023-02-20 20:18 ` [PATCH v5 08/14] drm/scheduler: " Rob Clark
2023-02-20 20:18 ` [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj waits Rob Clark
2023-02-21 8:53 ` Pekka Paalanen
2023-02-21 17:25 ` Rob Clark
2023-02-22 10:09 ` Pekka Paalanen
2023-02-22 14:05 ` Rodrigo Vivi
2023-02-22 15:33 ` Rob Clark
2023-02-20 20:18 ` [PATCH v5 10/14] drm/vblank: Add helper to get next vblank time Rob Clark
2023-02-20 20:18 ` [PATCH v5 11/14] drm/atomic-helper: Set fence deadline for vblank Rob Clark
2023-02-20 20:18 ` [PATCH v5 12/14] drm/msm: Add deadline based boost support Rob Clark
2023-02-20 20:19 ` [PATCH v5 13/14] drm/msm: Add wait-boost support Rob Clark
2023-02-20 20:19 ` Rob Clark [this message]
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=20230220201916.1822214-15-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=michel@daenzer.net \
--cc=ppaalanen@gmail.com \
--cc=robdclark@chromium.org \
--cc=rodrigo.vivi@intel.com \
--cc=sumit.semwal@linaro.org \
--cc=tvrtko.ursulin@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
/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