From patchwork Wed Feb 24 03:28:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Pan, Xinhui" X-Patchwork-Id: 12101191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA930C433DB for ; Wed, 24 Feb 2021 03:28:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 667D264D9F for ; Wed, 24 Feb 2021 03:28:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 667D264D9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73DE46E4DD; Wed, 24 Feb 2021 03:28:30 +0000 (UTC) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2048.outbound.protection.outlook.com [40.107.92.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 290F56E4DD; Wed, 24 Feb 2021 03:28:29 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d1Z4Nc/hi7lNuatlJ5LeAzWFwvyOa477ewedpghmCqrZBCMBXb5b4yuNQzgn1QxJev2B53Ly4Vm7w3syQCGWKUuo+5fRj8TQRY6z6axN6sW6MbJxdBW4VgIiUEcHHJzrOA+pDvhz89pM5hYX7WYbkFtz5DiZ08tjNxTG/cVSmrVEVhJd87Uj0u3ONzV9mBordGTYvIOzwUrbdCkcBkCIUXYFZluDZb7vk3m1vFhoU19QkZ89y7HQdkjR9oe9n/+eM/qTBWKSYVCiqwFVC5f4kbO0ddroUTFQsn7MRnxKVyz0T1ITAdOs39mB6PL2UIss3+p/v/CxaDCdEnoEwZV2qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N+aiCrULZzJPi4UcSX3i+ewhutuTyqlHbmBIHlymalE=; b=Oa3kVU7Tio5/XYtFJp2zYcW4Sym1KA4yOE3+n6xr5eUxBXTbrniLTodye0ID2wxG/NRKUx0Hs81ukkvizHjijFJFGRwWxjqUNmA0oibRqNmZUS3JGDNisiMMutinbIJSGWcJagg1cKWM2VZ1TBp84ueZWo3UmktIrxBA/IeCdC0DWJQMwjY85LSE+ZqFZs7j6wKT/iumTO3gOTzz/UlkG6G4wVFhA2U4HeK/+y1zPGQnUaFPF1al6fNSVZ5molnQ86LPE6ZqMeeIZkSskgiesX85PPve/vh2X2bMU6B9yYSZovNBdAbA7USxznN3VIiVV++JLM8hRv1fpMyJNi0aNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N+aiCrULZzJPi4UcSX3i+ewhutuTyqlHbmBIHlymalE=; b=Nn5QyH5WzPSUTssEX5nbM3Xa3zGEP2RomR/QM29GxYrirqUnGvwkA0ykDQ7ezCMh5+n1smWOO4ETbKIZcbO5bbjPHENoYZ+kqaBoJFIo4m0diKPAONYugObg9PchjW4gh+56uCukPX/c3riryjC9zJ0bz/JbRGu2uWGD5FTykf8= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; Received: from DM5PR1201MB0057.namprd12.prod.outlook.com (2603:10b6:4:5b::23) by DM5PR1201MB0251.namprd12.prod.outlook.com (2603:10b6:4:55::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.31; Wed, 24 Feb 2021 03:28:26 +0000 Received: from DM5PR1201MB0057.namprd12.prod.outlook.com ([fe80::99bd:b7c0:520d:92dd]) by DM5PR1201MB0057.namprd12.prod.outlook.com ([fe80::99bd:b7c0:520d:92dd%11]) with mapi id 15.20.3868.033; Wed, 24 Feb 2021 03:28:26 +0000 From: xinhui pan To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/ttm: Do not add non-system domain BO into swap list Date: Wed, 24 Feb 2021 11:28:08 +0800 Message-Id: <20210224032808.150465-1-xinhui.pan@amd.com> X-Mailer: git-send-email 2.25.1 X-Originating-IP: [180.167.199.189] X-ClientProxiedBy: HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) To DM5PR1201MB0057.namprd12.prod.outlook.com (2603:10b6:4:5b::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pp-server-two.amd.com (180.167.199.189) by HK2PR03CA0051.apcprd03.prod.outlook.com (2603:1096:202:17::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.8 via Frontend Transport; Wed, 24 Feb 2021 03:28:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ee6b026a-865f-4aa6-4ac8-08d8d8743f19 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0251: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rUN7dKevQt8bi6Lg2I3g8nIzzw4kVM8lnxCV5LKfhSLaaRZ1XWkUkTAh0FuBHcMwelB7yBAKLzwN6mvI/oNOUIthi6fM9hhakrdY+xDgdHoAxquDK8vz5SBzjFTU2GFdGcsMw4w0mMbSjq1wO4ye63+ur7z90UVTO/el0UzdqrAdGEvry+eTYKwwVyBF6gT7bV0cChYJGcW35jGKSWRQfW32JHJzr5peu7zyDPcgsPX5SfMrHFszon+KzLhNj0t/qXUH3iXKHWJcLAddW09JGL1+z0i5eS+AhJTlEhs43YYFHVWeJfFAk6QxIU5mdS6ej16BY4pH1P4ObStrMZE7J1dUYJ+J8QeG2u3a/WrUfYS0gYIKmb3gYMuhxbN4XRNZtP2atUluRzoNA2MKWLp+bO3KoikQsQYTS4Ts6IyZhgIpA9N7sE/J5ldK0+UVoh93JFREd0YYDJL0WD8rmIr0kgFW0xu6XLSG2cS/yL+i7woLGwq219jQq9vvzNLPN9/kNcVOfQgzF8WrfpsMEGOyxg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR1201MB0057.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(136003)(396003)(39860400002)(376002)(2906002)(4744005)(66476007)(1076003)(316002)(66946007)(83380400001)(186003)(86362001)(6486002)(26005)(6916009)(66556008)(8936002)(956004)(6666004)(5660300002)(36756003)(2616005)(16526019)(450100002)(7696005)(478600001)(8676002)(52116002)(4326008); DI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orrZYDoQnByBnjgs6F5Mp6k1k5D0qVJk35bw3OK0p7WSCL2q+DrrqQ5AxAHXTyxF2sZOUWNX01iwH0bdFulYwOFN1X6tIC0YkM/epIey+K/yU5vpfVq+ToX7yhqlDHL3L1g1R2Wfl4ll2cwib2gjZ4/pD1A2Odc04nZpzv414DVAW8UqARgNO+Z0ivea6/T6CWHdZq0HyOXCfuR5J2DQidX3h8gSjnwqiKYHm0iymOGtGvy1JyT7ZCRHXTFp2u6iedq065dxDRNDi3cyA5Feo/BZ2aYh/7hIxj2vX0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee6b026a-865f-4aa6-4ac8-08d8d8743f19 X-MS-Exchange-CrossTenant-AuthSource: DM5PR1201MB0057.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 03:28:26.2941 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V9CyIT6fSnXB3wtsgethu0lcMJX9UmxATFqp8CNra4bz3SAinJ/4pQ35pYn4m2HO X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0251 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: alexander.deucher@amd.com, xinhui pan , christian.koenig@amd.com, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: Alex Deucher Acked-by: Guchun Chen Acked-by: Alex Deucher 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 a97d41f4ce3c..3a10bebb75d6 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -111,6 +111,8 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo, swap = &ttm_glob.swap_lru[bo->priority]; list_move_tail(&bo->swap, swap); + } else { + list_del_init(&bo->swap); } if (bdev->funcs->del_from_lru_notify)