Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3692329pxb; Mon, 24 Jan 2022 15:31:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyok60Xyq0QEpbZzSGxOiYAebi9qDNacg50efAhkJshJuYEjUyNvyNL2+rDRVnfG0XJIT5/ X-Received: by 2002:a05:6a00:1c45:b0:4c7:9893:3452 with SMTP id s5-20020a056a001c4500b004c798933452mr13042606pfw.37.1643066955512; Mon, 24 Jan 2022 15:29:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643066955; cv=none; d=google.com; s=arc-20160816; b=F9otqheB2PBrfp2L2rKR4js+aR+7l/Of/i8Y8njMLoCyXtTuL1zpGhSdj0mmtgPpFn Ih9K3qkb6IibNz6ha7Jszs86QRA5RM04RuNReGBcFom8COFvAHOwiCbp45mbNHAnrWJL cfxyXHWZg/O1hPYreAYYgv+1Bw9Lc9EdTnnLjA3i9dfOJbq5q7BtUNTMaBcDudeo5qep jHSqoEzSZD4vIu+e606ph5EmmyTneZXMxXksjns66hHmffKHumlqEGJqOhU8urv9eZvn eqtBAIZiIL7tS3ZPjNl1SonOy0yNb4D96cFkH4fsSCTrZoDxdzmZd1BBaoCWy1hamc3N vR6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EmUlOe/oMU/TH11XUe46J6HkpApuQupWookpJSNKs5k=; b=hMJjt7Q7LkJHe6kdWaxPELxjdKOilV5hQkrGgAaA8hib+omtgNasnYik0iP+mONyBk I2RoZqfcak9i+rDQc5cS3YOd1Nojk87XuCwCJj1uez2fI6QnjR49WnbLH0Wf7gGI0kCp Tq075jsT+gsSlQNE8KdoLhP23HBNzAvP286N4jFxhE/eD6QtxX7xeRroJHivyc+sba2H hrWrGOxHo8d04gQLN+YEjU3zE2dKpeZfXJNgDDjFNgJzIgrNolFC1bZ16wjdvot1PBMZ 2QPT+cA50fzn8zmE+KtXNumoiEHstwoU4NgMVysH+1Er2ybeziBDJsSzUzBUcYINZLCP PQmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tV+Z81Lo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr1si47586pjb.60.2022.01.24.15.29.01; Mon, 24 Jan 2022 15:29:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tV+Z81Lo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1848830AbiAXXXv (ORCPT + 99 others); Mon, 24 Jan 2022 18:23:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1588126AbiAXWbj (ORCPT ); Mon, 24 Jan 2022 17:31:39 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32C32C047CD7; Mon, 24 Jan 2022 12:56:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E1B12B81233; Mon, 24 Jan 2022 20:56:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 048F3C340E5; Mon, 24 Jan 2022 20:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057800; bh=W+/+k2azZaIAX+5Yr6DtFQsLwnUIJoywgp9Jh6rhCI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tV+Z81LojYfjunB+USeoRh8Pxh5fN7VvbCXihmE+yiQyak8wzsOqP0VawCFhOAwyP idV6SerAYJiIW2P9wM5+2PNmKY7x3DODcfuSaHuKPB/o0+BRXpeTj8j9Adn9abfW/d Yeda9+4SHYQs2OokbsdmpEHiQbNGvuwWEVV5Xi+s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , xinhui pan Subject: [PATCH 5.16 0082/1039] drm/ttm: Put BO in its memory managers lru list Date: Mon, 24 Jan 2022 19:31:11 +0100 Message-Id: <20220124184127.917572817@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: xinhui pan commit 781050b0a3164934857c300bb0bc291e38c26b6f upstream. After we move BO to a new memory region, we should put it to the new memory manager's lru list regardless we unlock the resv or not. Cc: stable@vger.kernel.org Reviewed-by: Christian König Signed-off-by: xinhui pan Link: https://patchwork.freedesktop.org/patch/msgid/20211110043149.57554-1-xinhui.pan@amd.com Signed-off-by: Christian König Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -727,6 +727,8 @@ int ttm_mem_evict_first(struct ttm_devic ret = ttm_bo_evict(bo, ctx); if (locked) ttm_bo_unreserve(bo); + else + ttm_bo_move_to_lru_tail_unlocked(bo); ttm_bo_put(bo); return ret;