Skip to content

Commit c4c7c72

Browse files
committed
drm/sun4i: backend: Document the engine operations
Our operations were missing some documentation to explain what was expected from them. Let's make that clearer. Reviewed-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/fdcd8ec3ae9ecd73ef089ede5218d3a41b49be05.1516613040.git-series.maxime.ripard@free-electrons.com
1 parent f587087 commit c4c7c72

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

drivers/gpu/drm/sun4i/sunxi_engine.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,58 @@ struct drm_device;
1515

1616
struct sunxi_engine;
1717

18+
/**
19+
* struct sunxi_engine_ops - helper operations for sunXi engines
20+
*
21+
* These hooks are used by the common part of the DRM driver to
22+
* implement the proper behaviour.
23+
*/
1824
struct sunxi_engine_ops {
25+
/**
26+
* @commit:
27+
*
28+
* This callback will trigger the hardware switch to commit
29+
* the new configuration that has been setup during the next
30+
* vblank period.
31+
*
32+
* This function is optional.
33+
*/
1934
void (*commit)(struct sunxi_engine *engine);
35+
36+
/**
37+
* @layers_init:
38+
*
39+
* This callback is used to allocate, initialize and register
40+
* the layers supported by that engine.
41+
*
42+
* This function is mandatory.
43+
*
44+
* RETURNS:
45+
*
46+
* The array of struct drm_plane backing the layers, or an
47+
* error pointer on failure.
48+
*/
2049
struct drm_plane **(*layers_init)(struct drm_device *drm,
2150
struct sunxi_engine *engine);
2251

52+
/**
53+
* @apply_color_correction:
54+
*
55+
* This callback will enable the color correction in the
56+
* engine. This is useful only for the composite output.
57+
*
58+
* This function is optional.
59+
*/
2360
void (*apply_color_correction)(struct sunxi_engine *engine);
61+
62+
/**
63+
* @disable_color_correction:
64+
*
65+
* This callback will stop the color correction in the
66+
* engine. This is useful only for the composite output.
67+
*
68+
* This function is optional.
69+
*/
2470
void (*disable_color_correction)(struct sunxi_engine *engine);
2571
};
2672

0 commit comments

Comments
 (0)