aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-19 12:38:09 -0500
committerDave Airlie <airlied@redhat.com>2014-11-19 20:35:20 -0500
commit1a49863349929f5a85fd7c7ffb06213d4fdc8c15 (patch)
treeb1498373b6f7f07ebb4a6b4629e0201e903ed128 /drivers/gpu/drm/drm_crtc.c
parentf52b69f1ecfdd7ef6867a257620258c09e569552 (diff)
drm/crtc: Polish kerneldoc
- Make it clear that it's a negative errno (more in line with everything else). - Clean up the confusion around get_properties vs. getproperty ioctls: One reads per-obj property values, the other reads property metadata. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c79
1 files changed, 41 insertions, 38 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 5c878f172365..8c550302a9ef 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1490,7 +1490,7 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
1490 * connectors. 1490 * connectors.
1491 * 1491 *
1492 * Returns: 1492 * Returns:
1493 * Zero on success, errno on failure. 1493 * Zero on success, negative errno on failure.
1494 */ 1494 */
1495int drm_mode_create_aspect_ratio_property(struct drm_device *dev) 1495int drm_mode_create_aspect_ratio_property(struct drm_device *dev)
1496{ 1496{
@@ -1674,7 +1674,7 @@ static void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out,
1674 * the caller. 1674 * the caller.
1675 * 1675 *
1676 * Returns: 1676 * Returns:
1677 * Zero on success, errno on failure. 1677 * Zero on success, negative errno on failure.
1678 */ 1678 */
1679static int drm_crtc_convert_umode(struct drm_display_mode *out, 1679static int drm_crtc_convert_umode(struct drm_display_mode *out,
1680 const struct drm_mode_modeinfo *in) 1680 const struct drm_mode_modeinfo *in)
@@ -1717,7 +1717,7 @@ static int drm_crtc_convert_umode(struct drm_display_mode *out,
1717 * Called by the user via ioctl. 1717 * Called by the user via ioctl.
1718 * 1718 *
1719 * Returns: 1719 * Returns:
1720 * Zero on success, errno on failure. 1720 * Zero on success, negative errno on failure.
1721 */ 1721 */
1722int drm_mode_getresources(struct drm_device *dev, void *data, 1722int drm_mode_getresources(struct drm_device *dev, void *data,
1723 struct drm_file *file_priv) 1723 struct drm_file *file_priv)
@@ -1905,7 +1905,7 @@ out:
1905 * Called by the user via ioctl. 1905 * Called by the user via ioctl.
1906 * 1906 *
1907 * Returns: 1907 * Returns:
1908 * Zero on success, errno on failure. 1908 * Zero on success, negative errno on failure.
1909 */ 1909 */
1910int drm_mode_getcrtc(struct drm_device *dev, 1910int drm_mode_getcrtc(struct drm_device *dev,
1911 void *data, struct drm_file *file_priv) 1911 void *data, struct drm_file *file_priv)
@@ -1966,7 +1966,7 @@ static bool drm_mode_expose_to_userspace(const struct drm_display_mode *mode,
1966 * Called by the user via ioctl. 1966 * Called by the user via ioctl.
1967 * 1967 *
1968 * Returns: 1968 * Returns:
1969 * Zero on success, errno on failure. 1969 * Zero on success, negative errno on failure.
1970 */ 1970 */
1971int drm_mode_getconnector(struct drm_device *dev, void *data, 1971int drm_mode_getconnector(struct drm_device *dev, void *data,
1972 struct drm_file *file_priv) 1972 struct drm_file *file_priv)
@@ -2110,7 +2110,7 @@ out:
2110 * Called by the user via ioctl. 2110 * Called by the user via ioctl.
2111 * 2111 *
2112 * Returns: 2112 * Returns:
2113 * Zero on success, errno on failure. 2113 * Zero on success, negative errno on failure.
2114 */ 2114 */
2115int drm_mode_getencoder(struct drm_device *dev, void *data, 2115int drm_mode_getencoder(struct drm_device *dev, void *data,
2116 struct drm_file *file_priv) 2116 struct drm_file *file_priv)
@@ -2151,7 +2151,7 @@ int drm_mode_getencoder(struct drm_device *dev, void *data,
2151 * Called by the user via ioctl. 2151 * Called by the user via ioctl.
2152 * 2152 *
2153 * Returns: 2153 * Returns:
2154 * Zero on success, errno on failure. 2154 * Zero on success, negative errno on failure.
2155 */ 2155 */
2156int drm_mode_getplane_res(struct drm_device *dev, void *data, 2156int drm_mode_getplane_res(struct drm_device *dev, void *data,
2157 struct drm_file *file_priv) 2157 struct drm_file *file_priv)
@@ -2212,7 +2212,7 @@ int drm_mode_getplane_res(struct drm_device *dev, void *data,
2212 * Called by the user via ioctl. 2212 * Called by the user via ioctl.
2213 * 2213 *
2214 * Returns: 2214 * Returns:
2215 * Zero on success, errno on failure. 2215 * Zero on success, negative errno on failure.
2216 */ 2216 */
2217int drm_mode_getplane(struct drm_device *dev, void *data, 2217int drm_mode_getplane(struct drm_device *dev, void *data,
2218 struct drm_file *file_priv) 2218 struct drm_file *file_priv)
@@ -2386,7 +2386,7 @@ static int setplane_internal(struct drm_plane *plane,
2386 * valid crtc). 2386 * valid crtc).
2387 * 2387 *
2388 * Returns: 2388 * Returns:
2389 * Zero on success, errno on failure. 2389 * Zero on success, negative errno on failure.
2390 */ 2390 */
2391int drm_mode_setplane(struct drm_device *dev, void *data, 2391int drm_mode_setplane(struct drm_device *dev, void *data,
2392 struct drm_file *file_priv) 2392 struct drm_file *file_priv)
@@ -2461,7 +2461,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
2461 * interface. The only thing it adds is correct refcounting dance. 2461 * interface. The only thing it adds is correct refcounting dance.
2462 * 2462 *
2463 * Returns: 2463 * Returns:
2464 * Zero on success, errno on failure. 2464 * Zero on success, negative errno on failure.
2465 */ 2465 */
2466int drm_mode_set_config_internal(struct drm_mode_set *set) 2466int drm_mode_set_config_internal(struct drm_mode_set *set)
2467{ 2467{
@@ -2554,7 +2554,7 @@ EXPORT_SYMBOL(drm_crtc_check_viewport);
2554 * Called by the user via ioctl. 2554 * Called by the user via ioctl.
2555 * 2555 *
2556 * Returns: 2556 * Returns:
2557 * Zero on success, errno on failure. 2557 * Zero on success, negative errno on failure.
2558 */ 2558 */
2559int drm_mode_setcrtc(struct drm_device *dev, void *data, 2559int drm_mode_setcrtc(struct drm_device *dev, void *data,
2560 struct drm_file *file_priv) 2560 struct drm_file *file_priv)
@@ -2717,7 +2717,7 @@ out:
2717 * userspace wants to make use of these capabilities. 2717 * userspace wants to make use of these capabilities.
2718 * 2718 *
2719 * Returns: 2719 * Returns:
2720 * Zero on success, errno on failure. 2720 * Zero on success, negative errno on failure.
2721 */ 2721 */
2722static int drm_mode_cursor_universal(struct drm_crtc *crtc, 2722static int drm_mode_cursor_universal(struct drm_crtc *crtc,
2723 struct drm_mode_cursor2 *req, 2723 struct drm_mode_cursor2 *req,
@@ -2865,7 +2865,7 @@ out:
2865 * Called by the user via ioctl. 2865 * Called by the user via ioctl.
2866 * 2866 *
2867 * Returns: 2867 * Returns:
2868 * Zero on success, errno on failure. 2868 * Zero on success, negative errno on failure.
2869 */ 2869 */
2870int drm_mode_cursor_ioctl(struct drm_device *dev, 2870int drm_mode_cursor_ioctl(struct drm_device *dev,
2871 void *data, struct drm_file *file_priv) 2871 void *data, struct drm_file *file_priv)
@@ -2892,7 +2892,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
2892 * Called by the user via ioctl. 2892 * Called by the user via ioctl.
2893 * 2893 *
2894 * Returns: 2894 * Returns:
2895 * Zero on success, errno on failure. 2895 * Zero on success, negative errno on failure.
2896 */ 2896 */
2897int drm_mode_cursor2_ioctl(struct drm_device *dev, 2897int drm_mode_cursor2_ioctl(struct drm_device *dev,
2898 void *data, struct drm_file *file_priv) 2898 void *data, struct drm_file *file_priv)
@@ -2956,7 +2956,7 @@ EXPORT_SYMBOL(drm_mode_legacy_fb_format);
2956 * Called by the user via ioctl. 2956 * Called by the user via ioctl.
2957 * 2957 *
2958 * Returns: 2958 * Returns:
2959 * Zero on success, errno on failure. 2959 * Zero on success, negative errno on failure.
2960 */ 2960 */
2961int drm_mode_addfb(struct drm_device *dev, 2961int drm_mode_addfb(struct drm_device *dev,
2962 void *data, struct drm_file *file_priv) 2962 void *data, struct drm_file *file_priv)
@@ -3161,7 +3161,7 @@ static struct drm_framebuffer *add_framebuffer_internal(struct drm_device *dev,
3161 * Called by the user via ioctl. 3161 * Called by the user via ioctl.
3162 * 3162 *
3163 * Returns: 3163 * Returns:
3164 * Zero on success, errno on failure. 3164 * Zero on success, negative errno on failure.
3165 */ 3165 */
3166int drm_mode_addfb2(struct drm_device *dev, 3166int drm_mode_addfb2(struct drm_device *dev,
3167 void *data, struct drm_file *file_priv) 3167 void *data, struct drm_file *file_priv)
@@ -3189,7 +3189,7 @@ int drm_mode_addfb2(struct drm_device *dev,
3189 * Called by the user via ioctl. 3189 * Called by the user via ioctl.
3190 * 3190 *
3191 * Returns: 3191 * Returns:
3192 * Zero on success, errno on failure. 3192 * Zero on success, negative errno on failure.
3193 */ 3193 */
3194int drm_mode_rmfb(struct drm_device *dev, 3194int drm_mode_rmfb(struct drm_device *dev,
3195 void *data, struct drm_file *file_priv) 3195 void *data, struct drm_file *file_priv)
@@ -3243,7 +3243,7 @@ fail_lookup:
3243 * Called by the user via ioctl. 3243 * Called by the user via ioctl.
3244 * 3244 *
3245 * Returns: 3245 * Returns:
3246 * Zero on success, errno on failure. 3246 * Zero on success, negative errno on failure.
3247 */ 3247 */
3248int drm_mode_getfb(struct drm_device *dev, 3248int drm_mode_getfb(struct drm_device *dev,
3249 void *data, struct drm_file *file_priv) 3249 void *data, struct drm_file *file_priv)
@@ -3304,7 +3304,7 @@ int drm_mode_getfb(struct drm_device *dev,
3304 * Called by the user via ioctl. 3304 * Called by the user via ioctl.
3305 * 3305 *
3306 * Returns: 3306 * Returns:
3307 * Zero on success, errno on failure. 3307 * Zero on success, negative errno on failure.
3308 */ 3308 */
3309int drm_mode_dirtyfb_ioctl(struct drm_device *dev, 3309int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
3310 void *data, struct drm_file *file_priv) 3310 void *data, struct drm_file *file_priv)
@@ -3384,7 +3384,7 @@ out_err1:
3384 * Called by the user via ioctl. 3384 * Called by the user via ioctl.
3385 * 3385 *
3386 * Returns: 3386 * Returns:
3387 * Zero on success, errno on failure. 3387 * Zero on success, negative errno on failure.
3388 */ 3388 */
3389void drm_fb_release(struct drm_file *priv) 3389void drm_fb_release(struct drm_file *priv)
3390{ 3390{
@@ -3818,17 +3818,20 @@ int drm_object_property_get_value(struct drm_mode_object *obj,
3818EXPORT_SYMBOL(drm_object_property_get_value); 3818EXPORT_SYMBOL(drm_object_property_get_value);
3819 3819
3820/** 3820/**
3821 * drm_mode_getproperty_ioctl - get the current value of a connector's property 3821 * drm_mode_getproperty_ioctl - get the property metadata
3822 * @dev: DRM device 3822 * @dev: DRM device
3823 * @data: ioctl data 3823 * @data: ioctl data
3824 * @file_priv: DRM file info 3824 * @file_priv: DRM file info
3825 * 3825 *
3826 * This function retrieves the current value for an connectors's property. 3826 * This function retrieves the metadata for a given property, like the different
3827 * possible values for an enum property or the limits for a range property.
3828 *
3829 * Blob properties are special
3827 * 3830 *
3828 * Called by the user via ioctl. 3831 * Called by the user via ioctl.
3829 * 3832 *
3830 * Returns: 3833 * Returns:
3831 * Zero on success, errno on failure. 3834 * Zero on success, negative errno on failure.
3832 */ 3835 */
3833int drm_mode_getproperty_ioctl(struct drm_device *dev, 3836int drm_mode_getproperty_ioctl(struct drm_device *dev,
3834 void *data, struct drm_file *file_priv) 3837 void *data, struct drm_file *file_priv)
@@ -3981,7 +3984,7 @@ static void drm_property_destroy_blob(struct drm_device *dev,
3981 * Called by the user via ioctl. 3984 * Called by the user via ioctl.
3982 * 3985 *
3983 * Returns: 3986 * Returns:
3984 * Zero on success, errno on failure. 3987 * Zero on success, negative errno on failure.
3985 */ 3988 */
3986int drm_mode_getblob_ioctl(struct drm_device *dev, 3989int drm_mode_getblob_ioctl(struct drm_device *dev,
3987 void *data, struct drm_file *file_priv) 3990 void *data, struct drm_file *file_priv)
@@ -4026,7 +4029,7 @@ done:
4026 * them more meaningful names. 4029 * them more meaningful names.
4027 * 4030 *
4028 * Returns: 4031 * Returns:
4029 * Zero on success, errno on failure. 4032 * Zero on success, negative errno on failure.
4030 */ 4033 */
4031int drm_mode_connector_set_path_property(struct drm_connector *connector, 4034int drm_mode_connector_set_path_property(struct drm_connector *connector,
4032 const char *path) 4035 const char *path)
@@ -4056,7 +4059,7 @@ EXPORT_SYMBOL(drm_mode_connector_set_path_property);
4056 * connector's edid property. 4059 * connector's edid property.
4057 * 4060 *
4058 * Returns: 4061 * Returns:
4059 * Zero on success, errno on failure. 4062 * Zero on success, negative errno on failure.
4060 */ 4063 */
4061int drm_mode_connector_update_edid_property(struct drm_connector *connector, 4064int drm_mode_connector_update_edid_property(struct drm_connector *connector,
4062 const struct edid *edid) 4065 const struct edid *edid)
@@ -4153,7 +4156,7 @@ static bool drm_property_change_is_valid(struct drm_property *property,
4153 * Called by the user via ioctl. 4156 * Called by the user via ioctl.
4154 * 4157 *
4155 * Returns: 4158 * Returns:
4156 * Zero on success, errno on failure. 4159 * Zero on success, negative errno on failure.
4157 */ 4160 */
4158int drm_mode_connector_property_set_ioctl(struct drm_device *dev, 4161int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
4159 void *data, struct drm_file *file_priv) 4162 void *data, struct drm_file *file_priv)
@@ -4236,7 +4239,7 @@ int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
4236EXPORT_SYMBOL(drm_mode_plane_set_obj_prop); 4239EXPORT_SYMBOL(drm_mode_plane_set_obj_prop);
4237 4240
4238/** 4241/**
4239 * drm_mode_getproperty_ioctl - get the current value of a object's property 4242 * drm_mode_obj_get_properties_ioctl - get the current value of a object's property
4240 * @dev: DRM device 4243 * @dev: DRM device
4241 * @data: ioctl data 4244 * @data: ioctl data
4242 * @file_priv: DRM file info 4245 * @file_priv: DRM file info
@@ -4248,7 +4251,7 @@ EXPORT_SYMBOL(drm_mode_plane_set_obj_prop);
4248 * Called by the user via ioctl. 4251 * Called by the user via ioctl.
4249 * 4252 *
4250 * Returns: 4253 * Returns:
4251 * Zero on success, errno on failure. 4254 * Zero on success, negative errno on failure.
4252 */ 4255 */
4253int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, 4256int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
4254 struct drm_file *file_priv) 4257 struct drm_file *file_priv)
@@ -4320,7 +4323,7 @@ out:
4320 * Called by the user via ioctl. 4323 * Called by the user via ioctl.
4321 * 4324 *
4322 * Returns: 4325 * Returns:
4323 * Zero on success, errno on failure. 4326 * Zero on success, negative errno on failure.
4324 */ 4327 */
4325int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, 4328int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,
4326 struct drm_file *file_priv) 4329 struct drm_file *file_priv)
@@ -4392,7 +4395,7 @@ out:
4392 * possible_clones and possible_crtcs bitmasks. 4395 * possible_clones and possible_crtcs bitmasks.
4393 * 4396 *
4394 * Returns: 4397 * Returns:
4395 * Zero on success, errno on failure. 4398 * Zero on success, negative errno on failure.
4396 */ 4399 */
4397int drm_mode_connector_attach_encoder(struct drm_connector *connector, 4400int drm_mode_connector_attach_encoder(struct drm_connector *connector,
4398 struct drm_encoder *encoder) 4401 struct drm_encoder *encoder)
@@ -4419,7 +4422,7 @@ EXPORT_SYMBOL(drm_mode_connector_attach_encoder);
4419 * fixed gamma table size. 4422 * fixed gamma table size.
4420 * 4423 *
4421 * Returns: 4424 * Returns:
4422 * Zero on success, errno on failure. 4425 * Zero on success, negative errno on failure.
4423 */ 4426 */
4424int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, 4427int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
4425 int gamma_size) 4428 int gamma_size)
@@ -4448,7 +4451,7 @@ EXPORT_SYMBOL(drm_mode_crtc_set_gamma_size);
4448 * Called by the user via ioctl. 4451 * Called by the user via ioctl.
4449 * 4452 *
4450 * Returns: 4453 * Returns:
4451 * Zero on success, errno on failure. 4454 * Zero on success, negative errno on failure.
4452 */ 4455 */
4453int drm_mode_gamma_set_ioctl(struct drm_device *dev, 4456int drm_mode_gamma_set_ioctl(struct drm_device *dev,
4454 void *data, struct drm_file *file_priv) 4457 void *data, struct drm_file *file_priv)
@@ -4520,7 +4523,7 @@ out:
4520 * Called by the user via ioctl. 4523 * Called by the user via ioctl.
4521 * 4524 *
4522 * Returns: 4525 * Returns:
4523 * Zero on success, errno on failure. 4526 * Zero on success, negative errno on failure.
4524 */ 4527 */
4525int drm_mode_gamma_get_ioctl(struct drm_device *dev, 4528int drm_mode_gamma_get_ioctl(struct drm_device *dev,
4526 void *data, struct drm_file *file_priv) 4529 void *data, struct drm_file *file_priv)
@@ -4586,7 +4589,7 @@ out:
4586 * Called by the user via ioctl. 4589 * Called by the user via ioctl.
4587 * 4590 *
4588 * Returns: 4591 * Returns:
4589 * Zero on success, errno on failure. 4592 * Zero on success, negative errno on failure.
4590 */ 4593 */
4591int drm_mode_page_flip_ioctl(struct drm_device *dev, 4594int drm_mode_page_flip_ioctl(struct drm_device *dev,
4592 void *data, struct drm_file *file_priv) 4595 void *data, struct drm_file *file_priv)
@@ -4752,7 +4755,7 @@ EXPORT_SYMBOL(drm_mode_config_reset);
4752 * Called by the user via ioctl. 4755 * Called by the user via ioctl.
4753 * 4756 *
4754 * Returns: 4757 * Returns:
4755 * Zero on success, errno on failure. 4758 * Zero on success, negative errno on failure.
4756 */ 4759 */
4757int drm_mode_create_dumb_ioctl(struct drm_device *dev, 4760int drm_mode_create_dumb_ioctl(struct drm_device *dev,
4758 void *data, struct drm_file *file_priv) 4761 void *data, struct drm_file *file_priv)
@@ -4804,7 +4807,7 @@ int drm_mode_create_dumb_ioctl(struct drm_device *dev,
4804 * Called by the user via ioctl. 4807 * Called by the user via ioctl.
4805 * 4808 *
4806 * Returns: 4809 * Returns:
4807 * Zero on success, errno on failure. 4810 * Zero on success, negative errno on failure.
4808 */ 4811 */
4809int drm_mode_mmap_dumb_ioctl(struct drm_device *dev, 4812int drm_mode_mmap_dumb_ioctl(struct drm_device *dev,
4810 void *data, struct drm_file *file_priv) 4813 void *data, struct drm_file *file_priv)
@@ -4831,7 +4834,7 @@ int drm_mode_mmap_dumb_ioctl(struct drm_device *dev,
4831 * Called by the user via ioctl. 4834 * Called by the user via ioctl.
4832 * 4835 *
4833 * Returns: 4836 * Returns:
4834 * Zero on success, errno on failure. 4837 * Zero on success, negative errno on failure.
4835 */ 4838 */
4836int drm_mode_destroy_dumb_ioctl(struct drm_device *dev, 4839int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
4837 void *data, struct drm_file *file_priv) 4840 void *data, struct drm_file *file_priv)