diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-08-08 15:54:03 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-08-10 10:18:49 +0300 |
commit | 7bef64490f9bb04731d3cf46bc8f7f46e55b2e0e (patch) | |
tree | c56b3d9cca53b774f2a13c25ac2cdf269e101b7c /drivers/gpu/drm/tiny | |
parent | ce73f456744ca763ab6a9753104caf843d30fd8b (diff) | |
download | linux-7bef64490f9bb04731d3cf46bc8f7f46e55b2e0e.tar.xz |
drm/format-helper: Rework XRGB8888-to-GRAY8 conversion
Update XRGB8888-to-GRAY8 conversion to support struct iosys_map
and convert all users. Although these are single-plane color formats,
the new interface supports multi-plane formats for consistency with
drm_fb_blit().
v2:
* update documentation (Sam)
* add TODO on vaddr location (Sam)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220808125406.20752-12-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/tiny')
-rw-r--r-- | drivers/gpu/drm/tiny/st7586.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c index 94f55fac4295..b6f620b902e6 100644 --- a/drivers/gpu/drm/tiny/st7586.c +++ b/drivers/gpu/drm/tiny/st7586.c @@ -69,12 +69,15 @@ static void st7586_xrgb8888_to_gray332(u8 *dst, void *vaddr, size_t len = (clip->x2 - clip->x1) * (clip->y2 - clip->y1); unsigned int x, y; u8 *src, *buf, val; + struct iosys_map dst_map, vmap; buf = kmalloc(len, GFP_KERNEL); if (!buf) return; - drm_fb_xrgb8888_to_gray8(buf, 0, vaddr, fb, clip); + iosys_map_set_vaddr(&dst_map, buf); + iosys_map_set_vaddr(&vmap, vaddr); + drm_fb_xrgb8888_to_gray8(&dst_map, NULL, &vmap, fb, clip); src = buf; for (y = clip->y1; y < clip->y2; y++) { |