Message ID | 1526014680-4644-2-git-send-email-Jerry.Zhang@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70B9E602B1 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 11 May 2018 04:58:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49960287F5 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 11 May 2018 04:58:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CE1D288A2; Fri, 11 May 2018 04:58:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BCF8C287F5 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 11 May 2018 04:58:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 825B56E369; Fri, 11 May 2018 04:58:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0059.outbound.protection.outlook.com [104.47.37.59]) by gabe.freedesktop.org (Postfix) with ESMTPS id C07926E367; Fri, 11 May 2018 04:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9cEbLPSsmuoB9LKapM4E2W2bXcU2GCl+GXgQXjl5JCA=; b=Ih1yZh4K6GXoSkE00xTVJg57UFvteWREreqL2JygAESRInGSkLDf7sq65BOZZE4vFStJVGCXaB6Nnq164puQa+OElPf0rJxFRdG07b58WpmKYzNZQ+RRcsdOz4VUkzHsOGbXOVm0OHoKjt5JiyQcmgX3jXXbf/IZdDflkNNtk28= Received: from DM3PR12CA0047.namprd12.prod.outlook.com (2603:10b6:0:56::15) by BN4PR12MB0756.namprd12.prod.outlook.com (2a01:111:e400:59bc::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Fri, 11 May 2018 04:58:09 +0000 Received: from BY2NAM03FT042.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::209) by DM3PR12CA0047.outlook.office365.com (2603:10b6:0:56::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.755.16 via Frontend Transport; Fri, 11 May 2018 04:58:09 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) 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 SATLEXCHOV01.amd.com (165.204.84.17) by BY2NAM03FT042.mail.protection.outlook.com (10.152.85.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.735.16 via Frontend Transport; Fri, 11 May 2018 04:58:08 +0000 Received: from junwei-u1404.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.382.0; Thu, 10 May 2018 23:58:06 -0500 From: Junwei Zhang <Jerry.Zhang@amd.com> To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org> Subject: [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization Date: Fri, 11 May 2018 12:58:00 +0800 Message-ID: <1526014680-4644-2-git-send-email-Jerry.Zhang@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526014680-4644-1-git-send-email-Jerry.Zhang@amd.com> References: <1526014680-4644-1-git-send-email-Jerry.Zhang@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(376002)(396003)(346002)(2980300002)(428003)(189003)(199004)(47776003)(486006)(476003)(126002)(446003)(11346002)(2616005)(5660300001)(72206003)(426003)(53416004)(336012)(105586002)(53936002)(6666003)(110136005)(4326008)(450100002)(316002)(106466001)(478600001)(36756003)(104016004)(81156014)(86362001)(26005)(2906002)(50226002)(81166006)(50466002)(68736007)(16586007)(356003)(186003)(54906003)(8676002)(7696005)(77096007)(97736004)(76176011)(8936002)(305945005)(48376002)(51416003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR12MB0756; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT042; 1:YYXvZ6CMGKXrkGO8+rlENoq/pyQG5WUcQhSVOX2r4TF67g9Q7ibqhx2ObtTPtwUhFX2bQ2MpiarbKPNB0VTmZlVU4AyEsxN1zGSAsetJVYE3KKAI+ivK+IixC33G6diG X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060); SRVR:BN4PR12MB0756; X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 3:30C85tOQ0Edk32Yp0RyTL6E9SkxwL57g/Z/k4PvGsp3FukAW7+Es3I4XUT9l52ythrJ+52Fglbzb5nDyKjZwSvmyPgdfC2SFNxnODjCBqJTTUT4pjmPSaJxi8tVJ8AIR515DdvdgU6d+0ofyQFgClfsGY49YFGs658nHmvXRl/U4/ENpypNLyn6KyfqvcPCew6R8hQIp7mRfSeTUPQarJWZAsoymM6MbFV5CyHaYK9Z384Zlas6KpyEA8zdX3Eg/w0ByLAeNK+DjCb/L3u6wt9jOgB+IabHvf9WT7SjIaUvX3eNXV705bKyCuoLZtRgsKpBYo1zbNNRBHLVOTx1mF6ZWIVHvVTcdugq+uF3p4ho=; 25:UCSk+9Uz441CsyoY2ClyIkbzjDN/Lwv2IHpaDwgd5fNDE485zIiwwAUJdIuhtIaXyHMJr60xZNUHkwHRrggyhVl1SEySIkfnVycFxgAJHVe+P7a+Z7Hdb6nxLz0solryWCyMyqk80qbd+D2b0dsIxc8QUXS6VjHkXVCoGgdtAtGsfrfPWMdtpiDq7Hjy1WyQ1pqMVR1SBFEFVEED9gyGjqTW7BiqmABUHJMAqNIUGhSYv1V0UvzrvIPvfFMLQMYQMWbaRxE85YR9rmuGAAg1CxzeIoRsXlWtLa91QLJEgWpkiebDgSXZiSqpKcXtDr2EyuPmizA07tBZiWJm68PyYQ== X-MS-TrafficTypeDiagnostic: BN4PR12MB0756: X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 31:j+QxywFeAAQZ734K0qHQa6i1JydrHxVmCTJWUKpVAcjo+uhGm6nBTsTzLLvNJIVLUfBP6XTWJtMg1VBYVstF2IuhD9Y4ygerhDad1BPmQHh873BOtqktn0FfQW0J9ZzbY7f9lEPD2IVf3f1gzmKholetQM7eVWr9fL7P1mzr39yee11tfxVg+WtSl4sAe555f3dBTzBP6uqzrYrKee5guWzXh2/PboZZ/n8WE2czoKs=; 20:DXJUk3LBzPMKULLCy5JZ9BV1kWBheTWnGaptxUaZxritxELW3CnlN85mmaoPKjuTVaSp2HA5/RuwbblUMV0R29UrixIeFdmH6PX3v0JFHY40Gx7Xws8ashUBVhdSVAo9dhUFEK6c+TTZTgwxDhOsEleN6wFzBSNGZ3xzGqwyn1M/S/OSqCmaS6eOTmA1oJOooItK6wZxfR7k8B1dJo0WRae+h+VbD42ueMb/dj+CKCcU3CpVM/UrunSDV58PB3ncLif028KkM7eEC15TYPejtz1Oh0Bidk6Led01NTO65MgwYuMqchDPUxQDd8YHrWic+2QF7zKO8euMudAV9+8RZlnicyEBwBeqmxNFh4WU1rejFGLev8Zga0sogGMn3RmKNRjK5McAjFX9OlelqmTq/cOux3YJKz0F9gUFBTka++D80EZoJLCYp3I44MKXo81PfuJ90couf/2TjAboj/BZdASUtJRZYdpABGU6kKtIiheRoFVT7hFTG4Q8Q0P3DKFc X-Microsoft-Antispam-PRVS: <BN4PR12MB07564BE07673AE7C83535C9AFF9F0@BN4PR12MB0756.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93003095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:BN4PR12MB0756; BCL:0; PCL:0; RULEID:; SRVR:BN4PR12MB0756; X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 4:Q+A14dfpJCDRbNzti65tY+xrrRVqjrcq8z10aU8grTHMo36TavW5PAYnR97AABDMotpsmomcqLjMxvvydqkmECuLRZhje29Fhbi+2mRcR7QFKx4a++coGbNmpWGfTxhYudZKqadhIQlCHoxShXnBB/I8fhhTThq1P1VJJY1Brq655FVP/cSjuHIK+OfaEUXJ1L/XCe6YeoC3Gc6HUNorfucEQP6nOpA5bJHgQsoYd/UYTBI31MvzvoMtm1XimtiCZ+Hdg+QXg3V+zGjJZzc1axlv13RFmkQniNnSrQ8DFKI2LReaK262ANcgpKUbo466 X-Forefront-PRVS: 06691A4183 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN4PR12MB0756; 23:j5qlmp0N9AnTAGLfny+SoPunfo3mRsnaEvphDGMCd?= =?us-ascii?Q?2eoDurb5rMdc1rs97q09O8yWt9s5CZJAZJmw4gZ2qlnUS4D6BxWECJRrxTCe?= =?us-ascii?Q?CG+q4+si/RQ0x6sIeoLAorTzmi1/tuQj9aDnuMPUqptNWjXZbLOz/Q/xn6o9?= =?us-ascii?Q?xgbH7CHj/PGYl+SkHkwIdJ1Qr20a46aHUFDByt76Yl7WDr5o1bt6c3oCyAnd?= =?us-ascii?Q?rrQHxb4yWKJnHCN0aBh/LK68yyosn4us+1IolO+d16qE9rzeUcweG7mkaFU0?= =?us-ascii?Q?Igw+yJ5u15Yz2S663d9l7neZY7UaBWzL3M3h6zNi5VTCG/VhMAcHJSDNd2yy?= =?us-ascii?Q?7QiMQFZcLmMAIt9D2VsqFEQGaBb3JYWBZuo94xw1yqzwjUIwOac+OdSrjeiU?= =?us-ascii?Q?Uagjr9EEzxdXarIKv/vZyum2z3mOPFl1Ucx+MINj03E4vBajQfttpSpAn2LT?= =?us-ascii?Q?Dh6aQmgejD4eAv1R5rCAahLAOiaIFIKXLAEkWd9mUCL9neRf4GKBofN6P1xh?= =?us-ascii?Q?E71cmqryKgwewrWAcyZpiZ6QPtXBfmWwIw7V0XTeFNuuzbaDh3IRHCxlgnDo?= =?us-ascii?Q?H97VqTeEnvD69yAttK0Mg+YSZhPOWPJnErf6cpEGiUSy8a+YxcdT6BdlLHZn?= =?us-ascii?Q?hp+2E6sF0qjledXxUIkrcNm9SGy9lxJDH6g2O2OAdEctdiCWdVul3HN4ym4q?= =?us-ascii?Q?JE3krIv/iwqkFZ2BN66qamQK1hRVSmTym/cBND/AKcJw4lw243Gs93EtFqWB?= =?us-ascii?Q?0gvh1wBs+In72VhK9BkUTaSu0oOgK7gwsh5w8akK2mKL+4H6ry4orS9BoMGm?= =?us-ascii?Q?G9n0uUJ+mne0l2fTFZojMahLZVsOsxJIYIKe0HBhuXIgLxe9FNi7OhYwNqTd?= =?us-ascii?Q?ZiVuv/ECxN6jh27aljmHAJT8yBFy2/6z5OmPdsro0aEP8ybljKQ+1Y8JP41I?= =?us-ascii?Q?81KlgCfF8oeMQoFg8kK6RAZpcn5bnvLapFlf7WZ9CR7S85D5/CbluKB6WhuK?= =?us-ascii?Q?C1O66WxZwd+jpqI6QaiidZUNGE9epmDU5GXS7jYjhf5Ezah4duuC/72qUNB6?= =?us-ascii?Q?cEigvphewt8akzMXq4xfC+scEKXiVt/7fz3v7qr4OzMal/dPln9JYAaXj2UV?= =?us-ascii?Q?Og3n81z/pIA9xUdjiYet7sL/gNqca6n77EdmGe9/ElIh5iz1tacHWKLYB39o?= =?us-ascii?Q?WJfvnW173ksR40=3D?= X-Microsoft-Antispam-Message-Info: V8oB3yrRoVa+QQjoSNTom6rWuXejfw9+hy76zIFVO3aMQ8fTQTNvne2dJ/1zj6ZxyHhg/W7SocJDupGHN6ErGA1RuCWumosuU/NBTL/neKvmeecRsVupl2WyBtvTZACss+BIUFFbaN7BG9J9iV8PYLLHU74YHijcb2LEzTgltEwAtBGfe2MuHqDEZ1z+XIy/ X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 6:93q9YgtCaTV1aPFb8B+zycif17rydbf1gyqeaz2VgphbhCSQ7CjFhhJIynopeL1Eq3V2PqWdZ6HEqmyraIQOxV58MCSBNsyJt7shpq0UjDLQ1YJ9Afx4nuOIIWP4ExbYI+lQ2wOTnydtZxrBmIsUdwA/Fg8JcOveDg0pPSkflemUOVoptrpBb5uZn/F62n3c5M+f+Hm7JhbXgIhs/UZhbI2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vO2W2LRhNkpkcvp2+H+7fZeKhUoxEX5tYJaRN9iYxDCUaRuAbcdsuZX5CF+LQ8bwtH X-MS-Office365-Filtering-Correlation-Id: 2d6d97cd-9366-4637-5c27-08d5b6fbca33 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2018 04:58:08.6171 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d6d97cd-9366-4637-5c27-08d5b6fbca33 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.17]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR12MB0756 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Junwei Zhang <Jerry.Zhang@amd.com>, christian.koenig@amd.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e62153a..6a9e46a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -419,6 +419,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo->tbo.bdev = &adev->mman.bdev; amdgpu_ttm_placement_from_domain(bo, bp->domain); + if (bp->type == ttm_bo_type_kernel) + bo->tbo.priority = 1; r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type, &bo->placement, page_align, &ctx, acc_size, @@ -434,9 +436,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, else amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0); - if (bp->type == ttm_bo_type_kernel) - bo->tbo.priority = 1; - if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) { struct dma_fence *fence;
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)