Lines Matching refs:crtc
256 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_crtc_is_bigjoiner_slave() local
259 crtc->pipe != bigjoiner_master_pipe(crtc_state); in intel_crtc_is_bigjoiner_slave()
264 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_crtc_is_bigjoiner_master() local
267 crtc->pipe == bigjoiner_master_pipe(crtc_state); in intel_crtc_is_bigjoiner_master()
277 struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev); in intel_master_crtc()
282 return to_intel_crtc(crtc_state->uapi.crtc); in intel_master_crtc()
288 struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc); in intel_wait_for_pipe_off() local
289 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_wait_for_pipe_off()
299 intel_wait_for_pipe_scanline_stopped(crtc); in intel_wait_for_pipe_off()
348 static void assert_planes_disabled(struct intel_crtc *crtc) in assert_planes_disabled() argument
350 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in assert_planes_disabled()
353 for_each_intel_plane_on_crtc(&dev_priv->drm, crtc, plane) in assert_planes_disabled()
394 struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); in intel_enable_transcoder() local
395 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_enable_transcoder()
397 enum pipe pipe = crtc->pipe; in intel_enable_transcoder()
403 assert_planes_disabled(crtc); in intel_enable_transcoder()
419 intel_crtc_pch_transcoder(crtc)); in intel_enable_transcoder()
450 intel_wait_for_pipe_scanline_moving(crtc); in intel_enable_transcoder()
455 struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc); in intel_disable_transcoder() local
456 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_disable_transcoder()
458 enum pipe pipe = crtc->pipe; in intel_disable_transcoder()
468 assert_planes_disabled(crtc); in intel_disable_transcoder()
578 struct intel_crtc *crtc; in intel_plane_fb_max_stride() local
589 crtc = intel_first_crtc(dev_priv); in intel_plane_fb_max_stride()
590 if (!crtc) in intel_plane_fb_max_stride()
593 plane = to_intel_plane(crtc->base.primary); in intel_plane_fb_max_stride()
615 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); in intel_plane_fixup_bitmasks()
633 void intel_plane_disable_noatomic(struct intel_crtc *crtc, in intel_plane_disable_noatomic() argument
636 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_plane_disable_noatomic()
638 to_intel_crtc_state(crtc->base.state); in intel_plane_disable_noatomic()
645 crtc->base.base.id, crtc->base.name); in intel_plane_disable_noatomic()
658 intel_crtc_wait_for_next_vblank(crtc); in intel_plane_disable_noatomic()
672 intel_crtc_wait_for_next_vblank(crtc); in intel_plane_disable_noatomic()
679 intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false); in intel_plane_disable_noatomic()
682 intel_crtc_wait_for_next_vblank(crtc); in intel_plane_disable_noatomic()
698 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in icl_set_pipe_chicken() local
699 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in icl_set_pipe_chicken()
700 enum pipe pipe = crtc->pipe; in icl_set_pipe_chicken()
737 struct drm_crtc *crtc; in intel_has_pending_fb_unpin() local
740 drm_for_each_crtc(crtc, &dev_priv->drm) { in intel_has_pending_fb_unpin()
742 spin_lock(&crtc->commit_lock); in intel_has_pending_fb_unpin()
743 commit = list_first_entry_or_null(&crtc->commit_list, in intel_has_pending_fb_unpin()
747 spin_unlock(&crtc->commit_lock); in intel_has_pending_fb_unpin()
752 intel_crtc_wait_for_next_vblank(to_intel_crtc(crtc)); in intel_has_pending_fb_unpin()
778 if (connector_state->crtc != &master_crtc->base) in intel_get_crtc_new_encoder()
794 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in ilk_pfit_enable() local
795 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ilk_pfit_enable()
797 enum pipe pipe = crtc->pipe; in ilk_pfit_enable()
822 static void intel_crtc_dpms_overlay_disable(struct intel_crtc *crtc) in intel_crtc_dpms_overlay_disable() argument
824 if (crtc->overlay) in intel_crtc_dpms_overlay_disable()
825 (void) intel_overlay_switch_off(crtc->overlay); in intel_crtc_dpms_overlay_disable()
834 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); in needs_nv12_wa()
848 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); in needs_scalerclk_wa()
859 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); in needs_cursorclk_wa()
891 struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev); in needs_async_flip_vtd_wa()
932 struct intel_crtc *crtc) in intel_post_plane_update() argument
936 intel_atomic_get_old_crtc_state(state, crtc); in intel_post_plane_update()
938 intel_atomic_get_new_crtc_state(state, crtc); in intel_post_plane_update()
939 enum pipe pipe = crtc->pipe; in intel_post_plane_update()
946 intel_fbc_post_update(state, crtc); in intel_post_plane_update()
969 struct intel_crtc *crtc) in intel_crtc_enable_flip_done() argument
972 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_enable_flip_done()
979 if (plane->pipe == crtc->pipe && in intel_crtc_enable_flip_done()
986 struct intel_crtc *crtc) in intel_crtc_disable_flip_done() argument
989 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_disable_flip_done()
996 if (plane->pipe == crtc->pipe && in intel_crtc_disable_flip_done()
1003 struct intel_crtc *crtc) in intel_crtc_async_flip_disable_wa() argument
1006 intel_atomic_get_old_crtc_state(state, crtc); in intel_crtc_async_flip_disable_wa()
1008 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_async_flip_disable_wa()
1018 plane->pipe == crtc->pipe && in intel_crtc_async_flip_disable_wa()
1031 intel_crtc_wait_for_next_vblank(crtc); in intel_crtc_async_flip_disable_wa()
1035 struct intel_crtc *crtc) in intel_pre_plane_update() argument
1039 intel_atomic_get_old_crtc_state(state, crtc); in intel_pre_plane_update()
1041 intel_atomic_get_new_crtc_state(state, crtc); in intel_pre_plane_update()
1042 enum pipe pipe = crtc->pipe; in intel_pre_plane_update()
1051 intel_psr_pre_plane_update(state, crtc); in intel_pre_plane_update()
1053 if (hsw_ips_pre_update(state, crtc)) in intel_pre_plane_update()
1054 intel_crtc_wait_for_next_vblank(crtc); in intel_pre_plane_update()
1056 if (intel_fbc_pre_update(state, crtc)) in intel_pre_plane_update()
1057 intel_crtc_wait_for_next_vblank(crtc); in intel_pre_plane_update()
1089 intel_crtc_wait_for_next_vblank(crtc); in intel_pre_plane_update()
1100 intel_crtc_wait_for_next_vblank(crtc); in intel_pre_plane_update()
1121 if (!intel_initial_watermarks(state, crtc)) in intel_pre_plane_update()
1142 intel_crtc_async_flip_disable_wa(state, crtc); in intel_pre_plane_update()
1146 struct intel_crtc *crtc) in intel_crtc_disable_planes() argument
1148 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_crtc_disable_planes()
1150 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_disable_planes()
1157 intel_crtc_dpms_overlay_disable(crtc); in intel_crtc_disable_planes()
1160 if (crtc->pipe != plane->pipe || in intel_crtc_disable_planes()
1177 struct intel_crtc *crtc; in intel_encoders_update_prepare() local
1185 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in intel_encoders_update_prepare()
1196 struct intel_crtc *crtc) in intel_encoders_pre_pll_enable() argument
1199 intel_atomic_get_new_crtc_state(state, crtc); in intel_encoders_pre_pll_enable()
1208 if (conn_state->crtc != &crtc->base) in intel_encoders_pre_pll_enable()
1218 struct intel_crtc *crtc) in intel_encoders_pre_enable() argument
1221 intel_atomic_get_new_crtc_state(state, crtc); in intel_encoders_pre_enable()
1230 if (conn_state->crtc != &crtc->base) in intel_encoders_pre_enable()
1240 struct intel_crtc *crtc) in intel_encoders_enable() argument
1243 intel_atomic_get_new_crtc_state(state, crtc); in intel_encoders_enable()
1252 if (conn_state->crtc != &crtc->base) in intel_encoders_enable()
1263 struct intel_crtc *crtc) in intel_encoders_disable() argument
1266 intel_atomic_get_old_crtc_state(state, crtc); in intel_encoders_disable()
1275 if (old_conn_state->crtc != &crtc->base) in intel_encoders_disable()
1286 struct intel_crtc *crtc) in intel_encoders_post_disable() argument
1289 intel_atomic_get_old_crtc_state(state, crtc); in intel_encoders_post_disable()
1298 if (old_conn_state->crtc != &crtc->base) in intel_encoders_post_disable()
1308 struct intel_crtc *crtc) in intel_encoders_post_pll_disable() argument
1311 intel_atomic_get_old_crtc_state(state, crtc); in intel_encoders_post_pll_disable()
1320 if (old_conn_state->crtc != &crtc->base) in intel_encoders_post_pll_disable()
1330 struct intel_crtc *crtc) in intel_encoders_update_pipe() argument
1333 intel_atomic_get_new_crtc_state(state, crtc); in intel_encoders_update_pipe()
1342 if (conn_state->crtc != &crtc->base) in intel_encoders_update_pipe()
1353 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_disable_primary_plane() local
1354 struct intel_plane *plane = to_intel_plane(crtc->base.primary); in intel_disable_primary_plane()
1361 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in ilk_configure_cpu_transcoder() local
1365 intel_cpu_transcoder_set_m1_n1(crtc, cpu_transcoder, in ilk_configure_cpu_transcoder()
1368 intel_cpu_transcoder_set_m1_n1(crtc, cpu_transcoder, in ilk_configure_cpu_transcoder()
1370 intel_cpu_transcoder_set_m2_n2(crtc, cpu_transcoder, in ilk_configure_cpu_transcoder()
1380 struct intel_crtc *crtc) in ilk_crtc_enable() argument
1383 intel_atomic_get_new_crtc_state(state, crtc); in ilk_crtc_enable()
1384 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ilk_crtc_enable()
1385 enum pipe pipe = crtc->pipe; in ilk_crtc_enable()
1387 if (drm_WARN_ON(&dev_priv->drm, crtc->active)) in ilk_crtc_enable()
1407 crtc->active = true; in ilk_crtc_enable()
1409 intel_encoders_pre_enable(state, crtc); in ilk_crtc_enable()
1412 ilk_pch_pre_enable(state, crtc); in ilk_crtc_enable()
1430 intel_initial_watermarks(state, crtc); in ilk_crtc_enable()
1434 ilk_pch_enable(state, crtc); in ilk_crtc_enable()
1438 intel_encoders_enable(state, crtc); in ilk_crtc_enable()
1441 intel_wait_for_pipe_scanline_moving(crtc); in ilk_crtc_enable()
1450 intel_crtc_wait_for_next_vblank(crtc); in ilk_crtc_enable()
1451 intel_crtc_wait_for_next_vblank(crtc); in ilk_crtc_enable()
1473 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in hsw_set_linetime_wm() local
1474 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_set_linetime_wm()
1476 intel_de_write(dev_priv, WM_LINETIME(crtc->pipe), in hsw_set_linetime_wm()
1483 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in hsw_set_frame_start_delay() local
1484 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_set_frame_start_delay()
1514 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in hsw_configure_cpu_transcoder() local
1515 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_configure_cpu_transcoder()
1519 intel_cpu_transcoder_set_m1_n1(crtc, cpu_transcoder, in hsw_configure_cpu_transcoder()
1522 intel_cpu_transcoder_set_m1_n1(crtc, cpu_transcoder, in hsw_configure_cpu_transcoder()
1524 intel_cpu_transcoder_set_m2_n2(crtc, cpu_transcoder, in hsw_configure_cpu_transcoder()
1542 struct intel_crtc *crtc) in hsw_crtc_enable() argument
1545 intel_atomic_get_new_crtc_state(state, crtc); in hsw_crtc_enable()
1546 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_crtc_enable()
1547 enum pipe pipe = crtc->pipe, hsw_workaround_pipe; in hsw_crtc_enable()
1551 if (drm_WARN_ON(&dev_priv->drm, crtc->active)) in hsw_crtc_enable()
1554 intel_dmc_enable_pipe(dev_priv, crtc->pipe); in hsw_crtc_enable()
1557 intel_encoders_pre_pll_enable(state, crtc); in hsw_crtc_enable()
1562 intel_encoders_pre_enable(state, crtc); in hsw_crtc_enable()
1580 crtc->active = true; in hsw_crtc_enable()
1609 intel_initial_watermarks(state, crtc); in hsw_crtc_enable()
1614 intel_encoders_enable(state, crtc); in hsw_crtc_enable()
1617 intel_crtc_wait_for_next_vblank(crtc); in hsw_crtc_enable()
1636 struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc); in ilk_pfit_disable() local
1637 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ilk_pfit_disable()
1638 enum pipe pipe = crtc->pipe; in ilk_pfit_disable()
1651 struct intel_crtc *crtc) in ilk_crtc_disable() argument
1654 intel_atomic_get_old_crtc_state(state, crtc); in ilk_crtc_disable()
1655 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ilk_crtc_disable()
1656 enum pipe pipe = crtc->pipe; in ilk_crtc_disable()
1666 intel_encoders_disable(state, crtc); in ilk_crtc_disable()
1675 ilk_pch_disable(state, crtc); in ilk_crtc_disable()
1677 intel_encoders_post_disable(state, crtc); in ilk_crtc_disable()
1680 ilk_pch_post_disable(state, crtc); in ilk_crtc_disable()
1689 struct intel_crtc *crtc) in hsw_crtc_disable() argument
1692 intel_atomic_get_old_crtc_state(state, crtc); in hsw_crtc_disable()
1693 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in hsw_crtc_disable()
1700 intel_encoders_disable(state, crtc); in hsw_crtc_disable()
1701 intel_encoders_post_disable(state, crtc); in hsw_crtc_disable()
1709 intel_encoders_post_pll_disable(state, crtc); in hsw_crtc_disable()
1711 intel_dmc_disable_pipe(i915, crtc->pipe); in hsw_crtc_disable()
1721 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in i9xx_pfit_enable() local
1722 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_pfit_enable()
1741 intel_de_write(dev_priv, BCLRPAT(crtc->pipe), 0); in i9xx_pfit_enable()
1836 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in get_crtc_power_domains() local
1837 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in get_crtc_power_domains()
1840 enum pipe pipe = crtc->pipe; in get_crtc_power_domains()
1867 set_bit(intel_dsc_power_domain(crtc, cpu_transcoder), mask->bits); in get_crtc_power_domains()
1873 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_modeset_get_crtc_power_domains() local
1874 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_modeset_get_crtc_power_domains()
1882 crtc->enabled_power_domains.mask.bits, in intel_modeset_get_crtc_power_domains()
1885 crtc->enabled_power_domains.mask.bits, in intel_modeset_get_crtc_power_domains()
1891 &crtc->enabled_power_domains, in intel_modeset_get_crtc_power_domains()
1895 void intel_modeset_put_crtc_power_domains(struct intel_crtc *crtc, in intel_modeset_put_crtc_power_domains() argument
1898 intel_display_power_put_mask_in_set(to_i915(crtc->base.dev), in intel_modeset_put_crtc_power_domains()
1899 &crtc->enabled_power_domains, in intel_modeset_put_crtc_power_domains()
1905 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in i9xx_configure_cpu_transcoder() local
1909 intel_cpu_transcoder_set_m1_n1(crtc, cpu_transcoder, in i9xx_configure_cpu_transcoder()
1911 intel_cpu_transcoder_set_m2_n2(crtc, cpu_transcoder, in i9xx_configure_cpu_transcoder()
1921 struct intel_crtc *crtc) in valleyview_crtc_enable() argument
1924 intel_atomic_get_new_crtc_state(state, crtc); in valleyview_crtc_enable()
1925 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in valleyview_crtc_enable()
1926 enum pipe pipe = crtc->pipe; in valleyview_crtc_enable()
1928 if (drm_WARN_ON(&dev_priv->drm, crtc->active)) in valleyview_crtc_enable()
1942 crtc->active = true; in valleyview_crtc_enable()
1946 intel_encoders_pre_pll_enable(state, crtc); in valleyview_crtc_enable()
1953 intel_encoders_pre_enable(state, crtc); in valleyview_crtc_enable()
1963 intel_initial_watermarks(state, crtc); in valleyview_crtc_enable()
1968 intel_encoders_enable(state, crtc); in valleyview_crtc_enable()
1972 struct intel_crtc *crtc) in i9xx_crtc_enable() argument
1975 intel_atomic_get_new_crtc_state(state, crtc); in i9xx_crtc_enable()
1976 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_crtc_enable()
1977 enum pipe pipe = crtc->pipe; in i9xx_crtc_enable()
1979 if (drm_WARN_ON(&dev_priv->drm, crtc->active)) in i9xx_crtc_enable()
1986 crtc->active = true; in i9xx_crtc_enable()
1991 intel_encoders_pre_enable(state, crtc); in i9xx_crtc_enable()
2003 if (!intel_initial_watermarks(state, crtc)) in i9xx_crtc_enable()
2009 intel_encoders_enable(state, crtc); in i9xx_crtc_enable()
2013 intel_crtc_wait_for_next_vblank(crtc); in i9xx_crtc_enable()
2018 struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc); in i9xx_pfit_disable() local
2019 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_pfit_disable()
2032 struct intel_crtc *crtc) in i9xx_crtc_disable() argument
2035 intel_atomic_get_old_crtc_state(state, crtc); in i9xx_crtc_disable()
2036 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_crtc_disable()
2037 enum pipe pipe = crtc->pipe; in i9xx_crtc_disable()
2044 intel_crtc_wait_for_next_vblank(crtc); in i9xx_crtc_disable()
2046 intel_encoders_disable(state, crtc); in i9xx_crtc_disable()
2054 intel_encoders_post_disable(state, crtc); in i9xx_crtc_disable()
2065 intel_encoders_post_pll_disable(state, crtc); in i9xx_crtc_disable()
2086 static bool intel_crtc_supports_double_wide(const struct intel_crtc *crtc) in intel_crtc_supports_double_wide() argument
2088 const struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_crtc_supports_double_wide()
2092 (crtc->pipe == PIPE_A || IS_I915G(dev_priv)); in intel_crtc_supports_double_wide()
2139 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); in intel_crtc_compute_pixel_rate()
2252 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_crtc_compute_pipe_src() local
2253 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in intel_crtc_compute_pipe_src()
2267 crtc->base.base.id, crtc->base.name); in intel_crtc_compute_pipe_src()
2275 crtc->base.base.id, crtc->base.name); in intel_crtc_compute_pipe_src()
2285 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_crtc_compute_pipe_mode() local
2286 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in intel_crtc_compute_pipe_mode()
2311 if (intel_crtc_supports_double_wide(crtc) && in intel_crtc_compute_pipe_mode()
2321 crtc->base.base.id, crtc->base.name, in intel_crtc_compute_pipe_mode()
2331 struct intel_crtc *crtc) in intel_crtc_compute_config() argument
2334 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_compute_config()
2337 ret = intel_dpll_crtc_compute_clock(state, crtc); in intel_crtc_compute_config()
2352 return ilk_fdi_compute_config(crtc, crtc_state); in intel_crtc_compute_config()
2461 void intel_cpu_transcoder_set_m1_n1(struct intel_crtc *crtc, in intel_cpu_transcoder_set_m1_n1() argument
2465 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_cpu_transcoder_set_m1_n1()
2466 enum pipe pipe = crtc->pipe; in intel_cpu_transcoder_set_m1_n1()
2478 void intel_cpu_transcoder_set_m2_n2(struct intel_crtc *crtc, in intel_cpu_transcoder_set_m2_n2() argument
2482 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_cpu_transcoder_set_m2_n2()
2494 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_set_transcoder_timings() local
2495 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_set_transcoder_timings()
2496 enum pipe pipe = crtc->pipe; in intel_set_transcoder_timings()
2575 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_set_pipe_src_size() local
2576 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_set_pipe_src_size()
2579 enum pipe pipe = crtc->pipe; in intel_set_pipe_src_size()
2590 struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev); in intel_pipe_is_interlaced()
2603 static void intel_get_transcoder_timings(struct intel_crtc *crtc, in intel_get_transcoder_timings() argument
2606 struct drm_device *dev = crtc->base.dev; in intel_get_transcoder_timings()
2654 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_bigjoiner_adjust_pipe_src() local
2656 enum pipe master_pipe, pipe = crtc->pipe; in intel_bigjoiner_adjust_pipe_src()
2669 static void intel_get_pipe_src_size(struct intel_crtc *crtc, in intel_get_pipe_src_size() argument
2672 struct drm_device *dev = crtc->base.dev; in intel_get_pipe_src_size()
2676 tmp = intel_de_read(dev_priv, PIPESRC(crtc->pipe)); in intel_get_pipe_src_size()
2687 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in i9xx_set_pipeconf() local
2688 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_set_pipeconf()
2764 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in i9xx_get_pfit_config() local
2765 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_get_pfit_config()
2782 if (pipe != crtc->pipe) in i9xx_get_pfit_config()
2790 static void vlv_crtc_clock_get(struct intel_crtc *crtc, in vlv_crtc_clock_get() argument
2793 struct drm_device *dev = crtc->base.dev; in vlv_crtc_clock_get()
2795 enum pipe pipe = crtc->pipe; in vlv_crtc_clock_get()
2817 static void chv_crtc_clock_get(struct intel_crtc *crtc, in chv_crtc_clock_get() argument
2820 struct drm_device *dev = crtc->base.dev; in chv_crtc_clock_get()
2822 enum pipe pipe = crtc->pipe; in chv_crtc_clock_get()
2852 bdw_get_pipe_misc_output_format(struct intel_crtc *crtc) in bdw_get_pipe_misc_output_format() argument
2854 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in bdw_get_pipe_misc_output_format()
2857 tmp = intel_de_read(dev_priv, PIPE_MISC(crtc->pipe)); in bdw_get_pipe_misc_output_format()
2874 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in i9xx_get_pipe_color_config() local
2875 struct intel_plane *plane = to_intel_plane(crtc->base.primary); in i9xx_get_pipe_color_config()
2876 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_get_pipe_color_config()
2890 static bool i9xx_get_pipe_config(struct intel_crtc *crtc, in i9xx_get_pipe_config() argument
2893 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_get_pipe_config()
2899 power_domain = POWER_DOMAIN_PIPE(crtc->pipe); in i9xx_get_pipe_config()
2906 pipe_config->cpu_transcoder = (enum transcoder) crtc->pipe; in i9xx_get_pipe_config()
2947 CGM_PIPE_MODE(crtc->pipe)); in i9xx_get_pipe_config()
2955 intel_get_transcoder_timings(crtc, pipe_config); in i9xx_get_pipe_config()
2956 intel_get_pipe_src_size(crtc, pipe_config); in i9xx_get_pipe_config()
2962 if (IS_CHERRYVIEW(dev_priv) && crtc->pipe != PIPE_A) in i9xx_get_pipe_config()
2963 tmp = dev_priv->display.state.chv_dpll_md[crtc->pipe]; in i9xx_get_pipe_config()
2965 tmp = intel_de_read(dev_priv, DPLL_MD(crtc->pipe)); in i9xx_get_pipe_config()
2972 tmp = intel_de_read(dev_priv, DPLL(crtc->pipe)); in i9xx_get_pipe_config()
2983 DPLL(crtc->pipe)); in i9xx_get_pipe_config()
2986 FP0(crtc->pipe)); in i9xx_get_pipe_config()
2988 FP1(crtc->pipe)); in i9xx_get_pipe_config()
2997 chv_crtc_clock_get(crtc, pipe_config); in i9xx_get_pipe_config()
2999 vlv_crtc_clock_get(crtc, pipe_config); in i9xx_get_pipe_config()
3001 i9xx_crtc_clock_get(crtc, pipe_config); in i9xx_get_pipe_config()
3021 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in ilk_set_pipeconf() local
3022 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ilk_set_pipeconf()
3085 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in hsw_set_transconf() local
3086 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_set_transconf()
3115 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in bdw_set_pipe_misc() local
3116 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in bdw_set_pipe_misc()
3160 intel_de_write(dev_priv, PIPE_MISC(crtc->pipe), val); in bdw_set_pipe_misc()
3163 int bdw_get_pipe_misc_bpp(struct intel_crtc *crtc) in bdw_get_pipe_misc_bpp() argument
3165 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in bdw_get_pipe_misc_bpp()
3168 tmp = intel_de_read(dev_priv, PIPE_MISC(crtc->pipe)); in bdw_get_pipe_misc_bpp()
3220 void intel_cpu_transcoder_get_m1_n1(struct intel_crtc *crtc, in intel_cpu_transcoder_get_m1_n1() argument
3224 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_cpu_transcoder_get_m1_n1()
3225 enum pipe pipe = crtc->pipe; in intel_cpu_transcoder_get_m1_n1()
3237 void intel_cpu_transcoder_get_m2_n2(struct intel_crtc *crtc, in intel_cpu_transcoder_get_m2_n2() argument
3241 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_cpu_transcoder_get_m2_n2()
3253 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in ilk_get_pfit_config() local
3254 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ilk_get_pfit_config()
3258 ctl = intel_de_read(dev_priv, PF_CTL(crtc->pipe)); in ilk_get_pfit_config()
3265 pipe = crtc->pipe; in ilk_get_pfit_config()
3269 pos = intel_de_read(dev_priv, PF_WIN_POS(crtc->pipe)); in ilk_get_pfit_config()
3270 size = intel_de_read(dev_priv, PF_WIN_SZ(crtc->pipe)); in ilk_get_pfit_config()
3283 drm_WARN_ON(&dev_priv->drm, pipe != crtc->pipe); in ilk_get_pfit_config()
3286 static bool ilk_get_pipe_config(struct intel_crtc *crtc, in ilk_get_pipe_config() argument
3289 struct drm_device *dev = crtc->base.dev; in ilk_get_pipe_config()
3296 power_domain = POWER_DOMAIN_PIPE(crtc->pipe); in ilk_get_pipe_config()
3301 pipe_config->cpu_transcoder = (enum transcoder) crtc->pipe; in ilk_get_pipe_config()
3348 PIPE_CSC_MODE(crtc->pipe)); in ilk_get_pipe_config()
3357 intel_get_transcoder_timings(crtc, pipe_config); in ilk_get_pipe_config()
3358 intel_get_pipe_src_size(crtc, pipe_config); in ilk_get_pipe_config()
3402 struct intel_crtc *crtc; in enabled_bigjoiner_pipes() local
3407 for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, in enabled_bigjoiner_pipes()
3410 enum pipe pipe = crtc->pipe; in enabled_bigjoiner_pipes()
3413 power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe); in enabled_bigjoiner_pipes()
3487 static u8 hsw_enabled_transcoders(struct intel_crtc *crtc) in hsw_enabled_transcoders() argument
3489 struct drm_device *dev = crtc->base.dev; in hsw_enabled_transcoders()
3535 if (trans_pipe == crtc->pipe) in hsw_enabled_transcoders()
3540 cpu_transcoder = (enum transcoder) crtc->pipe; in hsw_enabled_transcoders()
3546 if (slave_pipes & BIT(crtc->pipe)) { in hsw_enabled_transcoders()
3548 get_bigjoiner_master_pipe(crtc->pipe, master_pipes, slave_pipes); in hsw_enabled_transcoders()
3589 static bool hsw_get_transcoder_state(struct intel_crtc *crtc, in hsw_get_transcoder_state() argument
3593 struct drm_device *dev = crtc->base.dev; in hsw_get_transcoder_state()
3598 enabled_transcoders = hsw_enabled_transcoders(crtc); in hsw_get_transcoder_state()
3627 static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc, in bxt_get_dsi_transcoder_state() argument
3631 struct drm_device *dev = crtc->base.dev; in bxt_get_dsi_transcoder_state()
3663 if ((tmp & BXT_PIPE_SELECT_MASK) != BXT_PIPE_SELECT(crtc->pipe)) in bxt_get_dsi_transcoder_state()
3675 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_bigjoiner_get_config() local
3676 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in intel_bigjoiner_get_config()
3678 enum pipe pipe = crtc->pipe; in intel_bigjoiner_get_config()
3690 static bool hsw_get_pipe_config(struct intel_crtc *crtc, in hsw_get_pipe_config() argument
3693 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_get_pipe_config()
3697 if (!intel_display_power_get_in_set_if_enabled(dev_priv, &crtc->hw_readout_power_domains, in hsw_get_pipe_config()
3698 POWER_DOMAIN_PIPE(crtc->pipe))) in hsw_get_pipe_config()
3703 active = hsw_get_transcoder_state(crtc, pipe_config, &crtc->hw_readout_power_domains); in hsw_get_pipe_config()
3706 bxt_get_dsi_transcoder_state(crtc, pipe_config, &crtc->hw_readout_power_domains)) { in hsw_get_pipe_config()
3719 intel_get_transcoder_timings(crtc, pipe_config); in hsw_get_pipe_config()
3724 intel_get_pipe_src_size(crtc, pipe_config); in hsw_get_pipe_config()
3736 bdw_get_pipe_misc_output_format(crtc); in hsw_get_pipe_config()
3742 GAMMA_MODE(crtc->pipe)); in hsw_get_pipe_config()
3745 PIPE_CSC_MODE(crtc->pipe)); in hsw_get_pipe_config()
3748 tmp = intel_de_read(dev_priv, SKL_BOTTOM_COLOR(crtc->pipe)); in hsw_get_pipe_config()
3761 tmp = intel_de_read(dev_priv, WM_LINETIME(crtc->pipe)); in hsw_get_pipe_config()
3767 if (intel_display_power_get_in_set_if_enabled(dev_priv, &crtc->hw_readout_power_domains, in hsw_get_pipe_config()
3768 POWER_DOMAIN_PIPE_PANEL_FITTER(crtc->pipe))) { in hsw_get_pipe_config()
3798 intel_display_power_put_all_in_set(dev_priv, &crtc->hw_readout_power_domains); in hsw_get_pipe_config()
3805 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_crtc_get_pipe_config() local
3806 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in intel_crtc_get_pipe_config()
3808 if (!i915->display.funcs.display->get_pipe_config(crtc, crtc_state)) in intel_crtc_get_pipe_config()
3835 void i9xx_crtc_clock_get(struct intel_crtc *crtc, in i9xx_crtc_clock_get() argument
3838 struct drm_device *dev = crtc->base.dev; in i9xx_crtc_clock_get()
3893 lvds_pipe == crtc->pipe) { in i9xx_crtc_clock_get()
3977 struct intel_crtc *crtc; in intel_encoder_current_mode() local
3983 crtc = intel_crtc_for_pipe(dev_priv, pipe); in intel_encoder_current_mode()
3989 crtc_state = intel_crtc_state_alloc(crtc); in intel_encoder_current_mode()
4019 struct intel_crtc *crtc, in check_single_encoder_cloning() argument
4028 if (connector_state->crtc != &crtc->base) in check_single_encoder_cloning()
4067 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in icl_check_nv12_planes() local
4068 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in icl_check_nv12_planes()
4082 if (plane->pipe != crtc->pipe || !plane_state->planar_linked_plane) in icl_check_nv12_planes()
4103 if (plane->pipe != crtc->pipe || in icl_check_nv12_planes()
4107 for_each_intel_plane_on_crtc(&dev_priv->drm, crtc, linked) { in icl_check_nv12_planes()
4172 struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); in c8_planes_changed() local
4176 intel_atomic_get_old_crtc_state(state, crtc); in c8_planes_changed()
4214 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in skl_linetime_wm() local
4215 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in skl_linetime_wm()
4235 struct intel_crtc *crtc) in hsw_compute_linetime_wm() argument
4237 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in hsw_compute_linetime_wm()
4239 intel_atomic_get_new_crtc_state(state, crtc); in hsw_compute_linetime_wm()
4247 if (!hsw_crtc_supports_ips(crtc)) in hsw_compute_linetime_wm()
4261 struct intel_crtc *crtc) in intel_crtc_atomic_check() argument
4263 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_crtc_atomic_check()
4265 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_atomic_check()
4274 ret = intel_dpll_crtc_get_shared_dpll(state, crtc); in intel_crtc_atomic_check()
4292 ret = intel_compute_pipe_wm(state, crtc); in intel_crtc_atomic_check()
4304 ret = intel_compute_intermediate_wm(state, crtc); in intel_crtc_atomic_check()
4319 ret = intel_atomic_setup_scalers(dev_priv, crtc, crtc_state); in intel_crtc_atomic_check()
4325 ret = hsw_ips_compute_config(state, crtc); in intel_crtc_atomic_check()
4332 ret = hsw_compute_linetime_wm(state, crtc); in intel_crtc_atomic_check()
4338 ret = intel_psr2_sel_fetch_update(state, crtc); in intel_crtc_atomic_check()
4350 struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev); in compute_sink_pipe_bpp()
4389 struct intel_crtc *crtc) in compute_baseline_pipe_bpp() argument
4391 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in compute_baseline_pipe_bpp()
4393 intel_atomic_get_new_crtc_state(state, crtc); in compute_baseline_pipe_bpp()
4412 if (connector_state->crtc != &crtc->base) in compute_baseline_pipe_bpp()
4459 drm_WARN_ON(dev, !connector_state->crtc); in check_digital_port_conflicts()
4494 struct intel_crtc *crtc) in intel_crtc_copy_uapi_to_hw_state_nomodeset() argument
4497 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_copy_uapi_to_hw_state_nomodeset()
4511 struct intel_crtc *crtc) in intel_crtc_copy_uapi_to_hw_state_modeset() argument
4514 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_copy_uapi_to_hw_state_modeset()
4526 intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc); in intel_crtc_copy_uapi_to_hw_state_modeset()
4603 struct intel_crtc *crtc) in intel_crtc_prepare_cleared_state() argument
4606 intel_atomic_get_new_crtc_state(state, crtc); in intel_crtc_prepare_cleared_state()
4607 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_crtc_prepare_cleared_state()
4610 saved_state = intel_crtc_state_alloc(crtc); in intel_crtc_prepare_cleared_state()
4637 intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc); in intel_crtc_prepare_cleared_state()
4644 struct intel_crtc *crtc) in intel_modeset_pipe_config() argument
4646 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in intel_modeset_pipe_config()
4648 intel_atomic_get_new_crtc_state(state, crtc); in intel_modeset_pipe_config()
4655 crtc_state->cpu_transcoder = (enum transcoder) crtc->pipe; in intel_modeset_pipe_config()
4672 ret = compute_baseline_pipe_bpp(state, crtc); in intel_modeset_pipe_config()
4695 if (connector_state->crtc != &crtc->base) in intel_modeset_pipe_config()
4698 if (!check_single_encoder_cloning(state, crtc, encoder)) { in intel_modeset_pipe_config()
4734 if (connector_state->crtc != &crtc->base) in intel_modeset_pipe_config()
4754 ret = intel_crtc_compute_config(state, crtc); in intel_modeset_pipe_config()
4760 crtc->base.base.id, crtc->base.name)) in intel_modeset_pipe_config()
4764 crtc->base.base.id, crtc->base.name); in intel_modeset_pipe_config()
4770 crtc->base.base.id, crtc->base.name, ret); in intel_modeset_pipe_config()
4782 crtc->base.base.id, crtc->base.name, in intel_modeset_pipe_config()
4790 struct intel_crtc *crtc) in intel_modeset_pipe_config_late() argument
4793 intel_atomic_get_new_crtc_state(state, crtc); in intel_modeset_pipe_config_late()
4806 if (conn_state->crtc != &crtc->base || in intel_modeset_pipe_config_late()
4963 pipe_config_mismatch(bool fastset, const struct intel_crtc *crtc, in pipe_config_mismatch() argument
4966 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in pipe_config_mismatch()
4977 crtc->base.base.id, crtc->base.name, name, &vaf); in pipe_config_mismatch()
4980 crtc->base.base.id, crtc->base.name, name, &vaf); in pipe_config_mismatch()
5007 struct drm_i915_private *dev_priv = to_i915(current_config->uapi.crtc->dev); in intel_pipe_config_compare()
5008 struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc); in intel_pipe_config_compare() local
5021 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5031 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5041 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5051 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5068 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5078 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5089 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5130 pipe_config_mismatch(fastset, crtc, __stringify(name), \ in intel_pipe_config_compare()
5177 pipe_config_mismatch(fastset, crtc, __stringify(lut), \ in intel_pipe_config_compare()
5428 struct intel_crtc *crtc; in intel_modeset_all_pipes() local
5434 for_each_intel_crtc(&dev_priv->drm, crtc) { in intel_modeset_all_pipes()
5438 crtc_state = intel_atomic_get_crtc_state(&state->base, crtc); in intel_modeset_all_pipes()
5447 crtc->base.base.id, crtc->base.name, reason); in intel_modeset_all_pipes()
5454 &crtc->base); in intel_modeset_all_pipes()
5458 ret = intel_dp_mst_add_topology_state_for_crtc(state, crtc); in intel_modeset_all_pipes()
5462 ret = intel_atomic_add_affected_planes(state, crtc); in intel_modeset_all_pipes()
5483 struct intel_crtc *crtc; in hsw_mode_set_planes_workaround() local
5490 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in hsw_mode_set_planes_workaround()
5500 first_pipe = crtc->pipe; in hsw_mode_set_planes_workaround()
5509 for_each_intel_crtc(state->base.dev, crtc) { in hsw_mode_set_planes_workaround()
5510 crtc_state = intel_atomic_get_crtc_state(&state->base, crtc); in hsw_mode_set_planes_workaround()
5524 enabled_pipe = crtc->pipe; in hsw_mode_set_planes_workaround()
5539 struct intel_crtc *crtc; in intel_calc_active_pipes() local
5542 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in intel_calc_active_pipes()
5544 active_pipes |= BIT(crtc->pipe); in intel_calc_active_pipes()
5546 active_pipes &= ~BIT(crtc->pipe); in intel_calc_active_pipes()
5567 struct drm_i915_private *i915 = to_i915(old_crtc_state->uapi.crtc->dev); in intel_crtc_check_fastset()
5582 struct intel_crtc *crtc, in intel_crtc_add_planes_to_state() argument
5588 for_each_intel_plane_on_crtc(&dev_priv->drm, crtc, plane) { in intel_crtc_add_planes_to_state()
5603 struct intel_crtc *crtc) in intel_atomic_add_affected_planes() argument
5606 intel_atomic_get_old_crtc_state(state, crtc); in intel_atomic_add_affected_planes()
5608 intel_atomic_get_new_crtc_state(state, crtc); in intel_atomic_add_affected_planes()
5610 return intel_crtc_add_planes_to_state(state, crtc, in intel_atomic_add_affected_planes()
5624 struct intel_crtc *crtc, in intel_crtc_add_bigjoiner_planes() argument
5633 if (plane->pipe == crtc->pipe) in intel_crtc_add_bigjoiner_planes()
5644 struct intel_crtc *crtc; in intel_bigjoiner_add_affected_planes() local
5647 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in intel_bigjoiner_add_affected_planes()
5654 if (crtc == other) in intel_bigjoiner_add_affected_planes()
5657 ret = intel_crtc_add_bigjoiner_planes(state, crtc, other); in intel_bigjoiner_add_affected_planes()
5672 struct intel_crtc *crtc; in intel_atomic_check_planes() local
5693 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check_planes()
5715 ret = intel_crtc_add_planes_to_state(state, crtc, new_active_planes); in intel_atomic_check_planes()
5726 struct intel_crtc *crtc; in intel_atomic_check_crtcs() local
5729 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in intel_atomic_check_crtcs()
5730 struct drm_i915_private *i915 = to_i915(crtc->base.dev); in intel_atomic_check_crtcs()
5733 ret = intel_crtc_atomic_check(state, crtc); in intel_atomic_check_crtcs()
5737 crtc->base.base.id, crtc->base.name); in intel_atomic_check_crtcs()
5749 struct intel_crtc *crtc; in intel_cpu_transcoders_need_modeset() local
5752 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_cpu_transcoders_need_modeset()
5766 struct intel_crtc *crtc; in intel_pipes_need_modeset() local
5769 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_pipes_need_modeset()
5771 pipes & BIT(crtc->pipe) && in intel_pipes_need_modeset()
5890 struct intel_crtc *crtc) in intel_async_flip_check_uapi() argument
5894 intel_atomic_get_new_crtc_state(state, crtc); in intel_async_flip_check_uapi()
5906 crtc->base.base.id, crtc->base.name); in intel_async_flip_check_uapi()
5913 crtc->base.base.id, crtc->base.name); in intel_async_flip_check_uapi()
5919 if (plane->pipe != crtc->pipe) in intel_async_flip_check_uapi()
5947 static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct intel_crtc *crtc) in intel_async_flip_check_hw() argument
5955 old_crtc_state = intel_atomic_get_old_crtc_state(state, crtc); in intel_async_flip_check_hw()
5956 new_crtc_state = intel_atomic_get_new_crtc_state(state, crtc); in intel_async_flip_check_hw()
5964 crtc->base.base.id, crtc->base.name); in intel_async_flip_check_hw()
5971 crtc->base.base.id, crtc->base.name); in intel_async_flip_check_hw()
5978 crtc->base.base.id, crtc->base.name); in intel_async_flip_check_hw()
5989 crtc->base.base.id, crtc->base.name); in intel_async_flip_check_hw()
5995 if (plane->pipe != crtc->pipe) in intel_async_flip_check_hw()
6145 struct intel_crtc *crtc; in intel_bigjoiner_add_affected_crtcs() local
6150 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in intel_bigjoiner_add_affected_crtcs()
6156 for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, affected_pipes) { in intel_bigjoiner_add_affected_crtcs()
6157 crtc_state = intel_atomic_get_crtc_state(&state->base, crtc); in intel_bigjoiner_add_affected_crtcs()
6162 for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, modeset_pipes) { in intel_bigjoiner_add_affected_crtcs()
6165 crtc_state = intel_atomic_get_new_crtc_state(state, crtc); in intel_bigjoiner_add_affected_crtcs()
6169 ret = drm_atomic_add_affected_connectors(&state->base, &crtc->base); in intel_bigjoiner_add_affected_crtcs()
6173 ret = intel_atomic_add_affected_planes(state, crtc); in intel_bigjoiner_add_affected_crtcs()
6178 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in intel_bigjoiner_add_affected_crtcs()
6182 kill_bigjoiner_slave(state, crtc); in intel_bigjoiner_add_affected_crtcs()
6199 struct intel_crtc *crtc; in intel_atomic_check() local
6203 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check()
6226 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_atomic_check()
6227 ret = intel_async_flip_check_uapi(state, crtc); in intel_atomic_check()
6236 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check()
6240 copy_bigjoiner_crtc_state_nomodeset(state, crtc); in intel_atomic_check()
6242 intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc); in intel_atomic_check()
6251 ret = intel_crtc_prepare_cleared_state(state, crtc); in intel_atomic_check()
6258 ret = intel_modeset_pipe_config(state, crtc); in intel_atomic_check()
6262 ret = intel_atomic_check_bigjoiner(state, crtc); in intel_atomic_check()
6267 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check()
6273 ret = intel_modeset_pipe_config_late(state, crtc); in intel_atomic_check()
6292 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_atomic_check()
6328 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check()
6335 intel_release_shared_dplls(state, crtc); in intel_atomic_check()
6390 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check()
6394 ret = intel_async_flip_check_hw(state, crtc); in intel_atomic_check()
6422 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_check()
6432 struct intel_crtc *crtc; in intel_atomic_prepare_commit() local
6439 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { in intel_atomic_prepare_commit()
6447 void intel_crtc_arm_fifo_underrun(struct intel_crtc *crtc, in intel_crtc_arm_fifo_underrun() argument
6450 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_crtc_arm_fifo_underrun()
6453 intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, true); in intel_crtc_arm_fifo_underrun()
6457 intel_crtc_pch_transcoder(crtc); in intel_crtc_arm_fifo_underrun()
6466 struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); in intel_pipe_fastset() local
6467 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in intel_pipe_fastset()
6503 intel_cpu_transcoder_set_m1_n1(crtc, new_crtc_state->cpu_transcoder, in intel_pipe_fastset()
6508 struct intel_crtc *crtc) in commit_pipe_pre_planes() argument
6512 intel_atomic_get_old_crtc_state(state, crtc); in commit_pipe_pre_planes()
6514 intel_atomic_get_new_crtc_state(state, crtc); in commit_pipe_pre_planes()
6534 intel_atomic_update_watermarks(state, crtc); in commit_pipe_pre_planes()
6538 struct intel_crtc *crtc) in commit_pipe_post_planes() argument
6542 intel_atomic_get_old_crtc_state(state, crtc); in commit_pipe_post_planes()
6544 intel_atomic_get_new_crtc_state(state, crtc); in commit_pipe_post_planes()
6560 struct intel_crtc *crtc) in intel_enable_crtc() argument
6564 intel_atomic_get_new_crtc_state(state, crtc); in intel_enable_crtc()
6572 dev_priv->display.funcs.display->crtc_enable(state, crtc); in intel_enable_crtc()
6578 intel_crtc_enable_pipe_crc(crtc); in intel_enable_crtc()
6582 struct intel_crtc *crtc) in intel_update_crtc() argument
6586 intel_atomic_get_old_crtc_state(state, crtc); in intel_update_crtc()
6588 intel_atomic_get_new_crtc_state(state, crtc); in intel_update_crtc()
6594 intel_dpt_configure(crtc); in intel_update_crtc()
6602 intel_pre_plane_update(state, crtc); in intel_update_crtc()
6605 intel_encoders_update_pipe(state, crtc); in intel_update_crtc()
6612 intel_fbc_update(state, crtc); in intel_update_crtc()
6620 intel_crtc_planes_update_noarm(state, crtc); in intel_update_crtc()
6623 intel_pipe_update_start(state, crtc); in intel_update_crtc()
6625 commit_pipe_pre_planes(state, crtc); in intel_update_crtc()
6627 intel_crtc_planes_update_arm(state, crtc); in intel_update_crtc()
6629 commit_pipe_post_planes(state, crtc); in intel_update_crtc()
6631 intel_pipe_update_end(state, crtc); in intel_update_crtc()
6650 intel_crtc_arm_fifo_underrun(crtc, new_crtc_state); in intel_update_crtc()
6656 struct intel_crtc *crtc) in intel_old_crtc_state_disables() argument
6664 intel_crtc_disable_pipe_crc(crtc); in intel_old_crtc_state_disables()
6666 dev_priv->display.funcs.display->crtc_disable(state, crtc); in intel_old_crtc_state_disables()
6667 crtc->active = false; in intel_old_crtc_state_disables()
6668 intel_fbc_disable(crtc); in intel_old_crtc_state_disables()
6671 intel_initial_watermarks(state, crtc); in intel_old_crtc_state_disables()
6677 struct intel_crtc *crtc; in intel_commit_modeset_disables() local
6681 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_commit_modeset_disables()
6686 intel_pre_plane_update(state, crtc); in intel_commit_modeset_disables()
6691 intel_crtc_disable_planes(state, crtc); in intel_commit_modeset_disables()
6695 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_commit_modeset_disables()
6714 new_crtc_state, crtc); in intel_commit_modeset_disables()
6715 handled |= BIT(crtc->pipe); in intel_commit_modeset_disables()
6719 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_commit_modeset_disables()
6722 (handled & BIT(crtc->pipe))) in intel_commit_modeset_disables()
6729 new_crtc_state, crtc); in intel_commit_modeset_disables()
6736 struct intel_crtc *crtc; in intel_commit_modeset_enables() local
6739 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_commit_modeset_enables()
6743 intel_enable_crtc(state, crtc); in intel_commit_modeset_enables()
6744 intel_update_crtc(state, crtc); in intel_commit_modeset_enables()
6751 struct intel_crtc *crtc; in skl_commit_modeset_enables() local
6757 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in skl_commit_modeset_enables()
6758 enum pipe pipe = crtc->pipe; in skl_commit_modeset_enables()
6782 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in skl_commit_modeset_enables()
6784 enum pipe pipe = crtc->pipe; in skl_commit_modeset_enables()
6796 intel_update_crtc(state, crtc); in skl_commit_modeset_enables()
6807 intel_crtc_wait_for_next_vblank(crtc); in skl_commit_modeset_enables()
6817 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in skl_commit_modeset_enables()
6818 enum pipe pipe = crtc->pipe; in skl_commit_modeset_enables()
6830 intel_enable_crtc(state, crtc); in skl_commit_modeset_enables()
6837 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in skl_commit_modeset_enables()
6838 enum pipe pipe = crtc->pipe; in skl_commit_modeset_enables()
6845 intel_enable_crtc(state, crtc); in skl_commit_modeset_enables()
6851 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in skl_commit_modeset_enables()
6852 enum pipe pipe = crtc->pipe; in skl_commit_modeset_enables()
6863 intel_update_crtc(state, crtc); in skl_commit_modeset_enables()
6921 struct intel_crtc *crtc; in intel_atomic_cleanup_work() local
6924 for_each_old_intel_crtc_in_state(state, crtc, old_crtc_state, i) in intel_atomic_cleanup_work()
6982 struct intel_crtc *crtc; in intel_atomic_commit_tail() local
7023 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_commit_tail()
7027 intel_modeset_get_crtc_power_domains(new_crtc_state, &put_domains[crtc->pipe]); in intel_atomic_commit_tail()
7033 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) in intel_atomic_commit_tail()
7034 crtc->config = new_crtc_state; in intel_atomic_commit_tail()
7055 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_atomic_commit_tail()
7061 drm_crtc_send_vblank_event(&crtc->base, in intel_atomic_commit_tail()
7074 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_atomic_commit_tail()
7076 intel_crtc_enable_flip_done(state, crtc); in intel_atomic_commit_tail()
7098 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { in intel_atomic_commit_tail()
7100 intel_crtc_disable_flip_done(state, crtc); in intel_atomic_commit_tail()
7110 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, in intel_atomic_commit_tail()
7121 intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, true); in intel_atomic_commit_tail()
7123 intel_optimize_watermarks(state, crtc); in intel_atomic_commit_tail()
7129 for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in intel_atomic_commit_tail()
7130 intel_post_plane_update(state, crtc); in intel_atomic_commit_tail()
7132 intel_modeset_put_crtc_power_domains(crtc, &put_domains[crtc->pipe]); in intel_atomic_commit_tail()
7134 intel_modeset_verify_crtc(crtc, state, old_crtc_state, new_crtc_state); in intel_atomic_commit_tail()
7137 hsw_ips_post_update(state, crtc); in intel_atomic_commit_tail()
7274 struct intel_crtc *crtc; in intel_atomic_commit() local
7277 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) in intel_atomic_commit()
7300 struct intel_crtc *crtc; in intel_atomic_commit() local
7305 for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) in intel_atomic_commit()
7350 struct intel_crtc *crtc; in intel_get_pipe_from_crtc_id_ioctl() local
7356 crtc = to_intel_crtc(drmmode_crtc); in intel_get_pipe_from_crtc_id_ioctl()
7357 pipe_from_crtc_id->pipe = crtc->pipe; in intel_get_pipe_from_crtc_id_ioctl()
7379 struct intel_crtc *crtc; in intel_encoder_possible_crtcs() local
7382 for_each_intel_crtc_in_pipe_mask(dev, crtc, encoder->pipe_mask) in intel_encoder_possible_crtcs()
7383 possible_crtcs |= drm_crtc_mask(&crtc->base); in intel_encoder_possible_crtcs()
7825 struct intel_crtc *crtc; in intel_initial_commit() local
7838 for_each_intel_crtc(dev, crtc) { in intel_initial_commit()
7840 intel_atomic_get_crtc_state(state, crtc); in intel_initial_commit()
7850 ret = drm_atomic_add_affected_planes(state, &crtc->base); in intel_initial_commit()
7867 &crtc->base); in intel_initial_commit()
7894 struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); in i830_enable_pipe() local
7969 intel_wait_for_pipe_scanline_moving(crtc); in i830_enable_pipe()
7974 struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); in i830_disable_pipe() local
7993 intel_wait_for_pipe_scanline_stopped(crtc); in i830_disable_pipe()