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 B7546C531CF for ; Thu, 19 Feb 2026 20:11:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D5F910E74C; Thu, 19 Feb 2026 20:11:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="c6tYgI21"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4DBE10E747; Thu, 19 Feb 2026 20:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771531865; x=1803067865; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4I+eHL5DZpUGnDtZRl9/I6Rj52RUYIAgScj7qSGJh6I=; b=c6tYgI21BZJxf2w+4ASOmG2LsAFe6QgJJflKOd8aOMNQ9PH4oBB9Q+Wg 6NOZRKc8REWKTAdneiv8uW61Vwn5MxJSdDJ4ZQslRiAobJtKIyCKWIN0+ 993pfUemoO6z/4lr6t4i453a6vFiNGtxuyMjIlMhQyBkBPdvVeKxylVmv M8zZVsItrEp8vJmmBDo4Gp8ALcH0Gag3GfKFDTpXd8Z/a7J49TL0pJCpG BggPHQXGvbVJHcRe5K+HKxM9qzZc0AaTmyFNy08tT1T234+irAT8EUF+Q IBPZ6BSFD0VwsU5tmdtP/6uYFJ1Crizy3u6zmYOFImJW1wrUg1vRhJqD/ g==; X-CSE-ConnectionGUID: Z0VAsYe2SM67mBL6idjypg== X-CSE-MsgGUID: bbDTDD9pTpGGYFqDYV+5zQ== X-IronPort-AV: E=McAfee;i="6800,10657,11706"; a="71654294" X-IronPort-AV: E=Sophos;i="6.21,300,1763452800"; d="scan'208";a="71654294" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2026 12:11:04 -0800 X-CSE-ConnectionGUID: 8pmg3S8OSJSPfYEVHAgNRg== X-CSE-MsgGUID: Cv1sTi3CRo6hnhz9uVmrAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,300,1763452800"; d="scan'208";a="214663967" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2026 12:11:04 -0800 From: Matthew Brost To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: leonro@nvidia.com, jgg@ziepe.ca, francois.dugast@intel.com, thomas.hellstrom@linux.intel.com, himal.prasad.ghimiray@intel.com Subject: [PATCH v5 3/5] drm/pagemap: Drop source_peer_migrates flag and assume true Date: Thu, 19 Feb 2026 12:10:55 -0800 Message-Id: <20260219201057.1010391-4-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260219201057.1010391-1-matthew.brost@intel.com> References: <20260219201057.1010391-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" All current users of DRM pagemap set source_peer_migrates to true during migration, and it is unclear whether any user would ever want to disable this for performance reasons or for features such as compression. It is also questionable whether this flag could be made to work with high-speed fabric mapping APIs. Drop the flag and make DRM pagemap unconditionally assume that source_peer_migrates is true. Signed-off-by: Matthew Brost --- drivers/gpu/drm/drm_pagemap.c | 10 ++++------ drivers/gpu/drm/xe/xe_svm.c | 1 - include/drm/drm_pagemap.h | 8 ++------ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c index 01a06d1fd1a0..32535ab01c0f 100644 --- a/drivers/gpu/drm/drm_pagemap.c +++ b/drivers/gpu/drm/drm_pagemap.c @@ -602,12 +602,10 @@ int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation, own_pages++; continue; } - if (mdetails->source_peer_migrates) { - cur.dpagemap = src_zdd->dpagemap; - cur.ops = src_zdd->devmem_allocation->ops; - cur.device = cur.dpagemap->drm->dev; - pages[i] = src_page; - } + cur.dpagemap = src_zdd->dpagemap; + cur.ops = src_zdd->devmem_allocation->ops; + cur.device = cur.dpagemap->drm->dev; + pages[i] = src_page; } if (!pages[i]) { cur.dpagemap = NULL; diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index c96ed760c077..e86e69087c7e 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -1027,7 +1027,6 @@ static int xe_drm_pagemap_populate_mm(struct drm_pagemap *dpagemap, struct xe_pagemap *xpagemap = container_of(dpagemap, typeof(*xpagemap), dpagemap); struct drm_pagemap_migrate_details mdetails = { .timeslice_ms = timeslice_ms, - .source_peer_migrates = 1, }; struct xe_vram_region *vr = xe_pagemap_to_vr(xpagemap); struct dma_fence *pre_migrate_fence = NULL; diff --git a/include/drm/drm_pagemap.h b/include/drm/drm_pagemap.h index 72f6828f2604..5c33982141c2 100644 --- a/include/drm/drm_pagemap.h +++ b/include/drm/drm_pagemap.h @@ -329,12 +329,8 @@ struct drm_pagemap_devmem { * struct drm_pagemap_migrate_details - Details to govern migration. * @timeslice_ms: The time requested for the migrated pagemap pages to * be present in @mm before being allowed to be migrated back. - * @can_migrate_same_pagemap: Whether the copy function as indicated by - * the @source_peer_migrates flag, can migrate device pages within a - * single drm_pagemap. - * @source_peer_migrates: Whether on p2p migration, The source drm_pagemap - * should use the copy_to_ram() callback rather than the destination - * drm_pagemap should use the copy_to_devmem() callback. + * @can_migrate_same_pagemap: Whether the copy function can migrate + * device pages within a single drm_pagemap. */ struct drm_pagemap_migrate_details { unsigned long timeslice_ms; -- 2.34.1