From: "He, Roger" <Hongbo.He@amd.com> To: "Christian König" <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 Date: Tue, 27 Mar 2018 03:32:54 +0000 [thread overview] Message-ID: <MWHPR1201MB0127FE21A778A3FD2DDD9234FDAC0@MWHPR1201MB0127.namprd12.prod.outlook.com> (raw) In-Reply-To: <20180325105759.2151-3-christian.koenig@amd.com> Acked-by: Roger He <Hongbo.He@amd.com> -----Original Message----- From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Sunday, March 25, 2018 6:58 PM To: linaro-mm-sig@lists.linaro.org; linux-media@vger.kernel.org; dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; sumit.semwal@linaro.org Subject: [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Pipeline removal of the BOs backing store when the placement is given during validation. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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. */ -- 2.14.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: "He, Roger" <Hongbo.He@amd.com> To: "Christian König" <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 Date: Tue, 27 Mar 2018 03:32:54 +0000 [thread overview] Message-ID: <MWHPR1201MB0127FE21A778A3FD2DDD9234FDAC0@MWHPR1201MB0127.namprd12.prod.outlook.com> (raw) In-Reply-To: <20180325105759.2151-3-christian.koenig@amd.com> Acked-by: Roger He <Hongbo.He@amd.com> -----Original Message----- From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Sunday, March 25, 2018 6:58 PM To: linaro-mm-sig@lists.linaro.org; linux-media@vger.kernel.org; dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; sumit.semwal@linaro.org Subject: [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Pipeline removal of the BOs backing store when the placement is given during validation. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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. */ -- 2.14.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-03-27 3:32 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-03-25 10:57 [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v3 Christian König 2018-03-25 10:57 ` Christian König 2018-03-25 10:57 ` [PATCH 2/5] drm/ttm: keep a reference to transfer pipelined BOs Christian König 2018-03-25 10:57 ` Christian König 2018-03-25 10:57 ` [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Christian König 2018-03-25 10:57 ` Christian König 2018-03-27 3:32 ` He, Roger [this message] 2018-03-27 3:32 ` He, Roger 2018-03-25 10:57 ` [PATCH 4/5] drm/amdgpu: add independent DMA-buf export v2 Christian König 2018-03-25 10:57 ` Christian König 2018-03-25 10:57 ` [PATCH 5/5] drm/amdgpu: add independent DMA-buf import v3 Christian König 2018-03-25 10:57 ` Christian König -- strict thread matches above, loose matches on Subject: below -- 2018-04-11 13:39 [PATCH 1/5] dma-buf: use parameter structure for dma_buf_attach Christian König 2018-04-11 13:39 ` [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Christian König 2018-04-11 13:39 ` Christian König 2018-03-16 13:20 RFC: unpinned DMA-buf exporting v2 Christian König 2018-03-16 13:20 ` [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Christian König 2018-03-16 13:20 ` Christian König
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=MWHPR1201MB0127FE21A778A3FD2DDD9234FDAC0@MWHPR1201MB0127.namprd12.prod.outlook.com \ --to=hongbo.he@amd.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=ckoenig.leichtzumerken@gmail.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linaro-mm-sig@lists.linaro.org \ --cc=linux-media@vger.kernel.org \ --cc=sumit.semwal@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.