]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/vbox: Use offset-adjusted shadow-plane mappings
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 3 Aug 2021 12:59:27 +0000 (14:59 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Sun, 8 Aug 2021 18:27:49 +0000 (20:27 +0200)
For framebuffers with non-zero offset fields, shadow-plane helpers
provide a pointer to the first byte of the contained data. Use it in
vbox.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210803125928.27780-11-tzimmermann@suse.de
drivers/gpu/drm/vboxvideo/vbox_mode.c

index 972c83b720aa19504cc486b91ef0365b5917a9bf..4227a915b06ab21d049fa38e1d72407b8c93d1ef 100644 (file)
@@ -398,7 +398,7 @@ static void vbox_cursor_atomic_update(struct drm_plane *plane,
        u32 height = new_state->crtc_h;
        struct drm_shadow_plane_state *shadow_plane_state =
                to_drm_shadow_plane_state(new_state);
-       struct dma_buf_map map = shadow_plane_state->map[0];
+       struct dma_buf_map map = shadow_plane_state->data[0];
        u8 *src = map.vaddr; /* TODO: Use mapping abstraction properly */
        size_t data_size, mask_size;
        u32 flags;