From patchwork Tue Jan 5 03:55:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunming Zhou X-Patchwork-Id: 7952671 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C93E99F3F6 for ; Tue, 5 Jan 2016 04:16:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9BF12035D for ; Tue, 5 Jan 2016 04:16:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CC7B620303 for ; Tue, 5 Jan 2016 04:16:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FB196E4FB; Mon, 4 Jan 2016 20:16:31 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0084.outbound.protection.outlook.com [157.56.110.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94F7C6E4FB for ; Mon, 4 Jan 2016 20:16:29 -0800 (PST) Received: from BN4PR12MB0849.namprd12.prod.outlook.com (10.164.59.11) by BN4PR12MB0865.namprd12.prod.outlook.com (10.164.59.15) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 5 Jan 2016 04:02:14 +0000 Received: from CY1PR1201CA0026.namprd12.prod.outlook.com (10.169.17.164) by BN4PR12MB0849.namprd12.prod.outlook.com (10.164.59.11) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 5 Jan 2016 04:02:13 +0000 Received: from BY2NAM03FT052.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::206) by CY1PR1201CA0026.outlook.office365.com (2a01:111:e400:5b9a::36) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Tue, 5 Jan 2016 04:02:13 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp02.amd.com (165.204.84.222) by BY2NAM03FT052.mail.protection.outlook.com (10.152.85.223) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Tue, 5 Jan 2016 04:02:12 +0000 X-WSS-ID: 0O0GOJK-08-MO8-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2FB9CD22A26 for ; Mon, 4 Jan 2016 23:02:08 -0500 (EST) Received: from SATLEXCHOV02.amd.com (10.181.40.72) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 4 Jan 2016 22:03:03 -0600 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 4 Jan 2016 22:02:10 -0600 Received: from zhoucm1.amd.com (10.237.74.94) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.266.1; Tue, 5 Jan 2016 12:01:55 +0800 From: To: Subject: [PATCH 2/4] drm/ttm: zero allocation only for CPU domain Date: Tue, 5 Jan 2016 11:55:43 +0800 Message-ID: <1451966143-27368-1-git-send-email-david1.zhou@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(189002)(199003)(189998001)(2876002)(110136002)(50986999)(586003)(97736004)(101416001)(1220700001)(48376002)(11100500001)(50466002)(4326007)(1096002)(36756003)(77096005)(50226001)(33646002)(19580405001)(5008740100001)(19580395003)(53416004)(450100001)(87936001)(105586002)(47776003)(86152002)(575784001)(86362001)(5003940100001)(92566002)(5003600100002)(106466001)(2351001)(229853001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR12MB0849; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0849; 2:9h1iRFuDdCxRkU4IgH9MeJpjVsSlLxELTKQYsG/ellaUnDtqTJJxFqNqJWuu9jE5EO4+jn7umqyKEAwbaESP4UtdO5KK+HZZcEELuRemYhaOIFhSHPPQxa12BKzsxvAfMfuD5ZOkvC63Un+6Wzb3DQ==; 3:JVHJ8MbjW+Z1xBSTYf756PxdbMRQf10s3fmKDMZrJByqW/HLi8Bx4j1EJMu9iE53ua9wZk/hXcu//juwr1WdsAaEM66DQp3dqOw459AlLfQ6LkQek+rk+4HIKX+99XnUuV1PBbeGWfs++ou5K8YJgZ8SZs5vTRc7JvRIil3fcAfTwXSLyl5G64IlgUY02mqeekGULXopoVaGuV+9KRz+Tg72gcjGvQDEwmlTc6fHlu4=; 25:P48vZYov1BHEyZtuL1Cyj2DcKWnv/idbPBf42Ozfkt6MprE1niOwQhM4ewVmVEWSB4vAwGwaHPWEuk8VLTX30YJ/W6tcUJt9YP1gotF1hoP+VNTauA+h2ABaTea1B71CKQ5Yqo3ck1xraFrHM2xEfv7PXfOZSr1ovI4rGKgIU/Mi62JE0doe0FJe90AEDz1aNubB+uluRnygKPWNQUJDiWJZUFyCldv2MsxQZ8K5JFFjOHYBzFR7SWACuqs3/GxE X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN4PR12MB0849; X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0849; 20:eKEzug1sV48AFn6A5UgJhPG0RMlmqynqPW/npUDwnhpTjJC4XNJIUQ6guUH77yqZ71BL89j5HgYWVwu1hVLqBM/9syXUYfj/6Pxpkp/fB5B6iRvTG12nnlUyW5kRw2K/sZuApStlM1k/Ki15zuob9Lv6HNuxegu2y3iuaVnjxWMeEUdFx10P76A2XKob4BCG/cHZBBXSfnRlnDs3vTJHG3/+3eBzVRGjBVsukiPu4Ra8QvBRaZHkTTIVvfJ303d6wqUNuNVZIkmifz763XQjhTpidx6phC1k1vp/QLXrycYQVxb5KfA8QC+6JQTUHNl8tAnOjHEZLsk94rmpZA3dQMJGtvf3FW//vY0W6Hv+2oPQfbyfLkhwDK9ncusxvVy0ZZCI8twJWnhBYVe0g8WEbshJE9wTgIKKHD580T4YgldEdIRi9U+TQmdRC3R4TSxrUfehMCaTyuntnNQQpogt3G+FvwKvvZrDGLroyrNbO7TvJB7ptPydgPXJzQHl8ErU; 4:IOzUxItYx4477zEre/wZ51bCMD4vxuF73milsaODnUAqEzQzWwDr9uuoNhqE7OWXtPNM6zAP9nh4rFKnh4l9ygdRcxZhaEMkhcpFuM1+FEswh/yLlezzrNzgXvxMmJkPkW87BmBdES1/Lj7bTq0cA+em6o+lPPHn/QvdlGbTQX9SE0tenHYR/SRnVhwKvTYERHVCjJkaOKpcwQGeri38omeJLfBxfU9uDn+SCdPGCYB+dGL//OjenaLpBJ2z6kCpuJIaH1eHTOUwml0pgKVe45nvFs0t8fdTlh013z6GzUGgk8+QuWveIZgs7iXSMqZ3kK2oNIGtXFvMC7Ng9q+nnNoHVHhrSPrOVePZilJKbJ/rw9vyN8RfsEx6ZysKBCNmfITf8KsuTKU1wE449V9LQNmWhT1MaY3+FV4HKa5pFSs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:BN4PR12MB0849; BCL:0; PCL:0; RULEID:; SRVR:BN4PR12MB0849; X-Forefront-PRVS: 0812095267 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN4PR12MB0849; 23:3GA07F77Le1+H2uWd20pjsKHSHwWFz45m28UHdO4H?= =?us-ascii?Q?2u/kaOgb6F/4WwXGMwnMpEFX53TRaYBYBC/hDAPqXJTEb7uaHe5d/Owkxu6X?= =?us-ascii?Q?ijNjpu9BJfkukDSwewGzDanc6/vgZbdlxeCvJrKST7iZPvFry9sO1vYIxwja?= =?us-ascii?Q?FIYsWmXjzZMrKKnuKeIr18sBcUwH9BhbKa1HeVdqWXG1UNz6Hkc/g7yvhjnd?= =?us-ascii?Q?agILvj5jWZxg9s8BgcpH0lOJD1HmM7+dQvMLKEHMIBCPZeb0lHzxEv+11OTc?= =?us-ascii?Q?IzCnh0bEJNawZDTUE3jlanlm0GJMtZNRsj94OBU+USc0hQKxIn4zua8UN2a2?= =?us-ascii?Q?wOvUy+Iv6UV2UPHfbaaEuuyjLPBwNKJuLmxEaEKdLSsBkPSTulR1eYHQYfpG?= =?us-ascii?Q?IJVdMu9ee3vmz1dvmW14zTi2DNhTzCkRNVLmLs9+oXOP88fwbTNxUxXKgXRS?= =?us-ascii?Q?REFZgYB7W3QFB0+sKmFYyXtcZebz2J2S79ToW+e6iVSxwYo798XpmCXSOfHZ?= =?us-ascii?Q?Vue+ng+Sj5Dk2iQat1ijZM8251blYUdcwJPRsh11ZZQbFhyDggT/GCmc/1rk?= =?us-ascii?Q?6TZw3MSx2UyEI/cNiUg4QkeeebcjdPjagWquErkxIbZEcyDYlWgIGBuCze/H?= =?us-ascii?Q?PeTfLp5b030btXx1puc4GtKraQLd7Jmc8Wl0N9fUQbSkgdJo1jH2fouAwbkF?= =?us-ascii?Q?c5ZAcJp/PM1y4FG/0OTCbtviTDVQx7rh25yOdDKRtunFcVpV/my7lKXWvcfe?= =?us-ascii?Q?EGnHOb4O9D6QeXoVf3vwx9FfmQzv1sdyhNcaAS4M7HH0A+OXbdYFuYvYrKRn?= =?us-ascii?Q?n5U3F71hiznebGmxUwNSnOZ1617fhyGNIkY2qA4aUMv43G9u1XQBEv7E/dx4?= =?us-ascii?Q?ws753MV+2lYdjXsFKXgNntcXN7zQKDPEYamIalsoC4UFrVCL2TW6abrotTdc?= =?us-ascii?Q?fk4BRLUJFD7Fq72sRzy16rq6rdHD2m9+kaamTekTye43zaDOwavAKF7f7evG?= =?us-ascii?Q?cziqPLTqdZdlxLtX9CYKRCtvqtPgebUWCyiwkQ1+GsQ5A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0849; 5:YSP7HI2a54pBAv1JxGajpMb/hT5c6/EA2NJIfiJyBb8XNOdiMCMLQA4HpGLZ8RO4JrzI9oA16EKs6jbnb9T2ymPkalZNvhubmUiOaEee4IckiIcH//noKlNjUmTOSJHodT7L46OKobvBPjtUJPqkqg==; 24:+cZCdRIz1amu3fmconm6Dk32NZWDnkmeAVlIKTngnT/tqaMo/fDhvc88l3gXGtwfjkyIRiADQ17rozf85riwTSnCJdqrdhF/KhhvfUUcCGo=; 20:u1QCzzhu8Iub7cCnLIZByBovr8lU6nhkh4Gf2UzPssQxxjKuvhQbaGgsOJXKiiZemm1WjW2Fu5PTdAfGDW5GPzvJoqdcl2foJCopLp3N8SYxiimOe1mxvGYEJ7ZI+P35HcIv9d5UlZ9uL927F6iPeX8cnvOi7w3oiwWKy5XEfrbeH3rL+y1RZQu2fgc1gnH0FtQgDzYmLO2v14LkVREuRX0FglhioVodEKvqyaHEdfTC94FX8jOL4R9J45h+Q4nK SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2016 04:02:12.7283 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.222]; Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR12MB0849 X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0865; 2:sJEsZoC6gAq72sP4NzLqoYtj/aMd34+W5Yqm6L/KZVtrSfOzk4/tw3sWyPOgYUM41hDP8vkSOGAdZmenl3XWAMtt3cgN1Ff8aMEjBVEfGBAyGtB8ywJSST2SHSH7Q+y6vlTxIwc2kbYRHVsqNy70dA==; 23:UJP9DLGMpXjKb2XbbbSZleTmMgLEPxIlI9PPfQ2alIDuvqlWAAjW87mKEIJS7IJ0YH6pg4bgeSwvBpcwCzv8icpDKjGUZ1hJJWcyY9bdT4W6cUGvcQC5HOj6iNCI75KbCY8TMPnR32SVoRdN7MwrgCwOvxXRAhqGWadq4Vc+YIQ4pTkFV61a1pABOLqjFLui X-OriginatorOrg: amd.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chunming Zhou Change-Id: I653d61e32faaa11c39bb978bf90301513a0c35b8 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 745e996..0633b65 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -301,6 +301,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) { if (bo->ttm == NULL) { bool zero = !(old_man->flags & TTM_MEMTYPE_FLAG_FIXED); + zero = (mem->mem_type == TTM_PL_SYSTEM) ? zero : false; ret = ttm_bo_add_ttm(bo, zero); if (ret) goto out_err;