From: Matthew Brost Date: Thu, 9 Sep 2021 16:47:26 +0000 (-0700) Subject: drm/i915/guc: Process all G2H message at once in work queue X-Git-Tag: baikal/mips/sdk6.1~7173^2~8^2~92 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=83af8213adbe34fb84a98b7524aa82d74fb7a7be;p=kernel.git drm/i915/guc: Process all G2H message at once in work queue Rather than processing 1 G2H at a time and re-queuing the work queue if more messages exist, process all the G2H in a single pass of the work queue. Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio Cc: Daniel Vetter Cc: Michal Wajdeczko Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-6-matthew.brost@intel.com --- diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c index 22b4733b55e2b..20c710a744987 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c @@ -1042,9 +1042,9 @@ static void ct_incoming_request_worker_func(struct work_struct *w) container_of(w, struct intel_guc_ct, requests.worker); bool done; - done = ct_process_incoming_requests(ct); - if (!done) - queue_work(system_unbound_wq, &ct->requests.worker); + do { + done = ct_process_incoming_requests(ct); + } while (!done); } static int ct_handle_event(struct intel_guc_ct *ct, struct ct_incoming_msg *request)