Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/xe_ccs: fix bo size for ccs
@ 2024-03-15 16:27 Matthew Auld
  2024-03-15 17:11 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Matthew Auld @ 2024-03-15 16:27 UTC (permalink / raw)
  To: igt-dev; +Cc: Zbigniew Kempczyński, Juha-Pekka Heikkila

Don't just assume it will always fit into the default page size. When
passing in custom -W or -H the raw CCS size could be larger than BO,
leading to assertions.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/intel/xe_ccs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
index d6f5408a7..aec83a057 100644
--- a/tests/intel/xe_ccs.c
+++ b/tests/intel/xe_ccs.c
@@ -108,7 +108,7 @@ static void surf_copy(int xe,
 	const uint32_t bpp = 32;
 	uint32_t bb1, bb2, ccs, ccs2, *ccsmap, *ccsmap2;
 	uint64_t bb_size, ccssize = mid->size / CCS_RATIO(xe);
-	uint64_t ccs_bo_size = xe_get_default_alignment(xe);
+	uint64_t ccs_bo_size = ALIGN(ccssize, xe_get_default_alignment(xe));
 	uint32_t *ccscopy;
 	uint8_t uc_mocs = intel_get_uc_mocs_index(xe);
 	uint32_t sysmem = system_memory(xe);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-21  4:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-15 16:27 [PATCH i-g-t] tests/intel/xe_ccs: fix bo size for ccs Matthew Auld
2024-03-15 17:11 ` ✓ CI.xeBAT: success for " Patchwork
2024-03-15 17:33 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-18 12:34   ` Kamil Konieczny
2024-03-21  4:13     ` Illipilli, TejasreeX
2024-03-18  8:42 ` [PATCH i-g-t] " Juha-Pekka Heikkila
2024-03-20  6:35 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-03-20 17:36 ` ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox