diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-12-04 03:46:01 -0500 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-12-08 10:13:52 -0500 |
| commit | c6b0ca3ea8366d1954c7825d0f67bc833b8e10df (patch) | |
| tree | 0354a81b5a3fd6459e9b9df2e326ae0343e26721 /include/drm/drm_crtc.h | |
| parent | f6da8c6e5ee378c82f20ad07f84556befc7b58e9 (diff) | |
drm: Add kerneldoc for drm_framebuffer_funcs
While typing these I noticed that ->dirty is a bit a can of worms
and even supports blt/fill semantics ... shocked me a bit.
Oh well it's defined in a way that nothing bad (just a bit of inefficiency)
will happen for drivers which supports this. So I didn't bother copying
the detailed spec into the new kerneldoc.
v2: Suggestions from Thierry.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1449218769-16577-21-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/drm/drm_crtc.h')
| -rw-r--r-- | include/drm/drm_crtc.h | 68 |
1 files changed, 50 insertions, 18 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 44a98082d409..f09391f9cac0 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -162,23 +162,55 @@ struct drm_tile_group { | |||
| 162 | u8 group_data[8]; | 162 | u8 group_data[8]; |
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | /** | ||
| 166 | * struct drm_framebuffer_funcs - framebuffer hooks | ||
| 167 | */ | ||
| 165 | struct drm_framebuffer_funcs { | 168 | struct drm_framebuffer_funcs { |
| 166 | /* note: use drm_framebuffer_remove() */ | 169 | /** |
| 170 | * @destroy: | ||
| 171 | * | ||
| 172 | * Clean up framebuffer resources, specifically also unreference the | ||
| 173 | * backing storage. The core guarantees to call this function for every | ||
| 174 | * framebuffer successfully created by ->fb_create() in | ||
| 175 | * &drm_mode_config_funcs. | ||
| 176 | */ | ||
| 167 | void (*destroy)(struct drm_framebuffer *framebuffer); | 177 | void (*destroy)(struct drm_framebuffer *framebuffer); |
| 178 | |||
| 179 | /** | ||
| 180 | * @create_handle: | ||
| 181 | * | ||
| 182 | * Create a buffer handle in the driver-specific buffer manager (either | ||
| 183 | * GEM or TTM) valid for the passed-in struct &drm_file. This is used by | ||
| 184 | * the core to implement the GETFB IOCTL, which returns (for | ||
| 185 | * sufficiently priviledged user) also a native buffer handle. This can | ||
| 186 | * be used for seamless transitions between modesetting clients by | ||
| 187 | * copying the current screen contents to a private buffer and blending | ||
| 188 | * between that and the new contents. | ||
| 189 | * | ||
| 190 | * RETURNS: | ||
| 191 | * | ||
| 192 | * 0 on success or a negative error code on failure. | ||
| 193 | */ | ||
| 168 | int (*create_handle)(struct drm_framebuffer *fb, | 194 | int (*create_handle)(struct drm_framebuffer *fb, |
| 169 | struct drm_file *file_priv, | 195 | struct drm_file *file_priv, |
| 170 | unsigned int *handle); | 196 | unsigned int *handle); |
| 171 | /* | 197 | /** |
| 172 | * Optional callback for the dirty fb ioctl. | 198 | * @dirty: |
| 173 | * | 199 | * |
| 174 | * Userspace can notify the driver via this callback | 200 | * Optional callback for the dirty fb IOCTL. |
| 175 | * that a area of the framebuffer has changed and should | ||
| 176 | * be flushed to the display hardware. | ||
| 177 | * | 201 | * |
| 178 | * See documentation in drm_mode.h for the struct | 202 | * Userspace can notify the driver via this callback that an area of the |
| 179 | * drm_mode_fb_dirty_cmd for more information as all | 203 | * framebuffer has changed and should be flushed to the display |
| 180 | * the semantics and arguments have a one to one mapping | 204 | * hardware. This can also be used internally, e.g. by the fbdev |
| 181 | * on this function. | 205 | * emulation, though that's not the case currently. |
| 206 | * | ||
| 207 | * See documentation in drm_mode.h for the struct drm_mode_fb_dirty_cmd | ||
| 208 | * for more information as all the semantics and arguments have a one to | ||
| 209 | * one mapping on this function. | ||
| 210 | * | ||
| 211 | * RETURNS: | ||
| 212 | * | ||
| 213 | * 0 on success or a negative error code on failure. | ||
| 182 | */ | 214 | */ |
| 183 | int (*dirty)(struct drm_framebuffer *framebuffer, | 215 | int (*dirty)(struct drm_framebuffer *framebuffer, |
| 184 | struct drm_file *file_priv, unsigned flags, | 216 | struct drm_file *file_priv, unsigned flags, |
| @@ -627,7 +659,7 @@ struct drm_crtc_funcs { | |||
| 627 | * @atomic_get_property: | 659 | * @atomic_get_property: |
| 628 | * | 660 | * |
| 629 | * Reads out the decoded driver-private property. This is used to | 661 | * Reads out the decoded driver-private property. This is used to |
| 630 | * implement the GETCRTC ioctl. | 662 | * implement the GETCRTC IOCTL. |
| 631 | * | 663 | * |
| 632 | * Do not call this function directly, use | 664 | * Do not call this function directly, use |
| 633 | * drm_atomic_crtc_get_property() instead. | 665 | * drm_atomic_crtc_get_property() instead. |
| @@ -670,7 +702,7 @@ struct drm_crtc_funcs { | |||
| 670 | * @properties: property tracking for this CRTC | 702 | * @properties: property tracking for this CRTC |
| 671 | * @state: current atomic state for this CRTC | 703 | * @state: current atomic state for this CRTC |
| 672 | * @acquire_ctx: per-CRTC implicit acquire context used by atomic drivers for | 704 | * @acquire_ctx: per-CRTC implicit acquire context used by atomic drivers for |
| 673 | * legacy ioctls | 705 | * legacy IOCTLs |
| 674 | * | 706 | * |
| 675 | * Each CRTC may have one or more connectors associated with it. This structure | 707 | * Each CRTC may have one or more connectors associated with it. This structure |
| 676 | * allows the CRTC to be controlled. | 708 | * allows the CRTC to be controlled. |
| @@ -724,7 +756,7 @@ struct drm_crtc { | |||
| 724 | struct drm_crtc_state *state; | 756 | struct drm_crtc_state *state; |
| 725 | 757 | ||
| 726 | /* | 758 | /* |
| 727 | * For legacy crtc ioctls so that atomic drivers can get at the locking | 759 | * For legacy crtc IOCTLs so that atomic drivers can get at the locking |
| 728 | * acquire context. | 760 | * acquire context. |
| 729 | */ | 761 | */ |
| 730 | struct drm_modeset_acquire_ctx *acquire_ctx; | 762 | struct drm_modeset_acquire_ctx *acquire_ctx; |
| @@ -968,7 +1000,7 @@ struct drm_connector_funcs { | |||
| 968 | * @atomic_get_property: | 1000 | * @atomic_get_property: |
| 969 | * | 1001 | * |
| 970 | * Reads out the decoded driver-private property. This is used to | 1002 | * Reads out the decoded driver-private property. This is used to |
| 971 | * implement the GETCONNECTOR ioctl. | 1003 | * implement the GETCONNECTOR IOCTL. |
| 972 | * | 1004 | * |
| 973 | * Do not call this function directly, use | 1005 | * Do not call this function directly, use |
| 974 | * drm_atomic_connector_get_property() instead. | 1006 | * drm_atomic_connector_get_property() instead. |
| @@ -1269,7 +1301,7 @@ struct drm_plane_funcs { | |||
| 1269 | * @disable_plane: | 1301 | * @disable_plane: |
| 1270 | * | 1302 | * |
| 1271 | * This is the legacy entry point to disable the plane. The DRM core | 1303 | * This is the legacy entry point to disable the plane. The DRM core |
| 1272 | * calls this method in response to a DRM_IOCTL_MODE_SETPLANE ioctl call | 1304 | * calls this method in response to a DRM_IOCTL_MODE_SETPLANE IOCTL call |
| 1273 | * with the frame buffer ID set to 0. Disabled planes must not be | 1305 | * with the frame buffer ID set to 0. Disabled planes must not be |
| 1274 | * processed by the CRTC. | 1306 | * processed by the CRTC. |
| 1275 | * | 1307 | * |
| @@ -1413,7 +1445,7 @@ struct drm_plane_funcs { | |||
| 1413 | * @atomic_get_property: | 1445 | * @atomic_get_property: |
| 1414 | * | 1446 | * |
| 1415 | * Reads out the decoded driver-private property. This is used to | 1447 | * Reads out the decoded driver-private property. This is used to |
| 1416 | * implement the GETPLANE ioctl. | 1448 | * implement the GETPLANE IOCTL. |
| 1417 | * | 1449 | * |
| 1418 | * Do not call this function directly, use | 1450 | * Do not call this function directly, use |
| 1419 | * drm_atomic_plane_get_property() instead. | 1451 | * drm_atomic_plane_get_property() instead. |
| @@ -1628,7 +1660,7 @@ struct drm_bridge { | |||
| 1628 | * struct drm_atomic_state - the global state object for atomic updates | 1660 | * struct drm_atomic_state - the global state object for atomic updates |
| 1629 | * @dev: parent DRM device | 1661 | * @dev: parent DRM device |
| 1630 | * @allow_modeset: allow full modeset | 1662 | * @allow_modeset: allow full modeset |
| 1631 | * @legacy_cursor_update: hint to enforce legacy cursor ioctl semantics | 1663 | * @legacy_cursor_update: hint to enforce legacy cursor IOCTL semantics |
| 1632 | * @planes: pointer to array of plane pointers | 1664 | * @planes: pointer to array of plane pointers |
| 1633 | * @plane_states: pointer to array of plane states pointers | 1665 | * @plane_states: pointer to array of plane states pointers |
| 1634 | * @crtcs: pointer to array of CRTC pointers | 1666 | * @crtcs: pointer to array of CRTC pointers |
| @@ -1716,7 +1748,7 @@ struct drm_mode_config_funcs { | |||
| 1716 | * @mutex: mutex protecting KMS related lists and structures | 1748 | * @mutex: mutex protecting KMS related lists and structures |
| 1717 | * @connection_mutex: ww mutex protecting connector state and routing | 1749 | * @connection_mutex: ww mutex protecting connector state and routing |
| 1718 | * @acquire_ctx: global implicit acquire context used by atomic drivers for | 1750 | * @acquire_ctx: global implicit acquire context used by atomic drivers for |
| 1719 | * legacy ioctls | 1751 | * legacy IOCTLs |
| 1720 | * @idr_mutex: mutex for KMS ID allocation and management | 1752 | * @idr_mutex: mutex for KMS ID allocation and management |
| 1721 | * @crtc_idr: main KMS ID tracking object | 1753 | * @crtc_idr: main KMS ID tracking object |
| 1722 | * @fb_lock: mutex to protect fb state and lists | 1754 | * @fb_lock: mutex to protect fb state and lists |
