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 8058DC7EE31 for ; Mon, 1 May 2023 07:51:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 069C610E39C; Mon, 1 May 2023 07:51:17 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id B796410E312 for ; Mon, 1 May 2023 07:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682927472; x=1714463472; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rBHan5HSE3gaag3Oz7SBRu8x4tsgYMeNqCefbepqfg0=; b=JRJFHCvsYDaS6oS1S7f1HGcqJL0PnYDmYWVKxR1fX1+cJ8yk5k6JzU83 yL+h0pKG448KX/7aDsP1YB11em+bipYigB6SWT10SvwBlAJBT7LuxNCQy 5q++5aZRyYaVAhxn6lfaGDPLRceWWt3xJC9dFPiWn5b80vRDznLpyvmW/ xoEKUMdaa8GGxSQgArQuw65rrWmfNWD0E2P7w5yhLpOb489GZ/JVeQ+Oj pJgAve3qcVB+voAAGGMyuTtWTkXhs4W4k1ZNK1QqTmRo/Su1p9RxIS5kP g1YGkfGd5qXmMwO0Sk+Nbpqxn/VQKfa5ESTYmaNx8NsaD/uGKXlVhJrrL g==; X-IronPort-AV: E=McAfee;i="6600,9927,10696"; a="346910709" X-IronPort-AV: E=Sophos;i="5.99,239,1677571200"; d="scan'208";a="346910709" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2023 00:51:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10696"; a="870095203" X-IronPort-AV: E=Sophos;i="5.99,239,1677571200"; d="scan'208";a="870095203" Received: from lstrano-desk.jf.intel.com ([10.24.89.184]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2023 00:51:10 -0700 From: Matthew Brost To: Date: Mon, 1 May 2023 00:50:51 -0700 Message-Id: <20230501075114.3108352-8-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230501075114.3108352-1-matthew.brost@intel.com> References: <20230501075114.3108352-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH 07/30] drm/xe: Only try to lock external BOs in VM bind 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: , Cc: Matthew Brost Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Not needed and causes some issues with bulk LRU moves. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_vm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 272f0f7f24fe..6c427ff92c44 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -2064,9 +2064,11 @@ static int vm_bind_ioctl(struct xe_vm *vm, struct xe_vma *vma, */ xe_bo_get(vbo); - tv_bo.bo = &vbo->ttm; - tv_bo.num_shared = 1; - list_add(&tv_bo.head, &objs); + if (!vbo->vm) { + tv_bo.bo = &vbo->ttm; + tv_bo.num_shared = 1; + list_add(&tv_bo.head, &objs); + } } again: -- 2.34.1