Skip to content

Commit 772cd52

Browse files
committed
drm/connector: Add documentation for drm_cmdline_mode
The struct drm_cmdline_mode holds the result of the command line parsers. However, it wasn't documented so far, so let's do that. Reviewed-by: Noralf Trønnes <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/963c893c16c6a25fc469b53c726f493d99bdc578.1560783090.git-series.maxime.ripard@bootlin.com
1 parent c936843 commit 772cd52

File tree

1 file changed

+84
-2
lines changed

1 file changed

+84
-2
lines changed

include/drm/drm_connector.h

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,18 +923,100 @@ struct drm_connector_funcs {
923923
const struct drm_connector_state *state);
924924
};
925925

926-
/* mode specified on the command line */
926+
/**
927+
* struct drm_cmdline_mode - DRM Mode passed through the kernel command-line
928+
*
929+
* Each connector can have an initial mode with additional options
930+
* passed through the kernel command line. This structure allows to
931+
* express those parameters and will be filled by the command-line
932+
* parser.
933+
*/
927934
struct drm_cmdline_mode {
935+
/**
936+
* @specified:
937+
*
938+
* Has a mode been read from the command-line?
939+
*/
928940
bool specified;
941+
942+
/**
943+
* @refresh_specified:
944+
*
945+
* Did the mode have a preferred refresh rate?
946+
*/
929947
bool refresh_specified;
948+
949+
/**
950+
* @bpp_specified:
951+
*
952+
* Did the mode have a preferred BPP?
953+
*/
930954
bool bpp_specified;
931-
int xres, yres;
955+
956+
/**
957+
* @xres:
958+
*
959+
* Active resolution on the X axis, in pixels.
960+
*/
961+
int xres;
962+
963+
/**
964+
* @yres:
965+
*
966+
* Active resolution on the Y axis, in pixels.
967+
*/
968+
int yres;
969+
970+
/**
971+
* @bpp:
972+
*
973+
* Bits per pixels for the mode.
974+
*/
932975
int bpp;
976+
977+
/**
978+
* @refresh:
979+
*
980+
* Refresh rate, in Hertz.
981+
*/
933982
int refresh;
983+
984+
/**
985+
* @rb:
986+
*
987+
* Do we need to use reduced blanking?
988+
*/
934989
bool rb;
990+
991+
/**
992+
* @interlace:
993+
*
994+
* The mode is interlaced.
995+
*/
935996
bool interlace;
997+
998+
/**
999+
* @cvt:
1000+
*
1001+
* The timings will be calculated using the VESA Coordinated
1002+
* Video Timings instead of looking up the mode from a table.
1003+
*/
9361004
bool cvt;
1005+
1006+
/**
1007+
* @margins:
1008+
*
1009+
* Add margins to the mode calculation (1.8% of xres rounded
1010+
* down to 8 pixels and 1.8% of yres).
1011+
*/
9371012
bool margins;
1013+
1014+
/**
1015+
* @force:
1016+
*
1017+
* Ignore the hotplug state of the connector, and force its
1018+
* state to one of the DRM_FORCE_* values.
1019+
*/
9381020
enum drm_connector_force force;
9391021
};
9401022

0 commit comments

Comments
 (0)