[PATCH i-g-t] lib/igt_fb: fix stride calculation for igt_fb_get_fnv1a_crc()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Fri Sep 13 15:44:13 UTC 2024
Hi Esha,
your change look ok. Those ci failures you got are some noise, they're
not relating to your change.
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
On 12.9.2024 0.00, Esha Bharadwaj wrote:
> 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 at 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;
More information about the igt-dev
mailing list