Lines Matching full:plane
16 #include "plane.h"
18 static void tegra_plane_destroy(struct drm_plane *plane) in tegra_plane_destroy() argument
20 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_destroy()
22 drm_plane_cleanup(plane); in tegra_plane_destroy()
26 static void tegra_plane_reset(struct drm_plane *plane) in tegra_plane_reset() argument
28 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_reset()
32 if (plane->state) in tegra_plane_reset()
33 __drm_atomic_helper_plane_destroy_state(plane->state); in tegra_plane_reset()
35 kfree(plane->state); in tegra_plane_reset()
36 plane->state = NULL; in tegra_plane_reset()
40 plane->state = &state->base; in tegra_plane_reset()
41 plane->state->plane = plane; in tegra_plane_reset()
42 plane->state->zpos = p->index; in tegra_plane_reset()
43 plane->state->normalized_zpos = p->index; in tegra_plane_reset()
51 tegra_plane_atomic_duplicate_state(struct drm_plane *plane) in tegra_plane_atomic_duplicate_state() argument
53 struct tegra_plane_state *state = to_tegra_plane_state(plane->state); in tegra_plane_atomic_duplicate_state()
61 __drm_atomic_helper_plane_duplicate_state(plane, ©->base); in tegra_plane_atomic_duplicate_state()
83 static void tegra_plane_atomic_destroy_state(struct drm_plane *plane, in tegra_plane_atomic_destroy_state() argument
90 static bool tegra_plane_supports_sector_layout(struct drm_plane *plane) in tegra_plane_supports_sector_layout() argument
94 drm_for_each_crtc(crtc, plane->dev) { in tegra_plane_supports_sector_layout()
95 if (plane->possible_crtcs & drm_crtc_mask(crtc)) { in tegra_plane_supports_sector_layout()
106 static bool tegra_plane_format_mod_supported(struct drm_plane *plane, in tegra_plane_format_mod_supported() argument
118 if (!tegra_plane_supports_sector_layout(plane)) in tegra_plane_format_mod_supported()
195 dev_err(dc->dev, "failed to map plane %u: %d\n", i, err); in tegra_dc_pin()
229 int tegra_plane_prepare_fb(struct drm_plane *plane, in tegra_plane_prepare_fb() argument
237 drm_gem_plane_helper_prepare_fb(plane, state); in tegra_plane_prepare_fb()
242 void tegra_plane_cleanup_fb(struct drm_plane *plane, in tegra_plane_cleanup_fb() argument
323 int tegra_plane_state_add(struct tegra_plane *plane, in tegra_plane_state_add() argument
335 /* Check plane state for visibility and calculate clipping bounds */ in tegra_plane_state_add()
347 tegra->planes |= WIN_A_ACT_REQ << plane->index; in tegra_plane_state_add()
588 struct drm_plane *plane; in tegra_plane_check_transparency() local
598 drm_for_each_plane(plane, tegra->base.dev) { in tegra_plane_check_transparency()
599 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_check_transparency()
601 /* skip this plane and planes on different CRTCs */ in tegra_plane_check_transparency()
606 plane); in tegra_plane_check_transparency()
614 static unsigned int tegra_plane_get_overlap_index(struct tegra_plane *plane, in tegra_plane_get_overlap_index() argument
619 WARN_ON(plane == other); in tegra_plane_get_overlap_index()
622 if (i == plane->index) in tegra_plane_get_overlap_index()
638 struct drm_plane *plane; in tegra_plane_update_transparency() local
641 for_each_new_plane_in_state(state->base.state, plane, new, i) { in tegra_plane_update_transparency()
642 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_update_transparency()
645 /* skip this plane and planes on different CRTCs */ in tegra_plane_update_transparency()
662 * Missing framebuffer means that plane is disabled, in this in tegra_plane_update_transparency()
677 struct drm_plane *plane; in tegra_plane_setup_transparency() local
691 * transparency state for each plane. in tegra_plane_setup_transparency()
693 drm_for_each_plane(plane, tegra->base.dev) { in tegra_plane_setup_transparency()
694 struct tegra_plane *p = to_tegra_plane(plane); in tegra_plane_setup_transparency()
700 new = drm_atomic_get_new_plane_state(state->base.state, plane); in tegra_plane_setup_transparency()
705 * plane. in tegra_plane_setup_transparency()
734 int tegra_plane_interconnect_init(struct tegra_plane *plane) in tegra_plane_interconnect_init() argument
736 const char *icc_name = tegra_plane_icc_names[plane->index]; in tegra_plane_interconnect_init()
737 struct device *dev = plane->dc->dev; in tegra_plane_interconnect_init()
738 struct tegra_dc *dc = plane->dc; in tegra_plane_interconnect_init()
741 if (WARN_ON(plane->index >= TEGRA_DC_LEGACY_PLANES_NUM) || in tegra_plane_interconnect_init()
742 WARN_ON(!tegra_plane_icc_names[plane->index])) in tegra_plane_interconnect_init()
745 plane->icc_mem = devm_of_icc_get(dev, icc_name); in tegra_plane_interconnect_init()
746 err = PTR_ERR_OR_ZERO(plane->icc_mem); in tegra_plane_interconnect_init()
753 /* plane B on T20/30 has a dedicated memory client for a 6-tap vertical filter */ in tegra_plane_interconnect_init()
754 if (plane->index == 1 && dc->soc->has_win_b_vfilter_mem_client) { in tegra_plane_interconnect_init()
755 plane->icc_mem_vfilter = devm_of_icc_get(dev, "winb-vfilter"); in tegra_plane_interconnect_init()
756 err = PTR_ERR_OR_ZERO(plane->icc_mem_vfilter); in tegra_plane_interconnect_init()