summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-06-06 15:06:38 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-06-07 12:24:29 +0200
commit37e017311c650ba0502aec6ec531ed9bc84d70da (patch)
tree56bd2e2afb4cf0f99a2f7a02cc1bc18aaaa3edde
parent6800e63cf97bae62bca56d8e691544540d945f53 (diff)
downloadlwn-37e017311c650ba0502aec6ec531ed9bc84d70da.tar.gz
lwn-37e017311c650ba0502aec6ec531ed9bc84d70da.zip
drm/xe/guc: Split g2h worker function
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> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240606130639.1504-2-michal.wajdeczko@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_guc_ct.c10
1 files 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)