Lines Matching refs:format
54 static size_t gud_xrgb8888_to_r124(u8 *dst, const struct drm_format_info *format, in gud_xrgb8888_to_r124() argument
58 unsigned int block_width = drm_format_info_block_width(format, 0); in gud_xrgb8888_to_r124()
65 WARN_ON_ONCE(format->char_per_block[0] != 1); in gud_xrgb8888_to_r124()
71 len = drm_format_info_min_pitch(format, 0, width) * height; in gud_xrgb8888_to_r124()
100 static size_t gud_xrgb8888_to_color(u8 *dst, const struct drm_format_info *format, in gud_xrgb8888_to_color() argument
104 unsigned int block_width = drm_format_info_block_width(format, 0); in gud_xrgb8888_to_color()
114 len = drm_format_info_min_pitch(format, 0, width) * drm_rect_height(rect); in gud_xrgb8888_to_color()
133 switch (format->format) { in gud_xrgb8888_to_color()
150 const struct drm_format_info *format, struct drm_rect *rect, in gud_prep_flush() argument
161 pitch = drm_format_info_min_pitch(format, 0, drm_rect_width(rect)); in gud_prep_flush()
185 if (format != fb->format) { in gud_prep_flush()
186 if (format->format == GUD_DRM_FORMAT_R1) { in gud_prep_flush()
187 len = gud_xrgb8888_to_r124(buf, format, vaddr, fb, rect); in gud_prep_flush()
192 } else if (format->format == DRM_FORMAT_R8) { in gud_prep_flush()
194 } else if (format->format == DRM_FORMAT_RGB332) { in gud_prep_flush()
196 } else if (format->format == DRM_FORMAT_RGB565) { in gud_prep_flush()
198 } else if (format->format == DRM_FORMAT_RGB888) { in gud_prep_flush()
201 len = gud_xrgb8888_to_color(buf, format, vaddr, fb, rect); in gud_prep_flush()
203 } else if (gud_is_big_endian() && format->cpp[0] > 1) { in gud_prep_flush()
280 const struct drm_format_info *format, struct drm_rect *rect) in gud_flush_rect() argument
288 ret = gud_prep_flush(gdrm, fb, format, rect, &req); in gud_flush_rect()
362 const struct drm_format_info *format; in gud_flush_work() local
382 format = fb->format; in gud_flush_work()
383 if (format->format == DRM_FORMAT_XRGB8888 && gdrm->xrgb8888_emulation_format) in gud_flush_work()
384 format = gdrm->xrgb8888_emulation_format; in gud_flush_work()
387 pitch = drm_format_info_min_pitch(format, 0, drm_rect_width(&damage)); in gud_flush_work()
399 ret = gud_flush_rect(gdrm, fb, format, &rect); in gud_flush_work()
455 const struct drm_format_info *format = fb->format; in gud_pipe_check() local
468 if (old_fb && old_fb->format != format) in gud_pipe_check()
478 if (format->format == DRM_FORMAT_XRGB8888 && gdrm->xrgb8888_emulation_format) in gud_pipe_check()
479 format = gdrm->xrgb8888_emulation_format; in gud_pipe_check()
514 req->format = gud_from_fourcc(format->format); in gud_pipe_check()
515 if (WARN_ON_ONCE(!req->format)) { in gud_pipe_check()