Re: [Intel-gfx] [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs

2017-01-25 Thread Daniel Vetter
On Wed, Jan 25, 2017 at 10:48:53AM -0200, Gustavo Padovan wrote:
> Otherwise looks good to me:

Nice catches, fixed them all and applied it.
> 
> Rewiewed-by: Gustavo Padovan 

Thanks for your review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs

2017-01-25 Thread Gustavo Padovan
Hi Daniel,

2017-01-25 Daniel Vetter :

> I just learned that &struct_name.member_name works and looks pretty
> even. It doesn't (yet) link to the member directly though, which would
> be really good for big structures or vfunc tables (where the
> per-member kerneldoc tends to be long).
> 
> Also some minor drive-by polish where it makes sense, I read a lot
> of docs ...
> 
> Cc: Jani Nikula 
> Cc: Chris Wilson 
> Signed-off-by: Daniel Vetter 
> ---
>  drivers/gpu/drm/drm_atomic_helper.c  |  97 ++--
>  drivers/gpu/drm/drm_crtc_helper.c|  28 +++---
>  drivers/gpu/drm/drm_dp_helper.c  |   2 +-
>  drivers/gpu/drm/drm_fb_helper.c  |  48 +-
>  drivers/gpu/drm/drm_plane_helper.c   |   9 +-
>  drivers/gpu/drm/drm_probe_helper.c   |  14 +--
>  include/drm/drm_atomic_helper.h  |  13 +--
>  include/drm/drm_dp_mst_helper.h  |   7 +-
>  include/drm/drm_flip_work.h  |   2 +-
>  include/drm/drm_modeset_helper_vtables.h | 146 
> ---
>  include/drm/drm_simple_kms_helper.h  |  12 +--
>  11 files changed, 197 insertions(+), 181 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c 
> b/drivers/gpu/drm/drm_atomic_helper.c
> index 1f0cd7e715c9..5e512dd3a2c4 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -458,22 +458,25 @@ mode_fixup(struct drm_atomic_state *state)
>   * Check the state object to see if the requested state is physically 
> possible.
>   * This does all the crtc and connector related computations for an atomic
>   * update and adds any additional connectors needed for full modesets and 
> calls
> - * down into ->mode_fixup functions of the driver backend.
> - *
> - * crtc_state->mode_changed is set when the input mode is changed.
> - * crtc_state->connectors_changed is set when a connector is added or
> - * removed from the crtc.
> - * crtc_state->active_changed is set when crtc_state->active changes,
> - * which is used for dpms.
> + * down into &drm_crtc_helper_funcs.mode_fixup and
> + * &drm_encoder_helper_funcs.mode_fixup or
> + * &drm_encoder_helper_funcs.atomic_check functions of the driver backend.
> + *
> + * &drm_crtc_state.mode_changed is set when the input mode is changed.
> + * &drm_crtc_state.connectors_changed is set when a connector is added or
> + * removed from the crtc.  &drm_crtc_state.active_changed is set when
> + * &drm_crtc_state.active changes, which is used for DPMS.
>   * See also: drm_atomic_crtc_needs_modeset()
>   *
>   * IMPORTANT:
>   *
> - * Drivers which set ->mode_changed (e.g. in their ->atomic_check hooks if a
> - * plane update can't be done without a full modeset) _must_ call this 
> function
> - * afterwards after that change. It is permitted to call this function 
> multiple
> - * times for the same update, e.g. when the ->atomic_check functions depend 
> upon
> - * the adjusted dotclock for fifo space allocation and watermark computation.
> + * Drivers which set &drm_crtc_state.mode_changed (e.g. in their
> + * &drm_plane_helper_funcs.atomic_check hooks if a plane update can't be done
> + * without a full modeset) _must_ call this function afterwards after that
> + * change. It is permitted to call this function multiple times for the same
> + * update, e.g. when the &drm_crtc_helper_funcs.atomic_check functions depend
> + * upon the adjusted dotclock for fifo space allocation and watermark
> + * computation.
>   *
>   * RETURNS:
>   * Zero for success or -errno
> @@ -584,9 +587,10 @@ EXPORT_SYMBOL(drm_atomic_helper_check_modeset);
>   *
>   * Check the state object to see if the requested state is physically 
> possible.
>   * This does all the plane update related checks using by calling into the
> - * ->atomic_check hooks provided by the driver.
> + * &drm_crtc_helper_funcs.atomic_check and 
> &drm_plane_helper_funcs.atomic_check
> + * hooks provided by the driver.
>   *
> - * It also sets crtc_state->planes_changed to indicate that a crtc has
> + * It also sets &drm_crtc_state.planes_changed to indicate that a crtc has
>   * updated planes.
>   *
>   * RETURNS:
> @@ -648,14 +652,15 @@ EXPORT_SYMBOL(drm_atomic_helper_check_planes);
>   * Check the state object to see if the requested state is physically 
> possible.
>   * Only crtcs and planes have check callbacks, so for any additional (global)
>   * checking that a driver needs it can simply wrap that around this function.
> - * Drivers without such needs can directly use this as their ->atomic_check()
> - * callback.
> + * Drivers without such needs can directly use this as their
> + * &drm_mode_config_funcs.atomic_check callback.
>   *
>   * This just wraps the two parts of the state checking for planes and modeset
>   * state in the default order: First it calls 
> drm_atomic_helper_check_modeset()
>   * and then drm_atomic_helper_check_planes(). The assumption is that the
> - * ->atomic_check functions depend upon an updated adju

[Intel-gfx] [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs

2017-01-24 Thread Daniel Vetter
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).

Also some minor drive-by polish where it makes sense, I read a lot
of docs ...

Cc: Jani Nikula 
Cc: Chris Wilson 
Signed-off-by: Daniel Vetter 
---
 drivers/gpu/drm/drm_atomic_helper.c  |  97 ++--
 drivers/gpu/drm/drm_crtc_helper.c|  28 +++---
 drivers/gpu/drm/drm_dp_helper.c  |   2 +-
 drivers/gpu/drm/drm_fb_helper.c  |  48 +-
 drivers/gpu/drm/drm_plane_helper.c   |   9 +-
 drivers/gpu/drm/drm_probe_helper.c   |  14 +--
 include/drm/drm_atomic_helper.h  |  13 +--
 include/drm/drm_dp_mst_helper.h  |   7 +-
 include/drm/drm_flip_work.h  |   2 +-
 include/drm/drm_modeset_helper_vtables.h | 146 ---
 include/drm/drm_simple_kms_helper.h  |  12 +--
 11 files changed, 197 insertions(+), 181 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c 
b/drivers/gpu/drm/drm_atomic_helper.c
index 1f0cd7e715c9..5e512dd3a2c4 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -458,22 +458,25 @@ mode_fixup(struct drm_atomic_state *state)
  * Check the state object to see if the requested state is physically possible.
  * This does all the crtc and connector related computations for an atomic
  * update and adds any additional connectors needed for full modesets and calls
- * down into ->mode_fixup functions of the driver backend.
- *
- * crtc_state->mode_changed is set when the input mode is changed.
- * crtc_state->connectors_changed is set when a connector is added or
- * removed from the crtc.
- * crtc_state->active_changed is set when crtc_state->active changes,
- * which is used for dpms.
+ * down into &drm_crtc_helper_funcs.mode_fixup and
+ * &drm_encoder_helper_funcs.mode_fixup or
+ * &drm_encoder_helper_funcs.atomic_check functions of the driver backend.
+ *
+ * &drm_crtc_state.mode_changed is set when the input mode is changed.
+ * &drm_crtc_state.connectors_changed is set when a connector is added or
+ * removed from the crtc.  &drm_crtc_state.active_changed is set when
+ * &drm_crtc_state.active changes, which is used for DPMS.
  * See also: drm_atomic_crtc_needs_modeset()
  *
  * IMPORTANT:
  *
- * Drivers which set ->mode_changed (e.g. in their ->atomic_check hooks if a
- * plane update can't be done without a full modeset) _must_ call this function
- * afterwards after that change. It is permitted to call this function multiple
- * times for the same update, e.g. when the ->atomic_check functions depend 
upon
- * the adjusted dotclock for fifo space allocation and watermark computation.
+ * Drivers which set &drm_crtc_state.mode_changed (e.g. in their
+ * &drm_plane_helper_funcs.atomic_check hooks if a plane update can't be done
+ * without a full modeset) _must_ call this function afterwards after that
+ * change. It is permitted to call this function multiple times for the same
+ * update, e.g. when the &drm_crtc_helper_funcs.atomic_check functions depend
+ * upon the adjusted dotclock for fifo space allocation and watermark
+ * computation.
  *
  * RETURNS:
  * Zero for success or -errno
@@ -584,9 +587,10 @@ EXPORT_SYMBOL(drm_atomic_helper_check_modeset);
  *
  * Check the state object to see if the requested state is physically possible.
  * This does all the plane update related checks using by calling into the
- * ->atomic_check hooks provided by the driver.
+ * &drm_crtc_helper_funcs.atomic_check and &drm_plane_helper_funcs.atomic_check
+ * hooks provided by the driver.
  *
- * It also sets crtc_state->planes_changed to indicate that a crtc has
+ * It also sets &drm_crtc_state.planes_changed to indicate that a crtc has
  * updated planes.
  *
  * RETURNS:
@@ -648,14 +652,15 @@ EXPORT_SYMBOL(drm_atomic_helper_check_planes);
  * Check the state object to see if the requested state is physically possible.
  * Only crtcs and planes have check callbacks, so for any additional (global)
  * checking that a driver needs it can simply wrap that around this function.
- * Drivers without such needs can directly use this as their ->atomic_check()
- * callback.
+ * Drivers without such needs can directly use this as their
+ * &drm_mode_config_funcs.atomic_check callback.
  *
  * This just wraps the two parts of the state checking for planes and modeset
  * state in the default order: First it calls drm_atomic_helper_check_modeset()
  * and then drm_atomic_helper_check_planes(). The assumption is that the
- * ->atomic_check functions depend upon an updated adjusted_mode.clock to
- * e.g. properly compute watermarks.
+ * @drm_plane_helper_funcs.atomic_check and @drm_crtc_helper_funcs.atomic_check
+ * functions depend upon an updated adjusted_mode.clock to e.g. properly 
compute
+ * watermarks.
  *
  * RETURNS:
  *