16b84bc037ee1a2729c4272db795994ae2b63b68
[openwrt/staging/luka.git] /
1 From 7c0f4f4d81958f63abf696e71b342e8b75a6e530 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@bootlin.com>
3 Date: Wed, 19 Jun 2019 12:17:48 +0200
4 Subject: [PATCH] drm/connector: Add documentation for drm_cmdline_mode
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 commit 772cd52c5574b04b00a97d638b2cfe94c0c1a9b6 upstream.
10
11 The struct drm_cmdline_mode holds the result of the command line parsers.
12 However, it wasn't documented so far, so let's do that.
13
14 Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
15 Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
16 Link: https://patchwork.freedesktop.org/patch/msgid/963c893c16c6a25fc469b53c726f493d99bdc578.1560783090.git-series.maxime.ripard@bootlin.com
17 ---
18 include/drm/drm_connector.h | 86 ++++++++++++++++++++++++++++++++++++-
19 1 file changed, 84 insertions(+), 2 deletions(-)
20
21 --- a/include/drm/drm_connector.h
22 +++ b/include/drm/drm_connector.h
23 @@ -755,18 +755,100 @@ struct drm_connector_funcs {
24 const struct drm_connector_state *state);
25 };
26
27 -/* mode specified on the command line */
28 +/**
29 + * struct drm_cmdline_mode - DRM Mode passed through the kernel command-line
30 + *
31 + * Each connector can have an initial mode with additional options
32 + * passed through the kernel command line. This structure allows to
33 + * express those parameters and will be filled by the command-line
34 + * parser.
35 + */
36 struct drm_cmdline_mode {
37 + /**
38 + * @specified:
39 + *
40 + * Has a mode been read from the command-line?
41 + */
42 bool specified;
43 +
44 + /**
45 + * @refresh_specified:
46 + *
47 + * Did the mode have a preferred refresh rate?
48 + */
49 bool refresh_specified;
50 +
51 + /**
52 + * @bpp_specified:
53 + *
54 + * Did the mode have a preferred BPP?
55 + */
56 bool bpp_specified;
57 - int xres, yres;
58 +
59 + /**
60 + * @xres:
61 + *
62 + * Active resolution on the X axis, in pixels.
63 + */
64 + int xres;
65 +
66 + /**
67 + * @yres:
68 + *
69 + * Active resolution on the Y axis, in pixels.
70 + */
71 + int yres;
72 +
73 + /**
74 + * @bpp:
75 + *
76 + * Bits per pixels for the mode.
77 + */
78 int bpp;
79 +
80 + /**
81 + * @refresh:
82 + *
83 + * Refresh rate, in Hertz.
84 + */
85 int refresh;
86 +
87 + /**
88 + * @rb:
89 + *
90 + * Do we need to use reduced blanking?
91 + */
92 bool rb;
93 +
94 + /**
95 + * @interlace:
96 + *
97 + * The mode is interlaced.
98 + */
99 bool interlace;
100 +
101 + /**
102 + * @cvt:
103 + *
104 + * The timings will be calculated using the VESA Coordinated
105 + * Video Timings instead of looking up the mode from a table.
106 + */
107 bool cvt;
108 +
109 + /**
110 + * @margins:
111 + *
112 + * Add margins to the mode calculation (1.8% of xres rounded
113 + * down to 8 pixels and 1.8% of yres).
114 + */
115 bool margins;
116 +
117 + /**
118 + * @force:
119 + *
120 + * Ignore the hotplug state of the connector, and force its
121 + * state to one of the DRM_FORCE_* values.
122 + */
123 enum drm_connector_force force;
124 };
125