Skip to content

Commit df1d52b

Browse files
6by9pelwell
authored andcommitted
drm/vc4: plane: Swap Cb/Cr offsets for YVU formats
Follow up to "drm/vc4: plane: Swap Cb/Cr pointers for YVU formats" Swap the offsets as well as the buffer objects for YVU formats. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 889e42c commit df1d52b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,9 +2174,10 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
21742174
* TODO: This only covers Raster Scan Order planes
21752175
*/
21762176
for (i = 0; i < num_planes; i++) {
2177+
int idx = vc6_get_plane_idx(format, i);
21772178
struct drm_gem_dma_object *bo =
2178-
drm_fb_dma_get_gem_obj(fb, vc6_get_plane_idx(format, i));
2179-
dma_addr_t paddr = bo->dma_addr + fb->offsets[i] + offsets[i];
2179+
drm_fb_dma_get_gem_obj(fb, idx);
2180+
dma_addr_t paddr = bo->dma_addr + fb->offsets[idx] + offsets[idx];
21802181

21812182
/* Pointer Word 0 */
21822183
vc4_state->ptr0_offset[i] = vc4_state->dlist_count;

0 commit comments

Comments
 (0)