drm/vc4: Correct arithmetic for shifting between columns of SAND images

Commit 69dbba71ac ("drm/vc4: Add algorithmic handling for SAND")
lost a multiplication by the tile width when doing the pointer arithmetic
for cropping off columns for vc6.

Correct that computation.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2025-03-19 15:34:04 +00:00
committed by Dom Cobley
parent ac1f355b1a
commit 1e93c19b8b

View File

@@ -1519,7 +1519,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
tile = src_x / pix_per_tile; tile = src_x / pix_per_tile;
offsets[i] += pitch[i] * tile; offsets[i] += pitch[i] * tile * tile_width;
offsets[i] += src_y / (i ? v_subsample : 1) * tile_width; offsets[i] += src_y / (i ? v_subsample : 1) * tile_width;
offsets[i] += x_off & ~(i ? 1 : 0); offsets[i] += x_off & ~(i ? 1 : 0);
} }
@@ -1995,7 +1995,7 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
tile = src_x / pix_per_tile; tile = src_x / pix_per_tile;
offsets[i] += pitch[i] * tile; offsets[i] += pitch[i] * tile * tile_width;
offsets[i] += src_y / (i ? v_subsample : 1) * tile_width; offsets[i] += src_y / (i ? v_subsample : 1) * tile_width;
offsets[i] += x_off & ~(i ? 1 : 0); offsets[i] += x_off & ~(i ? 1 : 0);