Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_big_fb: Fix width calculation while creating the intel buf
@ 2024-05-07 12:30 Vinod Govindapillai
  2024-05-07 12:34 ` Juha-Pekka Heikkila
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Vinod Govindapillai @ 2024-05-07 12:30 UTC (permalink / raw)
  To: igt-dev
  Cc: vinod.govindapillai, bhanuprakash.modem, juha-pekka.heikkila,
	jani.saarinen

From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
 lib/igt_draw.c           | 2 +-
 tests/intel/kms_big_fb.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 2c01d7b02..97a7e6b37 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -650,7 +650,7 @@ static struct intel_buf *create_buf(int fd, struct buf_ops *bops,
 	uint64_t region = driver == INTEL_DRIVER_XE ? vram_if_possible(fd, 0) : -1;
 	uint64_t size = from->size;
 
-	width = from->width;
+	width = from->stride / (from->bpp / 8);
 	height = from->height;
 	if (driver == INTEL_DRIVER_XE)
 		size = ALIGN(size, xe_get_default_alignment(fd));
diff --git a/tests/intel/kms_big_fb.c b/tests/intel/kms_big_fb.c
index f7f303d41..1e45d8e42 100644
--- a/tests/intel/kms_big_fb.c
+++ b/tests/intel/kms_big_fb.c
@@ -199,7 +199,7 @@ static struct intel_buf *init_buf(data_t *data,
 	tiling = igt_fb_mod_to_tiling(fb->modifier);
 	bpp = fb->plane_bpp[0];
 	size = fb->size;
-	width = fb->width;
+	width = fb->strides[0] / (bpp / 8);
 	height = fb->height;
 
 	name = gem_flink(data->drm_fd, fb->gem_handle);
-- 
2.34.1


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

end of thread, other threads:[~2024-05-09 21:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 12:30 [PATCH i-g-t] tests/intel/kms_big_fb: Fix width calculation while creating the intel buf Vinod Govindapillai
2024-05-07 12:34 ` Juha-Pekka Heikkila
2024-05-07 19:14 ` ✗ Fi.CI.BAT: failure for " Patchwork
2024-05-08  6:33   ` Saarinen, Jani
2024-05-07 19:55 ` ✓ CI.xeBAT: success " Patchwork
2024-05-08  4:00 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-08 15:13 ` [PATCH i-g-t] " Kamil Konieczny
2024-05-08 18:39   ` Juha-Pekka Heikkilä
2024-05-09  9:23 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-05-09 21:44 ` ✗ 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