Merge branches 'for-3.10/multitouch', 'for-3.10/roccat' and 'for-3.10/upstream' into...
[firefly-linux-kernel-4.4.55.git] / include / video / videomode.h
1 /*
2  * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
3  *
4  * generic videomode description
5  *
6  * This file is released under the GPLv2
7  */
8
9 #ifndef __LINUX_VIDEOMODE_H
10 #define __LINUX_VIDEOMODE_H
11
12 #include <linux/types.h>
13 #include <video/display_timing.h>
14
15 /*
16  * Subsystem independent description of a videomode.
17  * Can be generated from struct display_timing.
18  */
19 struct videomode {
20         unsigned long pixelclock;       /* pixelclock in Hz */
21
22         u32 hactive;
23         u32 hfront_porch;
24         u32 hback_porch;
25         u32 hsync_len;
26
27         u32 vactive;
28         u32 vfront_porch;
29         u32 vback_porch;
30         u32 vsync_len;
31
32         unsigned int dmt_flags; /* VESA DMT flags */
33         unsigned int data_flags; /* video data flags */
34 };
35
36 /**
37  * videomode_from_timing - convert display timing to videomode
38  * @disp: structure with all possible timing entries
39  * @vm: return value
40  * @index: index into the list of display timings in devicetree
41  *
42  * DESCRIPTION:
43  * This function converts a struct display_timing to a struct videomode.
44  */
45 int videomode_from_timing(const struct display_timings *disp,
46                           struct videomode *vm, unsigned int index);
47
48 #endif