aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_crtc.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-05-31 17:11:10 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-03 14:55:03 -0400
commitac3ba4a5968e4a009898504926220395c44f5ecb (patch)
tree9371cfc915c8f21bb11d2d05513a8f2f886cc027 /include/drm/drm_crtc.h
parent041916a770155c84cb29de3601e626a7ac7a3219 (diff)
drm/doc: Update kerneldoc for drm_crtc.h
Apparently not everyone has been super dutiful with updating this stuff. I still decided to leave out the documentation for all the *_property pointers we have in drm_mode_config. v2: Feedback from Liviu. Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r--include/drm/drm_crtc.h78
1 files changed, 64 insertions, 14 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index e690021ce4cc..f59d8a2d8920 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -314,6 +314,7 @@ struct drm_plane_helper_funcs;
314 * update to ensure framebuffer cleanup isn't done too early 314 * update to ensure framebuffer cleanup isn't done too early
315 * @adjusted_mode: for use by helpers and drivers to compute adjusted mode timings 315 * @adjusted_mode: for use by helpers and drivers to compute adjusted mode timings
316 * @mode: current mode timings 316 * @mode: current mode timings
317 * @mode_blob: &drm_property_blob for @mode
317 * @degamma_lut: Lookup table for converting framebuffer pixel data 318 * @degamma_lut: Lookup table for converting framebuffer pixel data
318 * before apply the conversion matrix 319 * before apply the conversion matrix
319 * @ctm: Transformation matrix 320 * @ctm: Transformation matrix
@@ -708,6 +709,7 @@ struct drm_crtc_funcs {
708 * @dev: parent DRM device 709 * @dev: parent DRM device
709 * @port: OF node used by drm_of_find_possible_crtcs() 710 * @port: OF node used by drm_of_find_possible_crtcs()
710 * @head: list management 711 * @head: list management
712 * @name: human readable name, can be overwritten by the driver
711 * @mutex: per-CRTC locking 713 * @mutex: per-CRTC locking
712 * @base: base KMS object for ID tracking etc. 714 * @base: base KMS object for ID tracking etc.
713 * @primary: primary plane for this CRTC 715 * @primary: primary plane for this CRTC
@@ -738,12 +740,13 @@ struct drm_crtc {
738 740
739 char *name; 741 char *name;
740 742
741 /* 743 /**
742 * crtc mutex 744 * @mutex:
743 * 745 *
744 * This provides a read lock for the overall crtc state (mode, dpms 746 * This provides a read lock for the overall crtc state (mode, dpms
745 * state, ...) and a write lock for everything which can be update 747 * state, ...) and a write lock for everything which can be update
746 * without a full modeset (fb, cursor data, ...) 748 * without a full modeset (fb, cursor data, crtc properties ...). Full
749 * modeset also need to grab dev->mode_config.connection_mutex.
747 */ 750 */
748 struct drm_modeset_lock mutex; 751 struct drm_modeset_lock mutex;
749 752
@@ -1081,7 +1084,7 @@ struct drm_encoder_funcs {
1081 * @dev: parent DRM device 1084 * @dev: parent DRM device
1082 * @head: list management 1085 * @head: list management
1083 * @base: base KMS object 1086 * @base: base KMS object
1084 * @name: encoder name 1087 * @name: human readable name, can be overwritten by the driver
1085 * @encoder_type: one of the %DRM_MODE_ENCODER_<foo> types in drm_mode.h 1088 * @encoder_type: one of the %DRM_MODE_ENCODER_<foo> types in drm_mode.h
1086 * @possible_crtcs: bitmask of potential CRTC bindings 1089 * @possible_crtcs: bitmask of potential CRTC bindings
1087 * @possible_clones: bitmask of potential sibling encoders for cloning 1090 * @possible_clones: bitmask of potential sibling encoders for cloning
@@ -1131,7 +1134,8 @@ struct drm_encoder {
1131 * @attr: sysfs attributes 1134 * @attr: sysfs attributes
1132 * @head: list management 1135 * @head: list management
1133 * @base: base KMS object 1136 * @base: base KMS object
1134 * @name: connector name 1137 * @name: human readable name, can be overwritten by the driver
1138 * @connector_id: compacted connector id useful indexing arrays
1135 * @connector_type: one of the %DRM_MODE_CONNECTOR_<foo> types from drm_mode.h 1139 * @connector_type: one of the %DRM_MODE_CONNECTOR_<foo> types from drm_mode.h
1136 * @connector_type_id: index into connector type enum 1140 * @connector_type_id: index into connector type enum
1137 * @interlace_allowed: can this connector handle interlaced modes? 1141 * @interlace_allowed: can this connector handle interlaced modes?
@@ -1144,7 +1148,6 @@ struct drm_encoder {
1144 * @funcs: connector control functions 1148 * @funcs: connector control functions
1145 * @edid_blob_ptr: DRM property containing EDID if present 1149 * @edid_blob_ptr: DRM property containing EDID if present
1146 * @properties: property tracking for this connector 1150 * @properties: property tracking for this connector
1147 * @path_blob_ptr: DRM blob property data for the DP MST path property
1148 * @polled: a %DRM_CONNECTOR_POLL_<foo> value for core driven polling 1151 * @polled: a %DRM_CONNECTOR_POLL_<foo> value for core driven polling
1149 * @dpms: current dpms state 1152 * @dpms: current dpms state
1150 * @helper_private: mid-layer private data 1153 * @helper_private: mid-layer private data
@@ -1207,8 +1210,23 @@ struct drm_connector {
1207 struct drm_property_blob *edid_blob_ptr; 1210 struct drm_property_blob *edid_blob_ptr;
1208 struct drm_object_properties properties; 1211 struct drm_object_properties properties;
1209 1212
1213 /**
1214 * @path_blob_ptr:
1215 *
1216 * DRM blob property data for the DP MST path property.
1217 */
1210 struct drm_property_blob *path_blob_ptr; 1218 struct drm_property_blob *path_blob_ptr;
1211 1219
1220 /**
1221 * @tile_blob_ptr:
1222 *
1223 * DRM blob property data for the tile property (used mostly by DP MST).
1224 * This is meant for screens which are driven through separate display
1225 * pipelines represented by &drm_crtc, which might not be running with
1226 * genlocked clocks. For tiled panels which are genlocked, like
1227 * dual-link LVDS or dual-link DSI, the driver should try to not expose
1228 * the tiling and virtualize both &drm_crtc and &drm_plane if needed.
1229 */
1212 struct drm_property_blob *tile_blob_ptr; 1230 struct drm_property_blob *tile_blob_ptr;
1213 1231
1214 uint8_t polled; /* DRM_CONNECTOR_POLL_* */ 1232 uint8_t polled; /* DRM_CONNECTOR_POLL_* */
@@ -1270,6 +1288,7 @@ struct drm_connector {
1270 * plane (in 16.16) 1288 * plane (in 16.16)
1271 * @src_w: width of visible portion of plane (in 16.16) 1289 * @src_w: width of visible portion of plane (in 16.16)
1272 * @src_h: height of visible portion of plane (in 16.16) 1290 * @src_h: height of visible portion of plane (in 16.16)
1291 * @rotation: rotation of the plane
1273 * @state: backpointer to global drm_atomic_state 1292 * @state: backpointer to global drm_atomic_state
1274 */ 1293 */
1275struct drm_plane_state { 1294struct drm_plane_state {
@@ -1510,6 +1529,7 @@ enum drm_plane_type {
1510 * struct drm_plane - central DRM plane control structure 1529 * struct drm_plane - central DRM plane control structure
1511 * @dev: DRM device this plane belongs to 1530 * @dev: DRM device this plane belongs to
1512 * @head: for list management 1531 * @head: for list management
1532 * @name: human readable name, can be overwritten by the driver
1513 * @base: base mode object 1533 * @base: base mode object
1514 * @possible_crtcs: pipes this plane can be bound to 1534 * @possible_crtcs: pipes this plane can be bound to
1515 * @format_types: array of formats supported by this plane 1535 * @format_types: array of formats supported by this plane
@@ -1523,6 +1543,7 @@ enum drm_plane_type {
1523 * @properties: property tracking for this plane 1543 * @properties: property tracking for this plane
1524 * @type: type of plane (overlay, primary, cursor) 1544 * @type: type of plane (overlay, primary, cursor)
1525 * @state: current atomic state for this plane 1545 * @state: current atomic state for this plane
1546 * @helper_private: mid-layer private data
1526 */ 1547 */
1527struct drm_plane { 1548struct drm_plane {
1528 struct drm_device *dev; 1549 struct drm_device *dev;
@@ -1530,6 +1551,13 @@ struct drm_plane {
1530 1551
1531 char *name; 1552 char *name;
1532 1553
1554 /**
1555 * @mutex:
1556 *
1557 * Protects modeset plane state, together with the mutex of &drm_crtc
1558 * this plane is linked to (when active, getting actived or getting
1559 * disabled).
1560 */
1533 struct drm_modeset_lock mutex; 1561 struct drm_modeset_lock mutex;
1534 1562
1535 struct drm_mode_object base; 1563 struct drm_mode_object base;
@@ -1726,7 +1754,6 @@ struct __drm_connnectors_state {
1726 * @legacy_set_config: Disable conflicting encoders instead of failing with -EINVAL. 1754 * @legacy_set_config: Disable conflicting encoders instead of failing with -EINVAL.
1727 * @planes: pointer to array of structures with per-plane data 1755 * @planes: pointer to array of structures with per-plane data
1728 * @crtcs: pointer to array of CRTC pointers 1756 * @crtcs: pointer to array of CRTC pointers
1729 * @crtc_states: pointer to array of CRTC states pointers
1730 * @num_connector: size of the @connectors and @connector_states arrays 1757 * @num_connector: size of the @connectors and @connector_states arrays
1731 * @connectors: pointer to array of structures with per-connector data 1758 * @connectors: pointer to array of structures with per-connector data
1732 * @acquire_ctx: acquire context for this atomic modeset state update 1759 * @acquire_ctx: acquire context for this atomic modeset state update
@@ -2042,8 +2069,6 @@ struct drm_mode_config_funcs {
2042 * @connection_mutex: ww mutex protecting connector state and routing 2069 * @connection_mutex: ww mutex protecting connector state and routing
2043 * @acquire_ctx: global implicit acquire context used by atomic drivers for 2070 * @acquire_ctx: global implicit acquire context used by atomic drivers for
2044 * legacy IOCTLs 2071 * legacy IOCTLs
2045 * @idr_mutex: mutex for KMS ID allocation and management
2046 * @crtc_idr: main KMS ID tracking object
2047 * @fb_lock: mutex to protect fb state and lists 2072 * @fb_lock: mutex to protect fb state and lists
2048 * @num_fb: number of fbs available 2073 * @num_fb: number of fbs available
2049 * @fb_list: list of framebuffers available 2074 * @fb_list: list of framebuffers available
@@ -2065,6 +2090,7 @@ struct drm_mode_config_funcs {
2065 * @fb_base: base address of the framebuffer 2090 * @fb_base: base address of the framebuffer
2066 * @poll_enabled: track polling support for this device 2091 * @poll_enabled: track polling support for this device
2067 * @poll_running: track polling status for this device 2092 * @poll_running: track polling status for this device
2093 * @delayed_event: track delayed poll uevent deliver for this device
2068 * @output_poll_work: delayed work for polling in process context 2094 * @output_poll_work: delayed work for polling in process context
2069 * @property_blob_list: list of all the blob property objects 2095 * @property_blob_list: list of all the blob property objects
2070 * @blob_lock: mutex for blob property allocation and management 2096 * @blob_lock: mutex for blob property allocation and management
@@ -2092,10 +2118,30 @@ struct drm_mode_config {
2092 struct mutex mutex; /* protects configuration (mode lists etc.) */ 2118 struct mutex mutex; /* protects configuration (mode lists etc.) */
2093 struct drm_modeset_lock connection_mutex; /* protects connector->encoder and encoder->crtc links */ 2119 struct drm_modeset_lock connection_mutex; /* protects connector->encoder and encoder->crtc links */
2094 struct drm_modeset_acquire_ctx *acquire_ctx; /* for legacy _lock_all() / _unlock_all() */ 2120 struct drm_modeset_acquire_ctx *acquire_ctx; /* for legacy _lock_all() / _unlock_all() */
2095 struct mutex idr_mutex; /* for IDR management */ 2121
2096 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */ 2122 /**
2097 struct idr tile_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */ 2123 * @idr_mutex:
2098 /* this is limited to one for now */ 2124 *
2125 * Mutex for KMS ID allocation and management. Protects both @crtc_idr
2126 * and @tile_idr.
2127 */
2128 struct mutex idr_mutex;
2129
2130 /**
2131 * @crtc_idr:
2132 *
2133 * Main KMS ID tracking object. Use this idr for all IDs, fb, crtc,
2134 * connector, modes - just makes life easier to have only one.
2135 */
2136 struct idr crtc_idr;
2137
2138 /**
2139 * @tile_idr:
2140 *
2141 * Use this idr for allocating new IDs for tiled sinks like use in some
2142 * high-res DP MST screens.
2143 */
2144 struct idr tile_idr;
2099 2145
2100 struct mutex fb_lock; /* proctects global and per-file fb lists */ 2146 struct mutex fb_lock; /* proctects global and per-file fb lists */
2101 int num_fb; 2147 int num_fb;
@@ -2197,7 +2243,11 @@ struct drm_mode_config {
2197 /* whether async page flip is supported or not */ 2243 /* whether async page flip is supported or not */
2198 bool async_page_flip; 2244 bool async_page_flip;
2199 2245
2200 /* whether the driver supports fb modifiers */ 2246 /**
2247 * @allow_fb_modifiers:
2248 *
2249 * Whether the driver supports fb modifiers in the ADDFB2.1 ioctl call.
2250 */
2201 bool allow_fb_modifiers; 2251 bool allow_fb_modifiers;
2202 2252
2203 /* cursor size */ 2253 /* cursor size */