]> git.ipfire.org Git - people/ms/linux.git/commitdiff
drm/simpledrm: Use offset-adjusted shadow-plane mapping
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 3 Aug 2021 12:59:25 +0000 (14:59 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Sun, 8 Aug 2021 18:27:40 +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
simpledrm.

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

index 08ae66b1e6f571c2ee4d30632e3b95319ee2bf6e..481b48bde0473fe56a9f56e970ce4ba130111c2b 100644 (file)
@@ -639,7 +639,7 @@ simpledrm_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
        struct simpledrm_device *sdev = simpledrm_device_of_dev(pipe->crtc.dev);
        struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
        struct drm_framebuffer *fb = plane_state->fb;
-       void *vmap = shadow_plane_state->map[0].vaddr; /* TODO: Use mapping abstraction properly */
+       void *vmap = shadow_plane_state->data[0].vaddr; /* TODO: Use mapping abstraction */
        struct drm_device *dev = &sdev->dev;
        int idx;
 
@@ -677,7 +677,7 @@ simpledrm_simple_display_pipe_update(struct drm_simple_display_pipe *pipe,
        struct simpledrm_device *sdev = simpledrm_device_of_dev(pipe->crtc.dev);
        struct drm_plane_state *plane_state = pipe->plane.state;
        struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
-       void *vmap = shadow_plane_state->map[0].vaddr; /* TODO: Use mapping abstraction properly */
+       void *vmap = shadow_plane_state->data[0].vaddr; /* TODO: Use mapping abstraction */
        struct drm_framebuffer *fb = plane_state->fb;
        struct drm_device *dev = &sdev->dev;
        struct drm_rect clip;