Lines Matching refs:plane

17 #include "plane.h"
19 static void tegra_plane_destroy(struct drm_plane *plane)
21 struct tegra_plane *p = to_tegra_plane(plane);
23 drm_plane_cleanup(plane);
27 static void tegra_plane_reset(struct drm_plane *plane)
29 struct tegra_plane *p = to_tegra_plane(plane);
33 if (plane->state)
34 __drm_atomic_helper_plane_destroy_state(plane->state);
36 kfree(plane->state);
37 plane->state = NULL;
41 plane->state = &state->base;
42 plane->state->plane = plane;
43 plane->state->zpos = p->index;
44 plane->state->normalized_zpos = p->index;
52 tegra_plane_atomic_duplicate_state(struct drm_plane *plane)
54 struct tegra_plane_state *state = to_tegra_plane_state(plane->state);
62 __drm_atomic_helper_plane_duplicate_state(plane, &copy->base);
84 static void tegra_plane_atomic_destroy_state(struct drm_plane *plane,
91 static bool tegra_plane_supports_sector_layout(struct drm_plane *plane)
95 drm_for_each_crtc(crtc, plane->dev) {
96 if (plane->possible_crtcs & drm_crtc_mask(crtc)) {
107 static bool tegra_plane_format_mod_supported(struct drm_plane *plane,
119 if (!tegra_plane_supports_sector_layout(plane))
178 dev_err(dc->dev, "failed to map plane %u: %d\n", i, err);
200 int tegra_plane_prepare_fb(struct drm_plane *plane,
209 err = drm_gem_plane_helper_prepare_fb(plane, state);
216 void tegra_plane_cleanup_fb(struct drm_plane *plane,
297 int tegra_plane_state_add(struct tegra_plane *plane,
309 /* Check plane state for visibility and calculate clipping bounds */
321 tegra->planes |= WIN_A_ACT_REQ << plane->index;
621 struct drm_plane *plane;
631 drm_for_each_plane(plane, tegra->base.dev) {
632 struct tegra_plane *p = to_tegra_plane(plane);
634 /* skip this plane and planes on different CRTCs */
639 plane);
647 static unsigned int tegra_plane_get_overlap_index(struct tegra_plane *plane,
652 WARN_ON(plane == other);
655 if (i == plane->index)
671 struct drm_plane *plane;
674 for_each_new_plane_in_state(state->base.state, plane, new, i) {
675 struct tegra_plane *p = to_tegra_plane(plane);
678 /* skip this plane and planes on different CRTCs */
695 * Missing framebuffer means that plane is disabled, in this
710 struct drm_plane *plane;
724 * transparency state for each plane.
726 drm_for_each_plane(plane, tegra->base.dev) {
727 struct tegra_plane *p = to_tegra_plane(plane);
733 new = drm_atomic_get_new_plane_state(state->base.state, plane);
738 * plane.
767 int tegra_plane_interconnect_init(struct tegra_plane *plane)
769 const char *icc_name = tegra_plane_icc_names[plane->index];
770 struct device *dev = plane->dc->dev;
771 struct tegra_dc *dc = plane->dc;
774 if (WARN_ON(plane->index >= TEGRA_DC_LEGACY_PLANES_NUM) ||
775 WARN_ON(!tegra_plane_icc_names[plane->index]))
778 plane->icc_mem = devm_of_icc_get(dev, icc_name);
779 err = PTR_ERR_OR_ZERO(plane->icc_mem);
784 /* plane B on T20/30 has a dedicated memory client for a 6-tap vertical filter */
785 if (plane->index == 1 && dc->soc->has_win_b_vfilter_mem_client) {
786 plane->icc_mem_vfilter = devm_of_icc_get(dev, "winb-vfilter");
787 err = PTR_ERR_OR_ZERO(plane->icc_mem_vfilter);