1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #include <inttypes.h>
8 
9 namespace edid {
10 
11 typedef struct timing_params {
12     uint32_t pixel_freq_10khz;
13 
14     uint32_t horizontal_addressable;
15     uint32_t horizontal_front_porch;
16     uint32_t horizontal_sync_pulse;
17     uint32_t horizontal_blanking;
18 
19     uint32_t vertical_addressable;
20     uint32_t vertical_front_porch;
21     uint32_t vertical_sync_pulse;
22     uint32_t vertical_blanking;
23 
24     uint32_t flags;
25 
26     static constexpr uint32_t kPositiveHsync = (1 << 1);
27     static constexpr uint32_t kPositiveVsync = (1 << 0);
28     static constexpr uint32_t kInterlaced = (1 << 2);
29     // Flag indicating alternating vblank lengths of |vertical_blanking|
30     // and |vertical_blanking| + 1. The +1 is obtained by adding .5 to
31     // the vfront and vback timings.
32     static constexpr uint32_t kAlternatingVblank = (1 << 3);
33     static constexpr uint32_t kDoubleClocked = (1 << 4);
34 
35     uint32_t vertical_refresh_e2;
36 } timing_params_t;
37 
38 namespace internal {
39 
40 extern const timing_params_t* dmt_timings;
41 extern const uint32_t dmt_timings_count;
42 
43 extern const timing_params_t* cea_timings;
44 extern const uint32_t cea_timings_count;
45 
46 } // namespace internal
47 } // namespace edid
48