1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022-2023 Intel Corporation
4  */
5 
6 #ifndef __INTEL_VBLANK_H__
7 #define __INTEL_VBLANK_H__
8 
9 #include <linux/ktime.h>
10 #include <linux/types.h>
11 
12 struct drm_crtc;
13 struct intel_crtc;
14 
15 u32 i915_get_vblank_counter(struct drm_crtc *crtc);
16 u32 g4x_get_vblank_counter(struct drm_crtc *crtc);
17 bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int *max_error,
18 				     ktime_t *vblank_time, bool in_vblank_irq);
19 int intel_get_crtc_scanline(struct intel_crtc *crtc);
20 void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc);
21 void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc);
22 
23 #endif /* __INTEL_VBLANK_H__ */
24