Lines Matching full:plane

24 /* Primary plane formats for gen <= 3 */
32 /* Primary plane formats for ivb (no fp16 due to hw issue) */
42 /* Primary plane formats for gen >= 4, except ivb */
53 /* Primary plane formats for vlv/chv */
137 static bool i9xx_plane_has_windowing(struct intel_plane *plane) in i9xx_plane_has_windowing() argument
139 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in i9xx_plane_has_windowing()
140 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_plane_has_windowing()
157 to_i915(plane_state->uapi.plane->dev); in i9xx_plane_ctl()
228 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in i9xx_check_plane_surface() local
229 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in i9xx_check_plane_surface()
259 * When using an X-tiled surface the plane starts to in i9xx_check_plane_surface()
270 unsigned int alignment = plane->min_alignment(plane, fb, 0); in i9xx_check_plane_surface()
324 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in i9xx_plane_check() local
334 i9xx_plane_has_windowing(plane)); in i9xx_plane_check()
381 * of cdclk when the sprite plane is enabled on the in i9xx_plane_ratio()
419 static void i9xx_plane_update_noarm(struct intel_plane *plane, in i9xx_plane_update_noarm() argument
423 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in i9xx_plane_update_noarm()
424 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_plane_update_noarm()
447 static void i9xx_plane_update_arm(struct intel_plane *plane, in i9xx_plane_update_arm() argument
451 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in i9xx_plane_update_arm()
452 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_plane_update_arm()
460 if (plane->need_async_flip_toggle_wa && in i9xx_plane_update_arm()
461 crtc_state->async_flip_planes & BIT(plane->id)) in i9xx_plane_update_arm()
496 * The control register self-arms if the plane was previously in i9xx_plane_update_arm()
497 * disabled. Try to make the plane enable atomic by writing in i9xx_plane_update_arm()
510 static void i830_plane_update_arm(struct intel_plane *plane, in i830_plane_update_arm() argument
520 i9xx_plane_update_noarm(plane, crtc_state, plane_state); in i830_plane_update_arm()
521 i9xx_plane_update_arm(plane, crtc_state, plane_state); in i830_plane_update_arm()
524 static void i9xx_plane_disable_arm(struct intel_plane *plane, in i9xx_plane_disable_arm() argument
527 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in i9xx_plane_disable_arm()
528 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_plane_disable_arm()
534 * well, so we must configure them even if the plane in i9xx_plane_disable_arm()
552 g4x_primary_async_flip(struct intel_plane *plane, in g4x_primary_async_flip() argument
557 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in g4x_primary_async_flip()
560 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in g4x_primary_async_flip()
572 vlv_primary_async_flip(struct intel_plane *plane, in vlv_primary_async_flip() argument
577 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in vlv_primary_async_flip()
579 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in vlv_primary_async_flip()
586 bdw_primary_enable_flip_done(struct intel_plane *plane) in bdw_primary_enable_flip_done() argument
588 struct drm_i915_private *i915 = to_i915(plane->base.dev); in bdw_primary_enable_flip_done()
589 enum pipe pipe = plane->pipe; in bdw_primary_enable_flip_done()
597 bdw_primary_disable_flip_done(struct intel_plane *plane) in bdw_primary_disable_flip_done() argument
599 struct drm_i915_private *i915 = to_i915(plane->base.dev); in bdw_primary_disable_flip_done()
600 enum pipe pipe = plane->pipe; in bdw_primary_disable_flip_done()
608 ivb_primary_enable_flip_done(struct intel_plane *plane) in ivb_primary_enable_flip_done() argument
610 struct drm_i915_private *i915 = to_i915(plane->base.dev); in ivb_primary_enable_flip_done()
613 ilk_enable_display_irq(i915, DE_PLANE_FLIP_DONE_IVB(plane->i9xx_plane)); in ivb_primary_enable_flip_done()
618 ivb_primary_disable_flip_done(struct intel_plane *plane) in ivb_primary_disable_flip_done() argument
620 struct drm_i915_private *i915 = to_i915(plane->base.dev); in ivb_primary_disable_flip_done()
623 ilk_disable_display_irq(i915, DE_PLANE_FLIP_DONE_IVB(plane->i9xx_plane)); in ivb_primary_disable_flip_done()
628 ilk_primary_enable_flip_done(struct intel_plane *plane) in ilk_primary_enable_flip_done() argument
630 struct drm_i915_private *i915 = to_i915(plane->base.dev); in ilk_primary_enable_flip_done()
633 ilk_enable_display_irq(i915, DE_PLANE_FLIP_DONE(plane->i9xx_plane)); in ilk_primary_enable_flip_done()
638 ilk_primary_disable_flip_done(struct intel_plane *plane) in ilk_primary_disable_flip_done() argument
640 struct drm_i915_private *i915 = to_i915(plane->base.dev); in ilk_primary_disable_flip_done()
643 ilk_disable_display_irq(i915, DE_PLANE_FLIP_DONE(plane->i9xx_plane)); in ilk_primary_disable_flip_done()
648 vlv_primary_enable_flip_done(struct intel_plane *plane) in vlv_primary_enable_flip_done() argument
650 struct drm_i915_private *i915 = to_i915(plane->base.dev); in vlv_primary_enable_flip_done()
651 enum pipe pipe = plane->pipe; in vlv_primary_enable_flip_done()
659 vlv_primary_disable_flip_done(struct intel_plane *plane) in vlv_primary_disable_flip_done() argument
661 struct drm_i915_private *i915 = to_i915(plane->base.dev); in vlv_primary_disable_flip_done()
662 enum pipe pipe = plane->pipe; in vlv_primary_disable_flip_done()
669 static bool i9xx_plane_get_hw_state(struct intel_plane *plane, in i9xx_plane_get_hw_state() argument
672 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in i9xx_plane_get_hw_state()
674 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_plane_get_hw_state()
684 power_domain = POWER_DOMAIN_PIPE(plane->pipe); in i9xx_plane_get_hw_state()
694 *pipe = plane->pipe; in i9xx_plane_get_hw_state()
704 hsw_primary_max_stride(struct intel_plane *plane, in hsw_primary_max_stride() argument
716 ilk_primary_max_stride(struct intel_plane *plane, in ilk_primary_max_stride() argument
731 i965_plane_max_stride(struct intel_plane *plane, in i965_plane_max_stride() argument
746 i915_plane_max_stride(struct intel_plane *plane, in i915_plane_max_stride() argument
757 i8xx_plane_max_stride(struct intel_plane *plane, in i8xx_plane_max_stride() argument
761 if (plane->i9xx_plane == PLANE_C) in i8xx_plane_max_stride()
767 static unsigned int vlv_primary_min_alignment(struct intel_plane *plane, in vlv_primary_min_alignment() argument
771 struct drm_i915_private *i915 = to_i915(plane->base.dev); in vlv_primary_min_alignment()
786 static unsigned int g4x_primary_min_alignment(struct intel_plane *plane, in g4x_primary_min_alignment() argument
790 struct drm_i915_private *i915 = to_i915(plane->base.dev); in g4x_primary_min_alignment()
805 static unsigned int i965_plane_min_alignment(struct intel_plane *plane, in i965_plane_min_alignment() argument
820 static unsigned int i9xx_plane_min_alignment(struct intel_plane *plane, in i9xx_plane_min_alignment() argument
848 struct intel_plane *plane; in intel_primary_plane_create() local
856 plane = intel_plane_alloc(); in intel_primary_plane_create()
857 if (IS_ERR(plane)) in intel_primary_plane_create()
858 return plane; in intel_primary_plane_create()
860 plane->pipe = pipe; in intel_primary_plane_create()
862 * On gen2/3 only plane A can do FBC, but the panel fitter and LVDS in intel_primary_plane_create()
863 * port is hooked to pipe B. Hence we want plane A feeding pipe B. in intel_primary_plane_create()
867 plane->i9xx_plane = (enum i9xx_plane_id) !pipe; in intel_primary_plane_create()
869 plane->i9xx_plane = (enum i9xx_plane_id) pipe; in intel_primary_plane_create()
870 plane->id = PLANE_PRIMARY; in intel_primary_plane_create()
871 plane->frontbuffer_bit = INTEL_FRONTBUFFER(pipe, plane->id); in intel_primary_plane_create()
873 intel_fbc_add_plane(i9xx_plane_fbc(dev_priv, plane->i9xx_plane), plane); in intel_primary_plane_create()
881 * "Workaround : When using the 64-bit format, the plane in intel_primary_plane_create()
885 * multiply the plane output by four." in intel_primary_plane_create()
887 * There is no dedicated plane gamma for the primary plane, in intel_primary_plane_create()
910 plane->min_cdclk = vlv_plane_min_cdclk; in intel_primary_plane_create()
912 plane->min_cdclk = hsw_plane_min_cdclk; in intel_primary_plane_create()
914 plane->min_cdclk = ivb_plane_min_cdclk; in intel_primary_plane_create()
916 plane->min_cdclk = i9xx_plane_min_cdclk; in intel_primary_plane_create()
920 plane->max_stride = i965_plane_max_stride; in intel_primary_plane_create()
922 plane->max_stride = i915_plane_max_stride; in intel_primary_plane_create()
924 plane->max_stride = i8xx_plane_max_stride; in intel_primary_plane_create()
927 plane->max_stride = hsw_primary_max_stride; in intel_primary_plane_create()
929 plane->max_stride = ilk_primary_max_stride; in intel_primary_plane_create()
933 plane->min_alignment = vlv_primary_min_alignment; in intel_primary_plane_create()
935 plane->min_alignment = g4x_primary_min_alignment; in intel_primary_plane_create()
937 plane->min_alignment = i965_plane_min_alignment; in intel_primary_plane_create()
939 plane->min_alignment = i9xx_plane_min_alignment; in intel_primary_plane_create()
942 plane->update_arm = i830_plane_update_arm; in intel_primary_plane_create()
944 plane->update_noarm = i9xx_plane_update_noarm; in intel_primary_plane_create()
945 plane->update_arm = i9xx_plane_update_arm; in intel_primary_plane_create()
947 plane->disable_arm = i9xx_plane_disable_arm; in intel_primary_plane_create()
948 plane->get_hw_state = i9xx_plane_get_hw_state; in intel_primary_plane_create()
949 plane->check_plane = i9xx_plane_check; in intel_primary_plane_create()
952 plane->async_flip = vlv_primary_async_flip; in intel_primary_plane_create()
953 plane->enable_flip_done = vlv_primary_enable_flip_done; in intel_primary_plane_create()
954 plane->disable_flip_done = vlv_primary_disable_flip_done; in intel_primary_plane_create()
956 plane->need_async_flip_toggle_wa = true; in intel_primary_plane_create()
957 plane->async_flip = g4x_primary_async_flip; in intel_primary_plane_create()
958 plane->enable_flip_done = bdw_primary_enable_flip_done; in intel_primary_plane_create()
959 plane->disable_flip_done = bdw_primary_disable_flip_done; in intel_primary_plane_create()
961 plane->async_flip = g4x_primary_async_flip; in intel_primary_plane_create()
962 plane->enable_flip_done = ivb_primary_enable_flip_done; in intel_primary_plane_create()
963 plane->disable_flip_done = ivb_primary_disable_flip_done; in intel_primary_plane_create()
965 plane->async_flip = g4x_primary_async_flip; in intel_primary_plane_create()
966 plane->enable_flip_done = ilk_primary_enable_flip_done; in intel_primary_plane_create()
967 plane->disable_flip_done = ilk_primary_disable_flip_done; in intel_primary_plane_create()
973 ret = drm_universal_plane_init(&dev_priv->drm, &plane->base, in intel_primary_plane_create()
980 ret = drm_universal_plane_init(&dev_priv->drm, &plane->base, in intel_primary_plane_create()
985 "plane %c", in intel_primary_plane_create()
986 plane_name(plane->i9xx_plane)); in intel_primary_plane_create()
1005 drm_plane_create_rotation_property(&plane->base, in intel_primary_plane_create()
1010 drm_plane_create_zpos_immutable_property(&plane->base, zpos); in intel_primary_plane_create()
1012 intel_plane_helper_add(plane); in intel_primary_plane_create()
1014 return plane; in intel_primary_plane_create()
1017 intel_plane_free(plane); in intel_primary_plane_create()
1061 struct intel_plane *plane = to_intel_plane(crtc->base.primary); in i9xx_get_initial_plane_config() local
1062 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_get_initial_plane_config()
1070 if (!plane->get_hw_state(plane, &pipe)) in i9xx_get_initial_plane_config()
1138 crtc->base.name, plane->base.name, fb->width, fb->height, in i9xx_get_initial_plane_config()
1149 struct intel_plane *plane = to_intel_plane(crtc->base.primary); in i9xx_fixup_initial_plane_config() local
1151 to_intel_plane_state(plane->base.state); in i9xx_fixup_initial_plane_config()
1152 enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; in i9xx_fixup_initial_plane_config()
1162 * part of ggtt, make the plane aware of that. in i9xx_fixup_initial_plane_config()