Benjamin Gaignard | f2cb314 | 2014-07-30 18:20:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) STMicroelectronics SA 2014 |
| 3 | * Author: Benjamin Gaignard <benjamin.gaignard@st.com> for STMicroelectronics. |
| 4 | * License terms: GNU General Public License (GPL), version 2 |
| 5 | */ |
| 6 | |
| 7 | #ifndef _STI_VTG_H_ |
| 8 | #define _STI_VTG_H_ |
| 9 | |
| 10 | #define VTG_TOP_FIELD_EVENT 1 |
| 11 | #define VTG_BOTTOM_FIELD_EVENT 2 |
| 12 | |
Vincent Abriou | 503290c | 2016-01-28 13:08:48 +0100 | [diff] [blame] | 13 | #define VTG_SYNC_ID_HDMI 1 |
| 14 | #define VTG_SYNC_ID_HDDCS 2 |
| 15 | #define VTG_SYNC_ID_HDF 3 |
| 16 | #define VTG_SYNC_ID_DVO 4 |
| 17 | |
Benjamin Gaignard | f2cb314 | 2014-07-30 18:20:56 +0200 | [diff] [blame] | 18 | struct sti_vtg; |
| 19 | struct drm_display_mode; |
| 20 | struct notifier_block; |
| 21 | |
| 22 | struct sti_vtg *of_vtg_find(struct device_node *np); |
| 23 | void sti_vtg_set_config(struct sti_vtg *vtg, |
| 24 | const struct drm_display_mode *mode); |
Thierry Reding | 2388693 | 2015-09-24 18:35:38 +0200 | [diff] [blame] | 25 | int sti_vtg_register_client(struct sti_vtg *vtg, struct notifier_block *nb, |
| 26 | struct drm_crtc *crtc); |
Benjamin Gaignard | f2cb314 | 2014-07-30 18:20:56 +0200 | [diff] [blame] | 27 | int sti_vtg_unregister_client(struct sti_vtg *vtg, |
| 28 | struct notifier_block *nb); |
| 29 | |
| 30 | u32 sti_vtg_get_line_number(struct drm_display_mode mode, int y); |
| 31 | u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x); |
| 32 | |
| 33 | #endif |