[PATCH v2 1/2] drm/xe: Remove unused code in devcoredump_snapshot()

Dong, Zhanjun zhanjun.dong at intel.com
Thu Jul 3 14:38:12 UTC 2025


LGTM
Reviewed-by: Zhanjun Dong <zhanjun.dong at intel.com>

Regards,
Zhanjun Dong

On 2025-07-03 3:41 a.m., Shuicheng Lin wrote:
> The deleted code is no longer needed bacause patch ecb633646391("drm/xe/guc: Plumb GuC-capture
> into dev coredump") has removed the related usage code.
> Remove the code to tidy up the function.
> 
> Cc: Zhanjun Dong <zhanjun.dong at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_devcoredump.c | 12 ------------
>   1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
> index 7a8af2311318..94625010abc4 100644
> --- a/drivers/gpu/drm/xe/xe_devcoredump.c
> +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
> @@ -313,13 +313,9 @@ static void devcoredump_snapshot(struct xe_devcoredump *coredump,
>   {
>   	struct xe_devcoredump_snapshot *ss = &coredump->snapshot;
>   	struct xe_guc *guc = exec_queue_to_guc(q);
> -	u32 adj_logical_mask = q->logical_mask;
> -	u32 width_mask = (0x1 << q->width) - 1;
>   	const char *process_name = "no process";
> -
>   	unsigned int fw_ref;
>   	bool cookie;
> -	int i;
>   
>   	ss->snapshot_time = ktime_get_real();
>   	ss->boot_time = ktime_get_boottime();
> @@ -335,14 +331,6 @@ static void devcoredump_snapshot(struct xe_devcoredump *coredump,
>   	INIT_WORK(&ss->work, xe_devcoredump_deferred_snap_work);
>   
>   	cookie = dma_fence_begin_signalling();
> -	for (i = 0; q->width > 1 && i < XE_HW_ENGINE_MAX_INSTANCE;) {
> -		if (adj_logical_mask & BIT(i)) {
> -			adj_logical_mask |= width_mask << i;
> -			i += q->width;
> -		} else {
> -			++i;
> -		}
> -	}
>   
>   	/* keep going if fw fails as we still want to save the memory and SW data */
>   	fw_ref = xe_force_wake_get(gt_to_fw(q->gt), XE_FORCEWAKE_ALL);



More information about the Intel-xe mailing list