Lines Matching defs:plane
6 * ARM Mali DP plane manipulation routines.
76 static void malidp_plane_reset(struct drm_plane *plane)
78 struct malidp_plane_state *state = to_malidp_plane_state(plane->state);
83 plane->state = NULL;
86 __drm_atomic_helper_plane_reset(plane, &state->base);
90 drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane)
94 if (!plane->state)
101 m_state = to_malidp_plane_state(plane->state);
102 __drm_atomic_helper_plane_duplicate_state(plane, &state->base);
113 static void malidp_destroy_plane_state(struct drm_plane *plane,
198 DRM_DEBUG_KMS("AFBC buffers expect one plane\n");
246 static bool malidp_format_mod_supported_per_plane(struct drm_plane *plane,
249 return malidp_format_mod_supported(plane->dev, format, modifier);
290 /* Scaling not necessary for this plane. */
492 static int malidp_de_plane_check(struct drm_plane *plane,
496 plane);
497 struct malidp_plane *mp = to_malidp_plane(plane);
522 DRM_DEBUG_KMS("Invalid pitch %u for plane %d\n",
546 * DP550/650 video layers can accept 3 plane formats only if
548 * third plane stride register.
594 /* HW can't support plane + pixel blending */
672 static void malidp_de_set_color_encoding(struct malidp_plane *plane,
680 malidp_hw_write(plane->hwdev, malidp_yuv2rgb_coeffs[enc][range][i],
681 plane->layer->base + plane->layer->yuv2rgb_offset +
710 struct drm_plane *plane = &mp->base;
717 * framebuffer as per the plane's src_x, src_y co-ordinates (ie to
723 dma_addr = drm_fb_dma_get_gem_addr(fb, plane->state,
739 static void malidp_de_set_plane_afbc(struct drm_plane *plane)
743 struct drm_framebuffer *fb = plane->state->fb;
745 mp = to_malidp_plane(plane);
747 /* no afbc_decoder_offset means AFBC is not supported on this plane */
757 src_w = plane->state->src_w >> 16;
758 src_h = plane->state->src_h >> 16;
759 src_x = plane->state->src_x >> 16;
760 src_y = plane->state->src_y >> 16;
781 static void malidp_de_plane_update(struct drm_plane *plane,
785 plane);
787 struct malidp_plane_state *ms = to_malidp_plane_state(plane->state);
789 plane);
794 struct drm_framebuffer *fb = plane->state->fb;
796 mp = to_malidp_plane(plane);
826 if ((plane->state->color_encoding != old_state->color_encoding) ||
827 (plane->state->color_range != old_state->color_range))
828 malidp_de_set_color_encoding(mp, plane->state->color_encoding,
829 plane->state->color_range);
844 * able to use it as a drm plane.
853 malidp_de_set_plane_afbc(plane);
861 val |= ilog2(plane->state->rotation & DRM_MODE_ROTATE_MASK) <<
902 static void malidp_de_plane_disable(struct drm_plane *plane,
905 struct malidp_plane *mp = to_malidp_plane(plane);
927 struct malidp_plane *plane = NULL;
978 plane = drmm_universal_plane_alloc(drm, struct malidp_plane, base,
982 if (IS_ERR(plane)) {
983 ret = PTR_ERR(plane);
987 drm_plane_helper_add(&plane->base,
989 plane->hwdev = malidp->dev;
990 plane->layer = &map->layers[i];
992 drm_plane_create_alpha_property(&plane->base);
993 drm_plane_create_blend_mode_property(&plane->base, blend_caps);
1000 drm_plane_create_rotation_property(&plane->base, DRM_MODE_ROTATE_0, flags);
1002 plane->layer->base + MALIDP_LAYER_COMPOSE);
1010 ret = drm_plane_create_color_properties(&plane->base,
1019 malidp_de_set_color_encoding(plane, enc, range);