Lines Matching defs:plane

6  * ARM Mali DP plane manipulation routines.
70 static void malidp_de_plane_destroy(struct drm_plane *plane)
72 struct malidp_plane *mp = to_malidp_plane(plane);
74 drm_plane_cleanup(plane);
83 static void malidp_plane_reset(struct drm_plane *plane)
85 struct malidp_plane_state *state = to_malidp_plane_state(plane->state);
90 plane->state = NULL;
93 __drm_atomic_helper_plane_reset(plane, &state->base);
97 drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane)
101 if (!plane->state)
108 m_state = to_malidp_plane_state(plane->state);
109 __drm_atomic_helper_plane_duplicate_state(plane, &state->base);
120 static void malidp_destroy_plane_state(struct drm_plane *plane,
205 DRM_DEBUG_KMS("AFBC buffers expect one plane\n");
253 static bool malidp_format_mod_supported_per_plane(struct drm_plane *plane,
256 return malidp_format_mod_supported(plane->dev, format, modifier);
298 /* Scaling not necessary for this plane. */
504 static int malidp_de_plane_check(struct drm_plane *plane,
507 struct malidp_plane *mp = to_malidp_plane(plane);
532 DRM_DEBUG_KMS("Invalid pitch %u for plane %d\n",
556 * DP550/650 video layers can accept 3 plane formats only if
558 * third plane stride register.
604 /* HW can't support plane + pixel blending */
682 static void malidp_de_set_color_encoding(struct malidp_plane *plane,
690 malidp_hw_write(plane->hwdev, malidp_yuv2rgb_coeffs[enc][range][i],
691 plane->layer->base + plane->layer->yuv2rgb_offset +
720 struct drm_plane *plane = &mp->base;
727 * framebuffer as per the plane's src_x, src_y co-ordinates (ie to
733 paddr = drm_fb_cma_get_gem_addr(fb, plane->state,
749 static void malidp_de_set_plane_afbc(struct drm_plane *plane)
753 struct drm_framebuffer *fb = plane->state->fb;
755 mp = to_malidp_plane(plane);
757 /* no afbc_decoder_offset means AFBC is not supported on this plane */
767 src_w = plane->state->src_w >> 16;
768 src_h = plane->state->src_h >> 16;
769 src_x = plane->state->src_x >> 16;
770 src_y = plane->state->src_y >> 16;
791 static void malidp_de_plane_update(struct drm_plane *plane,
795 struct malidp_plane_state *ms = to_malidp_plane_state(plane->state);
796 struct drm_plane_state *state = plane->state;
801 struct drm_framebuffer *fb = plane->state->fb;
803 mp = to_malidp_plane(plane);
833 if ((plane->state->color_encoding != old_state->color_encoding) ||
834 (plane->state->color_range != old_state->color_range))
835 malidp_de_set_color_encoding(mp, plane->state->color_encoding,
836 plane->state->color_range);
851 * able to use it as a drm plane.
860 malidp_de_set_plane_afbc(plane);
868 val |= ilog2(plane->state->rotation & DRM_MODE_ROTATE_MASK) <<
909 static void malidp_de_plane_disable(struct drm_plane *plane,
912 struct malidp_plane *mp = to_malidp_plane(plane);
934 struct malidp_plane *plane = NULL;
973 plane = kzalloc(sizeof(*plane), GFP_KERNEL);
974 if (!plane) {
991 ret = drm_universal_plane_init(drm, &plane->base, crtcs,
999 drm_plane_helper_add(&plane->base,
1001 plane->hwdev = malidp->dev;
1002 plane->layer = &map->layers[i];
1004 drm_plane_create_alpha_property(&plane->base);
1005 drm_plane_create_blend_mode_property(&plane->base, blend_caps);
1012 drm_plane_create_rotation_property(&plane->base, DRM_MODE_ROTATE_0, flags);
1014 plane->layer->base + MALIDP_LAYER_COMPOSE);
1022 ret = drm_plane_create_color_properties(&plane->base,
1031 malidp_de_set_color_encoding(plane, enc, range);