From: Philipp Stanner <pstanner@redhat.com>
To: Luben Tuikov <ltuikov89@gmail.com>,
Matthew Brost <matthew.brost@intel.com>,
Danilo Krummrich <dakr@kernel.org>,
Philipp Stanner <pstanner@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 2/2] drm/sched: Fix docu of drm_sched_entity_flush()
Date: Tue, 19 Nov 2024 14:41:23 +0100 [thread overview]
Message-ID: <20241119134122.21950-3-pstanner@redhat.com> (raw)
In-Reply-To: <20241119134122.21950-2-pstanner@redhat.com>
drm_sched_entity_flush()'s documentation states that an error is being
returned when "the process was killed". That is not what the function
actually does.
Furthermore, it contains an inprecise statement about how the function
is part of a convenience wrapper.
Move that statement to drm_sched_entity_destroy().
Correct drm_sched_entity_flush()'s documentation.
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
drivers/gpu/drm/scheduler/sched_entity.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
index 16b172aee453..7af7b448ad06 100644
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -270,15 +270,12 @@ static void drm_sched_entity_kill(struct drm_sched_entity *entity)
/**
* drm_sched_entity_flush - Flush a context entity
- *
* @entity: scheduler entity
- * @timeout: time to wait in for Q to become empty in jiffies.
- *
- * Splitting drm_sched_entity_fini() into two functions, The first one does the
- * waiting, removes the entity from the runqueue and returns an error when the
- * process was killed.
+ * @timeout: time to wait in jiffies
*
* Returns: 0 if the timeout ellapsed, the remaining time otherwise.
+
+ * Waits at most @timeout jiffies for the entity's job queue to become empty.
*/
long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
{
@@ -290,7 +287,7 @@ long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
return 0;
sched = entity->rq->sched;
- /**
+ /*
* The client will not queue more IBs during this fini, consume existing
* queued IBs or discard them on SIGKILL
*/
@@ -359,8 +356,11 @@ EXPORT_SYMBOL(drm_sched_entity_fini);
* drm_sched_entity_destroy - Destroy a context entity
* @entity: scheduler entity
*
- * Calls drm_sched_entity_flush() and drm_sched_entity_fini() as a
- * convenience wrapper.
+ * Convenience wrapper for entity teardown.
+ *
+ * Teardown of entities is split into two functions. The first one,
+ * drm_sched_entity_flush(), waits for the entity to become empty. The second
+ * one, drm_sched_entity_fini(), does the actual cleanup of the entity object.
*/
void drm_sched_entity_destroy(struct drm_sched_entity *entity)
{
--
2.47.0
next prev parent reply other threads:[~2024-11-19 13:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 13:41 [PATCH 1/2] drm/sched: Fix drm_sched_entity_flush() return val Philipp Stanner
2024-11-19 13:41 ` Philipp Stanner [this message]
2024-11-19 14:27 ` [PATCH 2/2] drm/sched: Fix docu of drm_sched_entity_flush() Christian König
2024-11-19 15:49 ` Philipp Stanner
2024-11-21 21:01 ` kernel test robot
2024-11-19 13:48 ` [PATCH 1/2] drm/sched: Fix drm_sched_entity_flush() return val Philipp Stanner
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=20241119134122.21950-3-pstanner@redhat.com \
--to=pstanner@redhat.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltuikov89@gmail.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®