mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h
When sending a H2G message where a reply is expected in guc_submission_send_busy_loop(), outstanding_submission_g2h is incremented before the send. However, if there is an error sending the message, outstanding_submission_g2h is decremented without checking if a reply is expected. Therefore, check if reply is expected when there is a failure before decrementing outstanding_submission_g2h. Fixes:2f2cc53b5f("drm/i915/guc: Close deregister-context race against CT-loss") Signed-off-by: Jesus Narvaez <jesus.narvaez@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: Anshuman Gupta <anshuman.gupta@intel.com> Cc: Mousumi Jana <mousumi.jana@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://lore.kernel.org/r/20250514225224.4142684-1-jesus.narvaez@intel.com (cherry picked from commita6a26786f2) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
This commit is contained in:
parent
ed5915cfce
commit
c557fd1050
|
|
@ -633,7 +633,7 @@ static int guc_submission_send_busy_loop(struct intel_guc *guc,
|
|||
atomic_inc(&guc->outstanding_submission_g2h);
|
||||
|
||||
ret = intel_guc_send_busy_loop(guc, action, len, g2h_len_dw, loop);
|
||||
if (ret)
|
||||
if (ret && g2h_len_dw)
|
||||
atomic_dec(&guc->outstanding_submission_g2h);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user