[Intel-xe] [PATCH] drm/xe/gt: some error handling fixes

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Wed Mar 22 13:05:11 UTC 2023


looks good to me.

Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>

On 3/22/23 12:35 PM, Matthew Auld wrote:
> Make sure we pass along the correct errors.
> 
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index daa433d0f2f5..07464ba42746 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -234,7 +234,7 @@ static int emit_nop_job(struct xe_gt *gt, struct xe_engine *e)
>   	job = xe_bb_create_wa_job(e, bb, batch_ofs);
>   	if (IS_ERR(job)) {
>   		xe_bb_free(bb, NULL);
> -		return PTR_ERR(bb);
> +		return PTR_ERR(job);
>   	}
>   
>   	xe_sched_job_arm(job);
> @@ -285,7 +285,7 @@ static int emit_wa_job(struct xe_gt *gt, struct xe_engine *e)
>   	job = xe_bb_create_wa_job(e, bb, batch_ofs);
>   	if (IS_ERR(job)) {
>   		xe_bb_free(bb, NULL);
> -		return PTR_ERR(bb);
> +		return PTR_ERR(job);
>   	}
>   
>   	xe_sched_job_arm(job);
> @@ -545,8 +545,10 @@ static int all_fw_domain_init(struct xe_gt *gt)
>   
>   	if (!xe_gt_is_media_type(gt)) {
>   		gt->migrate = xe_migrate_init(gt);
> -		if (IS_ERR(gt->migrate))
> +		if (IS_ERR(gt->migrate)) {
> +			err = PTR_ERR(gt->migrate);
>   			goto err_force_wake;
> +		}
>   	} else {
>   		gt->migrate = xe_find_full_gt(gt)->migrate;
>   	}


More information about the Intel-xe mailing list