From patchwork Wed Apr 13 08:21:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthew Auld X-Patchwork-Id: 12811703 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 4D476C433EF for ; Wed, 13 Apr 2022 08:21:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A3C7E10FBE7; Wed, 13 Apr 2022 08:21:49 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F46A10FBE6; Wed, 13 Apr 2022 08:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649838107; x=1681374107; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=U69oTtnsuoF+2HIaIybh2b28ZIsOKec9noRM9rQWa2U=; b=Hd2lMZOjkAbBENGZPd2hgBBoBXl0uBoOnvnelxoJJOsTZ5s1J9sJK+Dd Cjh+WS53+HmbpVpFVG3gEEdxrWDW4A32KIq02G/nVqfkaTgie07wu5vzl aPGGyE5mLkd50/l988npTTa2tVJM4evlCZATzDD5Z5e5GKX/BmIWESDRh jD5LQay6onsbb9xx2J1zUIW+Z5EhUgj7zsqi5ogbL+J/XjGDCFNy7p3px sxdtaFSrBXQoVzvGPSght0NrTnumnHmXjtz40/UsD/QIIexNQPliELuId j3Ml2g40lWtgmXqQwJmqPskfftdnvYXpFp6H+MnEFDh5qp7WXaQq0QW5n A==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="325512932" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="325512932" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:21:46 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="573170394" Received: from jomolloy-mobl.ger.corp.intel.com (HELO mwauld-desk1.intel.com) ([10.252.23.209]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:21:45 -0700 From: Matthew Auld To: intel-gfx@lists.freedesktop.org Subject: [PATCH] drm/ttm: fixup ttm_bo_add_move_fence Date: Wed, 13 Apr 2022 09:21:33 +0100 Message-Id: <20220413082133.272445-1-matthew.auld@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , =?utf-8?q?Christian_K=C3=B6nig?= , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It looks like we still need to call dma_fence_put() on the man->move, otherwise we just end up leaking it, leading to fireworks later. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5689 Fixes: 8bb31587820a ("drm/ttm: remove bo->moving") Cc: Christian König Cc: Daniel Vetter Signed-off-by: Matthew Auld Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 015a94f766de..b15b77e10383 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -744,6 +744,8 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo, dma_fence_put(fence); return ret; } + + dma_fence_put(fence); return 0; }