Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3546394pxj; Mon, 24 May 2021 09:05:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmmWVMD39lvohmb5p1xixI6m+Nc5hE5QLHRbuBeWx9gKeS0nyZVIUmdV3cBeHOwgRU2FrM X-Received: by 2002:a92:da06:: with SMTP id z6mr16938749ilm.66.1621872349188; Mon, 24 May 2021 09:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872349; cv=none; d=google.com; s=arc-20160816; b=Gw9BKsJF5vzgClZwURcLpxq6YjXU5LmcI8QulVso5+9oU3U65gsLwhWHaQ7ZLO3cwR DPeRxFh2ZfaHQFLmR28c+DT6HjHxV3viD1mrUTty5I+6kYy+OM5YneQ/1dYKbzov3l0F Ezfvt3gtYiYnPgF+LaNrm74FxzrSimtS4hJQe2Uk4mJi3gsho5vfH43MePrIVJbtUJX2 yCk8xn5+W+/KYcob/rbkmXcwk+kF2hQDR4oWEc44tOPzbyqTAnW1xlgiz/PGgn0zlJtL qzpDZNLPOhnCtVPlWB8ndl4eRNjUt9WUfFpFPzF1s3HYsxWkBZw0ZcvhZ46K0seYS+6W npkw== 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=mCXt6iZAPNzdvRkJJ2OHlKWTGM/BWZ6Y9/weTOEs9C8=; b=oVSpNOPUIoPxcZbnS9BQf+By5br/Wl4si+oGCTM8UGtLF+7gGhkvgSSkOWsRImbyQ8 QVdUW7SpqvkPKWMmGbUmgjZ5QA5dxhPlfj8AewL/G+Z5LfGg92vbNuwR4ciTjbkIdRL8 6DhwTlcl5I9hnO2bcXDtBNgA4ADrTapSCCbEU4m6CIPaD8TP/X4eUbsWYXJdjvK2bg65 5YAobrUShlgwGhLKRHJvNS/hv3zZTvEy7mkCRb+kBWzhcKHzdYDXGElqVsewcCHKyHmx rAP/KxRNWcFY+N1eqaTpXC+1gfgogN0XylrRLokjrw6g0rKya3yazdZ48oKTAmEA2SCK NUgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h5gT2JyJ; 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 v8si7607506jat.73.2021.05.24.09.05.27; Mon, 24 May 2021 09:05:49 -0700 (PDT) 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=h5gT2JyJ; 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 S236043AbhEXQD6 (ORCPT + 99 others); Mon, 24 May 2021 12:03:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:40490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234853AbhEXP46 (ORCPT ); Mon, 24 May 2021 11:56:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 856636194C; Mon, 24 May 2021 15:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871001; bh=Q7N5BFJD1w+E3XQGJHFoJg4hWxx3QjNXlxWafl5zlYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h5gT2JyJTbt6dUpoKp2na/SxFxOD+l/3YLQfOuf1dwUtfholdDszKe/+R/FNgUArV bfHPPs/33rcP6kR4j4YZwJ05EYtYxA+CEOqTEDJ9MlINNA7nl3GDzutRxVEdJRBBMH bQJTeLeHTaMtlSfOEvpFaM0F0LHVxZmGSlbJqMIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, xinhui pan , Guchun Chen , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Sasha Levin Subject: [PATCH 5.12 027/127] drm/ttm: Do not add non-system domain BO into swap list Date: Mon, 24 May 2021 17:25:44 +0200 Message-Id: <20210524152335.763973546@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@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 [ Upstream commit ad2c28bd9a4083816fa45a7e90c2486cde8a9873 ] BO would be added into swap list if it is validated into system domain. If BO is validated again into non-system domain, say, VRAM domain. It actually should not be in the swap list. Signed-off-by: xinhui pan Acked-by: Guchun Chen Acked-by: Alex Deucher Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210224032808.150465-1-xinhui.pan@amd.com Signed-off-by: Christian König Signed-off-by: Sasha Levin --- 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 101a68dc615b..799ec7a7caa4 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -153,6 +153,8 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo, swap = &ttm_bo_glob.swap_lru[bo->priority]; list_move_tail(&bo->swap, swap); + } else { + list_del_init(&bo->swap); } if (bdev->driver->del_from_lru_notify) -- 2.30.2