summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tiny
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-08-08 14:53:54 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-08-10 09:15:51 +0200
commit71bf55872cbe035820a87b2aa5fc1dc60678abfa (patch)
tree18858343f1b1354951b59f236f91ebfdafed1087 /drivers/gpu/drm/tiny
parent116d902fa9ff1f559b66bafad0f0cad90df95d21 (diff)
downloadlinux-71bf55872cbe035820a87b2aa5fc1dc60678abfa.tar.bz2
drm/format-helper: Provide drm_fb_blit()
Provide drm_fb_blit() that works with struct iosys_map. Update all users of drm_fb_blit_toio(), which required a destination buffer in I/O memory. This patch only updates the function's interface. The implementation still relies on the destination buffer to be located in I/O memory. See the follow-up patches for implementational changes. The new function's interface works with multi-plane color formats, but again implementation only supports a single plane for now. v2: * rebase onto refactored simpledrm * use IOSYS_MAP_INIT_VADDR() (Sam) * update the commit message on the use of I/O memory (Sam) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220808125406.20752-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/tiny')
-rw-r--r--drivers/gpu/drm/tiny/simpledrm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
index 82fd98f77981..a81f91814595 100644
--- a/drivers/gpu/drm/tiny/simpledrm.c
+++ b/drivers/gpu/drm/tiny/simpledrm.c
@@ -508,11 +508,10 @@ static void simpledrm_primary_plane_helper_atomic_update(struct drm_plane *plane
struct drm_plane_state *plane_state = plane->state;
struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(old_state, plane);
struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
- void *vmap = shadow_plane_state->data[0].vaddr; /* TODO: Use mapping abstraction */
struct drm_framebuffer *fb = plane_state->fb;
struct drm_device *dev = plane->dev;
struct simpledrm_device *sdev = simpledrm_device_of_dev(dev);
- void __iomem *dst = sdev->screen_base;
+ struct iosys_map dst = IOSYS_MAP_INIT_VADDR(sdev->screen_base);
struct drm_rect src_clip, dst_clip;
int idx;
@@ -529,8 +528,9 @@ static void simpledrm_primary_plane_helper_atomic_update(struct drm_plane *plane
if (!drm_dev_enter(dev, &idx))
return;
- dst += drm_fb_clip_offset(sdev->pitch, sdev->format, &dst_clip);
- drm_fb_blit_toio(dst, sdev->pitch, sdev->format->format, vmap, fb, &src_clip);
+ iosys_map_incr(&dst, drm_fb_clip_offset(sdev->pitch, sdev->format, &dst_clip));
+ drm_fb_blit(&dst, &sdev->pitch, sdev->format->format, shadow_plane_state->data, fb,
+ &src_clip);
drm_dev_exit(idx);
}