[PATCH] drm/xe: Assert G2H outstanding when releasing G2H

Michal Wajdeczko michal.wajdeczko at intel.com
Fri Jul 26 12:36:17 UTC 2024



On 26.07.2024 01:18, Matthew Brost wrote:
> Ensure we are managing G2H credits correctly. Extra important now that
> this is tied to PM.
> 
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_ct.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 64afc90ad2c5..beeeb120d1fc 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -516,6 +516,7 @@ static void __g2h_release_space(struct xe_guc_ct *ct, u32 g2h_len)
>  	lockdep_assert_held(&ct->fast_lock);
>  	xe_gt_assert(ct_to_gt(ct), ct->ctbs.g2h.info.space + g2h_len <=
>  		     ct->ctbs.g2h.info.size - ct->ctbs.g2h.info.resv_space);
> +	xe_gt_assert(ct_to_gt(ct), ct->g2h_outstanding);
>  
>  	ct->ctbs.g2h.info.space += g2h_len;
>  	if (!--ct->g2h_outstanding)

this all g2h credits handling looks complex, more asserts is better,
especially since we do --ct->g2h_outstanding, so with CI happy:

Reviewed-by: Michal Wajdeczko <michal.wajdeczko at intel.com>


More information about the Intel-xe mailing list