Lines Matching full:fb

53 				   void *src, struct drm_framebuffer *fb,  in gud_xrgb8888_to_r124()  argument
79 drm_fb_xrgb8888_to_gray8(&dst_map, NULL, &vmap, fb, rect, fmtcnv_state); in gud_xrgb8888_to_r124()
103 void *src, struct drm_framebuffer *fb, in gud_xrgb8888_to_color() argument
120 sbuf32 = src + (y * fb->pitches[0]); in gud_xrgb8888_to_color()
153 static int gud_prep_flush(struct gud_device *gdrm, struct drm_framebuffer *fb, in gud_prep_flush() argument
181 if (format != fb->format) { in gud_prep_flush()
183 len = gud_xrgb8888_to_r124(buf, format, vaddr, fb, rect, fmtcnv_state); in gud_prep_flush()
187 drm_fb_xrgb8888_to_gray8(&dst, NULL, src, fb, rect, fmtcnv_state); in gud_prep_flush()
189 drm_fb_xrgb8888_to_rgb332(&dst, NULL, src, fb, rect, fmtcnv_state); in gud_prep_flush()
191 drm_fb_xrgb8888_to_rgb565(&dst, NULL, src, fb, rect, fmtcnv_state, in gud_prep_flush()
194 drm_fb_xrgb8888_to_rgb888(&dst, NULL, src, fb, rect, fmtcnv_state); in gud_prep_flush()
196 len = gud_xrgb8888_to_color(buf, format, vaddr, fb, rect); in gud_prep_flush()
199 drm_fb_swab(&dst, NULL, src, fb, rect, cached_reads, fmtcnv_state); in gud_prep_flush()
200 } else if (compression && cached_reads && pitch == fb->pitches[0]) { in gud_prep_flush()
204 drm_fb_memcpy(&dst, NULL, src, fb, rect); in gud_prep_flush()
269 static int gud_flush_rect(struct gud_device *gdrm, struct drm_framebuffer *fb, in gud_flush_rect() argument
278 drm_dbg(&gdrm->drm, "Flushing [FB:%d] " DRM_RECT_FMT "\n", fb->base.id, DRM_RECT_ARG(rect)); in gud_flush_rect()
280 ret = gud_prep_flush(gdrm, fb, src, cached_reads, format, rect, &req, fmtcnv_state); in gud_flush_rect()
320 static void gud_flush_damage(struct gud_device *gdrm, struct drm_framebuffer *fb, in gud_flush_damage() argument
330 format = fb->format; in gud_flush_damage()
347 ret = gud_flush_rect(gdrm, fb, src, cached_reads, format, &rect, &fmtcnv_state); in gud_flush_damage()
351 dev_err_ratelimited(fb->dev->dev, in gud_flush_damage()
365 struct drm_framebuffer *fb; in gud_flush_work() local
373 fb = gdrm->fb; in gud_flush_work()
374 gdrm->fb = NULL; in gud_flush_work()
380 if (!fb) in gud_flush_work()
383 gud_flush_damage(gdrm, fb, &shadow_map, true, &damage); in gud_flush_work()
385 drm_framebuffer_put(fb); in gud_flush_work()
390 static int gud_fb_queue_damage(struct gud_device *gdrm, struct drm_framebuffer *fb, in gud_fb_queue_damage() argument
399 gdrm->shadow_buf = vcalloc(fb->pitches[0], fb->height); in gud_fb_queue_damage()
407 iosys_map_incr(&shadow_map, drm_fb_clip_offset(fb->pitches[0], fb->format, damage)); in gud_fb_queue_damage()
408 drm_fb_memcpy(&shadow_map, fb->pitches, src, fb, damage); in gud_fb_queue_damage()
410 if (fb != gdrm->fb) { in gud_fb_queue_damage()
411 old_fb = gdrm->fb; in gud_fb_queue_damage()
412 drm_framebuffer_get(fb); in gud_fb_queue_damage()
413 gdrm->fb = fb; in gud_fb_queue_damage()
431 static void gud_fb_handle_damage(struct gud_device *gdrm, struct drm_framebuffer *fb, in gud_fb_handle_damage() argument
437 drm_rect_init(damage, 0, 0, fb->width, fb->height); in gud_fb_handle_damage()
440 ret = gud_fb_queue_damage(gdrm, fb, src, damage); in gud_fb_handle_damage()
446 gud_flush_damage(gdrm, fb, src, !fb->obj[0]->import_attach, damage); in gud_fb_handle_damage()
457 struct drm_framebuffer *old_fb = old_plane_state->fb; in gud_pipe_check()
459 struct drm_framebuffer *fb = new_plane_state->fb; in gud_pipe_check() local
460 const struct drm_format_info *format = fb->format; in gud_pipe_check()
467 if (WARN_ON_ONCE(!fb)) in gud_pipe_check()
552 if (drm_dev_enter(fb->dev, &idx)) { in gud_pipe_check()
572 struct drm_framebuffer *fb = state->fb; in gud_pipe_update() local
580 if (gdrm->fb) { in gud_pipe_update()
581 drm_framebuffer_put(gdrm->fb); in gud_pipe_update()
582 gdrm->fb = NULL; in gud_pipe_update()
593 if (!old_state->fb) in gud_pipe_update()
596 if (fb && (crtc->state->mode_changed || crtc->state->connectors_changed)) in gud_pipe_update()
602 if (!fb) in gud_pipe_update()
605 ret = drm_gem_fb_begin_cpu_access(fb, DMA_FROM_DEVICE); in gud_pipe_update()
610 gud_fb_handle_damage(gdrm, fb, &shadow_plane_state->data[0], &damage); in gud_pipe_update()
612 drm_gem_fb_end_cpu_access(fb, DMA_FROM_DEVICE); in gud_pipe_update()