From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Rob Clark <robdclark@gmail.com>, dri-devel@lists.freedesktop.org
Cc: "Rob Clark" <robdclark@chromium.org>,
intel-gfx@lists.freedesktop.org,
"Tvrtko Ursulin" <tvrtko.ursulin@intel.com>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Michel Dänzer" <michel@daenzer.net>,
"open list" <linux-kernel@vger.kernel.org>,
"Christian König" <christian.koenig@amd.com>,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@lists.linaro.org>,
"Pekka Paalanen" <ppaalanen@gmail.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
freedreno@lists.freedesktop.org,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"open list:DMA BUFFER SHARING FRAMEWORK"
<linux-media@vger.kernel.org>
Subject: Re: [PATCH v4 14/14] drm/i915: Add deadline based boost support
Date: Mon, 20 Feb 2023 15:46:39 +0000 [thread overview]
Message-ID: <2716c108-0486-6e27-77e2-efd1fa350f04@linux.intel.com> (raw)
In-Reply-To: <20230218211608.1630586-15-robdclark@gmail.com>
On 18/02/2023 21:15, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
>
> This should probably be re-written by someone who knows the i915
> request/timeline stuff better, to deal with non-immediate deadlines.
> But as-is I think this should be enough to handle the case where
> we want syncobj waits to trigger boost.
Yeah, there are endless possibilities. :) But I think it is effectively
similar enough to current waitboosting (when waits are done using the
i915 specific ioctl). So as a first step I'll try to organize some
internal power and performance testing, at least Chromebook focused, to
see if modern userspace (syncobj based) even benefits and does not by
some chance regress over the board.
Regards,
Tvrtko
>
> drivers/gpu/drm/i915/i915_driver.c | 2 +-
> drivers/gpu/drm/i915/i915_request.c | 20 ++++++++++++++++++++
> 2 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index cf1c0970ecb4..bd40b7bcb38a 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1781,7 +1781,7 @@ static const struct drm_driver i915_drm_driver = {
> .driver_features =
> DRIVER_GEM |
> DRIVER_RENDER | DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_SYNCOBJ |
> - DRIVER_SYNCOBJ_TIMELINE,
> + DRIVER_SYNCOBJ_TIMELINE | DRIVER_SYNCOBJ_DEADLINE,
> .release = i915_driver_release,
> .open = i915_driver_open,
> .lastclose = i915_driver_lastclose,
> 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)
prev parent reply other threads:[~2023-02-20 15:46 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 21:15 [PATCH v4 00/14] dma-fence: Deadline awareness Rob Clark
2023-02-18 21:15 ` [PATCH v4 01/14] dma-buf/dma-fence: Add deadline awareness Rob Clark
2023-02-22 10:23 ` Tvrtko Ursulin
2023-02-22 15:28 ` Christian König
2023-02-22 17:04 ` Tvrtko Ursulin
2023-02-22 17:16 ` Rob Clark
2023-02-22 17:33 ` Tvrtko Ursulin
2023-02-22 18:57 ` Rob Clark
2023-02-22 11:01 ` Luben Tuikov
2023-02-18 21:15 ` [PATCH v4 02/14] dma-buf/fence-array: Add fence deadline support Rob Clark
2023-02-18 21:15 ` [PATCH v4 03/14] dma-buf/fence-chain: " Rob Clark
2023-02-22 10:27 ` Tvrtko Ursulin
2023-02-22 15:55 ` Rob Clark
2023-02-18 21:15 ` [PATCH v4 04/14] dma-buf/dma-resv: Add a way to set fence deadline Rob Clark
2023-02-20 8:16 ` Christian König
2023-02-18 21:15 ` [PATCH v4 05/14] dma-buf/sync_file: Add SET_DEADLINE ioctl Rob Clark
2023-02-20 8:27 ` Christian König
2023-02-20 16:09 ` Rob Clark
2023-02-21 8:41 ` Pekka Paalanen
2023-02-23 9:19 ` Christian König
2023-02-20 8:48 ` Pekka Paalanen
2023-02-18 21:15 ` [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI Rob Clark
2023-02-20 8:31 ` Christian König
2023-02-21 8:38 ` Pekka Paalanen
2023-02-20 8:53 ` Pekka Paalanen
2023-02-20 16:14 ` Rob Clark
2023-02-21 8:37 ` Pekka Paalanen
2023-02-21 16:01 ` Sebastian Wick
2023-02-21 17:55 ` Rob Clark
2023-02-21 16:48 ` Luben Tuikov
2023-02-21 17:53 ` Rob Clark
2023-02-22 9:49 ` Pekka Paalanen
2023-02-22 10:26 ` Luben Tuikov
2023-02-22 15:37 ` Rob Clark
2023-02-23 9:38 ` Pekka Paalanen
2023-02-23 18:51 ` Rob Clark
2023-02-24 9:26 ` Pekka Paalanen
2023-02-24 9:41 ` Tvrtko Ursulin
2023-02-24 10:24 ` Pekka Paalanen
2023-02-24 10:50 ` Tvrtko Ursulin
2023-02-24 11:00 ` Pekka Paalanen
2023-02-24 11:37 ` Tvrtko Ursulin
2023-02-24 15:26 ` Luben Tuikov
2023-02-24 17:59 ` Rob Clark
2023-02-27 21:35 ` Rodrigo Vivi
2023-02-27 22:20 ` Rob Clark
2023-02-27 22:44 ` Sebastian Wick
2023-02-27 23:48 ` Rob Clark
2023-02-28 14:30 ` Sebastian Wick
2023-02-28 22:52 ` Rob Clark
2023-03-01 15:31 ` Sebastian Wick
2023-03-01 16:02 ` Rob Clark
2023-03-01 15:45 ` Rodrigo Vivi
2023-02-24 16:59 ` Rob Clark
2023-02-24 19:44 ` Rob Clark
2023-02-27 9:34 ` Pekka Paalanen
2023-02-27 18:43 ` Rob Clark
2023-02-18 21:15 ` [PATCH v4 07/14] dma-buf/sw_sync: Add fence deadline support Rob Clark
2023-02-20 8:29 ` Christian König
2023-02-18 21:15 ` [PATCH v4 08/14] drm/scheduler: " Rob Clark
2023-02-21 19:40 ` Luben Tuikov
2023-02-18 21:15 ` [PATCH v4 12/14] drm/msm: Add deadline based boost support Rob Clark
2023-02-18 21:15 ` [PATCH v4 14/14] drm/i915: " Rob Clark
2023-02-20 15:46 ` Tvrtko Ursulin [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=2716c108-0486-6e27-77e2-efd1fa350f04@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--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=robdclark@gmail.com \
--cc=rodrigo.vivi@intel.com \
--cc=sumit.semwal@linaro.org \
--cc=tvrtko.ursulin@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