Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3635615pxb; Mon, 24 Jan 2022 14:04:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgO2419bGpT+5L9zOhnmmodiI84iMY+bCFNzZqW0y0u1Y2wyuO4oN1lQ4UqTtJ6To6sUZa X-Received: by 2002:a05:6a00:10d5:b0:4be:d3f9:c329 with SMTP id d21-20020a056a0010d500b004bed3f9c329mr15433841pfu.2.1643061870841; Mon, 24 Jan 2022 14:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061870; cv=none; d=google.com; s=arc-20160816; b=cw7iJONDybhWnvw0YTI83F7mxcqdSVTG0msvwNeHINw13WOGHL4rFGN1Xr/2huTLRr F11h6JZkFyXgiDsxl+ueDKDhO67+hG9Rb04MqNiQpxccnMg6HAEQCfIejZzdSQydupMx gGnwMQ4mIpc73bSIrd9s8GFclMHBy+q7xghn1tMpZvO+J6ya8sWnJpIk4fX6/4Sx2zvT D0A5B3Ok0FaoHWHBANHvzxOWzkKluT9aK/Z1V7+RlKL6J4tadzmxMz+BeoUR74VVBZpf mOJuE6Dc7pwDCbYXtER3W4eSAKFx6PCsp2+LuGlcDL78OykrjQ9bp5/friqC+pOn5noE W05w== 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=+BlYrXERv/j+JCYTAf+FIsud7RAdoGSJUWHctNztjp0=; b=yvCWnQPQWXi6IGP2e709TEsvijU2KHPSJTJzngTXZso4Z8GCRyiseWrqn0sTcwKCjF tTqIbup0bvrq91K/IjJGMuCmB0N/3k6kSaUb4bIiyjQbxs4+cxb8pLy7COwHMeAqDVZ/ oGE9Uhp2SlLkmhke0wCFwHrR2dPOMllNlZBeUEQ4FDvb0cl9QJIaUh3MNh9ISz2HaUuV ga6wx62ZAkXTZrT+uWCGiC2im1jlT73Drm/6iaRRwKuFyR52gT4DsHJi79AnY6WF+e+V ikpvo0suxv28bAtmkROQq+6SE2sM71PjDUkh54W+pJywyzuEAbgHnQYBGaN8GuEbt+CU 52GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WWggblfS; 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 20si13055098pll.467.2022.01.24.14.04.18; Mon, 24 Jan 2022 14:04:30 -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=WWggblfS; 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 S1576350AbiAXVxZ (ORCPT + 99 others); Mon, 24 Jan 2022 16:53:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1450662AbiAXVVI (ORCPT ); Mon, 24 Jan 2022 16:21:08 -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 4203CC0604D5; Mon, 24 Jan 2022 12:15:37 -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 03487B8122D; Mon, 24 Jan 2022 20:15:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E4D1C340E5; Mon, 24 Jan 2022 20:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055334; bh=Of7o8sUp1oF0WnG3m2QjNpOrdoJeej0KI0tKW8m4LpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWggblfSrHy+k88gY4OJy9rItJfft5HNzntYLCyritFZlqc6Xzf4o0xKtdid0j59b 1wevG6FHckwW7EnPncAPUmjlQ+nie4YRX1BIARuApvec9Q6qciMMMNekvbyJtxhDp9 EpxLJk7EYe4+JAXpi6TGSYYtbK5AwJCqhkVp6M60= 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.15 075/846] drm/ttm: Put BO in its memory managers lru list Date: Mon, 24 Jan 2022 19:33:12 +0100 Message-Id: <20220124184103.575400530@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 @@ -724,6 +724,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;