1 /* 2 * Copyright 2011, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _VALIDATE_DISPLAY_MODE_H 6 #define _VALIDATE_DISPLAY_MODE_H 7 8 9 #include <Accelerant.h> 10 11 #include "edid.h" 12 13 struct timing_constraints { 14 uint16 resolution; 15 16 uint16 min_before_sync; 17 uint16 max_sync_start; 18 uint16 min_sync_length; 19 uint16 max_sync_length; 20 uint16 min_after_sync; 21 uint16 max_total; 22 }; 23 24 struct display_constraints { 25 uint16 min_h_display; 26 uint16 max_h_display; 27 uint16 min_v_display; 28 uint16 max_v_display; 29 30 uint32 min_pixel_clock; 31 uint32 max_pixel_clock; 32 33 timing_constraints horizontal_timing; 34 timing_constraints vertical_timing; 35 }; 36 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 43 bool sanitize_display_mode(display_mode& mode, 44 const display_constraints& constraints, const edid1_info* edidInfo); 45 bool is_display_mode_within_bounds(display_mode& mode, const display_mode& low, 46 const display_mode& high); 47 48 49 #ifdef __cplusplus 50 } 51 #endif 52 53 54 #endif /* _VALIDATE_DISPLAY_MODE_H */ 55