Lines Matching refs:plane
39 static inline struct tegra_plane *to_tegra_plane(struct drm_plane *plane) in to_tegra_plane() argument
41 return container_of(plane, struct tegra_plane, base); in to_tegra_plane()
413 static void tegra_plane_destroy(struct drm_plane *plane) in tegra_plane_destroy() argument
415 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_destroy()
417 drm_plane_cleanup(plane); in tegra_plane_destroy()
427 static void tegra_primary_plane_destroy(struct drm_plane *plane) in tegra_primary_plane_destroy() argument
429 tegra_plane_destroy(plane); in tegra_primary_plane_destroy()
432 static void tegra_plane_reset(struct drm_plane *plane) in tegra_plane_reset() argument
436 if (plane->state) in tegra_plane_reset()
437 __drm_atomic_helper_plane_destroy_state(plane, plane->state); in tegra_plane_reset()
439 kfree(plane->state); in tegra_plane_reset()
440 plane->state = NULL; in tegra_plane_reset()
444 plane->state = &state->base; in tegra_plane_reset()
445 plane->state->plane = plane; in tegra_plane_reset()
449 static struct drm_plane_state *tegra_plane_atomic_duplicate_state(struct drm_plane *plane) in tegra_plane_atomic_duplicate_state() argument
451 struct tegra_plane_state *state = to_tegra_plane_state(plane->state); in tegra_plane_atomic_duplicate_state()
458 __drm_atomic_helper_plane_duplicate_state(plane, ©->base); in tegra_plane_atomic_duplicate_state()
466 static void tegra_plane_atomic_destroy_state(struct drm_plane *plane, in tegra_plane_atomic_destroy_state() argument
469 __drm_atomic_helper_plane_destroy_state(plane, state); in tegra_plane_atomic_destroy_state()
482 static int tegra_plane_prepare_fb(struct drm_plane *plane, in tegra_plane_prepare_fb() argument
488 static void tegra_plane_cleanup_fb(struct drm_plane *plane, in tegra_plane_cleanup_fb() argument
493 static int tegra_plane_state_add(struct tegra_plane *plane, in tegra_plane_state_add() argument
506 tegra->planes |= WIN_A_ACT_REQ << plane->index; in tegra_plane_state_add()
511 static int tegra_plane_atomic_check(struct drm_plane *plane, in tegra_plane_atomic_check() argument
516 struct tegra_plane *tegra = to_tegra_plane(plane); in tegra_plane_atomic_check()
558 static void tegra_plane_atomic_update(struct drm_plane *plane, in tegra_plane_atomic_update() argument
561 struct tegra_plane_state *state = to_tegra_plane_state(plane->state); in tegra_plane_atomic_update()
562 struct tegra_dc *dc = to_tegra_dc(plane->state->crtc); in tegra_plane_atomic_update()
563 struct drm_framebuffer *fb = plane->state->fb; in tegra_plane_atomic_update()
564 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_atomic_update()
569 if (!plane->state->crtc || !plane->state->fb) in tegra_plane_atomic_update()
573 window.src.x = plane->state->src_x >> 16; in tegra_plane_atomic_update()
574 window.src.y = plane->state->src_y >> 16; in tegra_plane_atomic_update()
575 window.src.w = plane->state->src_w >> 16; in tegra_plane_atomic_update()
576 window.src.h = plane->state->src_h >> 16; in tegra_plane_atomic_update()
577 window.dst.x = plane->state->crtc_x; in tegra_plane_atomic_update()
578 window.dst.y = plane->state->crtc_y; in tegra_plane_atomic_update()
579 window.dst.w = plane->state->crtc_w; in tegra_plane_atomic_update()
580 window.dst.h = plane->state->crtc_h; in tegra_plane_atomic_update()
599 static void tegra_plane_atomic_disable(struct drm_plane *plane, in tegra_plane_atomic_disable() argument
602 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_atomic_disable()
649 struct tegra_plane *plane; in tegra_dc_primary_plane_create() local
654 plane = kzalloc(sizeof(*plane), GFP_KERNEL); in tegra_dc_primary_plane_create()
655 if (!plane) in tegra_dc_primary_plane_create()
661 err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, in tegra_dc_primary_plane_create()
665 kfree(plane); in tegra_dc_primary_plane_create()
669 drm_plane_helper_add(&plane->base, &tegra_primary_plane_helper_funcs); in tegra_dc_primary_plane_create()
671 return &plane->base; in tegra_dc_primary_plane_create()
678 static int tegra_cursor_atomic_check(struct drm_plane *plane, in tegra_cursor_atomic_check() argument
681 struct tegra_plane *tegra = to_tegra_plane(plane); in tegra_cursor_atomic_check()
708 static void tegra_cursor_atomic_update(struct drm_plane *plane, in tegra_cursor_atomic_update() argument
711 struct tegra_bo *bo = tegra_fb_get_plane(plane->state->fb, 0); in tegra_cursor_atomic_update()
712 struct tegra_dc *dc = to_tegra_dc(plane->state->crtc); in tegra_cursor_atomic_update()
713 struct drm_plane_state *state = plane->state; in tegra_cursor_atomic_update()
717 if (!plane->state->crtc || !plane->state->fb) in tegra_cursor_atomic_update()
770 static void tegra_cursor_atomic_disable(struct drm_plane *plane, in tegra_cursor_atomic_disable() argument
807 struct tegra_plane *plane; in tegra_dc_cursor_plane_create() local
812 plane = kzalloc(sizeof(*plane), GFP_KERNEL); in tegra_dc_cursor_plane_create()
813 if (!plane) in tegra_dc_cursor_plane_create()
823 plane->index = 6; in tegra_dc_cursor_plane_create()
828 err = drm_universal_plane_init(drm, &plane->base, 1 << dc->pipe, in tegra_dc_cursor_plane_create()
832 kfree(plane); in tegra_dc_cursor_plane_create()
836 drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs); in tegra_dc_cursor_plane_create()
838 return &plane->base; in tegra_dc_cursor_plane_create()
841 static void tegra_overlay_plane_destroy(struct drm_plane *plane) in tegra_overlay_plane_destroy() argument
843 tegra_plane_destroy(plane); in tegra_overlay_plane_destroy()
877 struct tegra_plane *plane; in tegra_dc_overlay_plane_create() local
882 plane = kzalloc(sizeof(*plane), GFP_KERNEL); in tegra_dc_overlay_plane_create()
883 if (!plane) in tegra_dc_overlay_plane_create()
886 plane->index = index; in tegra_dc_overlay_plane_create()
891 err = drm_universal_plane_init(drm, &plane->base, 1 << dc->pipe, in tegra_dc_overlay_plane_create()
895 kfree(plane); in tegra_dc_overlay_plane_create()
899 drm_plane_helper_add(&plane->base, &tegra_overlay_plane_helper_funcs); in tegra_dc_overlay_plane_create()
901 return &plane->base; in tegra_dc_overlay_plane_create()
906 struct drm_plane *plane; in tegra_dc_add_planes() local
910 plane = tegra_dc_overlay_plane_create(drm, dc, 1 + i); in tegra_dc_add_planes()
911 if (IS_ERR(plane)) in tegra_dc_add_planes()
912 return PTR_ERR(plane); in tegra_dc_add_planes()