Lines Matching refs:rect

106 			       struct drm_rect *rect,
108 int (*update_rect)(struct drm_framebuffer *fb, struct drm_rect *rect);
273 struct drm_rect *rect, in st7571_prepare_buffer_monochrome() argument
282 dst_pitch = DIV_ROUND_UP(drm_rect_width(rect), 8); in st7571_prepare_buffer_monochrome()
285 drm_fb_xrgb8888_to_mono(&dst, &dst_pitch, vmap, fb, rect, fmtcnv_state); in st7571_prepare_buffer_monochrome()
289 size = (rect->x2 - rect->x1) * (rect->y2 - rect->y1) / 8; in st7571_prepare_buffer_monochrome()
298 struct drm_rect *rect, in st7571_prepare_buffer_grayscale() argument
301 u32 size = (rect->x2 - rect->x1) * (rect->y2 - rect->y1) / 8; in st7571_prepare_buffer_grayscale()
307 dst_pitch = DIV_ROUND_UP(drm_rect_width(rect), 8); in st7571_prepare_buffer_grayscale()
310 drm_fb_xrgb8888_to_mono(&dst, &dst_pitch, vmap, fb, rect, fmtcnv_state); in st7571_prepare_buffer_grayscale()
314 size = (rect->x2 - rect->x1) * (rect->y2 - rect->y1) / 8; in st7571_prepare_buffer_grayscale()
319 size = (rect->x2 - rect->x1) * (rect->y2 - rect->y1) / 4; in st7571_prepare_buffer_grayscale()
325 static int st7571_fb_update_rect_monochrome(struct drm_framebuffer *fb, struct drm_rect *rect) in st7571_fb_update_rect_monochrome() argument
331 rect->y1 = round_down(rect->y1, ST7571_PAGE_HEIGHT); in st7571_fb_update_rect_monochrome()
332 rect->y2 = min_t(unsigned int, round_up(rect->y2, ST7571_PAGE_HEIGHT), st7571->nlines); in st7571_fb_update_rect_monochrome()
334 for (int y = rect->y1; y < rect->y2; y += ST7571_PAGE_HEIGHT) { in st7571_fb_update_rect_monochrome()
335 for (int x = rect->x1; x < rect->x2; x++) in st7571_fb_update_rect_monochrome()
338 st7571_set_position(st7571, rect->x1, y); in st7571_fb_update_rect_monochrome()
341 for (int x = rect->x1; x < rect->x2; x++) in st7571_fb_update_rect_monochrome()
348 static int st7571_fb_update_rect_grayscale(struct drm_framebuffer *fb, struct drm_rect *rect) in st7571_fb_update_rect_grayscale() argument
357 rect->y1 = round_down(rect->y1, ST7571_PAGE_HEIGHT); in st7571_fb_update_rect_grayscale()
358 rect->y2 = min_t(unsigned int, round_up(rect->y2, ST7571_PAGE_HEIGHT), st7571->nlines); in st7571_fb_update_rect_grayscale()
365 x1 = rect->x1; in st7571_fb_update_rect_grayscale()
366 x2 = rect->x2; in st7571_fb_update_rect_grayscale()
369 x1 = rect->x1 * 2; in st7571_fb_update_rect_grayscale()
370 x2 = rect->x2 * 2; in st7571_fb_update_rect_grayscale()
374 for (int y = rect->y1; y < rect->y2; y += ST7571_PAGE_HEIGHT) { in st7571_fb_update_rect_grayscale()
378 st7571_set_position(st7571, rect->x1, y); in st7571_fb_update_rect_grayscale()