Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH v2 1/2] drm/xe/guc: Split g2h worker function
Date: Thu,  6 Jun 2024 15:06:38 +0200	[thread overview]
Message-ID: <20240606130639.1504-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240606130639.1504-1-michal.wajdeczko@intel.com>

In the next patch we will want to perform the same steps that
g2h worker function is doing but from the different worker.

Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index c1f258348f5c..08cf355e2e56 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -1260,9 +1260,8 @@ static int dequeue_one_g2h(struct xe_guc_ct *ct)
 	return 1;
 }
 
-static void g2h_worker_func(struct work_struct *w)
+static void receive_g2h(struct xe_guc_ct *ct)
 {
-	struct xe_guc_ct *ct = container_of(w, struct xe_guc_ct, g2h_worker);
 	struct xe_gt *gt = ct_to_gt(ct);
 	bool ongoing;
 	int ret;
@@ -1311,6 +1310,13 @@ static void g2h_worker_func(struct work_struct *w)
 		xe_pm_runtime_put(ct_to_xe(ct));
 }
 
+static void g2h_worker_func(struct work_struct *w)
+{
+	struct xe_guc_ct *ct = container_of(w, struct xe_guc_ct, g2h_worker);
+
+	receive_g2h(ct);
+}
+
 static void guc_ctb_snapshot_capture(struct xe_device *xe, struct guc_ctb *ctb,
 				     struct guc_ctb_snapshot *snapshot,
 				     bool atomic)
-- 
2.43.0


  reply	other threads:[~2024-06-06 13:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 13:06 [PATCH v2 0/2] Allow CTB G2H processing without G2H IRQ Michal Wajdeczko
2024-06-06 13:06 ` Michal Wajdeczko [this message]
2024-06-06 16:10   ` [PATCH v2 1/2] drm/xe/guc: Split g2h worker function Matthew Brost
2024-06-06 13:06 ` [PATCH v2 2/2] drm/xe/guc: Allow CTB G2H processing without G2H IRQ Michal Wajdeczko
2024-06-06 16:14   ` Matthew Brost
2024-06-06 13:36 ` ✓ CI.Patch_applied: success for Allow CTB G2H processing without G2H IRQ (rev2) Patchwork
2024-06-06 13:37 ` ✓ CI.checkpatch: " Patchwork
2024-06-06 13:38 ` ✓ CI.KUnit: " Patchwork
2024-06-06 13:49 ` ✓ CI.Build: " Patchwork
2024-06-06 13:49 ` ✗ CI.Hooks: failure " Patchwork
2024-06-06 13:51 ` ✓ CI.checksparse: success " Patchwork
2024-06-06 20:08 ` ✗ CI.FULL: failure " Patchwork
2024-06-07 10:19   ` Michal Wajdeczko
2024-06-07 20:18 ` [PATCH v2 0/2] Allow CTB G2H processing without G2H IRQ Cavitt, Jonathan

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=20240606130639.1504-2-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@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