Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/igt_fb: fix stride calculation for igt_fb_get_fnv1a_crc()
@ 2024-09-11 21:00 Esha Bharadwaj
  2024-09-12  7:39 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Esha Bharadwaj @ 2024-09-11 21:00 UTC (permalink / raw)
  To: igt-dev
  Cc: adrinael, quic_abhinavk, arek, kamil.konieczny,
	juhapekka.heikkila, bhanuprakash.modem, ashutosh.dixit, robdclark,
	quic_jesszhan

fb->strides is assigned to the value returned by
calc_plane_stride() only if it was previously not set by the
caller. In the case of dumb buffer allocation, this is already
assigned by the driver.

Respect the stride requested by the driver in such cases by
using fb->strides[0] as this is assigned correctly in
calc_fb_size() only if it was previously not set by the driver.

Signed-off-by: Esha Bharadwaj <quic_ebharadw@quicinc.com>
---
 lib/igt_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ab162a5b7..ed016f07d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -4814,7 +4814,7 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)
 	void *map;
 	char *ptr;
 	int x, y, cpp = igt_drm_format_to_bpp(fb->drm_format) / 8;
-	uint32_t stride = calc_plane_stride(fb, 0);
+	uint32_t stride = fb->strides[0];
 
 	if (fb->num_planes != 1)
 		return -EINVAL;
-- 
2.34.1


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 21:00 [PATCH i-g-t] lib/igt_fb: fix stride calculation for igt_fb_get_fnv1a_crc() Esha Bharadwaj
2024-09-12  7:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-09-12  7:43 ` ✗ CI.xeBAT: failure " Patchwork
2024-09-12 13:37 ` ✗ CI.xeFULL: " Patchwork
2024-09-13  0:25 ` ✗ Fi.CI.IGT: " Patchwork
2024-09-13 15:44 ` [PATCH i-g-t] " Juha-Pekka Heikkila

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