Lines Matching full:plane

344 		 * - pipe and plane scaling (TODO verify this)  in skl_plane_max_width()
353 /* FIXME AUX plane? */ in skl_plane_max_width()
381 /* FIXME AUX plane? */ in glk_plane_max_width()
466 plane_max_stride(struct intel_plane *plane, in plane_max_stride() argument
482 adl_plane_max_stride(struct intel_plane *plane, in adl_plane_max_stride() argument
489 return plane_max_stride(plane, pixel_format, in adl_plane_max_stride()
495 skl_plane_max_stride(struct intel_plane *plane, in skl_plane_max_stride() argument
502 return plane_max_stride(plane, pixel_format, in skl_plane_max_stride()
507 static u32 tgl_plane_min_alignment(struct intel_plane *plane, in tgl_plane_min_alignment() argument
511 struct drm_i915_private *i915 = to_i915(plane->base.dev); in tgl_plane_min_alignment()
554 static u32 skl_plane_min_alignment(struct intel_plane *plane, in skl_plane_min_alignment() argument
596 icl_program_input_csc(struct intel_plane *plane, in icl_program_input_csc() argument
600 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in icl_program_input_csc()
601 enum pipe pipe = plane->pipe; in icl_program_input_csc()
602 enum plane_id plane_id = plane->id; in icl_program_input_csc()
722 static void skl_write_plane_wm(struct intel_plane *plane, in skl_write_plane_wm() argument
725 struct drm_i915_private *i915 = to_i915(plane->base.dev); in skl_write_plane_wm()
726 enum plane_id plane_id = plane->id; in skl_write_plane_wm()
727 enum pipe pipe = plane->pipe; in skl_write_plane_wm()
760 skl_plane_disable_arm(struct intel_plane *plane, in skl_plane_disable_arm() argument
763 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_disable_arm()
764 enum plane_id plane_id = plane->id; in skl_plane_disable_arm()
765 enum pipe pipe = plane->pipe; in skl_plane_disable_arm()
767 skl_write_plane_wm(plane, crtc_state); in skl_plane_disable_arm()
773 static void icl_plane_disable_sel_fetch_arm(struct intel_plane *plane, in icl_plane_disable_sel_fetch_arm() argument
776 struct drm_i915_private *i915 = to_i915(plane->base.dev); in icl_plane_disable_sel_fetch_arm()
777 enum pipe pipe = plane->pipe; in icl_plane_disable_sel_fetch_arm()
782 intel_de_write_fw(i915, SEL_FETCH_PLANE_CTL(pipe, plane->id), 0); in icl_plane_disable_sel_fetch_arm()
786 icl_plane_disable_arm(struct intel_plane *plane, in icl_plane_disable_arm() argument
789 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in icl_plane_disable_arm()
790 enum plane_id plane_id = plane->id; in icl_plane_disable_arm()
791 enum pipe pipe = plane->pipe; in icl_plane_disable_arm()
796 skl_write_plane_wm(plane, crtc_state); in icl_plane_disable_arm()
798 icl_plane_disable_sel_fetch_arm(plane, crtc_state); in icl_plane_disable_arm()
804 skl_plane_get_hw_state(struct intel_plane *plane, in skl_plane_get_hw_state() argument
807 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_get_hw_state()
809 enum plane_id plane_id = plane->id; in skl_plane_get_hw_state()
813 power_domain = POWER_DOMAIN_PIPE(plane->pipe); in skl_plane_get_hw_state()
818 ret = intel_de_read(dev_priv, PLANE_CTL(plane->pipe, plane_id)) & PLANE_CTL_ENABLE; in skl_plane_get_hw_state()
820 *pipe = plane->pipe; in skl_plane_get_hw_state()
1058 to_i915(plane_state->uapi.plane->dev); in skl_plane_ctl()
1118 to_i915(plane_state->uapi.plane->dev); in glk_plane_color_ctl()
1120 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in glk_plane_color_ctl() local
1126 if (fb->format->is_yuv && !icl_is_hdr_plane(dev_priv, plane->id)) { in glk_plane_color_ctl()
1156 struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev); in skl_surf_address()
1192 struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev); in skl_plane_aux_dist()
1237 static void icl_plane_csc_load_black(struct intel_plane *plane) in icl_plane_csc_load_black() argument
1239 struct drm_i915_private *i915 = to_i915(plane->base.dev); in icl_plane_csc_load_black()
1240 enum plane_id plane_id = plane->id; in icl_plane_csc_load_black()
1241 enum pipe pipe = plane->pipe; in icl_plane_csc_load_black()
1263 /* Program the UV plane on planar master */ in icl_plane_color_plane()
1271 skl_plane_update_noarm(struct intel_plane *plane, in skl_plane_update_noarm() argument
1275 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_update_noarm()
1276 enum plane_id plane_id = plane->id; in skl_plane_update_noarm()
1277 enum pipe pipe = plane->pipe; in skl_plane_update_noarm()
1297 skl_write_plane_wm(plane, crtc_state); in skl_plane_update_noarm()
1301 skl_plane_update_arm(struct intel_plane *plane, in skl_plane_update_arm() argument
1305 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_update_arm()
1306 enum plane_id plane_id = plane->id; in skl_plane_update_arm()
1307 enum pipe pipe = plane->pipe; in skl_plane_update_arm()
1316 if (plane->need_async_flip_toggle_wa && in skl_plane_update_arm()
1317 crtc_state->async_flip_planes & BIT(plane->id)) in skl_plane_update_arm()
1342 * Enable the scaler before the plane so that we don't in skl_plane_update_arm()
1349 skl_program_plane_scaler(plane, crtc_state, plane_state); in skl_plane_update_arm()
1352 * The control register self-arms if the plane was previously in skl_plane_update_arm()
1353 * disabled. Try to make the plane enable atomic by writing in skl_plane_update_arm()
1361 static void icl_plane_update_sel_fetch_noarm(struct intel_plane *plane, in icl_plane_update_sel_fetch_noarm() argument
1366 struct drm_i915_private *i915 = to_i915(plane->base.dev); in icl_plane_update_sel_fetch_noarm()
1367 enum pipe pipe = plane->pipe; in icl_plane_update_sel_fetch_noarm()
1383 intel_de_write_fw(i915, SEL_FETCH_PLANE_POS(pipe, plane->id), val); in icl_plane_update_sel_fetch_noarm()
1388 * From Bspec: UV surface Start Y Position = half of Y plane Y in icl_plane_update_sel_fetch_noarm()
1398 intel_de_write_fw(i915, SEL_FETCH_PLANE_OFFSET(pipe, plane->id), in icl_plane_update_sel_fetch_noarm()
1404 intel_de_write_fw(i915, SEL_FETCH_PLANE_SIZE(pipe, plane->id), val); in icl_plane_update_sel_fetch_noarm()
1408 icl_plane_update_noarm(struct intel_plane *plane, in icl_plane_update_noarm() argument
1412 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in icl_plane_update_noarm()
1413 enum plane_id plane_id = plane->id; in icl_plane_update_noarm()
1414 enum pipe pipe = plane->pipe; in icl_plane_update_noarm()
1468 icl_program_input_csc(plane, crtc_state, plane_state); in icl_plane_update_noarm()
1470 skl_write_plane_wm(plane, crtc_state); in icl_plane_update_noarm()
1477 icl_plane_csc_load_black(plane); in icl_plane_update_noarm()
1479 icl_plane_update_sel_fetch_noarm(plane, crtc_state, plane_state, color_plane); in icl_plane_update_noarm()
1482 static void icl_plane_update_sel_fetch_arm(struct intel_plane *plane, in icl_plane_update_sel_fetch_arm() argument
1486 struct drm_i915_private *i915 = to_i915(plane->base.dev); in icl_plane_update_sel_fetch_arm()
1487 enum pipe pipe = plane->pipe; in icl_plane_update_sel_fetch_arm()
1493 intel_de_write_fw(i915, SEL_FETCH_PLANE_CTL(pipe, plane->id), in icl_plane_update_sel_fetch_arm()
1496 icl_plane_disable_sel_fetch_arm(plane, crtc_state); in icl_plane_update_sel_fetch_arm()
1500 icl_plane_update_arm(struct intel_plane *plane, in icl_plane_update_arm() argument
1504 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in icl_plane_update_arm()
1505 enum plane_id plane_id = plane->id; in icl_plane_update_arm()
1506 enum pipe pipe = plane->pipe; in icl_plane_update_arm()
1514 * Enable the scaler before the plane so that we don't in icl_plane_update_arm()
1521 skl_program_plane_scaler(plane, crtc_state, plane_state); in icl_plane_update_arm()
1523 icl_plane_update_sel_fetch_arm(plane, crtc_state, plane_state); in icl_plane_update_arm()
1526 * The control register self-arms if the plane was previously in icl_plane_update_arm()
1527 * disabled. Try to make the plane enable atomic by writing in icl_plane_update_arm()
1536 skl_plane_async_flip(struct intel_plane *plane, in skl_plane_async_flip() argument
1541 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_async_flip()
1542 enum plane_id plane_id = plane->id; in skl_plane_async_flip()
1543 enum pipe pipe = plane->pipe; in skl_plane_async_flip()
1571 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in skl_plane_check_fb() local
1572 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_check_fb()
1666 to_i915(plane_state->uapi.plane->dev); in skl_plane_check_dst_coordinates()
1683 "requested plane X %s position %d invalid (valid range %d-%d)\n", in skl_plane_check_dst_coordinates()
1695 struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev); in skl_plane_check_nv12_rotation()
1728 static int intel_plane_min_width(struct intel_plane *plane, in intel_plane_min_width() argument
1733 if (plane->min_width) in intel_plane_min_width()
1734 return plane->min_width(fb, color_plane, rotation); in intel_plane_min_width()
1739 static int intel_plane_max_width(struct intel_plane *plane, in intel_plane_max_width() argument
1744 if (plane->max_width) in intel_plane_max_width()
1745 return plane->max_width(fb, color_plane, rotation); in intel_plane_max_width()
1750 static int intel_plane_max_height(struct intel_plane *plane, in intel_plane_max_height() argument
1755 if (plane->max_height) in intel_plane_max_height()
1756 return plane->max_height(fb, color_plane, rotation); in intel_plane_max_height()
1766 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in skl_check_main_ccs_coordinates() local
1771 unsigned int alignment = plane->min_alignment(plane, fb, ccs_plane); in skl_check_main_ccs_coordinates()
1810 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in skl_calc_main_surface_offset() local
1811 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_calc_main_surface_offset()
1815 unsigned int alignment = plane->min_alignment(plane, fb, 0); in skl_calc_main_surface_offset()
1834 * When using an X-tiled surface, the plane blows up in skl_calc_main_surface_offset()
1860 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in skl_check_main_surface() local
1861 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_check_main_surface()
1868 int min_width = intel_plane_min_width(plane, fb, 0, rotation); in skl_check_main_surface()
1869 int max_width = intel_plane_max_width(plane, fb, 0, rotation); in skl_check_main_surface()
1870 int max_height = intel_plane_max_height(plane, fb, 0, rotation); in skl_check_main_surface()
1871 unsigned int alignment = plane->min_alignment(plane, fb, 0); in skl_check_main_surface()
1890 * there's no aux plane on fb so skip this checking. in skl_check_main_surface()
1931 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in skl_check_nv12_aux_surface() local
1932 struct drm_i915_private *i915 = to_i915(plane->base.dev); in skl_check_nv12_aux_surface()
1938 int max_width = intel_plane_max_width(plane, fb, uv_plane, rotation); in skl_check_nv12_aux_surface()
1939 int max_height = intel_plane_max_height(plane, fb, uv_plane, rotation); in skl_check_nv12_aux_surface()
1946 /* FIXME not quite sure how/if these apply to the chroma plane */ in skl_check_nv12_aux_surface()
1960 unsigned int alignment = plane->min_alignment(plane, fb, uv_plane); in skl_check_nv12_aux_surface()
2095 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in check_protection() local
2096 struct drm_i915_private *i915 = to_i915(plane->base.dev); in check_protection()
2111 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in skl_plane_check() local
2112 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); in skl_plane_check()
2154 /* HW only has 8 bits pixel precision, disable plane if invisible */ in skl_plane_check()
2165 icl_is_hdr_plane(dev_priv, plane->id)) in skl_plane_check()
2265 struct intel_plane *plane = to_intel_plane(_plane); in skl_plane_format_mod_supported() local
2267 if (!intel_fb_plane_supports_modifier(plane, modifier)) in skl_plane_format_mod_supported()
2319 struct intel_plane *plane = to_intel_plane(_plane); in gen12_plane_format_mod_supported() local
2321 if (!intel_fb_plane_supports_modifier(plane, modifier)) in gen12_plane_format_mod_supported()
2387 skl_plane_enable_flip_done(struct intel_plane *plane) in skl_plane_enable_flip_done() argument
2389 struct drm_i915_private *i915 = to_i915(plane->base.dev); in skl_plane_enable_flip_done()
2390 enum pipe pipe = plane->pipe; in skl_plane_enable_flip_done()
2393 bdw_enable_pipe_irq(i915, pipe, GEN9_PIPE_PLANE_FLIP_DONE(plane->id)); in skl_plane_enable_flip_done()
2398 skl_plane_disable_flip_done(struct intel_plane *plane) in skl_plane_disable_flip_done() argument
2400 struct drm_i915_private *i915 = to_i915(plane->base.dev); in skl_plane_disable_flip_done()
2401 enum pipe pipe = plane->pipe; in skl_plane_disable_flip_done()
2404 bdw_disable_pipe_irq(i915, pipe, GEN9_PIPE_PLANE_FLIP_DONE(plane->id)); in skl_plane_disable_flip_done()
2478 struct intel_plane *plane; in skl_universal_plane_create() local
2487 plane = intel_plane_alloc(); in skl_universal_plane_create()
2488 if (IS_ERR(plane)) in skl_universal_plane_create()
2489 return plane; in skl_universal_plane_create()
2491 plane->pipe = pipe; in skl_universal_plane_create()
2492 plane->id = plane_id; in skl_universal_plane_create()
2493 plane->frontbuffer_bit = INTEL_FRONTBUFFER(pipe, plane_id); in skl_universal_plane_create()
2495 intel_fbc_add_plane(skl_plane_fbc(dev_priv, pipe, plane_id), plane); in skl_universal_plane_create()
2498 plane->min_width = icl_plane_min_width; in skl_universal_plane_create()
2500 plane->max_width = icl_hdr_plane_max_width; in skl_universal_plane_create()
2502 plane->max_width = icl_sdr_plane_max_width; in skl_universal_plane_create()
2503 plane->max_height = icl_plane_max_height; in skl_universal_plane_create()
2504 plane->min_cdclk = icl_plane_min_cdclk; in skl_universal_plane_create()
2506 plane->max_width = glk_plane_max_width; in skl_universal_plane_create()
2507 plane->max_height = skl_plane_max_height; in skl_universal_plane_create()
2508 plane->min_cdclk = glk_plane_min_cdclk; in skl_universal_plane_create()
2510 plane->max_width = skl_plane_max_width; in skl_universal_plane_create()
2511 plane->max_height = skl_plane_max_height; in skl_universal_plane_create()
2512 plane->min_cdclk = skl_plane_min_cdclk; in skl_universal_plane_create()
2516 plane->max_stride = adl_plane_max_stride; in skl_universal_plane_create()
2518 plane->max_stride = skl_plane_max_stride; in skl_universal_plane_create()
2521 plane->min_alignment = tgl_plane_min_alignment; in skl_universal_plane_create()
2523 plane->min_alignment = skl_plane_min_alignment; in skl_universal_plane_create()
2526 plane->update_noarm = icl_plane_update_noarm; in skl_universal_plane_create()
2527 plane->update_arm = icl_plane_update_arm; in skl_universal_plane_create()
2528 plane->disable_arm = icl_plane_disable_arm; in skl_universal_plane_create()
2530 plane->update_noarm = skl_plane_update_noarm; in skl_universal_plane_create()
2531 plane->update_arm = skl_plane_update_arm; in skl_universal_plane_create()
2532 plane->disable_arm = skl_plane_disable_arm; in skl_universal_plane_create()
2534 plane->get_hw_state = skl_plane_get_hw_state; in skl_universal_plane_create()
2535 plane->check_plane = skl_plane_check; in skl_universal_plane_create()
2538 plane->need_async_flip_toggle_wa = IS_DISPLAY_VER(dev_priv, 9, 10); in skl_universal_plane_create()
2539 plane->async_flip = skl_plane_async_flip; in skl_universal_plane_create()
2540 plane->enable_flip_done = skl_plane_enable_flip_done; in skl_universal_plane_create()
2541 plane->disable_flip_done = skl_plane_disable_flip_done; in skl_universal_plane_create()
2567 ret = drm_universal_plane_init(&dev_priv->drm, &plane->base, in skl_universal_plane_create()
2571 "plane %d%c", plane_id + 1, in skl_universal_plane_create()
2589 drm_plane_create_rotation_property(&plane->base, in skl_universal_plane_create()
2598 drm_plane_create_color_properties(&plane->base, in skl_universal_plane_create()
2605 drm_plane_create_alpha_property(&plane->base); in skl_universal_plane_create()
2606 drm_plane_create_blend_mode_property(&plane->base, in skl_universal_plane_create()
2611 drm_plane_create_zpos_immutable_property(&plane->base, plane_id); in skl_universal_plane_create()
2614 drm_plane_enable_fb_damage_clips(&plane->base); in skl_universal_plane_create()
2617 drm_plane_create_scaling_filter_property(&plane->base, in skl_universal_plane_create()
2621 intel_plane_helper_add(plane); in skl_universal_plane_create()
2623 return plane; in skl_universal_plane_create()
2626 intel_plane_free(plane); in skl_universal_plane_create()
2638 struct intel_plane *plane = to_intel_plane(crtc->base.primary); in skl_get_initial_plane_config() local
2639 enum plane_id plane_id = plane->id; in skl_get_initial_plane_config()
2648 if (!plane->get_hw_state(plane, &pipe)) in skl_get_initial_plane_config()
2793 crtc->base.name, plane->base.name, fb->width, fb->height, in skl_get_initial_plane_config()
2808 struct intel_plane *plane = to_intel_plane(crtc->base.primary); in skl_fixup_initial_plane_config() local
2810 to_intel_plane_state(plane->base.state); in skl_fixup_initial_plane_config()
2811 enum plane_id plane_id = plane->id; in skl_fixup_initial_plane_config()
2822 * part of ggtt, make the plane aware of that. in skl_fixup_initial_plane_config()