Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/encoder: improve drm_encoder_slave.h kernel-doc

Document structs drm_encoder_slave_funcs, drm_encoder_slave, and
drm_i2c_encoder_driver.

v2: Actually document the structs instead of just silencing kernel-doc

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/19bc9672c8ae4f7aee235665a4d2360e8790193d.1709898638.git.jani.nikula@intel.com

+74 -17
+74 -17
include/drm/drm_encoder_slave.h
··· 34 34 35 35 /** 36 36 * struct drm_encoder_slave_funcs - Entry points exposed by a slave encoder driver 37 - * @set_config: Initialize any encoder-specific modesetting parameters. 38 - * The meaning of the @params parameter is implementation 39 - * dependent. It will usually be a structure with DVO port 40 - * data format settings or timings. It's not required for 41 - * the new parameters to take effect until the next mode 42 - * is set. 43 37 * 44 38 * Most of its members are analogous to the function pointers in 45 39 * &drm_encoder_helper_funcs and they can optionally be used to ··· 42 48 * if the encoder is the currently selected one for the connector. 43 49 */ 44 50 struct drm_encoder_slave_funcs { 51 + /** 52 + * @set_config: Initialize any encoder-specific modesetting parameters. 53 + * The meaning of the @params parameter is implementation dependent. It 54 + * will usually be a structure with DVO port data format settings or 55 + * timings. It's not required for the new parameters to take effect 56 + * until the next mode is set. 57 + */ 45 58 void (*set_config)(struct drm_encoder *encoder, 46 59 void *params); 47 60 61 + /** 62 + * @destroy: Analogous to &drm_encoder_funcs @destroy callback. 63 + */ 48 64 void (*destroy)(struct drm_encoder *encoder); 65 + 66 + /** 67 + * @dpms: Analogous to &drm_encoder_helper_funcs @dpms callback. Wrapped 68 + * by drm_i2c_encoder_dpms(). 69 + */ 49 70 void (*dpms)(struct drm_encoder *encoder, int mode); 71 + 72 + /** 73 + * @save: Save state. Wrapped by drm_i2c_encoder_save(). 74 + */ 50 75 void (*save)(struct drm_encoder *encoder); 76 + 77 + /** 78 + * @restore: Restore state. Wrapped by drm_i2c_encoder_restore(). 79 + */ 51 80 void (*restore)(struct drm_encoder *encoder); 81 + 82 + /** 83 + * @mode_fixup: Analogous to &drm_encoder_helper_funcs @mode_fixup 84 + * callback. Wrapped by drm_i2c_encoder_mode_fixup(). 85 + */ 52 86 bool (*mode_fixup)(struct drm_encoder *encoder, 53 87 const struct drm_display_mode *mode, 54 88 struct drm_display_mode *adjusted_mode); 89 + 90 + /** 91 + * @mode_valid: Analogous to &drm_encoder_helper_funcs @mode_valid. 92 + */ 55 93 int (*mode_valid)(struct drm_encoder *encoder, 56 94 struct drm_display_mode *mode); 95 + /** 96 + * @mode_set: Analogous to &drm_encoder_helper_funcs @mode_set 97 + * callback. Wrapped by drm_i2c_encoder_mode_set(). 98 + */ 57 99 void (*mode_set)(struct drm_encoder *encoder, 58 100 struct drm_display_mode *mode, 59 101 struct drm_display_mode *adjusted_mode); 60 102 103 + /** 104 + * @detect: Analogous to &drm_encoder_helper_funcs @detect 105 + * callback. Wrapped by drm_i2c_encoder_detect(). 106 + */ 61 107 enum drm_connector_status (*detect)(struct drm_encoder *encoder, 62 108 struct drm_connector *connector); 109 + /** 110 + * @get_modes: Get modes. 111 + */ 63 112 int (*get_modes)(struct drm_encoder *encoder, 64 113 struct drm_connector *connector); 114 + /** 115 + * @create_resources: Create resources. 116 + */ 65 117 int (*create_resources)(struct drm_encoder *encoder, 66 118 struct drm_connector *connector); 119 + /** 120 + * @set_property: Set property. 121 + */ 67 122 int (*set_property)(struct drm_encoder *encoder, 68 123 struct drm_connector *connector, 69 124 struct drm_property *property, 70 125 uint64_t val); 71 - 72 126 }; 73 127 74 128 /** 75 129 * struct drm_encoder_slave - Slave encoder struct 76 - * @base: DRM encoder object. 77 - * @slave_funcs: Slave encoder callbacks. 78 - * @slave_priv: Slave encoder private data. 79 - * @bus_priv: Bus specific data. 80 130 * 81 131 * A &drm_encoder_slave has two sets of callbacks, @slave_funcs and the 82 132 * ones in @base. The former are never actually called by the common ··· 133 95 * this. 134 96 */ 135 97 struct drm_encoder_slave { 98 + /** 99 + * @base: DRM encoder object. 100 + */ 136 101 struct drm_encoder base; 137 102 103 + /** 104 + * @slave_funcs: Slave encoder callbacks. 105 + */ 138 106 const struct drm_encoder_slave_funcs *slave_funcs; 107 + 108 + /** 109 + * @slave_priv: Slave encoder private data. 110 + */ 139 111 void *slave_priv; 112 + 113 + /** 114 + * @bus_priv: Bus specific data. 115 + */ 140 116 void *bus_priv; 141 117 }; 142 118 #define to_encoder_slave(x) container_of((x), struct drm_encoder_slave, base) ··· 164 112 /** 165 113 * struct drm_i2c_encoder_driver 166 114 * 167 - * Describes a device driver for an encoder connected to the GPU 168 - * through an I2C bus. In addition to the entry points in @i2c_driver 169 - * an @encoder_init function should be provided. It will be called to 170 - * give the driver an opportunity to allocate any per-encoder data 171 - * structures and to initialize the @slave_funcs and (optionally) 172 - * @slave_priv members of @encoder. 115 + * Describes a device driver for an encoder connected to the GPU through an I2C 116 + * bus. 173 117 */ 174 118 struct drm_i2c_encoder_driver { 119 + /** 120 + * @i2c_driver: I2C device driver description. 121 + */ 175 122 struct i2c_driver i2c_driver; 176 123 124 + /** 125 + * @encoder_init: Callback to allocate any per-encoder data structures 126 + * and to initialize the @slave_funcs and (optionally) @slave_priv 127 + * members of @encoder. 128 + */ 177 129 int (*encoder_init)(struct i2c_client *client, 178 130 struct drm_device *dev, 179 131 struct drm_encoder_slave *encoder); ··· 189 133 190 134 /** 191 135 * drm_i2c_encoder_get_client - Get the I2C client corresponding to an encoder 136 + * @encoder: The encoder 192 137 */ 193 138 static inline struct i2c_client *drm_i2c_encoder_get_client(struct drm_encoder *encoder) 194 139 {