All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	daniel@ffwll.ch
Subject: [PATCH 2/7] drm/ttm: remove the backing store if no placement is given
Date: Wed, 19 Feb 2020 13:59:05 +0100	[thread overview]
Message-ID: <20200219125910.89147-2-christian.koenig@amd.com> (raw)
In-Reply-To: <20200219125910.89147-1-christian.koenig@amd.com>

Pipeline removal of the BOs backing store when no 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 151edfd8de77..6d1e91be9c78 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1196,6 +1196,18 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
 	uint32_t new_flags;
 
 	dma_resv_assert_held(bo->base.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.17.1


WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	daniel@ffwll.ch
Subject: [PATCH 2/7] drm/ttm: remove the backing store if no placement is given
Date: Wed, 19 Feb 2020 13:59:05 +0100	[thread overview]
Message-ID: <20200219125910.89147-2-christian.koenig@amd.com> (raw)
In-Reply-To: <20200219125910.89147-1-christian.koenig@amd.com>

Pipeline removal of the BOs backing store when no 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 151edfd8de77..6d1e91be9c78 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1196,6 +1196,18 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
 	uint32_t new_flags;
 
 	dma_resv_assert_held(bo->base.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.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	daniel@ffwll.ch
Subject: [Intel-gfx] [PATCH 2/7] drm/ttm: remove the backing store if no placement is given
Date: Wed, 19 Feb 2020 13:59:05 +0100	[thread overview]
Message-ID: <20200219125910.89147-2-christian.koenig@amd.com> (raw)
In-Reply-To: <20200219125910.89147-1-christian.koenig@amd.com>

Pipeline removal of the BOs backing store when no 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 151edfd8de77..6d1e91be9c78 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1196,6 +1196,18 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
 	uint32_t new_flags;
 
 	dma_resv_assert_held(bo->base.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.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-19 12:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 12:59 [PATCH 1/7] dma-buf: add dynamic DMA-buf handling v15 Christian König
2020-02-19 12:59 ` [Intel-gfx] " Christian König
2020-02-19 12:59 ` Christian König
2020-02-19 12:59 ` Christian König [this message]
2020-02-19 12:59   ` [Intel-gfx] [PATCH 2/7] drm/ttm: remove the backing store if no placement is given Christian König
2020-02-19 12:59   ` Christian König
2020-02-19 12:59 ` [PATCH 3/7] drm/amdgpu: use allowed_domains for exported DMA-bufs Christian König
2020-02-19 12:59   ` [Intel-gfx] " Christian König
2020-02-19 12:59   ` Christian König
2020-02-19 12:59 ` [PATCH 4/7] drm/amdgpu: add amdgpu_dma_buf_pin/unpin v2 Christian König
2020-02-19 12:59   ` [Intel-gfx] " Christian König
2020-02-19 12:59   ` Christian König
2020-02-19 12:59 ` [PATCH 5/7] drm/amdgpu: implement amdgpu_gem_prime_move_notify v2 Christian König
2020-02-19 12:59   ` [Intel-gfx] " Christian König
2020-02-19 12:59   ` Christian König
2020-02-19 12:59 ` [PATCH 6/7] dma-buf: drop dynamic_mapping flag Christian König
2020-02-19 12:59   ` [Intel-gfx] " Christian König
2020-02-19 12:59   ` Christian König
2020-02-19 12:59 ` [PATCH 7/7] dma-buf: make move_notify mandatory if importer_ops are provided Christian König
2020-02-19 12:59   ` [Intel-gfx] " Christian König
2020-02-19 12:59   ` Christian König
2020-02-19 20:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 Patchwork
2020-02-19 20:32 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-02-22  0:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2) Patchwork
2020-02-22  1:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-24 13:52 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-02-26 10:09 ` [PATCH 1/7] dma-buf: add dynamic DMA-buf handling v15 Daniel Vetter
2020-02-26 10:09   ` [Intel-gfx] " Daniel Vetter
2020-02-26 10:09   ` Daniel Vetter
2020-03-23 13:10   ` Daniel Vetter
2020-03-23 13:10     ` [Intel-gfx] " Daniel Vetter
2020-03-23 13:10     ` Daniel Vetter

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=20200219125910.89147-2-christian.koenig@amd.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.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: link
Be 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.