All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karolina Stolarek <karolina.stolarek@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Amaranath Somalapuram" <asomalap@amd.com>,
	"Karolina Stolarek" <karolina.stolarek@intel.com>
Subject: [PATCH v11 01/10] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk
Date: Wed, 17 Apr 2024 15:03:14 +0200	[thread overview]
Message-ID: <4b5a19219e4a1313fd438d52431b57cb7b77b34a.1713357042.git.karolina.stolarek@intel.com> (raw)
In-Reply-To: <cover.1713357042.git.karolina.stolarek@intel.com>

BOs in a bulk move have to share the same reservation object. That is
not the case in the ttm_bo_unreserve_bulk subtest. Share bo2's resv
object with bo1 to fix the issue.

Fixes: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions")
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
---
 drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
index 1f8a4f8adc92..632306adc4a1 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
@@ -339,6 +339,9 @@ static void ttm_bo_unreserve_bulk(struct kunit *test)
 	bo1 = ttm_bo_kunit_init(test, test->priv, BO_SIZE);
 	bo2 = ttm_bo_kunit_init(test, test->priv, BO_SIZE);
 
+	/* Share the reservation object in the same bulk move */
+	bo1->base.resv = bo2->base.resv;
+
 	dma_resv_lock(bo1->base.resv, NULL);
 	ttm_bo_set_bulk_move(bo1, &lru_bulk_move);
 	dma_resv_unlock(bo1->base.resv);
-- 
2.34.1


  reply	other threads:[~2024-04-17 13:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 13:03 [PATCH v11 00/10] Improve test coverage of TTM Karolina Stolarek
2024-04-17 13:03 ` Karolina Stolarek [this message]
2024-04-18  8:15   ` [PATCH v11 01/10] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk Christian König
2024-04-18  8:21     ` Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 02/10] drm/ttm/tests: Delete unnecessary config option Karolina Stolarek
2024-04-17 14:07   ` Nirmoy Das
2024-04-17 13:03 ` [PATCH v11 03/10] drm/ttm/tests: Set DMA mask in KUnit device Karolina Stolarek
2024-04-17 13:54   ` Nirmoy Das
2024-04-17 13:03 ` [PATCH v11 04/10] drm/ttm/tests: Use an init function from the helpers lib Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 05/10] drm/ttm/tests: Test simple BO creation and validation Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 06/10] drm/ttm/tests: Add tests with mock resource managers Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 07/10] drm/ttm/tests: Add test cases dependent on fence signaling Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 08/10] drm/ttm/tests: Add eviction testing Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 09/10] drm/ttm/tests: Add tests for ttm_tt_populate Karolina Stolarek
2024-04-17 13:03 ` [PATCH v11 10/10] drm/ttm/tests: Add TODO file Karolina Stolarek

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=4b5a19219e4a1313fd438d52431b57cb7b77b34a.1713357042.git.karolina.stolarek@intel.com \
    --to=karolina.stolarek@intel.com \
    --cc=asomalap@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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.