search for: clip_offset

Displaying 4 results from an estimated 4 matches for "clip_offset".

Did you mean: cfi_offset
2019 Apr 10
1
[PATCH v2 2/3] drm: switch drm_fb_xrgb8888_to_rgb565_dstclip to accept __iomem dst
..._len, - vaddr + src_offset, fb->pitches[0], - src_len, clip->y2 - clip->y1, - swap); + /* + * The cma memory is write-combined so reads are uncached. + * Speed up by fetching one line at a time. + */ + sbuf = kmalloc(src_len, GFP_KERNEL); + if (!sbuf) + return; + + vaddr += clip_offset(clip, fb->pitches[0], sizeof(u32)); + for (y = 0; y < lines; y++) { + memcpy(sbuf, vaddr, src_len); + drm_fb_xrgb8888_to_rgb565_line(dst, sbuf, linepixels, swab); + vaddr += fb->pitches[0]; + dst += dst_len; + } + + kfree(sbuf); } EXPORT_SYMBOL(drm_fb_xrgb8888_to_rgb565); /** *...
2019 Apr 10
1
[PATCH v2 1/3] drm: switch drm_fb_memcpy_dstclip to accept __iomem dst
...lper.h> #include <drm/drm_framebuffer.h> #include <drm/drm_fourcc.h> #include <drm/drm_rect.h> -static void drm_fb_memcpy_lines(void *dst, unsigned int dst_pitch, - void *src, unsigned int src_pitch, - unsigned int linelength, unsigned int lines) +static unsigned int clip_offset(struct drm_rect *clip, + unsigned int pitch, unsigned int cpp) { - int line; - - for (line = 0; line < lines; line++) { - memcpy(dst, src, linelength); - src += src_pitch; - dst += dst_pitch; - } + return clip->y1 * pitch + clip->x1 * cpp; } /** @@ -43,35 +37,44 @@ void drm_fb_m...
2019 Apr 10
1
[PATCH v2 3/3] drm: switch drm_fb_xrgb8888_to_rgb888_dstclip to accept __iomem dst
...ls * 3; + unsigned y, lines = clip->y2 - clip->y1; + void *dbuf; - drm_fb_xrgb8888_to_rgb888_lines(dst + dst_offset, dst_pitch, - vaddr + src_offset, fb->pitches[0], - src_len, clip->y2 - clip->y1); + dbuf = kmalloc(dst_len, GFP_KERNEL); + if (!dbuf) + return; + + vaddr += clip_offset(clip, fb->pitches[0], sizeof(u32)); + dst += clip_offset(clip, dst_pitch, sizeof(u16)); + for (y = 0; y < lines; y++) { + drm_fb_xrgb8888_to_rgb888_line(dbuf, vaddr, linepixels); + memcpy_toio(dst, dbuf, dst_len); + vaddr += fb->pitches[0]; + dst += dst_len; + } + + kfree(dbuf); } EX...
2019 Apr 09
0
[PATCH 4/4] drm: add convert_lines_toio() variant, fix cirrus builds on powerpc.
...st_cpp; + u32 y; + void *dbuf; + + dbuf = kmalloc(dst_linelength, GFP_KERNEL); + if (!dbuf) + return; + + for (y = 0; y < lines; y++) { + conv->func(dbuf, src, pixels); + memcpy_toio(dst, dbuf, dst_linelength); + src += src_pitch; + dst += dst_pitch; + } + + kfree(dbuf); +} + static u32 clip_offset(struct drm_rect *clip, u32 pitch, u32 cpp) { return (clip->y1 * pitch) + (clip->x1 * cpp); @@ -143,6 +169,19 @@ static void drm_fb_memcpy_lines(void *dst, unsigned int dst_pitch, } } +static void drm_fb_memcpy_lines_toio(void __iomem *dst, unsigned int dst_pitch, + void *src,...