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 03A81C54E4A for ; Fri, 8 Mar 2024 05:08:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AFA38112F83; Fri, 8 Mar 2024 05:08:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MzAh0VPU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C2A410FB99 for ; Fri, 8 Mar 2024 05:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709874474; x=1741410474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DxMSaGczLWYFVKqo8QBSePlhnxFY0njABx/SVY25j4o=; b=MzAh0VPUTVin515jDK9QqrXrFv3uTiWzsdpf3E85Sy4rlkuJ4FRHLpFz eoZ2IyF1DE7tE/FKLZI1Jy84mVlsR9BMngO85BG7FYr7Fk6O/3a6Areh9 pgtGbg7qWN8Uvw8F3PkMN09gNttupbfT8ze1rkt/15UNozlYiFOYnUxkD yYUyrVY42iEu/L1aZ47hB3xFQEdVfrdHUQBBLfos1hc5sngMh5/H/KM3j 0NclO3qU3MxSv+CAXGnqv0YWfprsvBLSS/8pk8DT4nl/zWmo4pXQ96MR/ qxHYYRfaK7i1wm9QjMY9yed7sBMYpc6NHgTtmv79VqIwQhLCib2HxIDdV Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4761965" X-IronPort-AV: E=Sophos;i="6.07,108,1708416000"; d="scan'208";a="4761965" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 21:07:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,108,1708416000"; d="scan'208";a="10402998" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 21:07:51 -0800 From: Matthew Brost To: Cc: Matthew Brost Subject: [PATCH v4 11/30] drm/xe: Move setting last fence to vm_bind_ioctl_ops_install_fences Date: Thu, 7 Mar 2024 21:07:47 -0800 Message-Id: <20240308050806.577176-12-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240308050806.577176-1-matthew.brost@intel.com> References: <20240308050806.577176-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" This moves setting of the last fence to a single location. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_vm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 8c96c98cba37..4432531f39fe 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -1841,9 +1841,6 @@ xe_vm_bind(struct xe_vm *vm, struct xe_vma *vma, struct xe_exec_queue *q, fence = xe_exec_queue_last_fence_get(wait_exec_queue, vm); } - if (last_op) - xe_exec_queue_last_fence_set(wait_exec_queue, vm, fence); - return fence; } @@ -1853,7 +1850,6 @@ xe_vm_unbind(struct xe_vm *vm, struct xe_vma *vma, u32 num_syncs, bool first_op, bool last_op) { struct dma_fence *fence; - struct xe_exec_queue *wait_exec_queue = to_wait_exec_queue(vm, q); xe_vm_assert_held(vm); xe_bo_assert_held(xe_vma_bo(vma)); @@ -1862,9 +1858,6 @@ xe_vm_unbind(struct xe_vm *vm, struct xe_vma *vma, if (IS_ERR(fence)) return fence; - if (last_op) - xe_exec_queue_last_fence_set(wait_exec_queue, vm, fence); - return fence; } @@ -2820,6 +2813,7 @@ static void vm_bind_ioctl_ops_install_fences(struct xe_vm *vm, struct xe_vma_ops *vops, struct dma_fence *fence) { + struct xe_exec_queue *wait_exec_queue = to_wait_exec_queue(vm, vops->q); struct xe_vma_op *op; int i; @@ -2832,6 +2826,7 @@ static void vm_bind_ioctl_ops_install_fences(struct xe_vm *vm, } for (i = 0; i < vops->num_syncs; i++) xe_sync_entry_signal(vops->syncs + i, NULL, fence); + xe_exec_queue_last_fence_set(wait_exec_queue, vm, fence); dma_fence_put(fence); } -- 2.34.1