From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80D9E10E32A for ; Fri, 15 Dec 2023 09:10:06 +0000 (UTC) From: Akshata Jahagirdar To: Subject: [PATCH i-g-t v7 5/6] lib/xe/xe_util: Align obj size before bind/unbind Date: Fri, 15 Dec 2023 13:09:46 -0800 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, matthew.auld@intel.com, Akshata Jahagirdar , akshata.jahagirdar@intel.co, ayaz.siddiqui@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Alter the range to default_alignment before vm bind/unbind operation to align the buffer object size with page size. Signed-off-by: Akshata Jahagirdar --- lib/xe/xe_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xe/xe_util.c b/lib/xe/xe_util.c index ba8eece71..6321a5729 100644 --- a/lib/xe/xe_util.c +++ b/lib/xe/xe_util.c @@ -148,7 +148,7 @@ static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(int xe, ops->flags = flags; ops->obj_offset = 0; ops->addr = obj->offset; - ops->range = obj->size; + ops->range = ALIGN(obj->size, 4096); ops->prefetch_mem_region_instance = 0; if (obj->pat_index == DEFAULT_PAT_INDEX) ops->pat_index = intel_get_pat_idx_wb(xe); -- 2.34.1