Skip to content

Commit 64e69dd

Browse files
6by9popcornmix
authored andcommitted
drm/vc4: Correct arithmetic for shifting between columns of SAND images
Commit 69dbba7 ("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>
1 parent 102481c commit 64e69dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
15191519

15201520
tile = src_x / pix_per_tile;
15211521

1522-
offsets[i] += pitch[i] * tile;
1522+
offsets[i] += pitch[i] * tile * tile_width;
15231523
offsets[i] += src_y / (i ? v_subsample : 1) * tile_width;
15241524
offsets[i] += x_off & ~(i ? 1 : 0);
15251525
}
@@ -1995,7 +1995,7 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
19951995

19961996
tile = src_x / pix_per_tile;
19971997

1998-
offsets[i] += pitch[i] * tile;
1998+
offsets[i] += pitch[i] * tile * tile_width;
19991999
offsets[i] += src_y / (i ? v_subsample : 1) * tile_width;
20002000
offsets[i] += x_off & ~(i ? 1 : 0);
20012001

0 commit comments

Comments
 (0)