Message ID | MWHPR1201MB0127FE21A778A3FD2DDD9234FDAC0@MWHPR1201MB0127.namprd12.prod.outlook.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 75797600CC for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 27 Mar 2018 03:32:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59C232881E for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 27 Mar 2018 03:32:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D6F5289D0; Tue, 27 Mar 2018 03:32:59 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 D58362881E for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 27 Mar 2018 03:32:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A21A26E554; Tue, 27 Mar 2018 03:32:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0081.outbound.protection.outlook.com [104.47.33.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0A976E554; Tue, 27 Mar 2018 03:32:56 +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=9QPGEQv/6qpx5wMOpIJPDRHzb2M0X8zOja2kvMP2ZyU=; b=4FYgk0JtxwAyKA8UkjJQlfUehwJmnxYqoR770xXevFtVvWN/7UNCV4kUM/F3x9poOImi9KIByDfdKlpY8a/CwuCtfmburB0J28dNjkSIdh2xvIPKtCQ7RZ6JTcdH8TfUuqzBKUiNurjbj22Wa6np0mov7hyU7C4fLrVPJLmFn2s= Received: from MWHPR1201MB0127.namprd12.prod.outlook.com (10.174.98.142) by MWHPR1201MB0206.namprd12.prod.outlook.com (10.174.99.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Tue, 27 Mar 2018 03:32:54 +0000 Received: from MWHPR1201MB0127.namprd12.prod.outlook.com ([fe80::4962:1f7b:d630:84b6]) by MWHPR1201MB0127.namprd12.prod.outlook.com ([fe80::4962:1f7b:d630:84b6%18]) with mapi id 15.20.0609.012; Tue, 27 Mar 2018 03:32:54 +0000 From: "He, Roger" <Hongbo.He@amd.com> To: =?utf-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= <ckoenig.leichtzumerken@gmail.com>, "linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>, "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>, "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>, "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>, "sumit.semwal@linaro.org" <sumit.semwal@linaro.org> Subject: RE: [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Thread-Topic: [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Thread-Index: AQHTxCgt9Yp/Zp6e3EeHiX0vgmVynKPjcDYw Date: Tue, 27 Mar 2018 03:32:54 +0000 Message-ID: <MWHPR1201MB0127FE21A778A3FD2DDD9234FDAC0@MWHPR1201MB0127.namprd12.prod.outlook.com> References: <20180325105759.2151-1-christian.koenig@amd.com> <20180325105759.2151-3-christian.koenig@amd.com> In-Reply-To: <20180325105759.2151-3-christian.koenig@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Hongbo.He@amd.com; x-originating-ip: [116.228.147.241] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; MWHPR1201MB0206; 7:GdjXrvnbQu1vzp9B6MMW1ym4HvYO9p+d1oDsmI1bADVQLSMcba8ZDwkdX8sUaN4p7O5GC5OLVatBTGT7qUFA2kg0oqo8Yq1dMB7WUsN+Kqj/Oa+7tnYsHuvWbjykf/aPvMZ+IcOsXdlX2zXyXWHhxPjI0QzdesetD4oRmWNudeutVnKlM4UsXbH44act59bN2Qz8RQWJ4OYR0pywyL3kC5nHEMgDC+jEAUOawArtwTjacYQgl9pmk2TkJg5JeRNb; 20:gfOQCZUM923v/c/ZsmomioPRLtaVBxZ7HVw6TUKFZxYi5o6ZhtNUJmYMF4HqWzLW++J1SItG0xqmEtncEr1bGVGXKV4Ra1VWlmclxn2YX1BohC+64NgonU25vQ/dObPsW1Gt6FyWjlg6yh5LnHfwYgMnHreFs5nkLaDMY7zHKsl9vbfjXpx2xejYYbGC3mvS30X6NJDiXoV1yXZe34KXa5dHLvWhhSpDbPJIYAfLM5z+voRtkmmb2tml3DD7zTk0 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 54dea292-816f-4d7b-e1b9-08d593936d81 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:MWHPR1201MB0206; x-ms-traffictypediagnostic: MWHPR1201MB0206: x-microsoft-antispam-prvs: <MWHPR1201MB02069CA78E64078A0202CC2CFDAC0@MWHPR1201MB0206.namprd12.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(9452136761055)(767451399110)(217544274631240)(1553240931313); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:MWHPR1201MB0206; BCL:0; PCL:0; RULEID:; SRVR:MWHPR1201MB0206; x-forefront-prvs: 0624A2429E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(366004)(376002)(346002)(39860400002)(199004)(189003)(13464003)(7736002)(3660700001)(110136005)(5250100002)(55016002)(6246003)(6306002)(86362001)(9686003)(2201001)(59450400001)(3280700002)(53936002)(575784001)(102836004)(316002)(186003)(486005)(486005)(2501003)(6506007)(25786009)(229853002)(2900100001)(66066001)(26005)(53546011)(5660300001)(39060400002)(76176011)(2906002)(478600001)(72206003)(446003)(99286004)(68736007)(14454004)(966005)(81166006)(97736004)(105586002)(106356001)(74316002)(7696005)(305945005)(11346002)(8936002)(3846002)(8676002)(6116002)(81156014)(33656002)(6436002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB0206; H:MWHPR1201MB0127.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: MnfT0ix7f6K6G0KZCqqqsTyT+lnXX2l2wzdzTY9t+PgRMVZXALfajnpivUpJ8HtCmdzdgYt2ImdQUteBJJiNdXQ0wWOU1LS3Vi/FfT4DSYmbRNZ5jmJxxKgQT9vaVBMSl/B3/vSvRv5xUhu1fCCaPPX62JjVbNVR0nXScC0Ez049+Yl640jbFdeuMcUHWb/L+z1MccIgglKl6x2MA9Q7ncHzBExVdjYAMehxLCZepVbmx7J8r1affaJMkCAQzBATHTyKNLYGItsgzI8Zng30GTWwcXpSlF2u66C9TKBX0L287QZiQh06ydHAy4u3aKSiE5V+UfHCOo20mvSOz6r+tw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54dea292-816f-4d7b-e1b9-08d593936d81 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2018 03:32:54.8559 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0206 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> 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/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 98e06f8bf23b..17e821f01d0a 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1078,6 +1078,18 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, uint32_t new_flags; reservation_object_assert_held(bo->resv); + + /* + * Remove the backing store if no placement is given. + */ + if (!placement->num_placement && !placement->num_busy_placement) { + ret = ttm_bo_pipeline_gutting(bo); + if (ret) + return ret; + + return ttm_tt_create(bo, false); + } + /* * Check whether we need to move buffer. */