Lines Matching full:fb
127 struct drm_framebuffer *fb = state->fb; in drm_plane_state_to_eba() local
132 dma_obj = drm_fb_dma_get_gem_obj(fb, plane); in drm_plane_state_to_eba()
135 return dma_obj->dma_addr + fb->offsets[plane] + fb->pitches[plane] * y + in drm_plane_state_to_eba()
136 fb->format->cpp[plane] * x; in drm_plane_state_to_eba()
142 struct drm_framebuffer *fb = state->fb; in drm_plane_state_to_ubo() local
148 dma_obj = drm_fb_dma_get_gem_obj(fb, 1); in drm_plane_state_to_ubo()
151 x /= fb->format->hsub; in drm_plane_state_to_ubo()
152 y /= fb->format->vsub; in drm_plane_state_to_ubo()
154 return dma_obj->dma_addr + fb->offsets[1] + fb->pitches[1] * y + in drm_plane_state_to_ubo()
155 fb->format->cpp[1] * x - eba; in drm_plane_state_to_ubo()
161 struct drm_framebuffer *fb = state->fb; in drm_plane_state_to_vbo() local
167 dma_obj = drm_fb_dma_get_gem_obj(fb, 2); in drm_plane_state_to_vbo()
170 x /= fb->format->hsub; in drm_plane_state_to_vbo()
171 y /= fb->format->vsub; in drm_plane_state_to_vbo()
173 return dma_obj->dma_addr + fb->offsets[2] + fb->pitches[2] * y + in drm_plane_state_to_vbo()
174 fb->format->cpp[2] * x - eba; in drm_plane_state_to_vbo()
240 switch (ipu_plane->base.state->fb->format->format) { in ipu_plane_separate_alpha()
375 struct drm_framebuffer *fb = new_state->fb; in ipu_plane_atomic_check() local
376 struct drm_framebuffer *old_fb = old_state->fb; in ipu_plane_atomic_check()
382 if (!fb) in ipu_plane_atomic_check()
431 fb->format != old_fb->format)) in ipu_plane_atomic_check()
439 if (fb->pitches[0] < 1 || fb->pitches[0] > 16384) in ipu_plane_atomic_check()
442 if (old_fb && fb->pitches[0] != old_fb->pitches[0]) in ipu_plane_atomic_check()
445 if (ALIGN(fb->width, 8) * fb->format->cpp[0] > in ipu_plane_atomic_check()
446 fb->pitches[0] + fb->offsets[0]) { in ipu_plane_atomic_check()
451 switch (fb->format->format) { in ipu_plane_atomic_check()
471 if (old_fb && (fb->format == old_fb->format)) { in ipu_plane_atomic_check()
477 if (fb->pitches[1] != fb->pitches[2]) in ipu_plane_atomic_check()
488 if (old_fb && (fb->format == old_fb->format)) { in ipu_plane_atomic_check()
494 if (fb->pitches[1] < 1 || fb->pitches[1] > 16384) in ipu_plane_atomic_check()
497 if (old_fb && old_fb->pitches[1] != fb->pitches[1]) in ipu_plane_atomic_check()
504 if (((new_state->src.x1 >> 16) & (fb->format->hsub - 1)) || in ipu_plane_atomic_check()
505 ((new_state->src.y1 >> 16) & (fb->format->vsub - 1))) in ipu_plane_atomic_check()
518 if (fb->pitches[1] < 1 || fb->pitches[1] > 16384) in ipu_plane_atomic_check()
521 if (old_fb && old_fb->pitches[1] != fb->pitches[1]) in ipu_plane_atomic_check()
584 struct drm_framebuffer *fb = new_state->fb; in ipu_plane_atomic_update() local
602 !fb->format->has_alpha, 0xff, in ipu_plane_atomic_update()
611 !fb->format->has_alpha, 0xff, in ipu_plane_atomic_update()
632 height, fb->pitches[0], in ipu_plane_atomic_update()
633 fb->format->format, fb->modifier, in ipu_plane_atomic_update()
637 if (!old_state->fb || in ipu_plane_atomic_update()
638 old_state->fb->format->format != fb->format->format || in ipu_plane_atomic_update()
641 ics = ipu_drm_fourcc_to_colorspace(fb->format->format); in ipu_plane_atomic_update()
656 if (old_state->fb && !drm_atomic_crtc_needs_modeset(crtc_state)) { in ipu_plane_atomic_update()
672 ics = ipu_drm_fourcc_to_colorspace(fb->format->format); in ipu_plane_atomic_update()
688 info = drm_format_info(fb->format->format); in ipu_plane_atomic_update()
689 ipu_calculate_bursts(width, info->cpp[0], fb->pitches[0], in ipu_plane_atomic_update()
694 ipu_cpmem_set_fmt(ipu_plane->ipu_ch, fb->format->format); in ipu_plane_atomic_update()
699 ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]); in ipu_plane_atomic_update()
702 switch (fb->format->format) { in ipu_plane_atomic_update()
711 if (fb->format->format == DRM_FORMAT_YVU420 || in ipu_plane_atomic_update()
712 fb->format->format == DRM_FORMAT_YVU422 || in ipu_plane_atomic_update()
713 fb->format->format == DRM_FORMAT_YVU444) in ipu_plane_atomic_update()
717 fb->pitches[1], ubo, vbo); in ipu_plane_atomic_update()
728 fb->pitches[1], ubo, ubo); in ipu_plane_atomic_update()
754 ipu_cpmem_set_stride(ipu_plane->alpha_ch, fb->pitches[1]); in ipu_plane_atomic_update()
836 if (!plane_state->fb) { in ipu_planes_assign_pre()
841 if (!(plane_state->fb->flags & DRM_MODE_FB_MODIFIERS) || in ipu_planes_assign_pre()
842 plane_state->fb->modifier == DRM_FORMAT_MOD_LINEAR) in ipu_planes_assign_pre()
849 plane_state->fb->format->format, in ipu_planes_assign_pre()
850 plane_state->fb->modifier)) in ipu_planes_assign_pre()
861 if (!plane_state->fb) { in ipu_planes_assign_pre()
866 if ((plane_state->fb->flags & DRM_MODE_FB_MODIFIERS) && in ipu_planes_assign_pre()
867 plane_state->fb->modifier != DRM_FORMAT_MOD_LINEAR) in ipu_planes_assign_pre()
871 plane_state->fb->modifier = DRM_FORMAT_MOD_LINEAR; in ipu_planes_assign_pre()
875 plane_state->fb->format->format, in ipu_planes_assign_pre()
876 plane_state->fb->modifier)) { in ipu_planes_assign_pre()