1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2020 Intel Corporation 4 */ 5 6 #ifndef _INTEL_CRTC_H_ 7 #define _INTEL_CRTC_H_ 8 9 #include <linux/types.h> 10 11 enum i9xx_plane_id; 12 enum pipe; 13 struct drm_display_mode; 14 #define drm_i915_private inteldrm_softc 15 struct drm_i915_private; 16 struct intel_atomic_state; 17 struct intel_crtc; 18 struct intel_crtc_state; 19 20 int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode, 21 int usecs); 22 u32 intel_crtc_max_vblank_count(const struct intel_crtc_state *crtc_state); 23 int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe); 24 struct intel_crtc_state *intel_crtc_state_alloc(struct intel_crtc *crtc); 25 void intel_crtc_state_reset(struct intel_crtc_state *crtc_state, 26 struct intel_crtc *crtc); 27 u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc); 28 void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state); 29 void intel_crtc_vblank_off(const struct intel_crtc_state *crtc_state); 30 void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state); 31 void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state); 32 void intel_wait_for_vblank_workers(struct intel_atomic_state *state); 33 struct intel_crtc *intel_first_crtc(struct drm_i915_private *i915); 34 struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915, 35 enum pipe pipe); 36 void intel_wait_for_vblank_if_active(struct drm_i915_private *i915, 37 enum pipe pipe); 38 void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc); 39 40 #endif 41