Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm/vc4: Correct address offset for planes with src_[xy] offsets #5654

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,9 +1447,9 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
vc4_state->ptr0_offset[0] = vc4_state->dlist_count;

for (i = 0; i < num_planes; i++) {
dma_addr_t paddr = drm_fb_dma_get_gem_addr(fb, state, i);
struct drm_gem_dma_object *bo = drm_fb_dma_get_gem_obj(fb, i);

vc4_dlist_write(vc4_state, paddr + offsets[i]);
vc4_dlist_write(vc4_state, bo->dma_addr + fb->offsets[i] + offsets[i]);
}

/* Pointer Context Word 0/1/2: Written by the HVS */
Expand Down Expand Up @@ -1842,9 +1842,8 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
* TODO: This only covers Raster Scan Order planes
*/
for (i = 0; i < num_planes; i++) {
dma_addr_t paddr = drm_fb_dma_get_gem_addr(fb, state, i);

paddr += offsets[i];
struct drm_gem_dma_object *bo = drm_fb_dma_get_gem_obj(fb, i);
dma_addr_t paddr = bo->dma_addr + fb->offsets[i] + offsets[i];

/* Pointer Word 0 */
vc4_state->ptr0_offset[i] = vc4_state->dlist_count;
Expand Down