From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4826C79F85 for ; Fri, 4 Sep 2026 02:22:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C2F610E07F; Fri, 4 Sep 2026 02:22:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="aNbgEsnN"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1350010E1BB for ; Fri, 4 Sep 2026 02:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788488534; x=1820024534; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7jqq4BenHa5HnOItfb3TUeTm82VAxpVRiO36JXr47do=; b=aNbgEsnNOniO2ZBFDSPTk95qSX9TckF5YBKONJ9qB872peZhE4t1H3We nLkqacJPSJmSyU7tGYhr1NfkJixtHPbexdzobTZLrTprCD/o9/x2yBVz6 66Gi5qVEwZNm1Ds1gpfzgg4PvPfSRUvO2rJPko+wQN8WLF7GT52yMEIpc uAQcuVjE9/GgcufaCnJNHN0/wOmUplhRAziT8KcBcP6Q4P9EkanaDMRic 1PYZl6/0DJiiiOnN7wgZhQG3q+pwhMRIQkXFeAjgqrx2zwV6prW9ehlT+ pfNQ1UXMt9wOBvbOMpA+/1UyvcOeVpc5XbDqsGGqPulnmtacL4sppy+2k g==; X-CSE-ConnectionGUID: 5VQQnilvSgm9fKvu/QGn9Q== X-CSE-MsgGUID: b9RwBNVFTFe2PgTAQhlqyA== X-IronPort-AV: E=McAfee;i="6800,10657,11895"; a="106506273" X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="106506273" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2026 19:22:14 -0700 X-CSE-ConnectionGUID: gpzUSVQpQE6By6bTEsVX/g== X-CSE-MsgGUID: uUrc4JxlRP2K/H4c9MHwww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="275185106" Received: from gsse-cloud1.jf.intel.com ([10.54.39.91]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2026 19:22:13 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Cc: Francois Dugast Subject: [PATCH v5 01/25] drm/xe: Drop struct xe_migrate_pt_update argument from populate/clear vfuns Date: Thu, 3 Sep 2026 19:21:43 -0700 Message-Id: <20260904022207.3490018-2-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260904022207.3490018-1-matthew.brost@intel.com> References: <20260904022207.3490018-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Remove the xe_migrate_pt_update argument from the populate and clear vfuns. This structure will not be available in run_job, where CPU binds will be implemented. The populate path no longer needs it, and the clear path already uses the VM field instead. Signed-off-by: Matthew Brost Reviewed-by: Francois Dugast Link: https://patch.msgid.link/20260228013501.106680-2-matthew.brost@intel.com Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/xe/xe_migrate.c | 9 +++++---- drivers/gpu/drm/xe/xe_migrate.h | 12 +++++------- drivers/gpu/drm/xe/xe_pt.c | 12 +++++------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index ff45c24d8889..149c5fa654e6 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -1760,6 +1760,7 @@ static void write_pgtable(struct xe_tile *tile, struct xe_bb *bb, u64 ppgtt_ofs, struct xe_migrate_pt_update *pt_update) { const struct xe_migrate_pt_update_ops *ops = pt_update->ops; + struct xe_vm *vm = pt_update->vops->vm; u32 chunk; u32 ofs = update->ofs, size = update->qwords; @@ -1791,10 +1792,10 @@ static void write_pgtable(struct xe_tile *tile, struct xe_bb *bb, u64 ppgtt_ofs, bb->cs[bb->len++] = lower_32_bits(addr); bb->cs[bb->len++] = upper_32_bits(addr); if (pt_op->bind) - ops->populate(pt_update, tile, NULL, bb->cs + bb->len, + ops->populate(tile, NULL, bb->cs + bb->len, ofs, chunk, update); else - ops->clear(pt_update, tile, NULL, bb->cs + bb->len, + ops->clear(vm, tile, NULL, bb->cs + bb->len, ofs, chunk, update); bb->len += chunk * 2; @@ -1851,12 +1852,12 @@ xe_migrate_update_pgtables_cpu(struct xe_migrate *m, &pt_op->entries[j]; if (pt_op->bind) - ops->populate(pt_update, m->tile, + ops->populate(m->tile, &update->pt_bo->vmap, NULL, update->ofs, update->qwords, update); else - ops->clear(pt_update, m->tile, + ops->clear(vm, m->tile, &update->pt_bo->vmap, NULL, update->ofs, update->qwords, update); } diff --git a/drivers/gpu/drm/xe/xe_migrate.h b/drivers/gpu/drm/xe/xe_migrate.h index a9acc62f78f0..2ec9de896dfe 100644 --- a/drivers/gpu/drm/xe/xe_migrate.h +++ b/drivers/gpu/drm/xe/xe_migrate.h @@ -40,7 +40,6 @@ enum xe_migrate_copy_dir { struct xe_migrate_pt_update_ops { /** * @populate: Populate a command buffer or page-table with ptes. - * @pt_update: Embeddable callback argument. * @tile: The tile for the current operation. * @map: struct iosys_map into the memory to be populated. * @pos: If @map is NULL, map into the memory to be populated. @@ -52,13 +51,12 @@ struct xe_migrate_pt_update_ops { * page-table system to populate command buffers or shared * page-tables with PTEs. */ - void (*populate)(struct xe_migrate_pt_update *pt_update, - struct xe_tile *tile, struct iosys_map *map, + void (*populate)(struct xe_tile *tile, struct iosys_map *map, void *pos, u32 ofs, u32 num_qwords, const struct xe_vm_pgtable_update *update); /** * @clear: Clear a command buffer or page-table with ptes. - * @pt_update: Embeddable callback argument. + * @vm: VM being updated * @tile: The tile for the current operation. * @map: struct iosys_map into the memory to be populated. * @pos: If @map is NULL, map into the memory to be populated. @@ -70,9 +68,9 @@ struct xe_migrate_pt_update_ops { * page-table system to populate command buffers or shared * page-tables with PTEs. */ - void (*clear)(struct xe_migrate_pt_update *pt_update, - struct xe_tile *tile, struct iosys_map *map, - void *pos, u32 ofs, u32 num_qwords, + void (*clear)(struct xe_vm *vm, struct xe_tile *tile, + struct iosys_map *map, void *pos, u32 ofs, + u32 num_qwords, const struct xe_vm_pgtable_update *update); /** diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index 5d990c1c3740..854c0a59af71 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/drivers/gpu/drm/xe/xe_pt.c @@ -1092,9 +1092,8 @@ bool xe_pt_zap_ptes_range(struct xe_tile *tile, struct xe_vm *vm, } static void -xe_vm_populate_pgtable(struct xe_migrate_pt_update *pt_update, struct xe_tile *tile, - struct iosys_map *map, void *data, - u32 qword_ofs, u32 num_qwords, +xe_vm_populate_pgtable(struct xe_tile *tile, struct iosys_map *map, + void *data, u32 qword_ofs, u32 num_qwords, const struct xe_vm_pgtable_update *update) { struct xe_pt_entry *ptes = update->pt_entries; @@ -2008,12 +2007,11 @@ static unsigned int xe_pt_stage_unbind(struct xe_tile *tile, } static void -xe_migrate_clear_pgtable_callback(struct xe_migrate_pt_update *pt_update, - struct xe_tile *tile, struct iosys_map *map, - void *ptr, u32 qword_ofs, u32 num_qwords, +xe_migrate_clear_pgtable_callback(struct xe_vm *vm, struct xe_tile *tile, + struct iosys_map *map, void *ptr, + u32 qword_ofs, u32 num_qwords, const struct xe_vm_pgtable_update *update) { - struct xe_vm *vm = pt_update->vops->vm; u64 empty = __xe_pt_empty_pte(tile, vm, update->pt->level); int i; -- 2.34.1