All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] More kerneldoc cleanup
@ 2017-01-25  6:26 Daniel Vetter
  2017-01-25  6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
                   ` (15 more replies)
  0 siblings, 16 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development

Hi all,

First few patches are resends that fell through the cracks on a previous patch
series. Then there's a bit of garbage collection around struct drm_driver (but I
haven't yet done the full documentation run on that one). Plus at the end
document drm_crtc.[hc], because I've forgotten about that :(

Reviews&comments very much welcome.

Cheers, Daniel

Daniel Vetter (15):
  drm/kms-helpers: Use recommened kerneldoc for struct member refs
  drm/bridge: Use recommened kerneldoc for struct member refs
  drm/kms-core: Use recommened kerneldoc for struct member refs
  drm/gem|prime|mm: Use recommened kerneldoc for struct member refs
  drm/core: Use recommened kerneldoc for struct member refs
  drm/doc: Clarify connector overview
  drm/gma500: Nuke device_is_agp callback
  drm/i810: drop device_is_agp callback
  drm/mga: remove device_is_agp callback
  drm: remove device_is_agp callback
  drm: Nuke ums vgaarb support
  drm/moc: Mark legacy fields in drm_driver as such
  drm/doc: Fix typos for early_unregister doc
  drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/
  drm: Update kerneldoc for drm_crtc.[hc]

 Documentation/gpu/drm-kms.rst            |   6 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c  |   1 -
 drivers/gpu/drm/drm_agpsupport.c         |   2 +
 drivers/gpu/drm/drm_atomic.c             |  71 +++++++--------
 drivers/gpu/drm/drm_atomic_helper.c      |  99 +++++++++++----------
 drivers/gpu/drm/drm_auth.c               |   4 +-
 drivers/gpu/drm/drm_blend.c              |  11 ++-
 drivers/gpu/drm/drm_connector.c          |  21 +++--
 drivers/gpu/drm/drm_crtc.c               |  51 +++++------
 drivers/gpu/drm/drm_crtc_helper.c        |  28 +++---
 drivers/gpu/drm/drm_dp_helper.c          |   2 +-
 drivers/gpu/drm/drm_drv.c                |   8 +-
 drivers/gpu/drm/drm_dumb_buffers.c       |   4 +-
 drivers/gpu/drm/drm_encoder.c            |   2 +-
 drivers/gpu/drm/drm_encoder_slave.c      |   2 +-
 drivers/gpu/drm/drm_fb_helper.c          |  48 +++++-----
 drivers/gpu/drm/drm_fops.c               |  11 +--
 drivers/gpu/drm/drm_framebuffer.c        |  10 +--
 drivers/gpu/drm/drm_gem.c                |  24 ++---
 drivers/gpu/drm/drm_internal.h           |   1 +
 drivers/gpu/drm/drm_irq.c                |  36 ++------
 drivers/gpu/drm/drm_mm.c                 |   4 +-
 drivers/gpu/drm/drm_modes.c              |  21 +++++
 drivers/gpu/drm/drm_modeset_lock.c       |  10 +--
 drivers/gpu/drm/drm_pci.c                |   4 +-
 drivers/gpu/drm/drm_plane.c              |   2 +-
 drivers/gpu/drm/drm_plane_helper.c       |   9 +-
 drivers/gpu/drm/drm_platform.c           |   2 +-
 drivers/gpu/drm/drm_prime.c              |   2 +-
 drivers/gpu/drm/drm_probe_helper.c       |  14 +--
 drivers/gpu/drm/drm_property.c           |   2 +-
 drivers/gpu/drm/drm_sysfs.c              |   2 +-
 drivers/gpu/drm/gma500/psb_drv.c         |   6 --
 drivers/gpu/drm/i810/i810_dma.c          |  24 ++---
 drivers/gpu/drm/i810/i810_drv.c          |   1 -
 drivers/gpu/drm/i810/i810_drv.h          |   1 -
 drivers/gpu/drm/i915/intel_display.c     |   4 +-
 drivers/gpu/drm/mga/mga_dma.c            |  20 ++++-
 drivers/gpu/drm/mga/mga_drv.c            |  37 --------
 drivers/gpu/drm/nouveau/nouveau_abi16.c  |   2 +-
 drivers/gpu/drm/radeon/radeon_cs.c       |   3 +-
 drivers/gpu/drm/radeon/radeon_kms.c      |   2 +-
 include/drm/drmP.h                       |  15 ----
 include/drm/drm_atomic.h                 |   6 +-
 include/drm/drm_atomic_helper.h          |  13 +--
 include/drm/drm_auth.h                   |  12 +--
 include/drm/drm_bridge.h                 |   6 +-
 include/drm/drm_color_mgmt.h             |   2 +-
 include/drm/drm_connector.h              |  40 ++++-----
 include/drm/drm_crtc.h                   |  58 +++++++-----
 include/drm/drm_dp_mst_helper.h          |   7 +-
 include/drm/drm_drv.h                    |  32 ++-----
 include/drm/drm_encoder.h                |   2 +-
 include/drm/drm_flip_work.h              |   2 +-
 include/drm/drm_framebuffer.h            |  15 ++--
 include/drm/drm_gem.h                    |  16 ++--
 include/drm/drm_irq.h                    |   4 +-
 include/drm/drm_mode_config.h            |  12 +--
 include/drm/drm_mode_object.h            |  13 ++-
 include/drm/drm_modes.h                  |   2 +
 include/drm/drm_modeset_helper_vtables.h | 146 ++++++++++++++++---------------
 include/drm/drm_modeset_lock.h           |   2 +-
 include/drm/drm_plane.h                  |  20 ++---
 include/drm/drm_property.h               |   8 +-
 include/drm/drm_simple_kms_helper.h      |  12 +--
 65 files changed, 516 insertions(+), 543 deletions(-)

-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 12:48   ` [Intel-gfx] " Gustavo Padovan
  2017-01-25  6:26 ` [PATCH 02/15] drm/bridge: " Daniel Vetter
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development

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 <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 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:
  * Zero for success or -errno
@@ -1125,8 +1130,8 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks);
  * drm_atomic_helper_commit_tail - commit atomic update to hardware
  * @old_state: atomic state object with old state structures
  *
- * This is the default implemenation for the ->atomic_commit_tail() hook of the
- * &drm_mode_config_helper_funcs vtable.
+ * This is the default implemenation for the
+ * &drm_mode_config_helper_funcs.atomic_commit_tail hook.
  *
  * Note that the default ordering of how the various stages are called is to
  * match the legacy modeset helper library closest. One peculiarity of that is
@@ -1203,8 +1208,8 @@ static void commit_work(struct work_struct *work)
  * drm_atomic_helper_setup_commit() and related functions.
  *
  * Committing the actual hardware state is done through the
- * ->atomic_commit_tail() callback of the &drm_mode_config_helper_funcs vtable,
- * or it's default implementation drm_atomic_helper_commit_tail().
+ * &drm_mode_config_helper_funcs.atomic_commit_tail callback, or it's default
+ * implementation drm_atomic_helper_commit_tail().
  *
  * RETURNS:
  * Zero for success or -errno.
@@ -1373,14 +1378,15 @@ static void release_crtc_commit(struct completion *completion)
  *
  * This function prepares @state to be used by the atomic helper's support for
  * nonblocking commits. Drivers using the nonblocking commit infrastructure
- * should always call this function from their ->atomic_commit hook.
+ * should always call this function from their
+ * &drm_mode_config_funcs.atomic_commit hook.
  *
  * To be able to use this support drivers need to use a few more helper
  * functions. drm_atomic_helper_wait_for_dependencies() must be called before
  * actually committing the hardware state, and for nonblocking commits this call
  * must be placed in the async worker. See also drm_atomic_helper_swap_state()
  * and it's stall parameter, for when a driver's commit hooks look at the
- * ->state pointers of &struct drm_crtc, &drm_plane or &drm_connector directly.
+ * &drm_crtc.state, &drm_plane.state or &drm_connector.state pointer directly.
  *
  * Completion of the hardware commit step must be signalled using
  * drm_atomic_helper_commit_hw_done(). After this step the driver is not allowed
@@ -1489,8 +1495,7 @@ static struct drm_crtc_commit *preceeding_commit(struct drm_crtc *crtc)
  * This function waits for all preceeding commits that touch the same CRTC as
  * @old_state to both be committed to the hardware (as signalled by
  * drm_atomic_helper_commit_hw_done) and executed by the hardware (as signalled
- * by calling drm_crtc_vblank_send_event on the event member of
- * &drm_crtc_state).
+ * by calling drm_crtc_vblank_send_event on the &drm_crtc_state.event).
  *
  * This is part of the atomic helper support for nonblocking commits, see
  * drm_atomic_helper_setup_commit() for an overview.
@@ -1627,8 +1632,9 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_cleanup_done);
  * @state: atomic state object with new state structures
  *
  * This function prepares plane state, specifically framebuffers, for the new
- * configuration. If any failure is encountered this function will call
- * ->cleanup_fb on any already successfully prepared framebuffer.
+ * configuration, by calling &drm_plane_helper_funcs.prepare_fb. If any failure
+ * is encountered this function will call &drm_plane_helper_funcs.cleanup_fb on
+ * any already successfully prepared framebuffer.
  *
  * Returns:
  * 0 on success, negative error code on failure.
@@ -1708,10 +1714,10 @@ static bool plane_crtc_active(const struct drm_plane_state *state)
  *
  * Drivers may set the NO_DISABLE_AFTER_MODESET flag in @flags if the relevant
  * display controllers require to disable a CRTC's planes when the CRTC is
- * disabled. This function would skip the ->atomic_disable call for a plane if
- * the CRTC of the old plane state needs a modesetting operation. Of course,
- * the drivers need to disable the planes in their CRTC disable callbacks
- * since no one else would do that.
+ * disabled. This function would skip the &drm_plane_helper_funcs.atomic_disable
+ * call for a plane if the CRTC of the old plane state needs a modesetting
+ * operation. Of course, the drivers need to disable the planes in their CRTC
+ * disable callbacks since no one else would do that.
  *
  * The drm_atomic_helper_commit() default implementation doesn't set the
  * ACTIVE_ONLY flag to most closely match the behaviour of the legacy helpers.
@@ -1874,7 +1880,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_planes_on_crtc);
  * planes.
  *
  * It is a bug to call this function without having implemented the
- * ->atomic_disable() plane hook.
+ * &drm_plane_helper_funcs.atomic_disable plane hook.
  */
 void
 drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_state,
@@ -1961,8 +1967,8 @@ EXPORT_SYMBOL(drm_atomic_helper_cleanup_planes);
  * contains the old state. Also do any other cleanup required with that state.
  *
  * @stall must be set when nonblocking commits for this driver directly access
- * the ->state pointer of &drm_plane, &drm_crtc or &drm_connector. With the
- * current atomic helpers this is almost always the case, since the helpers
+ * the &drm_plane.state, &drm_crtc.state or &drm_connector.state pointer. With
+ * the current atomic helpers this is almost always the case, since the helpers
  * don't pass the right state structures to the callbacks.
  */
 void drm_atomic_helper_swap_state(struct drm_atomic_state *state,
@@ -2892,8 +2898,8 @@ EXPORT_SYMBOL(drm_atomic_helper_page_flip_target);
  *
  * This is the main helper function provided by the atomic helper framework for
  * implementing the legacy DPMS connector interface. It computes the new desired
- * ->active state for the corresponding CRTC (if the connector is enabled) and
- * updates it.
+ * &drm_crtc_state.active state for the corresponding CRTC (if the connector is
+ * enabled) and updates it.
  *
  * Returns:
  * Returns 0 on success, negative errno numbers on failure.
@@ -2965,11 +2971,11 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector,
 EXPORT_SYMBOL(drm_atomic_helper_connector_dpms);
 
 /**
- * drm_atomic_helper_best_encoder - Helper for &drm_connector_helper_funcs
- *                                  ->best_encoder callback
+ * drm_atomic_helper_best_encoder - Helper for
+ * 	&drm_connector_helper_funcs.best_encoder callback
  * @connector: Connector control structure
  *
- * This is a &drm_connector_helper_funcs ->best_encoder callback helper for
+ * This is a &drm_connector_helper_funcs.best_encoder callback helper for
  * connectors that support exactly 1 encoder, statically determined at driver
  * init time.
  */
@@ -3003,7 +3009,7 @@ EXPORT_SYMBOL(drm_atomic_helper_best_encoder);
  */
 
 /**
- * drm_atomic_helper_crtc_reset - default ->reset hook for CRTCs
+ * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs
  * @crtc: drm CRTC
  *
  * Resets the atomic state for @crtc by freeing the state pointer (which might
@@ -3110,7 +3116,7 @@ void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
 EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state);
 
 /**
- * drm_atomic_helper_plane_reset - default ->reset hook for planes
+ * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for planes
  * @plane: drm plane
  *
  * Resets the atomic state for @plane by freeing the state pointer (which might
@@ -3214,8 +3220,9 @@ EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state);
  * @conn_state: connector state to assign
  *
  * Initializes the newly allocated @conn_state and assigns it to
- * #connector ->state, usually required when initializing the drivers
- * or when called from the ->reset hook.
+ * the &drm_conector->state pointer of @connector, usually required when
+ * initializing the drivers or when called from the &drm_connector_funcs.reset
+ * hook.
  *
  * This is useful for drivers that subclass the connector state.
  */
@@ -3231,7 +3238,7 @@ __drm_atomic_helper_connector_reset(struct drm_connector *connector,
 EXPORT_SYMBOL(__drm_atomic_helper_connector_reset);
 
 /**
- * drm_atomic_helper_connector_reset - default ->reset hook for connectors
+ * drm_atomic_helper_connector_reset - default &drm_connector_funcs.reset hook for connectors
  * @connector: drm connector
  *
  * Resets the atomic state for @connector by freeing the state pointer (which
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 1e281dd42e4b..8c1e4d93a4f4 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -53,9 +53,9 @@
  * configuration on resume with drm_helper_resume_force_mode().
  *
  * Note that this helper library doesn't track the current power state of CRTCs
- * and encoders. It can call callbacks like ->dpms() even though the hardware is
- * already in the desired state. This deficiency has been fixed in the atomic
- * helpers.
+ * and encoders. It can call callbacks like &drm_encoder_helper_funcs.dpms even
+ * though the hardware is already in the desired state. This deficiency has been
+ * fixed in the atomic helpers.
  *
  * The driver callbacks are mostly compatible with the atomic modeset helpers,
  * except for the handling of the primary plane: Atomic helpers require that the
@@ -477,12 +477,12 @@ drm_crtc_helper_disable(struct drm_crtc *crtc)
  * drm_crtc_helper_set_config - set a new config from userspace
  * @set: mode set configuration
  *
- * The drm_crtc_helper_set_config() helper function implements the set_config
- * callback of &struct drm_crtc_funcs for drivers using the legacy CRTC helpers.
+ * The drm_crtc_helper_set_config() helper function implements the of
+ * &drm_crtc_funcs.set_config callback for drivers using the legacy CRTC
+ * helpers.
  *
  * It first tries to locate the best encoder for each connector by calling the
- * connector ->best_encoder() (&struct drm_connector_helper_funcs) helper
- * operation.
+ * connector @drm_connector_helper_funcs.best_encoder helper operation.
  *
  * After locating the appropriate encoders, the helper function will call the
  * mode_fixup encoder and CRTC helper operations to adjust the requested mode,
@@ -493,8 +493,7 @@ drm_crtc_helper_disable(struct drm_crtc *crtc)
  *
  * If the adjusted mode is identical to the current mode but changes to the
  * frame buffer need to be applied, the drm_crtc_helper_set_config() function
- * will call the CRTC ->mode_set_base() (&struct drm_crtc_helper_funcs) helper
- * operation.
+ * will call the CRTC &drm_crtc_helper_funcs.mode_set_base helper operation.
  *
  * If the adjusted mode differs from the current mode, or if the
  * ->mode_set_base() helper operation is not provided, the helper function
@@ -851,14 +850,15 @@ static int drm_helper_choose_crtc_dpms(struct drm_crtc *crtc)
  * @connector: affected connector
  * @mode: DPMS mode
  *
- * The drm_helper_connector_dpms() helper function implements the ->dpms()
- * callback of &struct drm_connector_funcs for drivers using the legacy CRTC helpers.
+ * The drm_helper_connector_dpms() helper function implements the
+ * &drm_connector_funcs.dpms() callback for drivers using the legacy CRTC
+ * helpers.
  *
  * This is the main helper function provided by the CRTC helper framework for
  * implementing the DPMS connector attribute. It computes the new desired DPMS
- * state for all encoders and CRTCs in the output mesh and calls the ->dpms()
- * callbacks provided by the driver in &struct drm_crtc_helper_funcs and struct
- * &drm_encoder_helper_funcs appropriately.
+ * state for all encoders and CRTCs in the output mesh and calls the
+ * &drm_crtc_helper_funcs.dpms and &drm_encoder_helper_funcs.dpms callbacks
+ * provided by the driver.
  *
  * This function is deprecated.  New drivers must implement atomic modeset
  * support, for which this function is unsuitable. Instead drivers should use
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 3e6fe82c6d64..68908c1d5ca1 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -725,7 +725,7 @@ MODULE_PARM_DESC(dp_aux_i2c_speed_khz,
 /*
  * Transfer a single I2C-over-AUX message and handle various error conditions,
  * retrying the transaction as appropriate.  It is assumed that the
- * aux->transfer function does not modify anything in the msg other than the
+ * &drm_dp_aux.transfer function does not modify anything in the msg other than the
  * reply field.
  *
  * Returns bytes transferred on success, or a negative error code on failure.
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0ab6aaacb7d6..c7fafa175755 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -66,11 +66,11 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
  * Teardown is done with drm_fb_helper_fini().
  *
  * At runtime drivers should restore the fbdev console by calling
- * drm_fb_helper_restore_fbdev_mode_unlocked() from their ->lastclose callback.
- * They should also notify the fb helper code from updates to the output
- * configuration by calling drm_fb_helper_hotplug_event(). For easier
+ * drm_fb_helper_restore_fbdev_mode_unlocked() from their &drm_driver.lastclose
+ * callback.  They should also notify the fb helper code from updates to the
+ * output configuration by calling drm_fb_helper_hotplug_event(). For easier
  * integration with the output polling code in drm_crtc_helper.c the modeset
- * code provides a ->output_poll_changed callback.
+ * code provides a &drm_mode_config_funcs.output_poll_changed callback.
  *
  * All other functions exported by the fb helper library can be used to
  * implement the fbdev driver interface by the driver.
@@ -79,7 +79,7 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
  * hotplug detection using the fbdev helpers. The drm_fb_helper_prepare()
  * helper must be called first to initialize the minimum required to make
  * hotplug detection work. Drivers also need to make sure to properly set up
- * the dev->mode_config.funcs member. After calling drm_kms_helper_poll_init()
+ * the &drm_mode_config.funcs member. After calling drm_kms_helper_poll_init()
  * it is safe to enable interrupts and start processing hotplug events. At the
  * same time, drivers should initialize all modeset objects such as CRTCs,
  * encoders and connectors. To finish up the fbdev helper initialization, the
@@ -88,9 +88,9 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
  * should call drm_fb_helper_single_add_all_connectors() followed by
  * drm_fb_helper_initial_config().
  *
- * If &drm_framebuffer_funcs ->dirty is set, the
+ * If &drm_framebuffer_funcs.dirty is set, the
  * drm_fb_helper_{cfb,sys}_{write,fillrect,copyarea,imageblit} functions will
- * accumulate changes and schedule &drm_fb_helper ->dirty_work to run right
+ * accumulate changes and schedule &drm_fb_helper.dirty_work to run right
  * away. This worker then calls the dirty() function ensuring that it will
  * always run in process context since the fb_*() function could be running in
  * atomic context. If drm_fb_helper_deferred_io() is used as the deferred_io
@@ -247,7 +247,7 @@ static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
 }
 
 /**
- * drm_fb_helper_debug_enter - implementation for ->fb_debug_enter
+ * drm_fb_helper_debug_enter - implementation for &fb_ops.fb_debug_enter
  * @info: fbdev registered by the helper
  */
 int drm_fb_helper_debug_enter(struct fb_info *info)
@@ -296,7 +296,7 @@ static struct drm_framebuffer *drm_mode_config_fb(struct drm_crtc *crtc)
 }
 
 /**
- * drm_fb_helper_debug_leave - implementation for ->fb_debug_leave
+ * drm_fb_helper_debug_leave - implementation for &fb_ops.fb_debug_leave
  * @info: fbdev registered by the helper
  */
 int drm_fb_helper_debug_leave(struct fb_info *info)
@@ -445,7 +445,7 @@ static int restore_fbdev_mode(struct drm_fb_helper *fb_helper)
  * drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration
  * @fb_helper: fbcon to restore
  *
- * This should be called from driver's drm ->lastclose callback
+ * This should be called from driver's drm &drm_driver.lastclose callback
  * when implementing an fbcon on top of kms using this helper. This ensures that
  * the user isn't greeted with a black screen when e.g. X dies.
  *
@@ -585,7 +585,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode)
 }
 
 /**
- * drm_fb_helper_blank - implementation for ->fb_blank
+ * drm_fb_helper_blank - implementation for &fb_ops.fb_blank
  * @blank: desired blanking state
  * @info: fbdev registered by the helper
  */
@@ -912,7 +912,7 @@ static void drm_fb_helper_dirty(struct fb_info *info, u32 x, u32 y,
  * @info: fb_info struct pointer
  * @pagelist: list of dirty mmap framebuffer pages
  *
- * This function is used as the &fb_deferred_io ->deferred_io
+ * This function is used as the &fb_deferred_io.deferred_io
  * callback function for flushing the fbdev mmap writes.
  */
 void drm_fb_helper_deferred_io(struct fb_info *info,
@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
  * due to all the printk activity.
  *
  * This function can be called multiple times with the same state since
- * &fb_info->state is checked to see if fbdev is running or not before locking.
+ * &fb_info.state is checked to see if fbdev is running or not before locking.
  *
  * Use drm_fb_helper_set_suspend() if you need to take the lock yourself.
  */
@@ -1181,7 +1181,7 @@ static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
 }
 
 /**
- * drm_fb_helper_setcmap - implementation for ->fb_setcmap
+ * drm_fb_helper_setcmap - implementation for &fb_ops.fb_setcmap
  * @cmap: cmap to set
  * @info: fbdev registered by the helper
  */
@@ -1238,7 +1238,7 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 EXPORT_SYMBOL(drm_fb_helper_setcmap);
 
 /**
- * drm_fb_helper_check_var - implementation for ->fb_check_var
+ * drm_fb_helper_check_var - implementation for &fb_ops.fb_check_var
  * @var: screeninfo to check
  * @info: fbdev registered by the helper
  */
@@ -1338,7 +1338,7 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
 EXPORT_SYMBOL(drm_fb_helper_check_var);
 
 /**
- * drm_fb_helper_set_par - implementation for ->fb_set_par
+ * drm_fb_helper_set_par - implementation for &fb_ops.fb_set_par
  * @info: fbdev registered by the helper
  *
  * This will let fbcon do the mode init and is called at initialization time by
@@ -1422,7 +1422,7 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
 }
 
 /**
- * drm_fb_helper_pan_display - implementation for ->fb_pan_display
+ * drm_fb_helper_pan_display - implementation for &fb_ops.fb_pan_display
  * @var: updated screen information
  * @info: fbdev registered by the helper
  */
@@ -1607,7 +1607,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
  * additional constraints need to set up their own limits.
  *
  * Drivers should call this (or their equivalent setup code) from their
- * ->fb_probe callback.
+ * &drm_fb_helper_funcs.fb_probe callback.
  */
 void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
 			    uint32_t depth)
@@ -1636,11 +1636,11 @@ EXPORT_SYMBOL(drm_fb_helper_fill_fix);
  * @fb_height: desired fb height
  *
  * Sets up the variable fbdev metainformation from the given fb helper instance
- * and the drm framebuffer allocated in fb_helper->fb.
+ * and the drm framebuffer allocated in &drm_fb_helper.fb.
  *
  * Drivers should call this (or their equivalent setup code) from their
- * ->fb_probe callback after having allocated the fbdev backing
- * storage framebuffer.
+ * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev
+ * backing storage framebuffer.
  */
 void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
 			    uint32_t fb_width, uint32_t fb_height)
@@ -2207,9 +2207,9 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
  * Note that this also registers the fbdev and so allows userspace to call into
  * the driver through the fbdev interfaces.
  *
- * This function will call down into the ->fb_probe callback to let
- * the driver allocate and initialize the fbdev info structure and the drm
- * framebuffer used to back the fbdev. drm_fb_helper_fill_var() and
+ * This function will call down into the &drm_fb_helper_funcs.fb_probe callback
+ * to let the driver allocate and initialize the fbdev info structure and the
+ * drm framebuffer used to back the fbdev. drm_fb_helper_fill_var() and
  * drm_fb_helper_fill_fix() are provided as helpers to setup simple default
  * values for the fbdev info structure.
  *
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 35d43607a47d..148688fb920a 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -39,9 +39,9 @@
  *
  * This helper library has two parts. The first part has support to implement
  * primary plane support on top of the normal CRTC configuration interface.
- * Since the legacy ->set_config interface ties the primary plane together with
- * the CRTC state this does not allow userspace to disable the primary plane
- * itself.  To avoid too much duplicated code use
+ * Since the legacy &drm_mode_config_funcs.set_config interface ties the primary
+ * plane together with the CRTC state this does not allow userspace to disable
+ * the primary plane itself.  To avoid too much duplicated code use
  * drm_plane_helper_check_update() which can be used to enforce the same
  * restrictions as primary planes had thus. The default primary plane only
  * expose XRBG8888 and ARGB8888 as valid pixel formats for the attached
@@ -384,7 +384,8 @@ EXPORT_SYMBOL(drm_primary_helper_update);
  * is called in response to a userspace SetPlane operation on the plane with a
  * NULL framebuffer parameter.  It unconditionally fails the disable call with
  * -EINVAL the only way to disable the primary plane without driver support is
- * to disable the entier CRTC. Which does not match the plane ->disable hook.
+ * to disable the entire CRTC. Which does not match the plane
+ * &drm_plane_funcs.disable_plane hook.
  *
  * Note that some hardware may be able to disable the primary plane without
  * disabling the whole CRTC.  Drivers for such hardware should provide their
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 041a5504780f..93381454bdf7 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -43,7 +43,7 @@
  * DOC: output probing helper overview
  *
  * This library provides some helper code for output probing. It provides an
- * implementation of the core connector->fill_modes interface with
+ * implementation of the core &drm_connector_funcs.fill_modes interface with
  * drm_helper_probe_single_connector_modes.
  *
  * It also provides support for polling connectors with a work item and for
@@ -187,9 +187,9 @@ drm_connector_detect(struct drm_connector *connector, bool force)
  * be added to the connector's probed_modes list, then culled (based on validity
  * and the @maxX, @maxY parameters) and put into the normal modes list.
  *
- * Intended to be used as a generic implementation of the ->fill_modes()
- * @connector vfunc for drivers that use the CRTC helpers for output mode
- * filtering and detection.
+ * Intended to be used as a generic implementation of the
+ * &drm_connector_funcs.fill_modes() vfunc for drivers that use the CRTC helpers
+ * for output mode filtering and detection.
  *
  * The basic procedure is as follows
  *
@@ -201,7 +201,7 @@ drm_connector_detect(struct drm_connector *connector, bool force)
  *
  *    - debugfs 'override_edid' (used for testing only)
  *    - firmware EDID (drm_load_edid_firmware())
- *    - connector helper ->get_modes() vfunc
+ *    - &drm_connector_helper_funcs.get_modes vfunc
  *    - if the connector status is connector_status_connected, standard
  *      VESA DMT modes up to 1024x768 are automatically added
  *      (drm_add_modes_noedid())
@@ -222,8 +222,8 @@ drm_connector_detect(struct drm_connector *connector, bool force)
  *      (if specified)
  *    - drm_mode_validate_flag() checks the modes againt basic connector
  *      capabilites (interlace_allowed,doublescan_allowed,stereo_allowed)
- *    - the optional connector ->mode_valid() helper can perform driver and/or
- *      hardware specific checks
+ *    - the optional &drm_connector_helper_funcs.mode_valid helper can perform
+ *      driver and/or hardware specific checks
  *
  * 5. Any mode whose status is not OK is pruned from the connector's modes list,
  *    accompanied by a debug message indicating the reason for the mode's
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 9afcd3810785..d066e9491ae3 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -177,7 +177,8 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
  *
  * This iterates over the current state, useful (for example) when applying
  * atomic state after it has been checked and swapped.  To iterate over the
- * planes which *will* be attached (for ->atomic_check()) see
+ * planes which *will* be attached (more useful in code called from
+ * &drm_mode_config_funcs.atomic_check) see
  * drm_atomic_crtc_state_for_each_plane().
  */
 #define drm_atomic_crtc_for_each_plane(plane, crtc) \
@@ -189,8 +190,9 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
  * @crtc_state: the incoming crtc-state
  *
  * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be
- * attached if the specified state is applied.  Useful during (for example)
- * ->atomic_check() operations, to validate the incoming state.
+ * attached if the specified state is applied.  Useful during for example
+ * in code called from &drm_mode_config_funcs.atomic_check operations, to
+ * validate the incoming state.
  */
 #define drm_atomic_crtc_state_for_each_plane(plane, crtc_state) \
 	drm_for_each_plane_mask(plane, (crtc_state)->state->dev, (crtc_state)->plane_mask)
@@ -202,8 +204,9 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
  * @crtc_state: the incoming crtc-state
  *
  * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be
- * attached if the specified state is applied.  Useful during (for example)
- * ->atomic_check() operations, to validate the incoming state.
+ * attached if the specified state is applied.  Useful during for example
+ * in code called from &drm_mode_config_funcs.atomic_check operations, to
+ * validate the incoming state.
  *
  * Compared to just drm_atomic_crtc_state_for_each_plane() this also fills in a
  * const plane_state. This is useful when a driver just wants to peek at other
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 003207670597..551f519d84a3 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -493,8 +493,8 @@ struct drm_dp_mst_topology_mgr {
 	int total_pbn;
 
 	/**
-	 * @qlock: protects @tx_msg_downq, the tx_slots in struct
-	 * &drm_dp_mst_branch and txmsg->state once they are queued
+	 * @qlock: protects @tx_msg_downq, the &drm_dp_mst_branch.txslost and
+	 * &drm_dp_sideband_msg_tx.state once they are queued
 	 */
 	struct mutex qlock;
 	/**
@@ -508,8 +508,7 @@ struct drm_dp_mst_topology_mgr {
 	struct mutex payload_lock;
 	/**
 	 * @proposed_vcpis: Array of pointers for the new VCPI allocation. The
-	 * VCPI structure itself is embedded into the corresponding
-	 * &drm_dp_mst_port structure.
+	 * VCPI structure itself is &drm_dp_mst_port.vcpi.
 	 */
 	struct drm_dp_vcpi **proposed_vcpis;
 	/**
diff --git a/include/drm/drm_flip_work.h b/include/drm/drm_flip_work.h
index d387cf06ae05..21c3d512d25c 100644
--- a/include/drm/drm_flip_work.h
+++ b/include/drm/drm_flip_work.h
@@ -54,7 +54,7 @@ typedef void (*drm_flip_func_t)(struct drm_flip_work *work, void *val);
 /**
  * struct drm_flip_task - flip work task
  * @node: list entry element
- * @data: data to pass to work->func
+ * @data: data to pass to &drm_flip_work.func
  */
 struct drm_flip_task {
 	struct list_head node;
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index 46f5b349f059..091c42205667 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -111,9 +111,9 @@ struct drm_crtc_helper_funcs {
 	 * This callback is used to validate a mode. The parameter mode is the
 	 * display mode that userspace requested, adjusted_mode is the mode the
 	 * encoders need to be fed with. Note that this is the inverse semantics
-	 * of the meaning for the &drm_encoder and &drm_bridge
-	 * ->mode_fixup() functions. If the CRTC cannot support the requested
-	 * conversion from mode to adjusted_mode it should reject the modeset.
+	 * of the meaning for the &drm_encoder and &drm_bridge_funcs.mode_fixup
+	 * vfunc. If the CRTC cannot support the requested conversion from mode
+	 * to adjusted_mode it should reject the modeset.
 	 *
 	 * This function is used by both legacy CRTC helpers and atomic helpers.
 	 * With atomic helpers it is optional.
@@ -134,17 +134,18 @@ struct drm_crtc_helper_funcs {
 	 *
 	 * Also beware that neither core nor helpers filter modes before
 	 * passing them to the driver: While the list of modes that is
-	 * advertised to userspace is filtered using the connector's
-	 * ->mode_valid() callback, neither the core nor the helpers do any
-	 * filtering on modes passed in from userspace when setting a mode. It
-	 * is therefore possible for userspace to pass in a mode that was
-	 * previously filtered out using ->mode_valid() or add a custom mode
-	 * that wasn't probed from EDID or similar to begin with.  Even though
-	 * this is an advanced feature and rarely used nowadays, some users rely
-	 * on being able to specify modes manually so drivers must be prepared
-	 * to deal with it. Specifically this means that all drivers need not
-	 * only validate modes in ->mode_valid() but also in ->mode_fixup() to
-	 * make sure invalid modes passed in from userspace are rejected.
+	 * advertised to userspace is filtered using the
+	 * &drm_connector.mode_valid callback, neither the core nor the helpers
+	 * do any filtering on modes passed in from userspace when setting a
+	 * mode. It is therefore possible for userspace to pass in a mode that
+	 * was previously filtered out using &drm_connector.mode_valid or add a
+	 * custom mode that wasn't probed from EDID or similar to begin with.
+	 * Even though this is an advanced feature and rarely used nowadays,
+	 * some users rely on being able to specify modes manually so drivers
+	 * must be prepared to deal with it. Specifically this means that all
+	 * drivers need not only validate modes in &drm_connector.mode_valid but
+	 * also in this or in the &drm_encoder_helper_funcs.mode_fixup callback
+	 * to make sure invalid modes passed in from userspace are rejected.
 	 *
 	 * RETURNS:
 	 *
@@ -205,7 +206,7 @@ struct drm_crtc_helper_funcs {
 	 * optimized fast-path instead of a full mode set operation with all the
 	 * resulting flickering. If it is not present
 	 * drm_crtc_helper_set_config() will fall back to a full modeset, using
-	 * the ->mode_set() callback. Since it can't update other planes it's
+	 * the @mode_set callback. Since it can't update other planes it's
 	 * incompatible with atomic modeset support.
 	 *
 	 * This callback is only used by the CRTC helpers and deprecated.
@@ -238,8 +239,7 @@ struct drm_crtc_helper_funcs {
 	/**
 	 * @load_lut:
 	 *
-	 * Load a LUT prepared with the @gamma_set functions from
-	 * &drm_fb_helper_funcs.
+	 * Load a LUT prepared with the &drm_fb_helper_funcs.gamma_set vfunc.
 	 *
 	 * This callback is optional and is only used by the fbdev emulation
 	 * helpers.
@@ -257,10 +257,11 @@ struct drm_crtc_helper_funcs {
 	 *
 	 * This callback should be used to disable the CRTC. With the atomic
 	 * drivers it is called after all encoders connected to this CRTC have
-	 * been shut off already using their own ->disable hook. If that
-	 * sequence is too simple drivers can just add their own hooks and call
-	 * it from this CRTC callback here by looping over all encoders
-	 * connected to it using for_each_encoder_on_crtc().
+	 * been shut off already using their own
+	 * &drm_encoder_helper_funcs.disable hook. If that sequence is too
+	 * simple drivers can just add their own hooks and call it from this
+	 * CRTC callback here by looping over all encoders connected to it using
+	 * for_each_encoder_on_crtc().
 	 *
 	 * This hook is used both by legacy CRTC helpers and atomic helpers.
 	 * Atomic drivers don't need to implement it if there's no need to
@@ -289,10 +290,10 @@ struct drm_crtc_helper_funcs {
 	 *
 	 * This callback should be used to enable the CRTC. With the atomic
 	 * drivers it is called before all encoders connected to this CRTC are
-	 * enabled through the encoder's own ->enable hook.  If that sequence is
-	 * too simple drivers can just add their own hooks and call it from this
-	 * CRTC callback here by looping over all encoders connected to it using
-	 * for_each_encoder_on_crtc().
+	 * enabled through the encoder's own &drm_encoder_helper_funcs.enable
+	 * hook.  If that sequence is too simple drivers can just add their own
+	 * hooks and call it from this CRTC callback here by looping over all
+	 * encoders connected to it using for_each_encoder_on_crtc().
 	 *
 	 * This hook is used only by atomic helpers, for symmetry with @disable.
 	 * Atomic drivers don't need to implement it if there's no need to
@@ -316,16 +317,16 @@ struct drm_crtc_helper_funcs {
 	 * beforehand. This is calling order used by the default helper
 	 * implementation in drm_atomic_helper_check().
 	 *
-	 * When using drm_atomic_helper_check_planes() CRTCs' ->atomic_check()
-	 * hooks are called after the ones for planes, which allows drivers to
-	 * assign shared resources requested by planes in the CRTC callback
-	 * here. For more complicated dependencies the driver can call the provided
-	 * check helpers multiple times until the computed state has a final
-	 * configuration and everything has been checked.
+	 * When using drm_atomic_helper_check_planes() this hook is called
+	 * after the &drm_plane_helper_funcs.atomc_check hook for planes, which
+	 * allows drivers to assign shared resources requested by planes in this
+	 * callback here. For more complicated dependencies the driver can call
+	 * the provided check helpers multiple times until the computed state
+	 * has a final configuration and everything has been checked.
 	 *
 	 * This function is also allowed to inspect any other object's state and
 	 * can add more state objects to the atomic commit if needed. Care must
-	 * be taken though to ensure that state check&compute functions for
+	 * be taken though to ensure that state check and compute functions for
 	 * these added states are all called, and derived state in other objects
 	 * all updated. Again the recommendation is to just call check helpers
 	 * until a maximal configuration is reached.
@@ -400,10 +401,11 @@ struct drm_crtc_helper_funcs {
 	 *
 	 * This callback should be used to disable the CRTC. With the atomic
 	 * drivers it is called after all encoders connected to this CRTC have
-	 * been shut off already using their own ->disable hook. If that
-	 * sequence is too simple drivers can just add their own hooks and call
-	 * it from this CRTC callback here by looping over all encoders
-	 * connected to it using for_each_encoder_on_crtc().
+	 * been shut off already using their own
+	 * &drm_encoder_helper_funcs.disable hook. If that sequence is too
+	 * simple drivers can just add their own hooks and call it from this
+	 * CRTC callback here by looping over all encoders connected to it using
+	 * for_each_encoder_on_crtc().
 	 *
 	 * This hook is used only by atomic helpers. Atomic drivers don't
 	 * need to implement it if there's no need to disable anything at the
@@ -483,16 +485,18 @@ struct drm_encoder_helper_funcs {
 	 * Also beware that neither core nor helpers filter modes before
 	 * passing them to the driver: While the list of modes that is
 	 * advertised to userspace is filtered using the connector's
-	 * ->mode_valid() callback, neither the core nor the helpers do any
-	 * filtering on modes passed in from userspace when setting a mode. It
-	 * is therefore possible for userspace to pass in a mode that was
-	 * previously filtered out using ->mode_valid() or add a custom mode
-	 * that wasn't probed from EDID or similar to begin with.  Even though
-	 * this is an advanced feature and rarely used nowadays, some users rely
-	 * on being able to specify modes manually so drivers must be prepared
-	 * to deal with it. Specifically this means that all drivers need not
-	 * only validate modes in ->mode_valid() but also in ->mode_fixup() to
-	 * make sure invalid modes passed in from userspace are rejected.
+	 * &drm_connector_helper_funcs.mode_valid callback, neither the core nor
+	 * the helpers do any filtering on modes passed in from userspace when
+	 * setting a mode. It is therefore possible for userspace to pass in a
+	 * mode that was previously filtered out using
+	 * &drm_connector_helper_funcs.mode_valid or add a custom mode that
+	 * wasn't probed from EDID or similar to begin with.  Even though this
+	 * is an advanced feature and rarely used nowadays, some users rely on
+	 * being able to specify modes manually so drivers must be prepared to
+	 * deal with it. Specifically this means that all drivers need not only
+	 * validate modes in &drm_connector.mode_valid but also in this or in
+	 * the &drm_crtc_helper_funcs.mode_fixup callback to make sure
+	 * invalid modes passed in from userspace are rejected.
 	 *
 	 * RETURNS:
 	 *
@@ -544,7 +548,7 @@ struct drm_encoder_helper_funcs {
 	 * use this hook, because the helper library calls it only once and not
 	 * every time the display pipeline is suspend using either DPMS or the
 	 * new "ACTIVE" property. Such drivers should instead move all their
-	 * encoder setup into the ->enable() callback.
+	 * encoder setup into the @enable callback.
 	 *
 	 * This callback is used both by the legacy CRTC helpers and the atomic
 	 * modeset helpers. It is optional in the atomic helpers.
@@ -570,7 +574,7 @@ struct drm_encoder_helper_funcs {
 	 * use this hook, because the helper library calls it only once and not
 	 * every time the display pipeline is suspended using either DPMS or the
 	 * new "ACTIVE" property. Such drivers should instead move all their
-	 * encoder setup into the ->enable() callback.
+	 * encoder setup into the @enable callback.
 	 *
 	 * This callback is used by the atomic modeset helpers in place of the
 	 * @mode_set callback, if set by the driver. It is optional and should
@@ -621,10 +625,10 @@ struct drm_encoder_helper_funcs {
 	 *
 	 * This callback should be used to disable the encoder. With the atomic
 	 * drivers it is called before this encoder's CRTC has been shut off
-	 * using the CRTC's own ->disable hook.  If that sequence is too simple
-	 * drivers can just add their own driver private encoder hooks and call
-	 * them from CRTC's callback by looping over all encoders connected to
-	 * it using for_each_encoder_on_crtc().
+	 * using their own &drm_crtc_helper_funcs.disable hook.  If that
+	 * sequence is too simple drivers can just add their own driver private
+	 * encoder hooks and call them from CRTC's callback by looping over all
+	 * encoders connected to it using for_each_encoder_on_crtc().
 	 *
 	 * This hook is used both by legacy CRTC helpers and atomic helpers.
 	 * Atomic drivers don't need to implement it if there's no need to
@@ -651,10 +655,10 @@ struct drm_encoder_helper_funcs {
 	 *
 	 * This callback should be used to enable the encoder. With the atomic
 	 * drivers it is called after this encoder's CRTC has been enabled using
-	 * the CRTC's own ->enable hook.  If that sequence is too simple drivers
-	 * can just add their own driver private encoder hooks and call them
-	 * from CRTC's callback by looping over all encoders connected to it
-	 * using for_each_encoder_on_crtc().
+	 * their own &drm_crtc_helper_funcs.enable hook.  If that sequence is
+	 * too simple drivers can just add their own driver private encoder
+	 * hooks and call them from CRTC's callback by looping over all encoders
+	 * connected to it using for_each_encoder_on_crtc().
 	 *
 	 * This hook is used only by atomic helpers, for symmetry with @disable.
 	 * Atomic drivers don't need to implement it if there's no need to
@@ -716,7 +720,7 @@ struct drm_connector_helper_funcs {
 	 * @get_modes:
 	 *
 	 * This function should fill in all modes currently valid for the sink
-	 * into the connector->probed_modes list. It should also update the
+	 * into the &drm_connector.probed_modes list. It should also update the
 	 * EDID property by calling drm_mode_connector_update_edid_property().
 	 *
 	 * The usual way to implement this is to cache the EDID retrieved in the
@@ -725,8 +729,9 @@ struct drm_connector_helper_funcs {
 	 * them by calling drm_add_edid_modes(). But connectors that driver a
 	 * fixed panel can also manually add specific modes using
 	 * drm_mode_probed_add(). Drivers which manually add modes should also
-	 * make sure that the @display_info, @width_mm and @height_mm fields of the
-	 * &struct drm_connector are filled in.
+	 * make sure that the &drm_connector.display_info,
+	 * &drm_connector.width_mm and &drm_connector.height_mm fields are
+	 * filled in.
 	 *
 	 * Virtual drivers that just want some standard VESA mode with a given
 	 * resolution can call drm_add_modes_noedid(), and mark the preferred
@@ -735,7 +740,7 @@ struct drm_connector_helper_funcs {
 	 * Finally drivers that support audio probably want to update the ELD
 	 * data, too, using drm_edid_to_eld().
 	 *
-	 * This function is only called after the ->detect() hook has indicated
+	 * This function is only called after the @detect hook has indicated
 	 * that a sink is connected and when the EDID isn't overridden through
 	 * sysfs or the kernel commandline.
 	 *
@@ -768,8 +773,8 @@ struct drm_connector_helper_funcs {
 	 *
 	 * RETURNS:
 	 *
-	 * Either MODE_OK or one of the failure reasons in enum
-	 * &drm_mode_status.
+	 * Either &drm_mode_status.MODE_OK or one of the failure reasons in &enum
+	 * drm_mode_status.
 	 */
 	enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
 					   struct drm_display_mode *mode);
@@ -875,7 +880,7 @@ struct drm_plane_helper_funcs {
 	 * RETURNS:
 	 *
 	 * 0 on success or one of the following negative error codes allowed by
-	 * the atomic_commit hook in &drm_mode_config_funcs. When using helpers
+	 * the &drm_mode_config_funcs.atomic_commit vfunc. When using helpers
 	 * this callback is the only one which can fail an atomic commit,
 	 * everything else must complete successfully.
 	 */
@@ -898,7 +903,7 @@ struct drm_plane_helper_funcs {
 	 *
 	 * Drivers should check plane specific constraints in this hook.
 	 *
-	 * When using drm_atomic_helper_check_planes() plane's ->atomic_check()
+	 * When using drm_atomic_helper_check_planes() plane's @atomic_check
 	 * hooks are called before the ones for CRTCs, which allows drivers to
 	 * request shared resources that the CRTC controls here. For more
 	 * complicated dependencies the driver can call the provided check helpers
@@ -907,7 +912,7 @@ struct drm_plane_helper_funcs {
 	 *
 	 * This function is also allowed to inspect any other object's state and
 	 * can add more state objects to the atomic commit if needed. Care must
-	 * be taken though to ensure that state check&compute functions for
+	 * be taken though to ensure that state check and compute functions for
 	 * these added states are all called, and derived state in other objects
 	 * all updated. Again the recommendation is to just call check helpers
 	 * until a maximal configuration is reached.
@@ -936,8 +941,8 @@ struct drm_plane_helper_funcs {
 	 * @atomic_update:
 	 *
 	 * Drivers should use this function to update the plane state.  This
-	 * hook is called in-between the ->atomic_begin() and
-	 * ->atomic_flush() of &drm_crtc_helper_funcs.
+	 * hook is called in-between the &drm_crtc_helper_funcs.atomic_begin and
+	 * drm_crtc_helper_funcs.atomic_flush callbacks.
 	 *
 	 * Note that the power state of the display pipe when this function is
 	 * called depends upon the exact helpers and calling sequence the driver
@@ -953,14 +958,15 @@ struct drm_plane_helper_funcs {
 	 * @atomic_disable:
 	 *
 	 * Drivers should use this function to unconditionally disable a plane.
-	 * This hook is called in-between the ->atomic_begin() and
-	 * ->atomic_flush() of &drm_crtc_helper_funcs. It is an alternative to
+	 * This hook is called in-between the
+	 * &drm_crtc_helper_funcs.atomic_begin and
+	 * drm_crtc_helper_funcs.atomic_flush callbacks. It is an alternative to
 	 * @atomic_update, which will be called for disabling planes, too, if
 	 * the @atomic_disable hook isn't implemented.
 	 *
 	 * This hook is also useful to disable planes in preparation of a modeset,
 	 * by calling drm_atomic_helper_disable_planes_on_crtc() from the
-	 * ->disable() hook in &drm_crtc_helper_funcs.
+	 * &drm_crtc_helper_funcs.disable hook.
 	 *
 	 * Note that the power state of the display pipe when this function is
 	 * called depends upon the exact helpers and calling sequence the driver
diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_kms_helper.h
index d138d08a48c1..fffbb95a0915 100644
--- a/include/drm/drm_simple_kms_helper.h
+++ b/include/drm/drm_simple_kms_helper.h
@@ -77,9 +77,9 @@ struct drm_simple_display_pipe_funcs {
 	/**
 	 * @prepare_fb:
 	 *
-	 * Optional, called by &struct drm_plane_helper_funcs ->prepare_fb .
-	 * Please read the documentation for the ->prepare_fb hook in
-	 * &struct drm_plane_helper_funcs for more details.
+	 * Optional, called by &drm_plane_helper_funcs.prepare_fb.  Please read
+	 * the documentation for the &drm_plane_helper_funcs.prepare_fb hook for
+	 * more details.
 	 */
 	int (*prepare_fb)(struct drm_simple_display_pipe *pipe,
 			  struct drm_plane_state *plane_state);
@@ -87,9 +87,9 @@ struct drm_simple_display_pipe_funcs {
 	/**
 	 * @cleanup_fb:
 	 *
-	 * Optional, called by &struct drm_plane_helper_funcs ->cleanup_fb .
-	 * Please read the documentation for the ->cleanup_fb hook in
-	 * &struct drm_plane_helper_funcs for more details.
+	 * Optional, called by &drm_plane_helper_funcs.cleanup_fb.  Please read
+	 * the documentation for the &drm_plane_helper_funcs.cleanup_fb hook for
+	 * more details.
 	 */
 	void (*cleanup_fb)(struct drm_simple_display_pipe *pipe,
 			   struct drm_plane_state *plane_state);
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 02/15] drm/bridge: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
  2017-01-25  6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25  9:33   ` Archit Taneja
  2017-01-25  6:26 ` [PATCH 03/15] drm/kms-core: " Daniel Vetter
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development
  Cc: Archit Taneja, Daniel Vetter, Intel Graphics Development, 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: Archit Taneja <architt@codeaurora.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 include/drm/drm_bridge.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index fdd82fcbf168..1595a57dfbf2 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -87,9 +87,9 @@ struct drm_bridge_funcs {
 	 * True if an acceptable configuration is possible, false if the modeset
 	 * operation should be rejected.
 	 */
-	bool (*mode_fixup)(struct drm_bridge *bridge,
-			   const struct drm_display_mode *mode,
-			   struct drm_display_mode *adjusted_mode);
+	bool (*mode_fixup)(struct drm_bridge *bridge, const struct
+			   drm_display_mode *mode, struct drm_display_mode
+			   *adjusted_mode);
 	/**
 	 * @disable:
 	 *
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 03/15] drm/kms-core: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
  2017-01-25  6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
  2017-01-25  6:26 ` [PATCH 02/15] drm/bridge: " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 13:52   ` Eric Engestrom
  2017-01-25  6:26 ` [PATCH 04/15] drm/gem|prime|mm: " Daniel Vetter
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development

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 <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_atomic.c        | 71 ++++++++++++++++++-------------------
 drivers/gpu/drm/drm_blend.c         | 11 +++---
 drivers/gpu/drm/drm_connector.c     | 12 +++----
 drivers/gpu/drm/drm_crtc.c          |  7 ++--
 drivers/gpu/drm/drm_dumb_buffers.c  |  4 +--
 drivers/gpu/drm/drm_encoder.c       |  2 +-
 drivers/gpu/drm/drm_encoder_slave.c |  2 +-
 drivers/gpu/drm/drm_framebuffer.c   | 10 +++---
 drivers/gpu/drm/drm_modeset_lock.c  | 10 +++---
 drivers/gpu/drm/drm_plane.c         |  2 +-
 drivers/gpu/drm/drm_property.c      |  2 +-
 include/drm/drm_atomic.h            |  6 ++--
 include/drm/drm_color_mgmt.h        |  2 +-
 include/drm/drm_connector.h         | 40 ++++++++++-----------
 include/drm/drm_crtc.h              | 29 +++++++--------
 include/drm/drm_framebuffer.h       | 15 ++++----
 include/drm/drm_mode_config.h       | 12 +++----
 include/drm/drm_mode_object.h       | 13 ++++---
 include/drm/drm_modeset_lock.h      |  2 +-
 include/drm/drm_plane.h             | 18 +++++-----
 include/drm/drm_property.h          |  8 ++---
 21 files changed, 141 insertions(+), 137 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 723392fc98c8..96c81a61a542 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -195,8 +195,8 @@ EXPORT_SYMBOL(drm_atomic_state_default_clear);
  * all locks. So someone else could sneak in and change the current modeset
  * configuration. Which means that all the state assembled in @state is no
  * longer an atomic update to the current state, but to some arbitrary earlier
- * state. Which could break assumptions the driver's ->atomic_check likely
- * relies on.
+ * state. Which could break assumptions the driver's
+ * &drm_mode_config_funcs.atomic_check likely relies on.
  *
  * Hence we must clear all cached state and completely start over, using this
  * function.
@@ -456,11 +456,10 @@ drm_atomic_replace_property_blob_from_id(struct drm_crtc *crtc,
  * @property: the property to set
  * @val: the new property value
  *
- * Use this instead of calling crtc->atomic_set_property directly.
- * This function handles generic/core properties and calls out to
- * driver's ->atomic_set_property() for driver properties.  To ensure
- * consistent behavior you must call this function rather than the
- * driver hook directly.
+ * This function handles generic/core properties and calls out to driver's
+ * &drm_crtc_funcs.atomic_set_property for driver properties. To ensure
+ * consistent behavior you must call this function rather than the driver hook
+ * directly.
  *
  * RETURNS:
  * Zero on success, error code on failure
@@ -532,10 +531,10 @@ EXPORT_SYMBOL(drm_atomic_crtc_set_property);
  * @property: the property to set
  * @val: return location for the property value
  *
- * This function handles generic/core properties and calls out to
- * driver's ->atomic_get_property() for driver properties.  To ensure
- * consistent behavior you must call this function rather than the
- * driver hook directly.
+ * This function handles generic/core properties and calls out to driver's
+ * &drm_crtc_funcs.atomic_get_property for driver properties. To ensure
+ * consistent behavior you must call this function rather than the driver hook
+ * directly.
  *
  * RETURNS:
  * Zero on success, error code on failure
@@ -716,11 +715,10 @@ EXPORT_SYMBOL(drm_atomic_get_plane_state);
  * @property: the property to set
  * @val: the new property value
  *
- * Use this instead of calling plane->atomic_set_property directly.
- * This function handles generic/core properties and calls out to
- * driver's ->atomic_set_property() for driver properties.  To ensure
- * consistent behavior you must call this function rather than the
- * driver hook directly.
+ * This function handles generic/core properties and calls out to driver's
+ * &drm_plane_funcs.atomic_set_property for driver properties.  To ensure
+ * consistent behavior you must call this function rather than the driver hook
+ * directly.
  *
  * RETURNS:
  * Zero on success, error code on failure
@@ -791,10 +789,10 @@ EXPORT_SYMBOL(drm_atomic_plane_set_property);
  * @property: the property to set
  * @val: return location for the property value
  *
- * This function handles generic/core properties and calls out to
- * driver's ->atomic_get_property() for driver properties.  To ensure
- * consistent behavior you must call this function rather than the
- * driver hook directly.
+ * This function handles generic/core properties and calls out to driver's
+ * &drm_plane_funcs.atomic_get_property for driver properties.  To ensure
+ * consistent behavior you must call this function rather than the driver hook
+ * directly.
  *
  * RETURNS:
  * Zero on success, error code on failure
@@ -1057,11 +1055,10 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);
  * @property: the property to set
  * @val: the new property value
  *
- * Use this instead of calling connector->atomic_set_property directly.
- * This function handles generic/core properties and calls out to
- * driver's ->atomic_set_property() for driver properties.  To ensure
- * consistent behavior you must call this function rather than the
- * driver hook directly.
+ * This function handles generic/core properties and calls out to driver's
+ * &drm_connector_funcs.atomic_set_property for driver properties.  To ensure
+ * consistent behavior you must call this function rather than the driver hook
+ * directly.
  *
  * RETURNS:
  * Zero on success, error code on failure
@@ -1136,10 +1133,10 @@ static void drm_atomic_connector_print_state(struct drm_printer *p,
  * @property: the property to set
  * @val: return location for the property value
  *
- * This function handles generic/core properties and calls out to
- * driver's ->atomic_get_property() for driver properties.  To ensure
- * consistent behavior you must call this function rather than the
- * driver hook directly.
+ * This function handles generic/core properties and calls out to driver's
+ * &drm_connector_funcs.atomic_get_property for driver properties.  To ensure
+ * consistent behavior you must call this function rather than the driver hook
+ * directly.
  *
  * RETURNS:
  * Zero on success, error code on failure
@@ -1316,8 +1313,8 @@ EXPORT_SYMBOL(drm_atomic_set_fb_for_plane);
  * all drope the reference to the fence as we not storing it
  * anywhere.
  *
- * Otherwise, if plane_state->fence is not set this function we
- * just set it with the received implict fence.
+ * Otherwise, if &drm_plane_state.fence is not set this function we just set it
+ * with the received implict fence.
  */
 void
 drm_atomic_set_fence_for_plane(struct drm_plane_state *plane_state,
@@ -1616,7 +1613,7 @@ int drm_atomic_commit(struct drm_atomic_state *state)
 EXPORT_SYMBOL(drm_atomic_commit);
 
 /**
- * drm_atomic_nonblocking_commit - atomic&nonblocking configuration commit
+ * drm_atomic_nonblocking_commit - atomic nonblocking commit
  * @state: atomic configuration to check
  *
  * Note that this function can return -EDEADLK if the driver needed to acquire
@@ -1829,10 +1826,10 @@ static int atomic_set_prop(struct drm_atomic_state *state,
  * @plane_mask: plane mask for planes that were updated.
  * @ret: return value, can be -EDEADLK for a retry.
  *
- * Before doing an update plane->old_fb is set to plane->fb,
- * but before dropping the locks old_fb needs to be set to NULL
- * and plane->fb updated. This is a common operation for each
- * atomic update, so this call is split off as a helper.
+ * Before doing an update &drm_plane.old_fb is set to &drm_plane.fb, but before
+ * dropping the locks old_fb needs to be set to NULL and plane->fb updated. This
+ * is a common operation for each atomic update, so this call is split off as a
+ * helper.
  */
 void drm_atomic_clean_old_fb(struct drm_device *dev,
 			     unsigned plane_mask,
@@ -1873,7 +1870,7 @@ EXPORT_SYMBOL(drm_atomic_clean_old_fb);
  * As a contrast, with implicit fencing the kernel keeps track of any
  * ongoing rendering, and automatically ensures that the atomic update waits
  * for any pending rendering to complete. For shared buffers represented with
- * a &struct dma_buf this is tracked in &reservation_object structures.
+ * a &struct dma_buf this is tracked in &struct reservation_object.
  * Implicit syncing is how Linux traditionally worked (e.g. DRI2/3 on X.org),
  * whereas explicit fencing is what Android wants.
  *
diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
index 1f2412c7ccfd..665aafc6ad68 100644
--- a/drivers/gpu/drm/drm_blend.c
+++ b/drivers/gpu/drm/drm_blend.c
@@ -40,9 +40,8 @@
  * sub-pixel accuracy, which is scaled up to a pixel-aligned destination
  * rectangle in the visible area of a &drm_crtc. The visible area of a CRTC is
  * defined by the horizontal and vertical visible pixels (stored in @hdisplay
- * and @vdisplay) of the requested mode (stored in @mode in the
- * &drm_crtc_state). These two rectangles are both stored in the
- * &drm_plane_state.
+ * and @vdisplay) of the requested mode (stored in &drm_crtc_state.mode). These
+ * two rectangles are both stored in the &drm_plane_state.
  *
  * For the atomic ioctl the following standard (atomic) properties on the plane object
  * encode the basic plane composition model:
@@ -215,7 +214,7 @@ EXPORT_SYMBOL(drm_rotation_simplify);
  * for it in drm core. Drivers can then attach this property to planes to enable
  * support for configurable planes arrangement during blending operation.
  * Once mutable zpos property has been enabled, the DRM core will automatically
- * calculate drm_plane_state->normalized_zpos values. Usually min should be set
+ * calculate &drm_plane_state.normalized_zpos values. Usually min should be set
  * to 0 and max to maximal number of planes for given crtc - 1.
  *
  * If zpos of some planes cannot be changed (like fixed background or
@@ -367,8 +366,8 @@ static int drm_atomic_helper_crtc_normalize_zpos(struct drm_crtc *crtc,
  * For every CRTC this function checks new states of all planes assigned to
  * it and calculates normalized zpos value for these planes. Planes are compared
  * first by their zpos values, then by plane id (if zpos is equal). The plane
- * with lowest zpos value is at the bottom. The plane_state->normalized_zpos is
- * then filled with unique values from 0 to number of active planes in crtc
+ * with lowest zpos value is at the bottom. The &drm_plane_state.normalized_zpos
+ * is then filled with unique values from 0 to number of active planes in crtc
  * minus one.
  *
  * RETURNS
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 799edd0d308e..dd720d4cb4f7 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -38,8 +38,8 @@
  * Hence they are reference-counted using drm_connector_reference() and
  * drm_connector_unreference().
  *
- * KMS driver must create, initialize, register and attach at a struct
- * &drm_connector for each such sink. The instance is created as other KMS
+ * KMS driver must create, initialize, register and attach at a &struct
+ * drm_connector for each such sink. The instance is created as other KMS
  * objects and initialized by setting the following fields.
  *
  * The connector is then registered with a call to drm_connector_init() with a
@@ -49,7 +49,7 @@
  * Connectors must be attached to an encoder to be used. For devices that map
  * connectors to encoders 1:1, the connector should be attached at
  * initialization time with a call to drm_mode_connector_attach_encoder(). The
- * driver must also set the &struct drm_connector encoder field to point to the
+ * driver must also set the &drm_connector.encoder field to point to the
  * attached encoder.
  *
  * For connectors which are not fixed (like built-in panels) the driver needs to
@@ -497,7 +497,7 @@ static struct lockdep_map connector_list_iter_dep_map = {
  * @dev: DRM device
  * @iter: connector_list iterator
  *
- * Sets @iter up to walk the connector list in &drm_mode_config of @dev. @iter
+ * Sets @iter up to walk the &drm_mode_config.connector_list of @dev. @iter
  * must always be cleaned up again by calling drm_connector_list_iter_put().
  * Iteration itself happens using drm_connector_list_iter_next() or
  * drm_for_each_connector_iter().
@@ -696,8 +696,8 @@ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,
  * 	drivers this is only provided for backwards compatibility with existing
  * 	drivers, it remaps to controlling the "ACTIVE" property on the CRTC the
  * 	connector is linked to. Drivers should never set this property directly,
- * 	it is handled by the DRM core by calling the ->dpms() callback in
- * 	&drm_connector_funcs. Atomic drivers should implement this hook using
+ * 	it is handled by the DRM core by calling the &drm_connector_funcs.dpms
+ * 	callback. Atomic drivers should implement this hook using
  * 	drm_atomic_helper_connector_dpms(). This is the only property standard
  * 	connector property that userspace can change.
  * PATH:
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index bd3c8b243447..cea7a7efa43c 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -415,11 +415,12 @@ int drm_mode_getcrtc(struct drm_device *dev,
 }
 
 /**
- * drm_mode_set_config_internal - helper to call ->set_config
+ * drm_mode_set_config_internal - helper to call &drm_mode_config_funcs.set_config
  * @set: modeset config to set
  *
- * This is a little helper to wrap internal calls to the ->set_config driver
- * interface. The only thing it adds is correct refcounting dance.
+ * This is a little helper to wrap internal calls to the
+ * &drm_mode_config_funcs.set_config driver interface. The only thing it adds is
+ * correct refcounting dance.
  *
  * Returns:
  * Zero on success, negative errno on failure.
diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c
index e5c61cda4ae3..10307cc16d75 100644
--- a/drivers/gpu/drm/drm_dumb_buffers.c
+++ b/drivers/gpu/drm/drm_dumb_buffers.c
@@ -42,8 +42,8 @@
  * create dumb buffers suitable for scanout, which can then be used to create
  * KMS frame buffers.
  *
- * To support dumb objects drivers must implement the dumb_create,
- * dumb_destroy and dumb_map_offset operations from &struct drm_driver. See
+ * To support dumb objects drivers must implement the &drm_driver.dumb_create,
+ * &drm_driver.dumb_destroy and &drm_driver.dumb_map_offset operations. See
  * there for further details.
  *
  * Note that dumb objects may not be used for gpu acceleration, as has been
diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
index 487cfe3989e8..129450713bb7 100644
--- a/drivers/gpu/drm/drm_encoder.c
+++ b/drivers/gpu/drm/drm_encoder.c
@@ -98,7 +98,7 @@ void drm_encoder_unregister_all(struct drm_device *dev)
  *
  * Initialises a preallocated encoder. Encoder should be subclassed as part of
  * driver encoder objects. At driver unload time drm_encoder_cleanup() should be
- * called from the driver's destroy hook in &drm_encoder_funcs.
+ * called from the driver's &drm_encoder_funcs.destroy hook.
  *
  * Returns:
  * Zero on success, error code on failure.
diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c
index 4484785cd9ac..cf804389f5ec 100644
--- a/drivers/gpu/drm/drm_encoder_slave.c
+++ b/drivers/gpu/drm/drm_encoder_slave.c
@@ -43,7 +43,7 @@
  * &drm_encoder_slave. The @slave_funcs field will be initialized with
  * the hooks provided by the slave driver.
  *
- * If @info->platform_data is non-NULL it will be used as the initial
+ * If @info.platform_data is non-NULL it will be used as the initial
  * slave config.
  *
  * Returns 0 on success or a negative errno on failure, in particular,
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 588ccc3a2218..ca9cff09cad1 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -58,8 +58,8 @@
  * fbdev framebuffer when the struct &struct drm_framebuffer is embedded into
  * the fbdev helper struct) drivers can manually clean up a framebuffer at
  * module unload time with drm_framebuffer_unregister_private(). But doing this
- * is not recommended, and it's better to have a normal free-standing struct
- * &drm_framebuffer.
+ * is not recommended, and it's better to have a normal free-standing &struct
+ * drm_framebuffer.
  */
 
 int drm_framebuffer_check_src_coords(uint32_t src_x, uint32_t src_y,
@@ -470,7 +470,7 @@ int drm_mode_getfb(struct drm_device *dev,
  * usb display-link, mipi manual update panels or edp panel self refresh modes.
  *
  * Modesetting drivers which always update the frontbuffer do not need to
- * implement the corresponding ->dirty framebuffer callback.
+ * implement the corresponding &drm_framebuffer_funcs.dirty callback.
  *
  * Called by the user via ioctl.
  *
@@ -709,8 +709,8 @@ EXPORT_SYMBOL(drm_framebuffer_unregister_private);
  * @fb: framebuffer to remove
  *
  * Cleanup framebuffer. This function is intended to be used from the drivers
- * ->destroy callback. It can also be used to clean up driver private
- * framebuffers embedded into a larger structure.
+ * &drm_framebuffer_funcs.destroy callback. It can also be used to clean up
+ * driver private framebuffers embedded into a larger structure.
  *
  * Note that this function does not remove the fb from active usuage - if it is
  * still used anywhere, hilarity can ensue since userspace could call getfb on
diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
index 3551ae31f143..bf60f2645e55 100644
--- a/drivers/gpu/drm/drm_modeset_lock.c
+++ b/drivers/gpu/drm/drm_modeset_lock.c
@@ -33,7 +33,7 @@
  * to use &ww_mutex and acquire-contexts to avoid deadlocks.  But because
  * the locking is more distributed around the driver code, we want a bit
  * of extra utility/tracking out of our acquire-ctx.  This is provided
- * by drm_modeset_lock / drm_modeset_acquire_ctx.
+ * by &struct drm_modeset_lock and &struct drm_modeset_acquire_ctx.
  *
  * For basic principles of &ww_mutex, see: Documentation/locking/ww-mutex-design.txt
  *
@@ -53,7 +53,7 @@
  *     drm_modeset_acquire_fini(&ctx);
  *
  * On top of of these per-object locks using &ww_mutex there's also an overall
- * dev->mode_config.lock, for protecting everything else. Mostly this means
+ * &drm_mode_config.mutex, for protecting everything else. Mostly this means
  * probe state of connectors, and preventing hotplug add/removal of connectors.
  *
  * Finally there's a bunch of dedicated locks to protect drm core internal
@@ -71,7 +71,7 @@ static DEFINE_WW_CLASS(crtc_ww_class);
  * drm_modeset_unlock_all() function.
  *
  * This function is deprecated. It allocates a lock acquisition context and
- * stores it in the DRM device's ->mode_config. This facilitate conversion of
+ * stores it in &drm_device.mode_config. This facilitate conversion of
  * existing code because it removes the need to manually deal with the
  * acquisition context, but it is also brittle because the context is global
  * and care must be taken not to nest calls. New code should use the
@@ -124,7 +124,7 @@ EXPORT_SYMBOL(drm_modeset_lock_all);
  * drm_modeset_lock_all() function.
  *
  * This function is deprecated. It uses the lock acquisition context stored
- * in the DRM device's ->mode_config. This facilitates conversion of existing
+ * in &drm_device.mode_config. This facilitates conversion of existing
  * code because it removes the need to manually deal with the acquisition
  * context, but it is also brittle because the context is global and care must
  * be taken not to nest calls. New code should pass the acquisition context
@@ -468,7 +468,7 @@ EXPORT_SYMBOL(drm_modeset_unlock);
  * This function takes all modeset locks, suitable where a more fine-grained
  * scheme isn't (yet) implemented.
  *
- * Unlike drm_modeset_lock_all(), it doesn't take the dev->mode_config.mutex
+ * Unlike drm_modeset_lock_all(), it doesn't take the &drm_mode_config.mutex
  * since that lock isn't required for modeset state changes. Callers which
  * need to grab that lock too need to do so outside of the acquire context
  * @ctx.
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index eed66be18329..c464fc4a874d 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -42,7 +42,7 @@
  *
  * Cursor and overlay planes are optional. All drivers should provide one
  * primary plane per CRTC to avoid surprising userspace too much. See enum
- * &drm_plane_type for a more in-depth discussion of these special uapi-relevant
+ * drm_plane_type for a more in-depth discussion of these special uapi-relevant
  * plane types. Special planes are associated with their CRTC by calling
  * drm_crtc_init_with_planes().
  *
diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index 0d0e5dc0ee23..0cb2a39fe059 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -43,7 +43,7 @@
  *
  * Property values are only 64bit. To support bigger piles of data (like gamma
  * tables, color correction matrizes or large structures) a property can instead
- * point at a &drm_property_blob with that additional data
+ * point at a &drm_property_blob with that additional data.
  *
  * Properties are defined by their symbolic name, userspace must keep a
  * per-object mapping from those names to the property ID used in the atomic
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index f1cb2b08afb5..052ab161b239 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -123,7 +123,8 @@ struct drm_crtc_commit {
 	/**
 	 * @commit_entry:
 	 *
-	 * Entry on the per-CRTC commit_list. Protected by crtc->commit_lock.
+	 * Entry on the per-CRTC &drm_crtc.commit_list. Protected by
+	 * $drm_crtc.commit_lock.
 	 */
 	struct list_head commit_entry;
 
@@ -429,7 +430,8 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
  *
  * For example if the CRTC mode has changed, and the hardware is able to enact
  * the requested mode change without going through a full modeset, the driver
- * should clear mode_changed during its ->atomic_check.
+ * should clear mode_changed in its &drm_mode_config_funcs.atomic_check
+ * implementation.
  */
 static inline bool
 drm_atomic_crtc_needs_modeset(const struct drm_crtc_state *state)
diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
index c767238ac9d5..d9c2f680f5ae 100644
--- a/include/drm/drm_color_mgmt.h
+++ b/include/drm/drm_color_mgmt.h
@@ -34,7 +34,7 @@ int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
 				 int gamma_size);
 
 /**
- * drm_color_lut_extract - clamp&round LUT entries
+ * drm_color_lut_extract - clamp and round LUT entries
  * @user_input: input value
  * @bit_precision: number of bits the hw LUT supports
  *
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index d489cc003b7e..4f7d3b49995a 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -331,15 +331,15 @@ struct drm_connector_funcs {
 	 *
 	 * Entry point for output detection and basic mode validation. The
 	 * driver should reprobe the output if needed (e.g. when hotplug
-	 * handling is unreliable), add all detected modes to connector->modes
+	 * handling is unreliable), add all detected modes to &drm_connector.modes
 	 * and filter out any the device can't support in any configuration. It
 	 * also needs to filter out any modes wider or higher than the
 	 * parameters max_width and max_height indicate.
 	 *
 	 * The drivers must also prune any modes no longer valid from
-	 * connector->modes. Furthermore it must update connector->status and
-	 * connector->edid.  If no EDID has been received for this output
-	 * connector->edid must be NULL.
+	 * &drm_connector.modes. Furthermore it must update
+	 * &drm_connector.status and &drm_connector.edid.  If no EDID has been
+	 * received for this output connector->edid must be NULL.
 	 *
 	 * Drivers using the probe helpers should use
 	 * drm_helper_probe_single_connector_modes() or
@@ -348,7 +348,7 @@ struct drm_connector_funcs {
 	 *
 	 * RETURNS:
 	 *
-	 * The number of modes detected and filled into connector->modes.
+	 * The number of modes detected and filled into &drm_connector.modes.
 	 */
 	int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
 
@@ -381,7 +381,7 @@ struct drm_connector_funcs {
 	 * core drm connector interfaces. Everything added from this callback
 	 * should be unregistered in the early_unregister callback.
 	 *
-	 * This is called while holding drm_connector->mutex.
+	 * This is called while holding &drm_connector.mutex.
 	 *
 	 * Returns:
 	 *
@@ -398,7 +398,7 @@ struct drm_connector_funcs {
 	 * early in the driver unload sequence to disable userspace access
 	 * before data structures are torndown.
 	 *
-	 * This is called while holding drm_connector->mutex.
+	 * This is called while holding &drm_connector.mutex.
 	 */
 	void (*early_unregister)(struct drm_connector *connector);
 
@@ -418,9 +418,9 @@ struct drm_connector_funcs {
 	 * Duplicate the current atomic state for this connector and return it.
 	 * The core and helpers guarantee that any atomic state duplicated with
 	 * this hook and still owned by the caller (i.e. not transferred to the
-	 * driver by calling ->atomic_commit() from struct
-	 * &drm_mode_config_funcs) will be cleaned up by calling the
-	 * @atomic_destroy_state hook in this structure.
+	 * driver by calling &drm_mode_config_funcs.atomic_commit) will be
+	 * cleaned up by calling the @atomic_destroy_state hook in this
+	 * structure.
 	 *
 	 * Atomic drivers which don't subclass &struct drm_connector_state should use
 	 * drm_atomic_helper_connector_duplicate_state(). Drivers that subclass the
@@ -428,7 +428,7 @@ struct drm_connector_funcs {
 	 * __drm_atomic_helper_connector_duplicate_state() to make sure shared state is
 	 * duplicated in a consistent fashion across drivers.
 	 *
-	 * It is an error to call this hook before connector->state has been
+	 * It is an error to call this hook before &drm_connector.state has been
 	 * initialized correctly.
 	 *
 	 * NOTE:
@@ -609,8 +609,8 @@ struct drm_connector {
 
 	/**
 	 * @mutex: Lock for general connector state, but currently only protects
-	 * @registered. Most of the connector state is still protected by the
-	 * mutex in &drm_mode_config.
+	 * @registered. Most of the connector state is still protected by
+	 * &drm_mode_config.mutex.
 	 */
 	struct mutex mutex;
 
@@ -636,14 +636,14 @@ struct drm_connector {
 	/**
 	 * @modes:
 	 * Modes available on this connector (from fill_modes() + user).
-	 * Protected by dev->mode_config.mutex.
+	 * Protected by &drm_mode_config.mutex.
 	 */
-	struct list_head modes; /* list of modes on this connector */
+	struct list_head modes;
 
 	/**
 	 * @status:
 	 * One of the drm_connector_status enums (connected, not, or unknown).
-	 * Protected by dev->mode_config.mutex.
+	 * Protected by &drm_mode_config.mutex.
 	 */
 	enum drm_connector_status status;
 
@@ -651,7 +651,7 @@ struct drm_connector {
 	 * @probed_modes:
 	 * These are modes added by probing with DDC or the BIOS, before
 	 * filtering is applied. Used by the probe helpers.Protected by
-	 * dev->mode_config.mutex.
+	 * &drm_mode_config.mutex.
 	 */
 	struct list_head probed_modes;
 
@@ -659,10 +659,10 @@ struct drm_connector {
 	 * @display_info: Display information is filled from EDID information
 	 * when a display is detected. For non hot-pluggable displays such as
 	 * flat panels in embedded systems, the driver should initialize the
-	 * display_info.width_mm and display_info.height_mm fields with the
-	 * physical size of the display.
+	 * &drm_display_info.width_mm and &drm_display_info.height_mm fields
+	 * with the physical size of the display.
 	 *
-	 * Protected by dev->mode_config.mutex.
+	 * Protected by &drm_mode_config.mutex.
 	 */
 	struct drm_display_info display_info;
 	const struct drm_connector_funcs *funcs;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 06c943d1e04c..496324d3416b 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -81,8 +81,8 @@ struct drm_plane_helper_funcs;
  * @enable: whether the CRTC should be enabled, gates all other state
  * @active: whether the CRTC is actively displaying (used for DPMS)
  * @planes_changed: planes on this crtc are updated
- * @mode_changed: crtc_state->mode or crtc_state->enable has been changed
- * @active_changed: crtc_state->active has been toggled.
+ * @mode_changed: @mode or @enable has been changed
+ * @active_changed: @active has been toggled.
  * @connectors_changed: connectors to this crtc have been updated
  * @zpos_changed: zpos values of planes on this crtc have been updated
  * @color_mgmt_changed: color management properties have changed (degamma or
@@ -102,9 +102,10 @@ struct drm_plane_helper_funcs;
  *
  * Note that the distinction between @enable and @active is rather subtile:
  * Flipping @active while @enable is set without changing anything else may
- * never return in a failure from the ->atomic_check callback. Userspace assumes
- * that a DPMS On will always succeed. In other words: @enable controls resource
- * assignment, @active controls the actual hardware state.
+ * never return in a failure from the &drm_mode_config_funcs.atomic_check
+ * callback. Userspace assumes that a DPMS On will always succeed. In other
+ * words: @enable controls resource assignment, @active controls the actual
+ * hardware state.
  *
  * The three booleans active_changed, connectors_changed and mode_changed are
  * intended to indicate whether a full modeset is needed, rather than strictly
@@ -346,8 +347,8 @@ struct drm_crtc_funcs {
 	 * through the DRM_MODE_PAGE_FLIP_ASYNC flag). When an application
 	 * requests a page flip the DRM core verifies that the new frame buffer
 	 * is large enough to be scanned out by the CRTC in the currently
-	 * configured mode and then calls the CRTC ->page_flip() operation with a
-	 * pointer to the new frame buffer.
+	 * configured mode and then calls this hook with a pointer to the new
+	 * frame buffer.
 	 *
 	 * The driver must wait for any pending rendering to the new framebuffer
 	 * to complete before executing the flip. It should also wait for any
@@ -382,7 +383,7 @@ struct drm_crtc_funcs {
 	 * RETURNS:
 	 *
 	 * 0 on success or a negative error code on failure. Note that if a
-	 * ->page_flip() operation is already pending the callback should return
+	 * page flip operation is already pending the callback should return
 	 * -EBUSY. Pageflips on a disabled CRTC (either by setting a NULL mode
 	 * or just runtime disabled through DPMS respectively the new atomic
 	 * "ACTIVE" state) should result in an -EINVAL error code. Note that
@@ -436,17 +437,17 @@ struct drm_crtc_funcs {
 	 * Duplicate the current atomic state for this CRTC and return it.
 	 * The core and helpers gurantee that any atomic state duplicated with
 	 * this hook and still owned by the caller (i.e. not transferred to the
-	 * driver by calling ->atomic_commit() from struct
-	 * &drm_mode_config_funcs) will be cleaned up by calling the
-	 * @atomic_destroy_state hook in this structure.
+	 * driver by calling &drm_mode_config_funcs.atomic_commit) will be
+	 * cleaned up by calling the @atomic_destroy_state hook in this
+	 * structure.
 	 *
-	 * Atomic drivers which don't subclass &struct drm_crtc should use
+	 * Atomic drivers which don't subclass &struct drm_crtc_state should use
 	 * drm_atomic_helper_crtc_duplicate_state(). Drivers that subclass the
 	 * state structure to extend it with driver-private state should use
 	 * __drm_atomic_helper_crtc_duplicate_state() to make sure shared state is
 	 * duplicated in a consistent fashion across drivers.
 	 *
-	 * It is an error to call this hook before crtc->state has been
+	 * It is an error to call this hook before &drm_crtc.state has been
 	 * initialized correctly.
 	 *
 	 * NOTE:
@@ -641,7 +642,7 @@ struct drm_crtc {
 	 * This provides a read lock for the overall crtc state (mode, dpms
 	 * state, ...) and a write lock for everything which can be update
 	 * without a full modeset (fb, cursor data, crtc properties ...). Full
-	 * modeset also need to grab dev->mode_config.connection_mutex.
+	 * modeset also need to grab &drm_mode_config.connection_mutex.
 	 */
 	struct drm_modeset_lock mutex;
 
diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
index 046c35e54099..04c77eee9c20 100644
--- a/include/drm/drm_framebuffer.h
+++ b/include/drm/drm_framebuffer.h
@@ -40,8 +40,8 @@ struct drm_framebuffer_funcs {
 	 *
 	 * Clean up framebuffer resources, specifically also unreference the
 	 * backing storage. The core guarantees to call this function for every
-	 * framebuffer successfully created by ->fb_create() in
-	 * &drm_mode_config_funcs. Drivers must also call
+	 * framebuffer successfully created by calling
+	 * &drm_mode_config_funcs.fb_create. Drivers must also call
 	 * drm_framebuffer_cleanup() to release DRM core resources for this
 	 * framebuffer.
 	 */
@@ -112,8 +112,8 @@ struct drm_framebuffer {
 	 */
 	struct drm_device *dev;
 	/**
-	 * @head: Place on the dev->mode_config.fb_list, access protected by
-	 * dev->mode_config.fb_lock.
+	 * @head: Place on the &drm_mode_config.fb_list, access protected by
+	 * &drm_mode_config.fb_lock.
 	 */
 	struct list_head head;
 
@@ -187,8 +187,7 @@ struct drm_framebuffer {
 	 */
 	int hot_y;
 	/**
-	 * @filp_head: Placed on &struct drm_file fbs list_head, protected by
-	 * fbs_lock in the same structure.
+	 * @filp_head: Placed on &drm_file.fbs, protected by &drm_file.fbs_lock.
 	 */
 	struct list_head filp_head;
 };
@@ -260,8 +259,8 @@ static inline void drm_framebuffer_assign(struct drm_framebuffer **p,
  * @fb: the loop cursor
  * @dev: the DRM device
  *
- * Iterate over all framebuffers of @dev. User must hold the fb_lock from
- * &drm_mode_config.
+ * Iterate over all framebuffers of @dev. User must hold
+ * &drm_mode_config.fb_lock.
  */
 #define drm_for_each_fb(fb, dev) \
 	for (WARN_ON(!mutex_is_locked(&(dev)->mode_config.fb_lock)),		\
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index fe230f161efc..26ff46ab26fb 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -132,8 +132,8 @@ struct drm_mode_config_funcs {
 	 *    that before calling this hook.
 	 *
 	 * See the documentation of @atomic_commit for an exhaustive list of
-	 * error conditions which don't have to be checked at the
-	 * ->atomic_check() stage?
+	 * error conditions which don't have to be checked at the in this
+	 * callback.
 	 *
 	 * See the documentation for &struct drm_atomic_state for how exactly
 	 * an atomic modeset update is described.
@@ -198,10 +198,10 @@ struct drm_mode_config_funcs {
 	 * completed. These events are per-CRTC and can be distinguished by the
 	 * CRTC index supplied in &drm_event to userspace.
 	 *
-	 * The drm core will supply a &struct drm_event in the event
-	 * member of each CRTC's &drm_crtc_state structure. See the
-	 * documentation for &drm_crtc_state for more details about the precise
-	 * semantics of this event.
+	 * The drm core will supply a &struct drm_event in each CRTC's
+	 * &drm_crtc_state.event. See the documentation for
+	 * &drm_crtc_state.event for more details about the precise semantics of
+	 * this event.
 	 *
 	 * NOTE:
 	 *
diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
index 43460b21d112..2c017adf6d74 100644
--- a/include/drm/drm_mode_object.h
+++ b/include/drm/drm_mode_object.h
@@ -86,10 +86,15 @@ struct drm_object_properties {
 	 *
 	 * Note that atomic drivers do not store mutable properties in this
 	 * array, but only the decoded values in the corresponding state
-	 * structure. The decoding is done using the ->atomic_get_property and
-	 * ->atomic_set_property hooks of the corresponding object. Hence atomic
-	 * drivers should not use drm_object_property_set_value() and
-	 * drm_object_property_get_value() on mutable objects, i.e. those
+	 * structure. The decoding is done using the &drm_crtc.atomic_get_property and
+	 * &drm_crtc.atomic_set_property hooks for &struct drm_crtc. For
+	 * &struct drm_plane the hooks are &drm_plane_funcs.atomic_get_property and
+	 * &drm_plane_funcs.atomic_set_property. And for &struct drm_connector
+	 * the hooks are &drm_connector_funcs.atomic_get_property and
+	 * &drm_connector_funcs.atomic_set_property .
+	 *
+	 * Hence atomic drivers should not use drm_object_property_set_value()
+	 * and drm_object_property_get_value() on mutable objects, i.e. those
 	 * without the DRM_MODE_PROP_IMMUTABLE flag set.
 	 */
 	uint64_t values[DRM_OBJECT_MAX_PROPERTY];
diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
index d918ce45ec2c..96d39fbd12ca 100644
--- a/include/drm/drm_modeset_lock.h
+++ b/include/drm/drm_modeset_lock.h
@@ -64,7 +64,7 @@ struct drm_modeset_acquire_ctx {
 /**
  * struct drm_modeset_lock - used for locking modeset resources.
  * @mutex: resource locking
- * @head: used to hold it's place on state->locked list when
+ * @head: used to hold it's place on &drm_atomi_state.locked list when
  *    part of an atomic update
  *
  * Used for locking CRTCs and other modeset resources.
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index e049bc52fb07..525a3340c1b2 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -249,9 +249,9 @@ struct drm_plane_funcs {
 	 * Duplicate the current atomic state for this plane and return it.
 	 * The core and helpers gurantee that any atomic state duplicated with
 	 * this hook and still owned by the caller (i.e. not transferred to the
-	 * driver by calling ->atomic_commit() from struct
-	 * &drm_mode_config_funcs) will be cleaned up by calling the
-	 * @atomic_destroy_state hook in this structure.
+	 * driver by calling &drm_mode_config_funcs.atomic_commit) will be
+	 * cleaned up by calling the @atomic_destroy_state hook in this
+	 * structure.
 	 *
 	 * Atomic drivers which don't subclass &struct drm_plane_state should use
 	 * drm_atomic_helper_plane_duplicate_state(). Drivers that subclass the
@@ -259,7 +259,7 @@ struct drm_plane_funcs {
 	 * __drm_atomic_helper_plane_duplicate_state() to make sure shared state is
 	 * duplicated in a consistent fashion across drivers.
 	 *
-	 * It is an error to call this hook before plane->state has been
+	 * It is an error to call this hook before &drm_plane.state has been
 	 * initialized correctly.
 	 *
 	 * NOTE:
@@ -423,8 +423,8 @@ enum drm_plane_type {
 	 *
 	 * Primary planes represent a "main" plane for a CRTC.  Primary planes
 	 * are the planes operated upon by CRTC modesetting and flipping
-	 * operations described in the page_flip and set_config hooks in struct
-	 * &drm_crtc_funcs.
+	 * operations described in the &drm_crtc_funcs.page_flip and
+	 * &drm_crtc_funcs.set_config hooks.
 	 */
 	DRM_PLANE_TYPE_PRIMARY,
 
@@ -470,8 +470,8 @@ struct drm_plane {
 	/**
 	 * @mutex:
 	 *
-	 * Protects modeset plane state, together with the mutex of &drm_crtc
-	 * this plane is linked to (when active, getting actived or getting
+	 * Protects modeset plane state, together with the &drm_crtc.mutex of
+	 * CRTC this plane is linked to (when active, getting actived or getting
 	 * disabled).
 	 */
 	struct drm_modeset_lock mutex;
@@ -580,7 +580,7 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,
  *
  * Iterate over all legacy planes of @dev, excluding primary and cursor planes.
  * This is useful for implementing userspace apis when userspace is not
- * universal plane aware. See also enum &drm_plane_type.
+ * universal plane aware. See also &enum drm_plane_type.
  */
 #define drm_for_each_legacy_plane(plane, dev) \
 	list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \
diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
index 43c4b6a2046d..f66fdb47551c 100644
--- a/include/drm/drm_property.h
+++ b/include/drm/drm_property.h
@@ -30,7 +30,7 @@
 /**
  * struct drm_property_enum - symbolic values for enumerations
  * @value: numeric property value for this enum entry
- * @head: list of enum values, linked to enum_list in &drm_property
+ * @head: list of enum values, linked to &drm_property.enum_list
  * @name: symbolic name for the enum
  *
  * For enumeration and bitmask properties this structure stores the symbolic
@@ -191,9 +191,9 @@ struct drm_property {
  * struct drm_property_blob - Blob data for &drm_property
  * @base: base KMS object
  * @dev: DRM device
- * @head_global: entry on the global blob list in &drm_mode_config
- *	property_blob_list.
- * @head_file: entry on the per-file blob list in &drm_file blobs list.
+ * @head_global: entry on the global blob list in
+ * 	&drm_mode_config.property_blob_list.
+ * @head_file: entry on the per-file blob list in &drm_file.blobs list.
  * @length: size of the blob in bytes, invariant over the lifetime of the object
  * @data: actual data, embedded at the end of this structure
  *
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 04/15] drm/gem|prime|mm: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (2 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 03/15] drm/kms-core: " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 12:51   ` Gustavo Padovan
  2017-01-25  6:26 ` [PATCH 05/15] drm/core: " Daniel Vetter
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development

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 <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_gem.c   | 24 ++++++++++++------------
 drivers/gpu/drm/drm_mm.c    |  4 ++--
 drivers/gpu/drm/drm_prime.c |  2 +-
 include/drm/drm_gem.h       | 16 ++++++++--------
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 465bacd0a630..bc93de308673 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -316,8 +316,8 @@ EXPORT_SYMBOL(drm_gem_handle_delete);
  * @dev: corresponding drm_device
  * @handle: the dumb handle to remove
  * 
- * This implements the ->dumb_destroy kms driver callback for drivers which use
- * gem to manage their backing storage.
+ * This implements the &drm_driver.dumb_destroy kms driver callback for drivers
+ * which use gem to manage their backing storage.
  */
 int drm_gem_dumb_destroy(struct drm_file *file,
 			 struct drm_device *dev,
@@ -333,9 +333,9 @@ EXPORT_SYMBOL(drm_gem_dumb_destroy);
  * @obj: object to register
  * @handlep: pointer to return the created handle to the caller
  * 
- * This expects the dev->object_name_lock to be held already and will drop it
- * before returning. Used to avoid races in establishing new handles when
- * importing an object from either an flink name or a dma-buf.
+ * This expects the &drm_device.object_name_lock to be held already and will
+ * drop it before returning. Used to avoid races in establishing new handles
+ * when importing an object from either an flink name or a dma-buf.
  *
  * Handles must be release again through drm_gem_handle_delete(). This is done
  * when userspace closes @file_priv for all attached handles, or through the
@@ -447,8 +447,8 @@ EXPORT_SYMBOL(drm_gem_free_mmap_offset);
  * structures.
  *
  * This routine allocates and attaches a fake offset for @obj, in cases where
- * the virtual size differs from the physical size (ie. obj->size).  Otherwise
- * just use drm_gem_create_mmap_offset().
+ * the virtual size differs from the physical size (ie. &drm_gem_object.size).
+ * Otherwise just use drm_gem_create_mmap_offset().
  *
  * This function is idempotent and handles an already allocated mmap offset
  * transparently. Drivers do not need to check for this case.
@@ -787,7 +787,7 @@ EXPORT_SYMBOL(drm_gem_object_release);
  * @kref: kref of the object to free
  *
  * Called after the last reference to the object has been lost.
- * Must be called holding &drm_device->struct_mutex.
+ * Must be called holding &drm_device.struct_mutex.
  *
  * Frees the object
  */
@@ -813,7 +813,7 @@ EXPORT_SYMBOL(drm_gem_object_free);
  * @obj: GEM buffer object
  *
  * This releases a reference to @obj. Callers must not hold the
- * dev->struct_mutex lock when calling this function.
+ * &drm_device.struct_mutex lock when calling this function.
  *
  * See also __drm_gem_object_unreference().
  */
@@ -840,9 +840,9 @@ EXPORT_SYMBOL(drm_gem_object_unreference_unlocked);
  * drm_gem_object_unreference - release a GEM BO reference
  * @obj: GEM buffer object
  *
- * This releases a reference to @obj. Callers must hold the dev->struct_mutex
- * lock when calling this function, even when the driver doesn't use
- * dev->struct_mutex for anything.
+ * This releases a reference to @obj. Callers must hold the
+ * &drm_device.struct_mutex lock when calling this function, even when the
+ * driver doesn't use &drm_device.struct_mutex for anything.
  *
  * For drivers not encumbered with legacy locking use
  * drm_gem_object_unreference_unlocked() instead.
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 229b3f525dee..e51876e588d6 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -552,8 +552,8 @@ EXPORT_SYMBOL(drm_mm_replace_node);
  * objects to the roster, probably by walking an LRU list, but this can be
  * freely implemented. Eviction candiates are added using
  * drm_mm_scan_add_block() until a suitable hole is found or there are no
- * further evictable objects. Eviction roster metadata is tracked in struct
- * &drm_mm_scan.
+ * further evictable objects. Eviction roster metadata is tracked in &struct
+ * drm_mm_scan.
  *
  * The driver must walk through all objects again in exactly the reverse
  * order to restore the allocator state. Note that while the allocator is used
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 8d77b2462594..485e558d6661 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -291,7 +291,7 @@ static void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
  * This wraps dma_buf_export() for use by generic GEM drivers that are using
  * drm_gem_dmabuf_release(). In addition to calling dma_buf_export(), we take
  * a reference to the &drm_device and the exported &drm_gem_object (stored in
- * exp_info->priv) which is released by drm_gem_dmabuf_release().
+ * &dma_buf_export_info.priv) which is released by drm_gem_dmabuf_release().
  *
  * Returns the new dmabuf.
  */
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
index 9f63736e6163..449a41b56ffc 100644
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -63,7 +63,7 @@ struct drm_gem_object {
 	 * drops to 0 any global names (e.g. the id in the flink namespace) will
 	 * be cleared.
 	 *
-	 * Protected by dev->object_name_lock.
+	 * Protected by &drm_device.object_name_lock.
 	 */
 	unsigned handle_count;
 
@@ -106,8 +106,8 @@ struct drm_gem_object {
 	 * @name:
 	 *
 	 * Global name for this object, starts at 1. 0 means unnamed.
-	 * Access is covered by dev->object_name_lock. This is used by the GEM_FLINK
-	 * and GEM_OPEN ioctls.
+	 * Access is covered by &drm_device.object_name_lock. This is used by
+	 * the GEM_FLINK and GEM_OPEN ioctls.
 	 */
 	int name;
 
@@ -150,7 +150,7 @@ struct drm_gem_object {
 	 * through importing or exporting). We break the resulting reference
 	 * loop when the last gem handle for this object is released.
 	 *
-	 * Protected by obj->object_name_lock.
+	 * Protected by &drm_device.object_name_lock.
 	 */
 	struct dma_buf *dma_buf;
 
@@ -163,7 +163,7 @@ struct drm_gem_object {
 	 * attachment point for the device. This is invariant over the lifetime
 	 * of a gem object.
 	 *
-	 * The driver's ->gem_free_object callback is responsible for cleaning
+	 * The &drm_driver.gem_free_object callback is responsible for cleaning
 	 * up the dma_buf attachment and references acquired at import time.
 	 *
 	 * Note that the drm gem/prime core does not depend upon drivers setting
@@ -204,7 +204,7 @@ drm_gem_object_reference(struct drm_gem_object *obj)
  * @obj: GEM buffer object
  *
  * This function is meant to be used by drivers which are not encumbered with
- * dev->struct_mutex legacy locking and which are using the
+ * &drm_device.struct_mutex legacy locking and which are using the
  * gem_free_object_unlocked callback. It avoids all the locking checks and
  * locking overhead of drm_gem_object_unreference() and
  * drm_gem_object_unreference_unlocked().
@@ -212,8 +212,8 @@ drm_gem_object_reference(struct drm_gem_object *obj)
  * Drivers should never call this directly in their code. Instead they should
  * wrap it up into a ``driver_gem_object_unreference(struct driver_gem_object
  * *obj)`` wrapper function, and use that. Shared code should never call this, to
- * avoid breaking drivers by accident which still depend upon dev->struct_mutex
- * locking.
+ * avoid breaking drivers by accident which still depend upon
+ * &drm_device.struct_mutex locking.
  */
 static inline void
 __drm_gem_object_unreference(struct drm_gem_object *obj)
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 05/15] drm/core: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (3 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 04/15] drm/gem|prime|mm: " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 12:55   ` Gustavo Padovan
  2017-01-25  6:26 ` [PATCH 06/15] drm/doc: Clarify connector overview Daniel Vetter
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development

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 <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_auth.c     |  4 ++--
 drivers/gpu/drm/drm_drv.c      |  8 ++++----
 drivers/gpu/drm/drm_fops.c     | 11 ++++++-----
 drivers/gpu/drm/drm_irq.c      | 10 +++++-----
 drivers/gpu/drm/drm_pci.c      |  2 +-
 drivers/gpu/drm/drm_platform.c |  2 +-
 drivers/gpu/drm/drm_sysfs.c    |  2 +-
 include/drm/drm_auth.h         | 12 ++++++------
 include/drm/drm_drv.h          |  2 +-
 include/drm/drm_irq.h          |  4 ++--
 10 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index 860cfe124c2a..7ff697389d74 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -40,8 +40,8 @@
  * least once successfully became the device master (either through the
  * SET_MASTER IOCTL, or implicitly through opening the primary device node when
  * no one else is the current master that time) there exists one &drm_master.
- * This is noted in the is_master member of &drm_file. All other clients have
- * just a pointer to the &drm_master they are associated with.
+ * This is noted in &drm_file.is_master. All other clients have just a pointer
+ * to the &drm_master they are associated with.
  *
  * In addition only one &drm_master can be the current master for a &drm_device.
  * It can be switched through the DROP_MASTER and SET_MASTER IOCTL, or
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 72116978ec06..242f67c08982 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -309,7 +309,7 @@ void drm_minor_release(struct drm_minor *minor)
  * userspace the device instance can be published using drm_dev_register().
  *
  * There is also deprecated support for initalizing device instances using
- * bus-specific helpers and the ->load() callback. But due to
+ * bus-specific helpers and the &drm_driver.load callback. But due to
  * backwards-compatibility needs the device instance have to be published too
  * early, which requires unpretty global locking to make safe and is therefore
  * only support for existing drivers not yet converted to the new scheme.
@@ -720,9 +720,9 @@ static void remove_compat_control_link(struct drm_device *dev)
  * Never call this twice on any device!
  *
  * NOTE: To ensure backward compatibility with existing drivers method this
- * function calls the ->load() method after registering the device nodes,
- * creating race conditions. Usage of the ->load() methods is therefore
- * deprecated, drivers must perform all initialization before calling
+ * function calls the &drm_driver.load method after registering the device
+ * nodes, creating race conditions. Usage of the &drm_driver.load methods is
+ * therefore deprecated, drivers must perform all initialization before calling
  * drm_dev_register().
  *
  * RETURNS:
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index e22645375e60..afdf5b147f39 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -580,7 +580,7 @@ EXPORT_SYMBOL(drm_poll);
  * kmalloc and @p must be the first member element.
  *
  * This is the locked version of drm_event_reserve_init() for callers which
- * already hold dev->event_lock.
+ * already hold &drm_device.event_lock.
  *
  * RETURNS:
  *
@@ -621,7 +621,7 @@ EXPORT_SYMBOL(drm_event_reserve_init_locked);
  * If callers embedded @p into a larger structure it must be allocated with
  * kmalloc and @p must be the first member element.
  *
- * Callers which already hold dev->event_lock should use
+ * Callers which already hold &drm_device.event_lock should use
  * drm_event_reserve_init_locked() instead.
  *
  * RETURNS:
@@ -677,7 +677,7 @@ EXPORT_SYMBOL(drm_event_cancel_free);
  *
  * This function sends the event @e, initialized with drm_event_reserve_init(),
  * to its associated userspace DRM file. Callers must already hold
- * dev->event_lock, see drm_send_event() for the unlocked version.
+ * &drm_device.event_lock, see drm_send_event() for the unlocked version.
  *
  * Note that the core will take care of unlinking and disarming events when the
  * corresponding DRM file is closed. Drivers need not worry about whether the
@@ -717,8 +717,9 @@ EXPORT_SYMBOL(drm_send_event_locked);
  * @e: DRM event to deliver
  *
  * This function sends the event @e, initialized with drm_event_reserve_init(),
- * to its associated userspace DRM file. This function acquires dev->event_lock,
- * see drm_send_event_locked() for callers which already hold this lock.
+ * to its associated userspace DRM file. This function acquires
+ * &drm_device.event_lock, see drm_send_event_locked() for callers which already
+ * hold this lock.
  *
  * Note that the core will take care of unlinking and disarming events when the
  * corresponding DRM file is closed. Drivers need not worry about whether the
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 88c69e71102e..1c4da043eeda 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -95,7 +95,7 @@ static void store_vblank(struct drm_device *dev, unsigned int pipe,
  *
  * Only to be called from drm_crtc_vblank_on().
  *
- * Note: caller must hold dev->vbl_lock since this reads & writes
+ * Note: caller must hold &drm_device.vbl_lock since this reads & writes
  * device vblank fields.
  */
 static void drm_reset_vblank_timestamp(struct drm_device *dev, unsigned int pipe)
@@ -142,7 +142,7 @@ static void drm_reset_vblank_timestamp(struct drm_device *dev, unsigned int pipe
  * Only necessary when going from off->on, to account for frames we
  * didn't get an interrupt for.
  *
- * Note: caller must hold dev->vbl_lock since this reads & writes
+ * Note: caller must hold &drm_device.vbl_lock since this reads & writes
  * device vblank fields.
  */
 static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
@@ -449,7 +449,7 @@ static void drm_irq_vgaarb_nokms(void *cookie, bool state)
  *
  * This is the simplified helper interface provided for drivers with no special
  * needs. Drivers which need to install interrupt handlers for multiple
- * interrupts must instead set drm_device->irq_enabled to signal the DRM core
+ * interrupts must instead set &drm_device.irq_enabled to signal the DRM core
  * that vblank interrupts are available.
  *
  * Returns:
@@ -519,7 +519,7 @@ EXPORT_SYMBOL(drm_irq_install);
  * Calls the driver's irq_uninstall() function and unregisters the IRQ handler.
  * This should only be called by drivers which used drm_irq_install() to set up
  * their interrupt handler. Other drivers must only reset
- * drm_device->irq_enabled to false.
+ * &drm_device.irq_enabled to false.
  *
  * Note that for kernel modesetting drivers it is a bug if this function fails.
  * The sanity checks are only to catch buggy user modesetting drivers which call
@@ -982,7 +982,7 @@ static void send_vblank_event(struct drm_device *dev,
  * period. This helper function implements exactly the required vblank arming
  * behaviour.
  *
- * NOTE: Drivers using this to send out the event in &struct drm_crtc_state
+ * NOTE: Drivers using this to send out the &struct drm_crtc_state.event
  * as part of an atomic commit must ensure that the next vblank happens at
  * exactly the same time as the atomic commit is committed to the hardware. This
  * function itself does **not** protect again the next vblank interrupt racing
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index dc358f860aea..50c732a95b5a 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -223,7 +223,7 @@ void drm_pci_agp_destroy(struct drm_device *dev)
  * Try and register, if we fail to register, backout previous work.
  *
  * NOTE: This function is deprecated, please use drm_dev_alloc() and
- * drm_dev_register() instead and remove your ->load() callback.
+ * drm_dev_register() instead and remove your &drm_driver.load() callback.
  *
  * Return: 0 on success or a negative error code on failure.
  */
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c
index 7af3005a030c..3b34c3717c4d 100644
--- a/drivers/gpu/drm/drm_platform.c
+++ b/drivers/gpu/drm/drm_platform.c
@@ -74,7 +74,7 @@ static int drm_get_platform_dev(struct platform_device *platdev,
  * .load() function.
  *
  * NOTE: This function is deprecated, please use drm_dev_alloc() and
- * drm_dev_register() instead and remove your ->load() callback.
+ * drm_dev_register() instead and remove your &drm_driver.load() callback.
  *
  * Return: 0 on success or a negative error code on failure.
  */
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 9a37196c1bf1..513288b5c2f6 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -255,7 +255,7 @@ static const struct attribute_group *connector_dev_groups[] = {
  * @connector: connector to add
  *
  * Create a connector device in sysfs, along with its associated connector
- * properties (so far, connection status, dpms, mode list & edid) and
+ * properties (so far, connection status, dpms, mode list and edid) and
  * generate a hotplug event so userspace knows there's a new connector
  * available.
  */
diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h
index eecbc2f43f55..1eb4a52cad8d 100644
--- a/include/drm/drm_auth.h
+++ b/include/drm/drm_auth.h
@@ -43,18 +43,18 @@ struct drm_master {
 	struct kref refcount;
 	struct drm_device *dev;
 	/**
-	 * @unique: Unique identifier: e.g. busid. Protected by struct
-	 * &drm_device master_mutex.
+	 * @unique: Unique identifier: e.g. busid. Protected by
+	 * &drm_device.master_mutex.
 	 */
 	char *unique;
 	/**
-	 * @unique_len: Length of unique field. Protected by &struct drm_device
-	 * master_mutex.
+	 * @unique_len: Length of unique field. Protected by
+	 * &drm_device.master_mutex.
 	 */
 	int unique_len;
 	/**
-	 * @magic_map: Map of used authentication tokens. Protected by struct
-	 * &drm_device master_mutex.
+	 * @magic_map: Map of used authentication tokens. Protected by
+	 * &drm_device.master_mutex.
 	 */
 	struct idr magic_map;
 	struct drm_lock_data lock;
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 34ece393c639..5ab2459b4345 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -314,7 +314,7 @@ struct drm_driver {
 	/**
 	 * @gem_free_object_unlocked: deconstructor for drm_gem_objects
 	 *
-	 * This is for drivers which are not encumbered with dev->struct_mutex
+	 * This is for drivers which are not encumbered with &drm_device.struct_mutex
 	 * legacy locking schemes. Use this hook instead of @gem_free_object.
 	 */
 	void (*gem_free_object_unlocked) (struct drm_gem_object *obj);
diff --git a/include/drm/drm_irq.h b/include/drm/drm_irq.h
index 18cfd11307e1..2fb880462a57 100644
--- a/include/drm/drm_irq.h
+++ b/include/drm/drm_irq.h
@@ -67,7 +67,7 @@ struct drm_vblank_crtc {
 	 * @disable_timer: Disable timer for the delayed vblank disabling
 	 * hysteresis logic. Vblank disabling is controlled through the
 	 * drm_vblank_offdelay module option and the setting of the
-	 * max_vblank_count value in the &drm_device structure.
+	 * &drm_device.max_vblank_count value.
 	 */
 	struct timer_list disable_timer;
 
@@ -92,7 +92,7 @@ struct drm_vblank_crtc {
 	 */
 	atomic_t refcount;		/* number of users of vblank interruptsper crtc */
 	/**
-	 * @last: Protected by dev->vbl_lock, used for wraparound handling.
+	 * @last: Protected by &drm_device.vbl_lock, used for wraparound handling.
 	 */
 	u32 last;
 	/**
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 06/15] drm/doc: Clarify connector overview
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (4 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 05/15] drm/core: " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 12:57   ` [Intel-gfx] " Gustavo Padovan
  2017-01-25  6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

There was a bit of mix-up between initialization and registering.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_connector.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index dd720d4cb4f7..c75ab242f907 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -40,11 +40,10 @@
  *
  * KMS driver must create, initialize, register and attach at a &struct
  * drm_connector for each such sink. The instance is created as other KMS
- * objects and initialized by setting the following fields.
- *
- * The connector is then registered with a call to drm_connector_init() with a
- * pointer to the connector functions and a connector type, and exposed through
- * sysfs with a call to drm_connector_register().
+ * objects and initialized by setting the following fields. The connector is
+ * initialized with a call to drm_connector_init() with a pointer to the
+ * connector functions and a connector type, and then exposed to userspace with
+ * a call to drm_connector_register().
  *
  * Connectors must be attached to an encoder to be used. For devices that map
  * connectors to encoders 1:1, the connector should be attached at
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 07/15] drm/gma500: Nuke device_is_agp callback
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (5 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 06/15] drm/doc: Clarify connector overview Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 12:58   ` Gustavo Padovan
  2017-01-26  0:11   ` Patrik Jakobsson
  2017-01-25  6:26 ` [PATCH 08/15] drm/i810: drop " Daniel Vetter
                   ` (8 subsequent siblings)
  15 siblings, 2 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Returning 0 for an on-chip gpu doesn't change anything at all.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 0dc7ba2fdc22..5ee93ff55608 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -406,11 +406,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
 	return ret;
 }
 
-static int psb_driver_device_is_agp(struct drm_device *dev)
-{
-	return 0;
-}
-
 static inline void get_brightness(struct backlight_device *bd)
 {
 #ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
@@ -487,7 +482,6 @@ static struct drm_driver driver = {
 	.set_busid = drm_pci_set_busid,
 
 	.num_ioctls = ARRAY_SIZE(psb_ioctls),
-	.device_is_agp = psb_driver_device_is_agp,
 	.irq_preinstall = psb_irq_preinstall,
 	.irq_postinstall = psb_irq_postinstall,
 	.irq_uninstall = psb_irq_uninstall,
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 08/15] drm/i810: drop device_is_agp callback
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (6 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 17:36   ` Alex Deucher
  2017-01-25  6:26 ` [PATCH 09/15] drm/mga: remove " Daniel Vetter
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Use the same trick we used for i915 when we still had ums support:
Just initialize the agp support unconditionally in the driver load
function.

Unfortunately that means we need to export drm_agp_init again, but I
think that's a lesser evil.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_agpsupport.c |  2 ++
 drivers/gpu/drm/i810/i810_dma.c  | 24 ++++++++----------------
 drivers/gpu/drm/i810/i810_drv.c  |  1 -
 drivers/gpu/drm/i810/i810_drv.h  |  1 -
 4 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index d621c8a4cf00..c89953449e96 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -421,6 +421,8 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
 	head->base = head->agp_info.aper_base;
 	return head;
 }
+/* Only exported for i810.ko */
+EXPORT_SYMBOL(drm_agp_init);
 
 /**
  * drm_legacy_agp_clear - Clear AGP resource list
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index ab4e6cbe1f8b..576a417690d4 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -1190,6 +1190,14 @@ static int i810_flip_bufs(struct drm_device *dev, void *data,
 
 int i810_driver_load(struct drm_device *dev, unsigned long flags)
 {
+	dev->agp = drm_agp_init(dev);
+	if (dev->agp) {
+		dev->agp->agp_mtrr = arch_phys_wc_add(
+			dev->agp->agp_info.aper_base,
+			dev->agp->agp_info.aper_size *
+			1024 * 1024);
+	}
+
 	/* Our userspace depends upon the agp mapping support. */
 	if (!dev->agp)
 		return -EINVAL;
@@ -1249,19 +1257,3 @@ const struct drm_ioctl_desc i810_ioctls[] = {
 };
 
 int i810_max_ioctl = ARRAY_SIZE(i810_ioctls);
-
-/**
- * Determine if the device really is AGP or not.
- *
- * All Intel graphics chipsets are treated as AGP, even if they are really
- * PCI-e.
- *
- * \param dev   The device to be tested.
- *
- * \returns
- * A value of 1 is always retured to indictate every i810 is AGP.
- */
-int i810_driver_device_is_agp(struct drm_device *dev)
-{
-	return 1;
-}
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
index 02504a7cfaf2..37fd0906f807 100644
--- a/drivers/gpu/drm/i810/i810_drv.c
+++ b/drivers/gpu/drm/i810/i810_drv.c
@@ -60,7 +60,6 @@ static struct drm_driver driver = {
 	.lastclose = i810_driver_lastclose,
 	.preclose = i810_driver_preclose,
 	.set_busid = drm_pci_set_busid,
-	.device_is_agp = i810_driver_device_is_agp,
 	.dma_quiescent = i810_driver_dma_quiescent,
 	.ioctls = i810_ioctls,
 	.fops = &i810_driver_fops,
diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
index 93ec5dc4e7d3..c73d2f2da57b 100644
--- a/drivers/gpu/drm/i810/i810_drv.h
+++ b/drivers/gpu/drm/i810/i810_drv.h
@@ -124,7 +124,6 @@ extern int i810_driver_load(struct drm_device *, unsigned long flags);
 extern void i810_driver_lastclose(struct drm_device *dev);
 extern void i810_driver_preclose(struct drm_device *dev,
 				 struct drm_file *file_priv);
-extern int i810_driver_device_is_agp(struct drm_device *dev);
 
 extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 extern const struct drm_ioctl_desc i810_ioctls[];
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 09/15] drm/mga: remove device_is_agp callback
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (7 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 08/15] drm/i810: drop " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 17:33   ` Alex Deucher
  2017-01-25  6:26 ` [PATCH 10/15] drm: " Daniel Vetter
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

It's only for a device quirk, and we might as well do that in the load
callback.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/mga/mga_dma.c | 20 +++++++++++++++++++-
 drivers/gpu/drm/mga/mga_drv.c | 37 -------------------------------------
 2 files changed, 19 insertions(+), 38 deletions(-)

diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c
index a1d8dd15b131..1ffdafea27e4 100644
--- a/drivers/gpu/drm/mga/mga_dma.c
+++ b/drivers/gpu/drm/mga/mga_dma.c
@@ -392,6 +392,24 @@ int mga_driver_load(struct drm_device *dev, unsigned long flags)
 	drm_mga_private_t *dev_priv;
 	int ret;
 
+	/* There are PCI versions of the G450.  These cards have the
+	 * same PCI ID as the AGP G450, but have an additional PCI-to-PCI
+	 * bridge chip.  We detect these cards, which are not currently
+	 * supported by this driver, by looking at the device ID of the
+	 * bus the "card" is on.  If vendor is 0x3388 (Hint Corp) and the
+	 * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
+	 * device.
+	 */
+	if ((dev->pdev->device == 0x0525) && dev->pdev->bus->self
+	    && (dev->pdev->bus->self->vendor == 0x3388)
+	    && (dev->pdev->bus->self->device == 0x0021)
+	    && dev->agp) {
+		/* FIXME: This should be quirked in the pci core, but oh well
+		 * the hw probably stopped existing. */
+		arch_phys_wc_del(dev->agp->agp_mtrr);
+		kfree(dev->agp);
+		dev->agp = NULL;
+	}
 	dev_priv = kzalloc(sizeof(drm_mga_private_t), GFP_KERNEL);
 	if (!dev_priv)
 		return -ENOMEM;
@@ -698,7 +716,7 @@ static int mga_do_pci_dma_bootstrap(struct drm_device *dev,
 static int mga_do_dma_bootstrap(struct drm_device *dev,
 				drm_mga_dma_bootstrap_t *dma_bs)
 {
-	const int is_agp = (dma_bs->agp_mode != 0) && drm_pci_device_is_agp(dev);
+	const int is_agp = (dma_bs->agp_mode != 0) && dev->agp;
 	int err;
 	drm_mga_private_t *const dev_priv =
 	    (drm_mga_private_t *) dev->dev_private;
diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
index 25b2a1a424e6..63ba0699d107 100644
--- a/drivers/gpu/drm/mga/mga_drv.c
+++ b/drivers/gpu/drm/mga/mga_drv.c
@@ -37,8 +37,6 @@
 
 #include <drm/drm_pciids.h>
 
-static int mga_driver_device_is_agp(struct drm_device *dev);
-
 static struct pci_device_id pciidlist[] = {
 	mga_PCI_IDS
 };
@@ -66,7 +64,6 @@ static struct drm_driver driver = {
 	.lastclose = mga_driver_lastclose,
 	.set_busid = drm_pci_set_busid,
 	.dma_quiescent = mga_driver_dma_quiescent,
-	.device_is_agp = mga_driver_device_is_agp,
 	.get_vblank_counter = mga_get_vblank_counter,
 	.enable_vblank = mga_enable_vblank,
 	.disable_vblank = mga_disable_vblank,
@@ -107,37 +104,3 @@ module_exit(mga_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
-
-/**
- * Determine if the device really is AGP or not.
- *
- * In addition to the usual tests performed by \c drm_device_is_agp, this
- * function detects PCI G450 cards that appear to the system exactly like
- * AGP G450 cards.
- *
- * \param dev   The device to be tested.
- *
- * \returns
- * If the device is a PCI G450, zero is returned.  Otherwise 2 is returned.
- */
-static int mga_driver_device_is_agp(struct drm_device *dev)
-{
-	const struct pci_dev *const pdev = dev->pdev;
-
-	/* There are PCI versions of the G450.  These cards have the
-	 * same PCI ID as the AGP G450, but have an additional PCI-to-PCI
-	 * bridge chip.  We detect these cards, which are not currently
-	 * supported by this driver, by looking at the device ID of the
-	 * bus the "card" is on.  If vendor is 0x3388 (Hint Corp) and the
-	 * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
-	 * device.
-	 */
-
-	if ((pdev->device == 0x0525) && pdev->bus->self
-	    && (pdev->bus->self->vendor == 0x3388)
-	    && (pdev->bus->self->device == 0x0021)) {
-		return 0;
-	}
-
-	return 2;
-}
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 10/15] drm: remove device_is_agp callback
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (8 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 09/15] drm/mga: remove " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 17:34   ` Alex Deucher
  2017-01-25  6:26 ` [PATCH 11/15] drm: Nuke ums vgaarb support Daniel Vetter
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development
  Cc: Alex Deucher, Daniel Vetter, Intel Graphics Development,
	Ben Skeggs, Daniel Vetter

With that the drm_pci_device_is_agp function becomes trivial, so
inline that too. And while at it, move the drm_pci_agp_destroy
declaration into drm-internal.h, since it's not used by drivers.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_internal.h          |  1 +
 drivers/gpu/drm/drm_pci.c               |  2 +-
 drivers/gpu/drm/nouveau/nouveau_abi16.c |  2 +-
 drivers/gpu/drm/radeon/radeon_cs.c      |  3 ++-
 drivers/gpu/drm/radeon/radeon_kms.c     |  2 +-
 include/drm/drmP.h                      | 15 ---------------
 include/drm/drm_drv.h                   | 14 --------------
 7 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index a6213f814345..f37388cb2fde 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -31,6 +31,7 @@ void drm_lastclose(struct drm_device *dev);
 /* drm_pci.c */
 int drm_irq_by_busid(struct drm_device *dev, void *data,
 		     struct drm_file *file_priv);
+void drm_pci_agp_destroy(struct drm_device *dev);
 
 /* drm_prime.c */
 int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 50c732a95b5a..b347c92914cf 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -191,7 +191,7 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
 static void drm_pci_agp_init(struct drm_device *dev)
 {
 	if (drm_core_check_feature(dev, DRIVER_USE_AGP)) {
-		if (drm_pci_device_is_agp(dev))
+		if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))
 			dev->agp = drm_agp_init(dev);
 		if (dev->agp) {
 			dev->agp->agp_mtrr = arch_phys_wc_add(
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index 7bd4683216d0..4df4f6ed4886 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -199,7 +199,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
 		if (!nvxx_device(device)->func->pci)
 			getparam->value = 3;
 		else
-		if (drm_pci_device_is_agp(dev))
+		if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))
 			getparam->value = 0;
 		else
 		if (!pci_is_pcie(dev->pdev))
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 510ea371dacc..a8442f7196d6 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -121,7 +121,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
 		   VRAM, also but everything into VRAM on AGP cards and older
 		   IGP chips to avoid image corruptions */
 		if (p->ring == R600_RING_TYPE_UVD_INDEX &&
-		    (i == 0 || drm_pci_device_is_agp(p->rdev->ddev) ||
+		    (i == 0 || pci_find_capability(p->rdev->ddev->pdev,
+						   PCI_CAP_ID_AGP) ||
 		     p->rdev->family == CHIP_RS780 ||
 		     p->rdev->family == CHIP_RS880)) {
 
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 116cf0d23595..56f35c06742c 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -105,7 +105,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 	dev->dev_private = (void *)rdev;
 
 	/* update BUS flag */
-	if (drm_pci_device_is_agp(dev)) {
+	if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP)) {
 		flags |= RADEON_IS_AGP;
 	} else if (pci_is_pcie(dev->pdev)) {
 		flags |= RADEON_IS_PCIE;
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index e5882d5a68e5..21a3a666a2fd 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -790,21 +790,6 @@ extern void drm_sysfs_hotplug_event(struct drm_device *dev);
 
 /*@}*/
 
-/* PCI section */
-static __inline__ int drm_pci_device_is_agp(struct drm_device *dev)
-{
-	if (dev->driver->device_is_agp != NULL) {
-		int err = (*dev->driver->device_is_agp) (dev);
-
-		if (err != 2) {
-			return err;
-		}
-	}
-
-	return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
-}
-void drm_pci_agp_destroy(struct drm_device *dev);
-
 extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
 extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
 #ifdef CONFIG_PCI
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 5ab2459b4345..af75fc6ec830 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -151,20 +151,6 @@ struct drm_driver {
 	void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);
 
 	/**
-	 * @device_is_agp:
-	 *
-	 * Called by drm_device_is_agp().  Typically used to determine if a card
-	 * is really attached to AGP or not.
-	 *
-	 * Returns:
-	 *
-	 * One of three values is returned depending on whether or not the
-	 * card is absolutely not AGP (return of 0), absolutely is AGP
-	 * (return of 1), or may or may not be AGP (return of 2).
-	 */
-	int (*device_is_agp) (struct drm_device *dev);
-
-	/**
 	 * @get_scanout_position:
 	 *
 	 * Called by vblank timestamping code.
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 11/15] drm: Nuke ums vgaarb support
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (9 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 10/15] drm: " Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 17:40   ` Alex Deucher
  2017-01-25  6:26 ` [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such Daniel Vetter
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

i915, nouveau (ever since merged to upstream) and radeon all lack ums
support in upstream. No point keeping the ums vgaarb support around.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_irq.c | 26 --------------------------
 include/drm/drm_drv.h     |  3 ---
 2 files changed, 29 deletions(-)

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 1c4da043eeda..954960cc68e7 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -415,29 +415,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
 }
 EXPORT_SYMBOL(drm_vblank_init);
 
-static void drm_irq_vgaarb_nokms(void *cookie, bool state)
-{
-	struct drm_device *dev = cookie;
-
-	if (dev->driver->vgaarb_irq) {
-		dev->driver->vgaarb_irq(dev, state);
-		return;
-	}
-
-	if (!dev->irq_enabled)
-		return;
-
-	if (state) {
-		if (dev->driver->irq_uninstall)
-			dev->driver->irq_uninstall(dev);
-	} else {
-		if (dev->driver->irq_preinstall)
-			dev->driver->irq_preinstall(dev);
-		if (dev->driver->irq_postinstall)
-			dev->driver->irq_postinstall(dev);
-	}
-}
-
 /**
  * drm_irq_install - install IRQ handler
  * @dev: DRM device
@@ -492,9 +469,6 @@ int drm_irq_install(struct drm_device *dev, int irq)
 		return ret;
 	}
 
-	if (drm_core_check_feature(dev, DRIVER_LEGACY))
-		vga_client_register(dev->pdev, (void *)dev, drm_irq_vgaarb_nokms, NULL);
-
 	/* After installing handler */
 	if (dev->driver->irq_postinstall)
 		ret = dev->driver->irq_postinstall(dev);
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index af75fc6ec830..8391135b95f2 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -345,9 +345,6 @@ struct drm_driver {
 	int (*gem_prime_mmap)(struct drm_gem_object *obj,
 				struct vm_area_struct *vma);
 
-	/* vga arb irq handler */
-	void (*vgaarb_irq)(struct drm_device *dev, bool state);
-
 	/**
 	 * @dumb_create:
 	 *
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (10 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 11/15] drm: Nuke ums vgaarb support Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 17:43   ` Alex Deucher
  2017-01-25  6:26 ` [PATCH 13/15] drm/doc: Fix typos for early_unregister doc Daniel Vetter
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

No point in documenting these, they only confuse.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  1 -
 include/drm/drm_drv.h                   | 13 ++++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 2534adaebe30..38c22c3c0d54 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -686,7 +686,6 @@ static struct drm_driver kms_driver = {
 	    DRIVER_USE_AGP |
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
 	    DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET,
-	.dev_priv_size = 0,
 	.load = amdgpu_driver_load_kms,
 	.open = amdgpu_driver_open_kms,
 	.preclose = amdgpu_driver_preclose_kms,
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 8391135b95f2..732e85652d1e 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -81,7 +81,6 @@ struct drm_driver {
 	 * Zero on success, non-zero value on failure.
 	 */
 	int (*load) (struct drm_device *, unsigned long flags);
-	int (*firstopen) (struct drm_device *);
 	int (*open) (struct drm_device *, struct drm_file *);
 	void (*preclose) (struct drm_device *, struct drm_file *file_priv);
 	void (*postclose) (struct drm_device *, struct drm_file *);
@@ -103,9 +102,6 @@ struct drm_driver {
 	 *
 	 */
 	void (*unload) (struct drm_device *);
-	int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
-	int (*dma_quiescent) (struct drm_device *);
-	int (*context_dtor) (struct drm_device *dev, int context);
 	int (*set_busid)(struct drm_device *dev, struct drm_master *master);
 
 	/**
@@ -413,13 +409,20 @@ struct drm_driver {
 	char *date;
 
 	u32 driver_features;
-	int dev_priv_size;
 	const struct drm_ioctl_desc *ioctls;
 	int num_ioctls;
 	const struct file_operations *fops;
 
+	/* Everything below here is for legacy driver, never use! */
+	/* private: */
+
 	/* List of devices hanging off this driver with stealth attach. */
 	struct list_head legacy_dev_list;
+	int (*firstopen) (struct drm_device *);
+	int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
+	int (*dma_quiescent) (struct drm_device *);
+	int (*context_dtor) (struct drm_device *dev, int context);
+	int dev_priv_size;
 };
 
 extern __printf(6, 7)
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 13/15] drm/doc: Fix typos for early_unregister doc
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (11 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-26  9:49   ` Daniel Vetter
  2017-01-25  6:26 ` [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ Daniel Vetter
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development

There's no late_unregister. While at it switch to the new canonical
reference style.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 include/drm/drm_crtc.h    | 2 +-
 include/drm/drm_encoder.h | 2 +-
 include/drm/drm_plane.h   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 496324d3416b..bef18a1fa36e 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -560,7 +560,7 @@ struct drm_crtc_funcs {
 	 *
 	 * This optional hook should be used to unregister the additional
 	 * userspace interfaces attached to the crtc from
-	 * late_unregister(). It is called from drm_dev_unregister(),
+	 * @late_register. It is called from drm_dev_unregister(),
 	 * early in the driver unload sequence to disable userspace access
 	 * before data structures are torndown.
 	 */
diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h
index 5f58f65344e0..8d8245ec0181 100644
--- a/include/drm/drm_encoder.h
+++ b/include/drm/drm_encoder.h
@@ -75,7 +75,7 @@ struct drm_encoder_funcs {
 	 *
 	 * This optional hook should be used to unregister the additional
 	 * userspace interfaces attached to the encoder from
-	 * late_unregister(). It is called from drm_dev_unregister(),
+	 * @late_register. It is called from drm_dev_unregister(),
 	 * early in the driver unload sequence to disable userspace access
 	 * before data structures are torndown.
 	 */
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 525a3340c1b2..953c174bf8a1 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -372,7 +372,7 @@ struct drm_plane_funcs {
 	 *
 	 * This optional hook should be used to unregister the additional
 	 * userspace interfaces attached to the plane from
-	 * late_unregister(). It is called from drm_dev_unregister(),
+	 * @late_register. It is called from drm_dev_unregister(),
 	 * early in the driver unload sequence to disable userspace access
 	 * before data structures are torndown.
 	 */
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (12 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 13/15] drm/doc: Fix typos for early_unregister doc Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 17:31   ` Alex Deucher
  2017-01-25  6:26 ` [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc] Daniel Vetter
  2017-01-25  7:54 ` ✗ Fi.CI.BAT: warning for More kerneldoc cleanup Patchwork
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

The function operates on modes, not CRTCs. Also move it into
drm_modes.[hc]. Spotted while reviewing CRTC docs.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c  |  2 +-
 drivers/gpu/drm/drm_crtc.c           | 23 +----------------------
 drivers/gpu/drm/drm_modes.c          | 21 +++++++++++++++++++++
 drivers/gpu/drm/i915/intel_display.c |  4 ++--
 include/drm/drm_crtc.h               |  2 --
 include/drm/drm_modes.h              |  2 ++
 6 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 5e512dd3a2c4..9633d12c4ed1 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2369,7 +2369,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
 	if (ret != 0)
 		return ret;
 
-	drm_crtc_get_hv_timing(set->mode, &hdisplay, &vdisplay);
+	drm_mode_get_hv_timing(set->mode, &hdisplay, &vdisplay);
 
 	drm_atomic_set_fb_for_plane(primary_state, set->fb);
 	primary_state->crtc_x = 0;
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index cea7a7efa43c..5f28e3a5a3e0 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -461,27 +461,6 @@ int drm_mode_set_config_internal(struct drm_mode_set *set)
 EXPORT_SYMBOL(drm_mode_set_config_internal);
 
 /**
- * drm_crtc_get_hv_timing - Fetches hdisplay/vdisplay for given mode
- * @mode: mode to query
- * @hdisplay: hdisplay value to fill in
- * @vdisplay: vdisplay value to fill in
- *
- * The vdisplay value will be doubled if the specified mode is a stereo mode of
- * the appropriate layout.
- */
-void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
-			    int *hdisplay, int *vdisplay)
-{
-	struct drm_display_mode adjusted;
-
-	drm_mode_copy(&adjusted, mode);
-	drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY);
-	*hdisplay = adjusted.crtc_hdisplay;
-	*vdisplay = adjusted.crtc_vdisplay;
-}
-EXPORT_SYMBOL(drm_crtc_get_hv_timing);
-
-/**
  * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the
  *     CRTC viewport
  * @crtc: CRTC that framebuffer will be displayed on
@@ -498,7 +477,7 @@ int drm_crtc_check_viewport(const struct drm_crtc *crtc,
 {
 	int hdisplay, vdisplay;
 
-	drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
+	drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay);
 
 	if (crtc->state &&
 	    drm_rotation_90_or_270(crtc->primary->state->rotation))
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index e6b19bc9021a..73ed6399c3fb 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -797,6 +797,27 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
 EXPORT_SYMBOL(drm_mode_vrefresh);
 
 /**
+ * drm_mode_get_hv_timing - Fetches hdisplay/vdisplay for given mode
+ * @mode: mode to query
+ * @hdisplay: hdisplay value to fill in
+ * @vdisplay: vdisplay value to fill in
+ *
+ * The vdisplay value will be doubled if the specified mode is a stereo mode of
+ * the appropriate layout.
+ */
+void drm_mode_get_hv_timing(const struct drm_display_mode *mode,
+			    int *hdisplay, int *vdisplay)
+{
+	struct drm_display_mode adjusted;
+
+	drm_mode_copy(&adjusted, mode);
+	drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY);
+	*hdisplay = adjusted.crtc_hdisplay;
+	*vdisplay = adjusted.crtc_vdisplay;
+}
+EXPORT_SYMBOL(drm_mode_get_hv_timing);
+
+/**
  * drm_mode_set_crtcinfo - set CRTC modesetting timing parameters
  * @p: mode
  * @adjust_flags: a combination of adjustment flags
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7af8ddcaa075..50096f9bc420 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11099,7 +11099,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
 		return PTR_ERR(plane_state);
 
 	if (mode)
-		drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
+		drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay);
 	else
 		hdisplay = vdisplay = 0;
 
@@ -12992,7 +12992,7 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,
 	 * computation to clearly distinguish it from the adjusted mode, which
 	 * can be changed by the connectors in the below retry loop.
 	 */
-	drm_crtc_get_hv_timing(&pipe_config->base.mode,
+	drm_mode_get_hv_timing(&pipe_config->base.mode,
 			       &pipe_config->pipe_src_w,
 			       &pipe_config->pipe_src_h);
 
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index bef18a1fa36e..816edab054e6 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -826,8 +826,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
 	return 1 << drm_crtc_index(crtc);
 }
 
-void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
-			    int *hdisplay, int *vdisplay);
 int drm_crtc_force_disable(struct drm_crtc *crtc);
 int drm_crtc_force_disable_all(struct drm_device *dev);
 
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index 9934d91619c1..6dd34280e892 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -459,6 +459,8 @@ int of_get_drm_display_mode(struct device_node *np,
 void drm_mode_set_name(struct drm_display_mode *mode);
 int drm_mode_hsync(const struct drm_display_mode *mode);
 int drm_mode_vrefresh(const struct drm_display_mode *mode);
+void drm_mode_get_hv_timing(const struct drm_display_mode *mode,
+			    int *hdisplay, int *vdisplay);
 
 void drm_mode_set_crtcinfo(struct drm_display_mode *p,
 			   int adjust_flags);
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc]
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (13 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ Daniel Vetter
@ 2017-01-25  6:26 ` Daniel Vetter
  2017-01-25 14:26   ` Eric Engestrom
  2017-01-25  7:54 ` ✗ Fi.CI.BAT: warning for More kerneldoc cleanup Patchwork
  15 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25  6:26 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

After going through all the trouble of splitting out parts from
drm_crtc.[hc] and then properly documenting each I've entirely
forgotten to show the same TLC for CRTCs themselves!

Let's make amends asap.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 Documentation/gpu/drm-kms.rst |  6 ++++++
 drivers/gpu/drm/drm_crtc.c    | 21 +++++++++++++++++++++
 include/drm/drm_crtc.h        | 25 +++++++++++++++++++------
 3 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
index 35c41cf84a1b..979cee853bb1 100644
--- a/Documentation/gpu/drm-kms.rst
+++ b/Documentation/gpu/drm-kms.rst
@@ -284,6 +284,12 @@ Atomic Mode Setting Function Reference
 CRTC Abstraction
 ================
 
+.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
+   :doc: overview
+
+CRTC Functions Reference
+--------------------------------
+
 .. kernel-doc:: include/drm/drm_crtc.h
    :internal:
 
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 5f28e3a5a3e0..6915f897bd8e 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -47,6 +47,27 @@
 #include "drm_internal.h"
 
 /**
+ * DOC: overview
+ *
+ * A CRTC represents the overall display pipeline. It receives pixel data from
+ * &drm_plane and blends them together. The &drm_display_mode is also attached
+ * to the CRTC, specifying display timings. On the output side the data is fed
+ * to one or more &drm_encoder, which are then each connected to one
+ * &drm_connector.
+ *
+ * To create a CRTC, a KMS drivers allocates and zeroes an instances of
+ * &struct drm_crtc (possibly as part of a larger structure) and registers it
+ * with a call to drm_crtc_init_with_planes().
+ *
+ * The CRTC is also the entry point for legacy modeset operations, see
+ * &drm_crtc_funcs.set_config, legacy plane operations, see
+ * &drm_crtc_funcs.page_flip and &drm_crtc_funcs.cursor_set2, and other legacy
+ * operations like &drm_crtc_funcs.gamma_set. For atomic drivers all these
+ * features are controlled through &drm_property and
+ * &drm_mode_config_funcs.atomic_check and &drm_mode_config_funcs.atomic_check.
+ */
+
+/**
  * drm_crtc_from_index - find the registered CRTC at an index
  * @dev: DRM device
  * @idx: index of registered CRTC to find for
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 816edab054e6..d788c624f67a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -641,7 +641,7 @@ struct drm_crtc {
 	 *
 	 * This provides a read lock for the overall crtc state (mode, dpms
 	 * state, ...) and a write lock for everything which can be update
-	 * without a full modeset (fb, cursor data, crtc properties ...). Full
+	 * without a full modeset (fb, cursor data, crtc properties ...). A full
 	 * modeset also need to grab &drm_mode_config.connection_mutex.
 	 */
 	struct drm_modeset_lock mutex;
@@ -774,10 +774,8 @@ struct drm_crtc {
  * @connectors: array of connectors to drive with this CRTC if possible
  * @num_connectors: size of @connectors array
  *
- * Represents a single crtc the connectors that it drives with what mode
- * and from which framebuffer it scans out from.
- *
- * This is used to set modes.
+ * This represents a modeset configuration for the legacy SETCRTC ioctl and is
+ * also used internally. Atomic drivers instead use &drm_atomic_state.
  */
 struct drm_mode_set {
 	struct drm_framebuffer *fb;
@@ -832,7 +830,15 @@ int drm_crtc_force_disable_all(struct drm_device *dev);
 int drm_mode_set_config_internal(struct drm_mode_set *set);
 struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
 
-/* Helpers */
+/**
+ * drm_crtc_find - look up a CRTC object from its ID
+ * @dev: DRM device
+ * @id: &drm_mode_object ID
+ *
+ * This can be used to look up a CRTC from its userspace ID. Only used by
+ * drivers for legacy IOCTLs and interface, nowadays extensions to the KMS
+ * userspace interface should be done using &drm_property.
+ */
 static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
 	uint32_t id)
 {
@@ -841,6 +847,13 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
 	return mo ? obj_to_crtc(mo) : NULL;
 }
 
+/**
+ * drm_for_each_crtc - iterate over all encoders
+ * @crtc: a &struct drm_crtc as the loop cursor
+ * @dev: the &struct drm_device
+ *
+ * Iterate over all CRTCs of @dev.
+ */
 #define drm_for_each_crtc(crtc, dev) \
 	list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
 
-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* ✗ Fi.CI.BAT: warning for More kerneldoc cleanup
  2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
                   ` (14 preceding siblings ...)
  2017-01-25  6:26 ` [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc] Daniel Vetter
@ 2017-01-25  7:54 ` Patchwork
  15 siblings, 0 replies; 40+ messages in thread
From: Patchwork @ 2017-01-25  7:54 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: More kerneldoc cleanup
URL   : https://patchwork.freedesktop.org/series/18534/
State : warning

== Summary ==

Series 18534v1 More kerneldoc cleanup
https://patchwork.freedesktop.org/api/1.0/series/18534/revisions/1/mbox/

Test gem_sync:
        Subgroup basic-store-all:
                fail       -> PASS       (fi-ivb-3770)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (fi-snb-2520m)

fi-bdw-5557u     total:247  pass:233  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:247  pass:208  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:247  pass:225  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:79   pass:66   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:247  pass:227  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:247  pass:222  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:247  pass:215  dwarn:1   dfail:0   fail:0   skip:31 
fi-snb-2600      total:247  pass:215  dwarn:0   dfail:0   fail:0   skip:32 

1a01e7157e02428675bbd28754d88da938b961e6 drm-tip: 2017y-01m-25d-05h-21m-01s UTC integration manifest
71e5ec3 drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/
6800f50 drm/doc: Fix typos for early_unregister doc
9dd514f drm/moc: Mark legacy fields in drm_driver as such
2283a7d drm: Nuke ums vgaarb support
5524451 drm: remove device_is_agp callback
ed244d2 drm/mga: remove device_is_agp callback
55bd6e6 drm/i810: drop device_is_agp callback
ce7bde1 drm/gma500: Nuke device_is_agp callback
3d24895 drm/doc: Clarify connector overview
3c8a22d drm/core: Use recommened kerneldoc for struct member refs
2f688ea drm/gem|prime|mm: Use recommened kerneldoc for struct member refs
9e0d2c2 drm/kms-core: Use recommened kerneldoc for struct member refs
fb94e6c drm/bridge: Use recommened kerneldoc for struct member refs
a1b49fd drm/kms-helpers: Use recommened kerneldoc for struct member refs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3601/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 02/15] drm/bridge: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 ` [PATCH 02/15] drm/bridge: " Daniel Vetter
@ 2017-01-25  9:33   ` Archit Taneja
  2017-01-25 12:40     ` Daniel Vetter
  0 siblings, 1 reply; 40+ messages in thread
From: Archit Taneja @ 2017-01-25  9:33 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development



On 01/25/2017 11:56 AM, Daniel Vetter wrote:
> 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 ...

This seems like a leftover from the older version of the patch, which
we decided to not take. I guess we could drop it.

Archit

>
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  include/drm/drm_bridge.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index fdd82fcbf168..1595a57dfbf2 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -87,9 +87,9 @@ struct drm_bridge_funcs {
>  	 * True if an acceptable configuration is possible, false if the modeset
>  	 * operation should be rejected.
>  	 */
> -	bool (*mode_fixup)(struct drm_bridge *bridge,
> -			   const struct drm_display_mode *mode,
> -			   struct drm_display_mode *adjusted_mode);
> +	bool (*mode_fixup)(struct drm_bridge *bridge, const struct
> +			   drm_display_mode *mode, struct drm_display_mode
> +			   *adjusted_mode);
>  	/**
>  	 * @disable:
>  	 *
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 02/15] drm/bridge: Use recommened kerneldoc for struct member refs
  2017-01-25  9:33   ` Archit Taneja
@ 2017-01-25 12:40     ` Daniel Vetter
  0 siblings, 0 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25 12:40 UTC (permalink / raw)
  To: Archit Taneja
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Wed, Jan 25, 2017 at 03:03:42PM +0530, Archit Taneja wrote:
> 
> 
> On 01/25/2017 11:56 AM, Daniel Vetter wrote:
> > 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 ...
> 
> This seems like a leftover from the older version of the patch, which
> we decided to not take. I guess we could drop it.

Right, this was a rebase oversight, thanks a lot for catching it. I'l drop
it now to make sure it won't resurface :-)
-Daniel

> 
> Archit
> 
> > 
> > Cc: Archit Taneja <architt@codeaurora.org>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  include/drm/drm_bridge.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> > index fdd82fcbf168..1595a57dfbf2 100644
> > --- a/include/drm/drm_bridge.h
> > +++ b/include/drm/drm_bridge.h
> > @@ -87,9 +87,9 @@ struct drm_bridge_funcs {
> >  	 * True if an acceptable configuration is possible, false if the modeset
> >  	 * operation should be rejected.
> >  	 */
> > -	bool (*mode_fixup)(struct drm_bridge *bridge,
> > -			   const struct drm_display_mode *mode,
> > -			   struct drm_display_mode *adjusted_mode);
> > +	bool (*mode_fixup)(struct drm_bridge *bridge, const struct
> > +			   drm_display_mode *mode, struct drm_display_mode
> > +			   *adjusted_mode);
> >  	/**
> >  	 * @disable:
> >  	 *
> > 
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Intel-gfx] [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
@ 2017-01-25 12:48   ` Gustavo Padovan
  2017-01-25 15:19     ` Daniel Vetter
  0 siblings, 1 reply; 40+ messages in thread
From: Gustavo Padovan @ 2017-01-25 12:48 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

Hi Daniel,

2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:

> 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 <jani.nikula@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  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:
>   * Zero for success or -errno
> @@ -1125,8 +1130,8 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks);
>   * drm_atomic_helper_commit_tail - commit atomic update to hardware
>   * @old_state: atomic state object with old state structures
>   *
> - * This is the default implemenation for the ->atomic_commit_tail() hook of the
> - * &drm_mode_config_helper_funcs vtable.
> + * This is the default implemenation for the
> + * &drm_mode_config_helper_funcs.atomic_commit_tail hook.

implementation

>   *
>   * Note that the default ordering of how the various stages are called is to
>   * match the legacy modeset helper library closest. One peculiarity of that is
> @@ -1203,8 +1208,8 @@ static void commit_work(struct work_struct *work)
>   * drm_atomic_helper_setup_commit() and related functions.
>   *
>   * Committing the actual hardware state is done through the
> - * ->atomic_commit_tail() callback of the &drm_mode_config_helper_funcs vtable,
> - * or it's default implementation drm_atomic_helper_commit_tail().
> + * &drm_mode_config_helper_funcs.atomic_commit_tail callback, or it's default
> + * implementation drm_atomic_helper_commit_tail().
>   *
>   * RETURNS:
>   * Zero for success or -errno.
> @@ -1373,14 +1378,15 @@ static void release_crtc_commit(struct completion *completion)
>   *
>   * This function prepares @state to be used by the atomic helper's support for
>   * nonblocking commits. Drivers using the nonblocking commit infrastructure
> - * should always call this function from their ->atomic_commit hook.
> + * should always call this function from their
> + * &drm_mode_config_funcs.atomic_commit hook.
>   *
>   * To be able to use this support drivers need to use a few more helper
>   * functions. drm_atomic_helper_wait_for_dependencies() must be called before
>   * actually committing the hardware state, and for nonblocking commits this call
>   * must be placed in the async worker. See also drm_atomic_helper_swap_state()
>   * and it's stall parameter, for when a driver's commit hooks look at the
> - * ->state pointers of &struct drm_crtc, &drm_plane or &drm_connector directly.
> + * &drm_crtc.state, &drm_plane.state or &drm_connector.state pointer directly.
>   *
>   * Completion of the hardware commit step must be signalled using
>   * drm_atomic_helper_commit_hw_done(). After this step the driver is not allowed
> @@ -1489,8 +1495,7 @@ static struct drm_crtc_commit *preceeding_commit(struct drm_crtc *crtc)
>   * This function waits for all preceeding commits that touch the same CRTC as
>   * @old_state to both be committed to the hardware (as signalled by
>   * drm_atomic_helper_commit_hw_done) and executed by the hardware (as signalled
> - * by calling drm_crtc_vblank_send_event on the event member of
> - * &drm_crtc_state).
> + * by calling drm_crtc_vblank_send_event on the &drm_crtc_state.event).

drm_crtc_vblank_send_event()

>   *
>   * This is part of the atomic helper support for nonblocking commits, see
>   * drm_atomic_helper_setup_commit() for an overview.
> @@ -1627,8 +1632,9 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_cleanup_done);
>   * @state: atomic state object with new state structures
>   *
>   * This function prepares plane state, specifically framebuffers, for the new
> - * configuration. If any failure is encountered this function will call
> - * ->cleanup_fb on any already successfully prepared framebuffer.
> + * configuration, by calling &drm_plane_helper_funcs.prepare_fb. If any failure
> + * is encountered this function will call &drm_plane_helper_funcs.cleanup_fb on
> + * any already successfully prepared framebuffer.
>   *
>   * Returns:
>   * 0 on success, negative error code on failure.
> @@ -1708,10 +1714,10 @@ static bool plane_crtc_active(const struct drm_plane_state *state)
>   *
>   * Drivers may set the NO_DISABLE_AFTER_MODESET flag in @flags if the relevant
>   * display controllers require to disable a CRTC's planes when the CRTC is
> - * disabled. This function would skip the ->atomic_disable call for a plane if
> - * the CRTC of the old plane state needs a modesetting operation. Of course,
> - * the drivers need to disable the planes in their CRTC disable callbacks
> - * since no one else would do that.
> + * disabled. This function would skip the &drm_plane_helper_funcs.atomic_disable
> + * call for a plane if the CRTC of the old plane state needs a modesetting
> + * operation. Of course, the drivers need to disable the planes in their CRTC
> + * disable callbacks since no one else would do that.
>   *
>   * The drm_atomic_helper_commit() default implementation doesn't set the
>   * ACTIVE_ONLY flag to most closely match the behaviour of the legacy helpers.
> @@ -1874,7 +1880,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_planes_on_crtc);
>   * planes.
>   *
>   * It is a bug to call this function without having implemented the
> - * ->atomic_disable() plane hook.
> + * &drm_plane_helper_funcs.atomic_disable plane hook.
>   */
>  void
>  drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_state,
> @@ -1961,8 +1967,8 @@ EXPORT_SYMBOL(drm_atomic_helper_cleanup_planes);
>   * contains the old state. Also do any other cleanup required with that state.
>   *
>   * @stall must be set when nonblocking commits for this driver directly access
> - * the ->state pointer of &drm_plane, &drm_crtc or &drm_connector. With the
> - * current atomic helpers this is almost always the case, since the helpers
> + * the &drm_plane.state, &drm_crtc.state or &drm_connector.state pointer. With
> + * the current atomic helpers this is almost always the case, since the helpers
>   * don't pass the right state structures to the callbacks.
>   */
>  void drm_atomic_helper_swap_state(struct drm_atomic_state *state,
> @@ -2892,8 +2898,8 @@ EXPORT_SYMBOL(drm_atomic_helper_page_flip_target);
>   *
>   * This is the main helper function provided by the atomic helper framework for
>   * implementing the legacy DPMS connector interface. It computes the new desired
> - * ->active state for the corresponding CRTC (if the connector is enabled) and
> - * updates it.
> + * &drm_crtc_state.active state for the corresponding CRTC (if the connector is
> + * enabled) and updates it.
>   *
>   * Returns:
>   * Returns 0 on success, negative errno numbers on failure.
> @@ -2965,11 +2971,11 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector,
>  EXPORT_SYMBOL(drm_atomic_helper_connector_dpms);
>  
>  /**
> - * drm_atomic_helper_best_encoder - Helper for &drm_connector_helper_funcs
> - *                                  ->best_encoder callback
> + * drm_atomic_helper_best_encoder - Helper for
> + * 	&drm_connector_helper_funcs.best_encoder callback
>   * @connector: Connector control structure
>   *
> - * This is a &drm_connector_helper_funcs ->best_encoder callback helper for
> + * This is a &drm_connector_helper_funcs.best_encoder callback helper for
>   * connectors that support exactly 1 encoder, statically determined at driver
>   * init time.
>   */
> @@ -3003,7 +3009,7 @@ EXPORT_SYMBOL(drm_atomic_helper_best_encoder);
>   */
>  
>  /**
> - * drm_atomic_helper_crtc_reset - default ->reset hook for CRTCs
> + * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs
>   * @crtc: drm CRTC
>   *
>   * Resets the atomic state for @crtc by freeing the state pointer (which might
> @@ -3110,7 +3116,7 @@ void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
>  EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state);
>  
>  /**
> - * drm_atomic_helper_plane_reset - default ->reset hook for planes
> + * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for planes
>   * @plane: drm plane
>   *
>   * Resets the atomic state for @plane by freeing the state pointer (which might
> @@ -3214,8 +3220,9 @@ EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state);
>   * @conn_state: connector state to assign
>   *
>   * Initializes the newly allocated @conn_state and assigns it to
> - * #connector ->state, usually required when initializing the drivers
> - * or when called from the ->reset hook.
> + * the &drm_conector->state pointer of @connector, usually required when
> + * initializing the drivers or when called from the &drm_connector_funcs.reset
> + * hook.
>   *
>   * This is useful for drivers that subclass the connector state.
>   */
> @@ -3231,7 +3238,7 @@ __drm_atomic_helper_connector_reset(struct drm_connector *connector,
>  EXPORT_SYMBOL(__drm_atomic_helper_connector_reset);
>  
>  /**
> - * drm_atomic_helper_connector_reset - default ->reset hook for connectors
> + * drm_atomic_helper_connector_reset - default &drm_connector_funcs.reset hook for connectors
>   * @connector: drm connector
>   *
>   * Resets the atomic state for @connector by freeing the state pointer (which
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index 1e281dd42e4b..8c1e4d93a4f4 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -53,9 +53,9 @@
>   * configuration on resume with drm_helper_resume_force_mode().
>   *
>   * Note that this helper library doesn't track the current power state of CRTCs
> - * and encoders. It can call callbacks like ->dpms() even though the hardware is
> - * already in the desired state. This deficiency has been fixed in the atomic
> - * helpers.
> + * and encoders. It can call callbacks like &drm_encoder_helper_funcs.dpms even
> + * though the hardware is already in the desired state. This deficiency has been
> + * fixed in the atomic helpers.
>   *
>   * The driver callbacks are mostly compatible with the atomic modeset helpers,
>   * except for the handling of the primary plane: Atomic helpers require that the
> @@ -477,12 +477,12 @@ drm_crtc_helper_disable(struct drm_crtc *crtc)
>   * drm_crtc_helper_set_config - set a new config from userspace
>   * @set: mode set configuration
>   *
> - * The drm_crtc_helper_set_config() helper function implements the set_config
> - * callback of &struct drm_crtc_funcs for drivers using the legacy CRTC helpers.
> + * The drm_crtc_helper_set_config() helper function implements the of
> + * &drm_crtc_funcs.set_config callback for drivers using the legacy CRTC
> + * helpers.
>   *
>   * It first tries to locate the best encoder for each connector by calling the
> - * connector ->best_encoder() (&struct drm_connector_helper_funcs) helper
> - * operation.
> + * connector @drm_connector_helper_funcs.best_encoder helper operation.
>   *
>   * After locating the appropriate encoders, the helper function will call the
>   * mode_fixup encoder and CRTC helper operations to adjust the requested mode,
> @@ -493,8 +493,7 @@ drm_crtc_helper_disable(struct drm_crtc *crtc)
>   *
>   * If the adjusted mode is identical to the current mode but changes to the
>   * frame buffer need to be applied, the drm_crtc_helper_set_config() function
> - * will call the CRTC ->mode_set_base() (&struct drm_crtc_helper_funcs) helper
> - * operation.
> + * will call the CRTC &drm_crtc_helper_funcs.mode_set_base helper operation.
>   *
>   * If the adjusted mode differs from the current mode, or if the
>   * ->mode_set_base() helper operation is not provided, the helper function
> @@ -851,14 +850,15 @@ static int drm_helper_choose_crtc_dpms(struct drm_crtc *crtc)
>   * @connector: affected connector
>   * @mode: DPMS mode
>   *
> - * The drm_helper_connector_dpms() helper function implements the ->dpms()
> - * callback of &struct drm_connector_funcs for drivers using the legacy CRTC helpers.
> + * The drm_helper_connector_dpms() helper function implements the
> + * &drm_connector_funcs.dpms() callback for drivers using the legacy CRTC
> + * helpers.

You didn't use () in any of the others.

Otherwise looks good to me:

Rewiewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>

Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 04/15] drm/gem|prime|mm: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 ` [PATCH 04/15] drm/gem|prime|mm: " Daniel Vetter
@ 2017-01-25 12:51   ` Gustavo Padovan
  0 siblings, 0 replies; 40+ messages in thread
From: Gustavo Padovan @ 2017-01-25 12:51 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

Hi Daniel,

2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:

> 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 <jani.nikula@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_gem.c   | 24 ++++++++++++------------
>  drivers/gpu/drm/drm_mm.c    |  4 ++--
>  drivers/gpu/drm/drm_prime.c |  2 +-
>  include/drm/drm_gem.h       | 16 ++++++++--------
>  4 files changed, 23 insertions(+), 23 deletions(-)

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>

Gustavo

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 05/15] drm/core: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 ` [PATCH 05/15] drm/core: " Daniel Vetter
@ 2017-01-25 12:55   ` Gustavo Padovan
  2017-01-25 15:23     ` Daniel Vetter
  0 siblings, 1 reply; 40+ messages in thread
From: Gustavo Padovan @ 2017-01-25 12:55 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

Hi Daniel,

2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:

> 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 <jani.nikula@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_auth.c     |  4 ++--
>  drivers/gpu/drm/drm_drv.c      |  8 ++++----
>  drivers/gpu/drm/drm_fops.c     | 11 ++++++-----
>  drivers/gpu/drm/drm_irq.c      | 10 +++++-----
>  drivers/gpu/drm/drm_pci.c      |  2 +-
>  drivers/gpu/drm/drm_platform.c |  2 +-
>  drivers/gpu/drm/drm_sysfs.c    |  2 +-
>  include/drm/drm_auth.h         | 12 ++++++------
>  include/drm/drm_drv.h          |  2 +-
>  include/drm/drm_irq.h          |  4 ++--
>  10 files changed, 29 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
> index 860cfe124c2a..7ff697389d74 100644
> --- a/drivers/gpu/drm/drm_auth.c
> +++ b/drivers/gpu/drm/drm_auth.c
> @@ -40,8 +40,8 @@
>   * least once successfully became the device master (either through the
>   * SET_MASTER IOCTL, or implicitly through opening the primary device node when
>   * no one else is the current master that time) there exists one &drm_master.
> - * This is noted in the is_master member of &drm_file. All other clients have
> - * just a pointer to the &drm_master they are associated with.
> + * This is noted in &drm_file.is_master. All other clients have just a pointer
> + * to the &drm_master they are associated with.
>   *
>   * In addition only one &drm_master can be the current master for a &drm_device.
>   * It can be switched through the DROP_MASTER and SET_MASTER IOCTL, or
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 72116978ec06..242f67c08982 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -309,7 +309,7 @@ void drm_minor_release(struct drm_minor *minor)
>   * userspace the device instance can be published using drm_dev_register().
>   *
>   * There is also deprecated support for initalizing device instances using
> - * bus-specific helpers and the ->load() callback. But due to
> + * bus-specific helpers and the &drm_driver.load callback. But due to
>   * backwards-compatibility needs the device instance have to be published too
>   * early, which requires unpretty global locking to make safe and is therefore
>   * only support for existing drivers not yet converted to the new scheme.
> @@ -720,9 +720,9 @@ static void remove_compat_control_link(struct drm_device *dev)
>   * Never call this twice on any device!
>   *
>   * NOTE: To ensure backward compatibility with existing drivers method this
> - * function calls the ->load() method after registering the device nodes,
> - * creating race conditions. Usage of the ->load() methods is therefore
> - * deprecated, drivers must perform all initialization before calling
> + * function calls the &drm_driver.load method after registering the device
> + * nodes, creating race conditions. Usage of the &drm_driver.load methods is
> + * therefore deprecated, drivers must perform all initialization before calling
>   * drm_dev_register().
>   *
>   * RETURNS:
> diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
> index e22645375e60..afdf5b147f39 100644
> --- a/drivers/gpu/drm/drm_fops.c
> +++ b/drivers/gpu/drm/drm_fops.c
> @@ -580,7 +580,7 @@ EXPORT_SYMBOL(drm_poll);
>   * kmalloc and @p must be the first member element.
>   *
>   * This is the locked version of drm_event_reserve_init() for callers which
> - * already hold dev->event_lock.
> + * already hold &drm_device.event_lock.
>   *
>   * RETURNS:
>   *
> @@ -621,7 +621,7 @@ EXPORT_SYMBOL(drm_event_reserve_init_locked);
>   * If callers embedded @p into a larger structure it must be allocated with
>   * kmalloc and @p must be the first member element.
>   *
> - * Callers which already hold dev->event_lock should use
> + * Callers which already hold &drm_device.event_lock should use
>   * drm_event_reserve_init_locked() instead.
>   *
>   * RETURNS:
> @@ -677,7 +677,7 @@ EXPORT_SYMBOL(drm_event_cancel_free);
>   *
>   * This function sends the event @e, initialized with drm_event_reserve_init(),
>   * to its associated userspace DRM file. Callers must already hold
> - * dev->event_lock, see drm_send_event() for the unlocked version.
> + * &drm_device.event_lock, see drm_send_event() for the unlocked version.
>   *
>   * Note that the core will take care of unlinking and disarming events when the
>   * corresponding DRM file is closed. Drivers need not worry about whether the
> @@ -717,8 +717,9 @@ EXPORT_SYMBOL(drm_send_event_locked);
>   * @e: DRM event to deliver
>   *
>   * This function sends the event @e, initialized with drm_event_reserve_init(),
> - * to its associated userspace DRM file. This function acquires dev->event_lock,
> - * see drm_send_event_locked() for callers which already hold this lock.
> + * to its associated userspace DRM file. This function acquires
> + * &drm_device.event_lock, see drm_send_event_locked() for callers which already
> + * hold this lock.
>   *
>   * Note that the core will take care of unlinking and disarming events when the
>   * corresponding DRM file is closed. Drivers need not worry about whether the
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 88c69e71102e..1c4da043eeda 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -95,7 +95,7 @@ static void store_vblank(struct drm_device *dev, unsigned int pipe,
>   *
>   * Only to be called from drm_crtc_vblank_on().
>   *
> - * Note: caller must hold dev->vbl_lock since this reads & writes
> + * Note: caller must hold &drm_device.vbl_lock since this reads & writes
>   * device vblank fields.
>   */
>  static void drm_reset_vblank_timestamp(struct drm_device *dev, unsigned int pipe)
> @@ -142,7 +142,7 @@ static void drm_reset_vblank_timestamp(struct drm_device *dev, unsigned int pipe
>   * Only necessary when going from off->on, to account for frames we
>   * didn't get an interrupt for.
>   *
> - * Note: caller must hold dev->vbl_lock since this reads & writes
> + * Note: caller must hold &drm_device.vbl_lock since this reads & writes
>   * device vblank fields.
>   */
>  static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
> @@ -449,7 +449,7 @@ static void drm_irq_vgaarb_nokms(void *cookie, bool state)
>   *
>   * This is the simplified helper interface provided for drivers with no special
>   * needs. Drivers which need to install interrupt handlers for multiple
> - * interrupts must instead set drm_device->irq_enabled to signal the DRM core
> + * interrupts must instead set &drm_device.irq_enabled to signal the DRM core
>   * that vblank interrupts are available.
>   *
>   * Returns:
> @@ -519,7 +519,7 @@ EXPORT_SYMBOL(drm_irq_install);
>   * Calls the driver's irq_uninstall() function and unregisters the IRQ handler.
>   * This should only be called by drivers which used drm_irq_install() to set up
>   * their interrupt handler. Other drivers must only reset
> - * drm_device->irq_enabled to false.
> + * &drm_device.irq_enabled to false.
>   *
>   * Note that for kernel modesetting drivers it is a bug if this function fails.
>   * The sanity checks are only to catch buggy user modesetting drivers which call
> @@ -982,7 +982,7 @@ static void send_vblank_event(struct drm_device *dev,
>   * period. This helper function implements exactly the required vblank arming
>   * behaviour.
>   *
> - * NOTE: Drivers using this to send out the event in &struct drm_crtc_state
> + * NOTE: Drivers using this to send out the &struct drm_crtc_state.event

&drm_crtc_state.event?

>   * as part of an atomic commit must ensure that the next vblank happens at
>   * exactly the same time as the atomic commit is committed to the hardware. This
>   * function itself does **not** protect again the next vblank interrupt racing
> diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
> index dc358f860aea..50c732a95b5a 100644
> --- a/drivers/gpu/drm/drm_pci.c
> +++ b/drivers/gpu/drm/drm_pci.c
> @@ -223,7 +223,7 @@ void drm_pci_agp_destroy(struct drm_device *dev)
>   * Try and register, if we fail to register, backout previous work.
>   *
>   * NOTE: This function is deprecated, please use drm_dev_alloc() and
> - * drm_dev_register() instead and remove your ->load() callback.
> + * drm_dev_register() instead and remove your &drm_driver.load() callback.

&drm_driver.load?

>   *
>   * Return: 0 on success or a negative error code on failure.
>   */
> diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c
> index 7af3005a030c..3b34c3717c4d 100644
> --- a/drivers/gpu/drm/drm_platform.c
> +++ b/drivers/gpu/drm/drm_platform.c
> @@ -74,7 +74,7 @@ static int drm_get_platform_dev(struct platform_device *platdev,
>   * .load() function.
>   *
>   * NOTE: This function is deprecated, please use drm_dev_alloc() and
> - * drm_dev_register() instead and remove your ->load() callback.
> + * drm_dev_register() instead and remove your &drm_driver.load() callback.

&drm_driver.load?

Otherwise looks good:

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Intel-gfx] [PATCH 06/15] drm/doc: Clarify connector overview
  2017-01-25  6:26 ` [PATCH 06/15] drm/doc: Clarify connector overview Daniel Vetter
@ 2017-01-25 12:57   ` Gustavo Padovan
  2017-01-25 15:33     ` Daniel Vetter
  0 siblings, 1 reply; 40+ messages in thread
From: Gustavo Padovan @ 2017-01-25 12:57 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

Hi Daniel,

2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:

> There was a bit of mix-up between initialization and registering.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_connector.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index dd720d4cb4f7..c75ab242f907 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -40,11 +40,10 @@
>   *
>   * KMS driver must create, initialize, register and attach at a &struct
>   * drm_connector for each such sink. The instance is created as other KMS
> - * objects and initialized by setting the following fields.
> - *
> - * The connector is then registered with a call to drm_connector_init() with a
> - * pointer to the connector functions and a connector type, and exposed through
> - * sysfs with a call to drm_connector_register().
> + * objects and initialized by setting the following fields. The connector is
> + * initialized with a call to drm_connector_init() with a pointer to the
> + * connector functions and a connector type, and then exposed to userspace with

&drm_connector_funcs

Other than that:

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 07/15] drm/gma500: Nuke device_is_agp callback
  2017-01-25  6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
@ 2017-01-25 12:58   ` Gustavo Padovan
  2017-01-26  0:11   ` Patrik Jakobsson
  1 sibling, 0 replies; 40+ messages in thread
From: Gustavo Padovan @ 2017-01-25 12:58 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

Hi Daniel,

2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:

> Returning 0 for an on-chip gpu doesn't change anything at all.
> 
> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/gma500/psb_drv.c | 6 ------
>  1 file changed, 6 deletions(-)

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 03/15] drm/kms-core: Use recommened kerneldoc for struct member refs
  2017-01-25  6:26 ` [PATCH 03/15] drm/kms-core: " Daniel Vetter
@ 2017-01-25 13:52   ` Eric Engestrom
  0 siblings, 0 replies; 40+ messages in thread
From: Eric Engestrom @ 2017-01-25 13:52 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wednesday, 2017-01-25 07:26:45 +0100, Daniel Vetter wrote:
> 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 <jani.nikula@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_atomic.c        | 71 ++++++++++++++++++-------------------
>  drivers/gpu/drm/drm_blend.c         | 11 +++---
>  drivers/gpu/drm/drm_connector.c     | 12 +++----
>  drivers/gpu/drm/drm_crtc.c          |  7 ++--
>  drivers/gpu/drm/drm_dumb_buffers.c  |  4 +--
>  drivers/gpu/drm/drm_encoder.c       |  2 +-
>  drivers/gpu/drm/drm_encoder_slave.c |  2 +-
>  drivers/gpu/drm/drm_framebuffer.c   | 10 +++---
>  drivers/gpu/drm/drm_modeset_lock.c  | 10 +++---
>  drivers/gpu/drm/drm_plane.c         |  2 +-
>  drivers/gpu/drm/drm_property.c      |  2 +-
>  include/drm/drm_atomic.h            |  6 ++--
>  include/drm/drm_color_mgmt.h        |  2 +-
>  include/drm/drm_connector.h         | 40 ++++++++++-----------
>  include/drm/drm_crtc.h              | 29 +++++++--------
>  include/drm/drm_framebuffer.h       | 15 ++++----
>  include/drm/drm_mode_config.h       | 12 +++----
>  include/drm/drm_mode_object.h       | 13 ++++---
>  include/drm/drm_modeset_lock.h      |  2 +-
>  include/drm/drm_plane.h             | 18 +++++-----
>  include/drm/drm_property.h          |  8 ++---
>  21 files changed, 141 insertions(+), 137 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 723392fc98c8..96c81a61a542 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -195,8 +195,8 @@ EXPORT_SYMBOL(drm_atomic_state_default_clear);
>   * all locks. So someone else could sneak in and change the current modeset
>   * configuration. Which means that all the state assembled in @state is no
>   * longer an atomic update to the current state, but to some arbitrary earlier
> - * state. Which could break assumptions the driver's ->atomic_check likely
> - * relies on.
> + * state. Which could break assumptions the driver's
> + * &drm_mode_config_funcs.atomic_check likely relies on.
>   *
>   * Hence we must clear all cached state and completely start over, using this
>   * function.
> @@ -456,11 +456,10 @@ drm_atomic_replace_property_blob_from_id(struct drm_crtc *crtc,
>   * @property: the property to set
>   * @val: the new property value
>   *
> - * Use this instead of calling crtc->atomic_set_property directly.
> - * This function handles generic/core properties and calls out to
> - * driver's ->atomic_set_property() for driver properties.  To ensure
> - * consistent behavior you must call this function rather than the
> - * driver hook directly.
> + * This function handles generic/core properties and calls out to driver's
> + * &drm_crtc_funcs.atomic_set_property for driver properties. To ensure
> + * consistent behavior you must call this function rather than the driver hook
> + * directly.
>   *
>   * RETURNS:
>   * Zero on success, error code on failure
> @@ -532,10 +531,10 @@ EXPORT_SYMBOL(drm_atomic_crtc_set_property);
>   * @property: the property to set
>   * @val: return location for the property value
>   *
> - * This function handles generic/core properties and calls out to
> - * driver's ->atomic_get_property() for driver properties.  To ensure
> - * consistent behavior you must call this function rather than the
> - * driver hook directly.
> + * This function handles generic/core properties and calls out to driver's
> + * &drm_crtc_funcs.atomic_get_property for driver properties. To ensure
> + * consistent behavior you must call this function rather than the driver hook
> + * directly.
>   *
>   * RETURNS:
>   * Zero on success, error code on failure
> @@ -716,11 +715,10 @@ EXPORT_SYMBOL(drm_atomic_get_plane_state);
>   * @property: the property to set
>   * @val: the new property value
>   *
> - * Use this instead of calling plane->atomic_set_property directly.
> - * This function handles generic/core properties and calls out to
> - * driver's ->atomic_set_property() for driver properties.  To ensure
> - * consistent behavior you must call this function rather than the
> - * driver hook directly.
> + * This function handles generic/core properties and calls out to driver's
> + * &drm_plane_funcs.atomic_set_property for driver properties.  To ensure
> + * consistent behavior you must call this function rather than the driver hook
> + * directly.
>   *
>   * RETURNS:
>   * Zero on success, error code on failure
> @@ -791,10 +789,10 @@ EXPORT_SYMBOL(drm_atomic_plane_set_property);
>   * @property: the property to set
>   * @val: return location for the property value
>   *
> - * This function handles generic/core properties and calls out to
> - * driver's ->atomic_get_property() for driver properties.  To ensure
> - * consistent behavior you must call this function rather than the
> - * driver hook directly.
> + * This function handles generic/core properties and calls out to driver's
> + * &drm_plane_funcs.atomic_get_property for driver properties.  To ensure
> + * consistent behavior you must call this function rather than the driver hook
> + * directly.
>   *
>   * RETURNS:
>   * Zero on success, error code on failure
> @@ -1057,11 +1055,10 @@ EXPORT_SYMBOL(drm_atomic_get_connector_state);
>   * @property: the property to set
>   * @val: the new property value
>   *
> - * Use this instead of calling connector->atomic_set_property directly.
> - * This function handles generic/core properties and calls out to
> - * driver's ->atomic_set_property() for driver properties.  To ensure
> - * consistent behavior you must call this function rather than the
> - * driver hook directly.
> + * This function handles generic/core properties and calls out to driver's
> + * &drm_connector_funcs.atomic_set_property for driver properties.  To ensure
> + * consistent behavior you must call this function rather than the driver hook
> + * directly.
>   *
>   * RETURNS:
>   * Zero on success, error code on failure
> @@ -1136,10 +1133,10 @@ static void drm_atomic_connector_print_state(struct drm_printer *p,
>   * @property: the property to set
>   * @val: return location for the property value
>   *
> - * This function handles generic/core properties and calls out to
> - * driver's ->atomic_get_property() for driver properties.  To ensure
> - * consistent behavior you must call this function rather than the
> - * driver hook directly.
> + * This function handles generic/core properties and calls out to driver's
> + * &drm_connector_funcs.atomic_get_property for driver properties.  To ensure
> + * consistent behavior you must call this function rather than the driver hook
> + * directly.
>   *
>   * RETURNS:
>   * Zero on success, error code on failure
> @@ -1316,8 +1313,8 @@ EXPORT_SYMBOL(drm_atomic_set_fb_for_plane);
>   * all drope the reference to the fence as we not storing it

The sentence above could be rewritten as:
	"It will drop all reference to the fence as we are not storing it
	anywhere."

>   * anywhere.
>   *
> - * Otherwise, if plane_state->fence is not set this function we
> - * just set it with the received implict fence.
> + * Otherwise, if &drm_plane_state.fence is not set this function we just set it
> + * with the received implict fence.

"implicit"

>   */
>  void
>  drm_atomic_set_fence_for_plane(struct drm_plane_state *plane_state,
> @@ -1616,7 +1613,7 @@ int drm_atomic_commit(struct drm_atomic_state *state)
>  EXPORT_SYMBOL(drm_atomic_commit);
>  
>  /**
> - * drm_atomic_nonblocking_commit - atomic&nonblocking configuration commit
> + * drm_atomic_nonblocking_commit - atomic nonblocking commit
>   * @state: atomic configuration to check
>   *
>   * Note that this function can return -EDEADLK if the driver needed to acquire
> @@ -1829,10 +1826,10 @@ static int atomic_set_prop(struct drm_atomic_state *state,
>   * @plane_mask: plane mask for planes that were updated.
>   * @ret: return value, can be -EDEADLK for a retry.
>   *
> - * Before doing an update plane->old_fb is set to plane->fb,
> - * but before dropping the locks old_fb needs to be set to NULL
> - * and plane->fb updated. This is a common operation for each
> - * atomic update, so this call is split off as a helper.
> + * Before doing an update &drm_plane.old_fb is set to &drm_plane.fb, but before
> + * dropping the locks old_fb needs to be set to NULL and plane->fb updated. This
> + * is a common operation for each atomic update, so this call is split off as a
> + * helper.
>   */
>  void drm_atomic_clean_old_fb(struct drm_device *dev,
>  			     unsigned plane_mask,
> @@ -1873,7 +1870,7 @@ EXPORT_SYMBOL(drm_atomic_clean_old_fb);
>   * As a contrast, with implicit fencing the kernel keeps track of any
>   * ongoing rendering, and automatically ensures that the atomic update waits
>   * for any pending rendering to complete. For shared buffers represented with
> - * a &struct dma_buf this is tracked in &reservation_object structures.
> + * a &struct dma_buf this is tracked in &struct reservation_object.
>   * Implicit syncing is how Linux traditionally worked (e.g. DRI2/3 on X.org),
>   * whereas explicit fencing is what Android wants.
>   *
> diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> index 1f2412c7ccfd..665aafc6ad68 100644
> --- a/drivers/gpu/drm/drm_blend.c
> +++ b/drivers/gpu/drm/drm_blend.c
> @@ -40,9 +40,8 @@
>   * sub-pixel accuracy, which is scaled up to a pixel-aligned destination
>   * rectangle in the visible area of a &drm_crtc. The visible area of a CRTC is
>   * defined by the horizontal and vertical visible pixels (stored in @hdisplay
> - * and @vdisplay) of the requested mode (stored in @mode in the
> - * &drm_crtc_state). These two rectangles are both stored in the
> - * &drm_plane_state.
> + * and @vdisplay) of the requested mode (stored in &drm_crtc_state.mode). These
> + * two rectangles are both stored in the &drm_plane_state.
>   *
>   * For the atomic ioctl the following standard (atomic) properties on the plane object
>   * encode the basic plane composition model:
> @@ -215,7 +214,7 @@ EXPORT_SYMBOL(drm_rotation_simplify);
>   * for it in drm core. Drivers can then attach this property to planes to enable
>   * support for configurable planes arrangement during blending operation.
>   * Once mutable zpos property has been enabled, the DRM core will automatically
> - * calculate drm_plane_state->normalized_zpos values. Usually min should be set
> + * calculate &drm_plane_state.normalized_zpos values. Usually min should be set
>   * to 0 and max to maximal number of planes for given crtc - 1.
>   *
>   * If zpos of some planes cannot be changed (like fixed background or
> @@ -367,8 +366,8 @@ static int drm_atomic_helper_crtc_normalize_zpos(struct drm_crtc *crtc,
>   * For every CRTC this function checks new states of all planes assigned to
>   * it and calculates normalized zpos value for these planes. Planes are compared
>   * first by their zpos values, then by plane id (if zpos is equal). The plane
> - * with lowest zpos value is at the bottom. The plane_state->normalized_zpos is
> - * then filled with unique values from 0 to number of active planes in crtc
> + * with lowest zpos value is at the bottom. The &drm_plane_state.normalized_zpos
> + * is then filled with unique values from 0 to number of active planes in crtc
>   * minus one.
>   *
>   * RETURNS
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 799edd0d308e..dd720d4cb4f7 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -38,8 +38,8 @@
>   * Hence they are reference-counted using drm_connector_reference() and
>   * drm_connector_unreference().
>   *
> - * KMS driver must create, initialize, register and attach at a struct
> - * &drm_connector for each such sink. The instance is created as other KMS
> + * KMS driver must create, initialize, register and attach at a &struct
> + * drm_connector for each such sink. The instance is created as other KMS
>   * objects and initialized by setting the following fields.
>   *
>   * The connector is then registered with a call to drm_connector_init() with a
> @@ -49,7 +49,7 @@
>   * Connectors must be attached to an encoder to be used. For devices that map
>   * connectors to encoders 1:1, the connector should be attached at
>   * initialization time with a call to drm_mode_connector_attach_encoder(). The
> - * driver must also set the &struct drm_connector encoder field to point to the
> + * driver must also set the &drm_connector.encoder field to point to the
>   * attached encoder.
>   *
>   * For connectors which are not fixed (like built-in panels) the driver needs to
> @@ -497,7 +497,7 @@ static struct lockdep_map connector_list_iter_dep_map = {
>   * @dev: DRM device
>   * @iter: connector_list iterator
>   *
> - * Sets @iter up to walk the connector list in &drm_mode_config of @dev. @iter
> + * Sets @iter up to walk the &drm_mode_config.connector_list of @dev. @iter
>   * must always be cleaned up again by calling drm_connector_list_iter_put().
>   * Iteration itself happens using drm_connector_list_iter_next() or
>   * drm_for_each_connector_iter().
> @@ -696,8 +696,8 @@ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,
>   * 	drivers this is only provided for backwards compatibility with existing
>   * 	drivers, it remaps to controlling the "ACTIVE" property on the CRTC the
>   * 	connector is linked to. Drivers should never set this property directly,
> - * 	it is handled by the DRM core by calling the ->dpms() callback in
> - * 	&drm_connector_funcs. Atomic drivers should implement this hook using
> + * 	it is handled by the DRM core by calling the &drm_connector_funcs.dpms
> + * 	callback. Atomic drivers should implement this hook using
>   * 	drm_atomic_helper_connector_dpms(). This is the only property standard
>   * 	connector property that userspace can change.
>   * PATH:
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index bd3c8b243447..cea7a7efa43c 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -415,11 +415,12 @@ int drm_mode_getcrtc(struct drm_device *dev,
>  }
>  
>  /**
> - * drm_mode_set_config_internal - helper to call ->set_config
> + * drm_mode_set_config_internal - helper to call &drm_mode_config_funcs.set_config
>   * @set: modeset config to set
>   *
> - * This is a little helper to wrap internal calls to the ->set_config driver
> - * interface. The only thing it adds is correct refcounting dance.
> + * This is a little helper to wrap internal calls to the
> + * &drm_mode_config_funcs.set_config driver interface. The only thing it adds is
> + * correct refcounting dance.
>   *
>   * Returns:
>   * Zero on success, negative errno on failure.
> diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c
> index e5c61cda4ae3..10307cc16d75 100644
> --- a/drivers/gpu/drm/drm_dumb_buffers.c
> +++ b/drivers/gpu/drm/drm_dumb_buffers.c
> @@ -42,8 +42,8 @@
>   * create dumb buffers suitable for scanout, which can then be used to create
>   * KMS frame buffers.
>   *
> - * To support dumb objects drivers must implement the dumb_create,
> - * dumb_destroy and dumb_map_offset operations from &struct drm_driver. See
> + * To support dumb objects drivers must implement the &drm_driver.dumb_create,
> + * &drm_driver.dumb_destroy and &drm_driver.dumb_map_offset operations. See
>   * there for further details.
>   *
>   * Note that dumb objects may not be used for gpu acceleration, as has been
> diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
> index 487cfe3989e8..129450713bb7 100644
> --- a/drivers/gpu/drm/drm_encoder.c
> +++ b/drivers/gpu/drm/drm_encoder.c
> @@ -98,7 +98,7 @@ void drm_encoder_unregister_all(struct drm_device *dev)
>   *
>   * Initialises a preallocated encoder. Encoder should be subclassed as part of
>   * driver encoder objects. At driver unload time drm_encoder_cleanup() should be
> - * called from the driver's destroy hook in &drm_encoder_funcs.
> + * called from the driver's &drm_encoder_funcs.destroy hook.
>   *
>   * Returns:
>   * Zero on success, error code on failure.
> diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c
> index 4484785cd9ac..cf804389f5ec 100644
> --- a/drivers/gpu/drm/drm_encoder_slave.c
> +++ b/drivers/gpu/drm/drm_encoder_slave.c
> @@ -43,7 +43,7 @@
>   * &drm_encoder_slave. The @slave_funcs field will be initialized with
>   * the hooks provided by the slave driver.
>   *
> - * If @info->platform_data is non-NULL it will be used as the initial
> + * If @info.platform_data is non-NULL it will be used as the initial
>   * slave config.
>   *
>   * Returns 0 on success or a negative errno on failure, in particular,
> diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
> index 588ccc3a2218..ca9cff09cad1 100644
> --- a/drivers/gpu/drm/drm_framebuffer.c
> +++ b/drivers/gpu/drm/drm_framebuffer.c
> @@ -58,8 +58,8 @@
>   * fbdev framebuffer when the struct &struct drm_framebuffer is embedded into
>   * the fbdev helper struct) drivers can manually clean up a framebuffer at
>   * module unload time with drm_framebuffer_unregister_private(). But doing this
> - * is not recommended, and it's better to have a normal free-standing struct
> - * &drm_framebuffer.
> + * is not recommended, and it's better to have a normal free-standing &struct
> + * drm_framebuffer.
>   */
>  
>  int drm_framebuffer_check_src_coords(uint32_t src_x, uint32_t src_y,
> @@ -470,7 +470,7 @@ int drm_mode_getfb(struct drm_device *dev,
>   * usb display-link, mipi manual update panels or edp panel self refresh modes.
>   *
>   * Modesetting drivers which always update the frontbuffer do not need to
> - * implement the corresponding ->dirty framebuffer callback.
> + * implement the corresponding &drm_framebuffer_funcs.dirty callback.
>   *
>   * Called by the user via ioctl.
>   *
> @@ -709,8 +709,8 @@ EXPORT_SYMBOL(drm_framebuffer_unregister_private);
>   * @fb: framebuffer to remove
>   *
>   * Cleanup framebuffer. This function is intended to be used from the drivers
> - * ->destroy callback. It can also be used to clean up driver private
> - * framebuffers embedded into a larger structure.
> + * &drm_framebuffer_funcs.destroy callback. It can also be used to clean up
> + * driver private framebuffers embedded into a larger structure.
>   *
>   * Note that this function does not remove the fb from active usuage - if it is

"usage"

>   * still used anywhere, hilarity can ensue since userspace could call getfb on
> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> index 3551ae31f143..bf60f2645e55 100644
> --- a/drivers/gpu/drm/drm_modeset_lock.c
> +++ b/drivers/gpu/drm/drm_modeset_lock.c
> @@ -33,7 +33,7 @@
>   * to use &ww_mutex and acquire-contexts to avoid deadlocks.  But because
>   * the locking is more distributed around the driver code, we want a bit
>   * of extra utility/tracking out of our acquire-ctx.  This is provided
> - * by drm_modeset_lock / drm_modeset_acquire_ctx.
> + * by &struct drm_modeset_lock and &struct drm_modeset_acquire_ctx.
>   *
>   * For basic principles of &ww_mutex, see: Documentation/locking/ww-mutex-design.txt
>   *
> @@ -53,7 +53,7 @@
>   *     drm_modeset_acquire_fini(&ctx);
>   *
>   * On top of of these per-object locks using &ww_mutex there's also an overall
> - * dev->mode_config.lock, for protecting everything else. Mostly this means
> + * &drm_mode_config.mutex, for protecting everything else. Mostly this means
>   * probe state of connectors, and preventing hotplug add/removal of connectors.
>   *
>   * Finally there's a bunch of dedicated locks to protect drm core internal
> @@ -71,7 +71,7 @@ static DEFINE_WW_CLASS(crtc_ww_class);
>   * drm_modeset_unlock_all() function.
>   *
>   * This function is deprecated. It allocates a lock acquisition context and
> - * stores it in the DRM device's ->mode_config. This facilitate conversion of
> + * stores it in &drm_device.mode_config. This facilitate conversion of
>   * existing code because it removes the need to manually deal with the
>   * acquisition context, but it is also brittle because the context is global
>   * and care must be taken not to nest calls. New code should use the
> @@ -124,7 +124,7 @@ EXPORT_SYMBOL(drm_modeset_lock_all);
>   * drm_modeset_lock_all() function.
>   *
>   * This function is deprecated. It uses the lock acquisition context stored
> - * in the DRM device's ->mode_config. This facilitates conversion of existing
> + * in &drm_device.mode_config. This facilitates conversion of existing
>   * code because it removes the need to manually deal with the acquisition
>   * context, but it is also brittle because the context is global and care must
>   * be taken not to nest calls. New code should pass the acquisition context
> @@ -468,7 +468,7 @@ EXPORT_SYMBOL(drm_modeset_unlock);
>   * This function takes all modeset locks, suitable where a more fine-grained
>   * scheme isn't (yet) implemented.
>   *
> - * Unlike drm_modeset_lock_all(), it doesn't take the dev->mode_config.mutex
> + * Unlike drm_modeset_lock_all(), it doesn't take the &drm_mode_config.mutex
>   * since that lock isn't required for modeset state changes. Callers which
>   * need to grab that lock too need to do so outside of the acquire context
>   * @ctx.
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index eed66be18329..c464fc4a874d 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -42,7 +42,7 @@
>   *
>   * Cursor and overlay planes are optional. All drivers should provide one
>   * primary plane per CRTC to avoid surprising userspace too much. See enum
> - * &drm_plane_type for a more in-depth discussion of these special uapi-relevant
> + * drm_plane_type for a more in-depth discussion of these special uapi-relevant
>   * plane types. Special planes are associated with their CRTC by calling
>   * drm_crtc_init_with_planes().
>   *
> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
> index 0d0e5dc0ee23..0cb2a39fe059 100644
> --- a/drivers/gpu/drm/drm_property.c
> +++ b/drivers/gpu/drm/drm_property.c
> @@ -43,7 +43,7 @@
>   *
>   * Property values are only 64bit. To support bigger piles of data (like gamma
>   * tables, color correction matrizes or large structures) a property can instead

"matrices"

> - * point at a &drm_property_blob with that additional data
> + * point at a &drm_property_blob with that additional data.
>   *
>   * Properties are defined by their symbolic name, userspace must keep a
>   * per-object mapping from those names to the property ID used in the atomic
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index f1cb2b08afb5..052ab161b239 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -123,7 +123,8 @@ struct drm_crtc_commit {
>  	/**
>  	 * @commit_entry:
>  	 *
> -	 * Entry on the per-CRTC commit_list. Protected by crtc->commit_lock.
> +	 * Entry on the per-CRTC &drm_crtc.commit_list. Protected by
> +	 * $drm_crtc.commit_lock.
>  	 */
>  	struct list_head commit_entry;
>  
> @@ -429,7 +430,8 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
>   *
>   * For example if the CRTC mode has changed, and the hardware is able to enact
>   * the requested mode change without going through a full modeset, the driver
> - * should clear mode_changed during its ->atomic_check.
> + * should clear mode_changed in its &drm_mode_config_funcs.atomic_check
> + * implementation.
>   */
>  static inline bool
>  drm_atomic_crtc_needs_modeset(const struct drm_crtc_state *state)
> diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
> index c767238ac9d5..d9c2f680f5ae 100644
> --- a/include/drm/drm_color_mgmt.h
> +++ b/include/drm/drm_color_mgmt.h
> @@ -34,7 +34,7 @@ int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
>  				 int gamma_size);
>  
>  /**
> - * drm_color_lut_extract - clamp&round LUT entries
> + * drm_color_lut_extract - clamp and round LUT entries
>   * @user_input: input value
>   * @bit_precision: number of bits the hw LUT supports
>   *
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index d489cc003b7e..4f7d3b49995a 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -331,15 +331,15 @@ struct drm_connector_funcs {
>  	 *
>  	 * Entry point for output detection and basic mode validation. The
>  	 * driver should reprobe the output if needed (e.g. when hotplug
> -	 * handling is unreliable), add all detected modes to connector->modes
> +	 * handling is unreliable), add all detected modes to &drm_connector.modes
>  	 * and filter out any the device can't support in any configuration. It
>  	 * also needs to filter out any modes wider or higher than the
>  	 * parameters max_width and max_height indicate.
>  	 *
>  	 * The drivers must also prune any modes no longer valid from
> -	 * connector->modes. Furthermore it must update connector->status and
> -	 * connector->edid.  If no EDID has been received for this output
> -	 * connector->edid must be NULL.
> +	 * &drm_connector.modes. Furthermore it must update
> +	 * &drm_connector.status and &drm_connector.edid.  If no EDID has been
> +	 * received for this output connector->edid must be NULL.
>  	 *
>  	 * Drivers using the probe helpers should use
>  	 * drm_helper_probe_single_connector_modes() or
> @@ -348,7 +348,7 @@ struct drm_connector_funcs {
>  	 *
>  	 * RETURNS:
>  	 *
> -	 * The number of modes detected and filled into connector->modes.
> +	 * The number of modes detected and filled into &drm_connector.modes.
>  	 */
>  	int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
>  
> @@ -381,7 +381,7 @@ struct drm_connector_funcs {
>  	 * core drm connector interfaces. Everything added from this callback
>  	 * should be unregistered in the early_unregister callback.
>  	 *
> -	 * This is called while holding drm_connector->mutex.
> +	 * This is called while holding &drm_connector.mutex.
>  	 *
>  	 * Returns:
>  	 *
> @@ -398,7 +398,7 @@ struct drm_connector_funcs {
>  	 * early in the driver unload sequence to disable userspace access
>  	 * before data structures are torndown.
>  	 *
> -	 * This is called while holding drm_connector->mutex.
> +	 * This is called while holding &drm_connector.mutex.
>  	 */
>  	void (*early_unregister)(struct drm_connector *connector);
>  
> @@ -418,9 +418,9 @@ struct drm_connector_funcs {
>  	 * Duplicate the current atomic state for this connector and return it.
>  	 * The core and helpers guarantee that any atomic state duplicated with
>  	 * this hook and still owned by the caller (i.e. not transferred to the
> -	 * driver by calling ->atomic_commit() from struct
> -	 * &drm_mode_config_funcs) will be cleaned up by calling the
> -	 * @atomic_destroy_state hook in this structure.
> +	 * driver by calling &drm_mode_config_funcs.atomic_commit) will be
> +	 * cleaned up by calling the @atomic_destroy_state hook in this
> +	 * structure.
>  	 *
>  	 * Atomic drivers which don't subclass &struct drm_connector_state should use
>  	 * drm_atomic_helper_connector_duplicate_state(). Drivers that subclass the
> @@ -428,7 +428,7 @@ struct drm_connector_funcs {
>  	 * __drm_atomic_helper_connector_duplicate_state() to make sure shared state is
>  	 * duplicated in a consistent fashion across drivers.
>  	 *
> -	 * It is an error to call this hook before connector->state has been
> +	 * It is an error to call this hook before &drm_connector.state has been
>  	 * initialized correctly.
>  	 *
>  	 * NOTE:
> @@ -609,8 +609,8 @@ struct drm_connector {
>  
>  	/**
>  	 * @mutex: Lock for general connector state, but currently only protects
> -	 * @registered. Most of the connector state is still protected by the
> -	 * mutex in &drm_mode_config.
> +	 * @registered. Most of the connector state is still protected by
> +	 * &drm_mode_config.mutex.
>  	 */
>  	struct mutex mutex;
>  
> @@ -636,14 +636,14 @@ struct drm_connector {
>  	/**
>  	 * @modes:
>  	 * Modes available on this connector (from fill_modes() + user).
> -	 * Protected by dev->mode_config.mutex.
> +	 * Protected by &drm_mode_config.mutex.
>  	 */
> -	struct list_head modes; /* list of modes on this connector */
> +	struct list_head modes;
>  
>  	/**
>  	 * @status:
>  	 * One of the drm_connector_status enums (connected, not, or unknown).
> -	 * Protected by dev->mode_config.mutex.
> +	 * Protected by &drm_mode_config.mutex.
>  	 */
>  	enum drm_connector_status status;
>  
> @@ -651,7 +651,7 @@ struct drm_connector {
>  	 * @probed_modes:
>  	 * These are modes added by probing with DDC or the BIOS, before
>  	 * filtering is applied. Used by the probe helpers.Protected by

space before "Protected"

> -	 * dev->mode_config.mutex.
> +	 * &drm_mode_config.mutex.
>  	 */
>  	struct list_head probed_modes;
>  
> @@ -659,10 +659,10 @@ struct drm_connector {
>  	 * @display_info: Display information is filled from EDID information
>  	 * when a display is detected. For non hot-pluggable displays such as
>  	 * flat panels in embedded systems, the driver should initialize the
> -	 * display_info.width_mm and display_info.height_mm fields with the
> -	 * physical size of the display.
> +	 * &drm_display_info.width_mm and &drm_display_info.height_mm fields
> +	 * with the physical size of the display.
>  	 *
> -	 * Protected by dev->mode_config.mutex.
> +	 * Protected by &drm_mode_config.mutex.
>  	 */
>  	struct drm_display_info display_info;
>  	const struct drm_connector_funcs *funcs;
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 06c943d1e04c..496324d3416b 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -81,8 +81,8 @@ struct drm_plane_helper_funcs;
>   * @enable: whether the CRTC should be enabled, gates all other state
>   * @active: whether the CRTC is actively displaying (used for DPMS)
>   * @planes_changed: planes on this crtc are updated
> - * @mode_changed: crtc_state->mode or crtc_state->enable has been changed
> - * @active_changed: crtc_state->active has been toggled.
> + * @mode_changed: @mode or @enable has been changed
> + * @active_changed: @active has been toggled.
>   * @connectors_changed: connectors to this crtc have been updated
>   * @zpos_changed: zpos values of planes on this crtc have been updated
>   * @color_mgmt_changed: color management properties have changed (degamma or
> @@ -102,9 +102,10 @@ struct drm_plane_helper_funcs;
>   *
>   * Note that the distinction between @enable and @active is rather subtile:
>   * Flipping @active while @enable is set without changing anything else may
> - * never return in a failure from the ->atomic_check callback. Userspace assumes
> - * that a DPMS On will always succeed. In other words: @enable controls resource
> - * assignment, @active controls the actual hardware state.
> + * never return in a failure from the &drm_mode_config_funcs.atomic_check
> + * callback. Userspace assumes that a DPMS On will always succeed. In other
> + * words: @enable controls resource assignment, @active controls the actual
> + * hardware state.
>   *
>   * The three booleans active_changed, connectors_changed and mode_changed are
>   * intended to indicate whether a full modeset is needed, rather than strictly
> @@ -346,8 +347,8 @@ struct drm_crtc_funcs {
>  	 * through the DRM_MODE_PAGE_FLIP_ASYNC flag). When an application
>  	 * requests a page flip the DRM core verifies that the new frame buffer
>  	 * is large enough to be scanned out by the CRTC in the currently
> -	 * configured mode and then calls the CRTC ->page_flip() operation with a
> -	 * pointer to the new frame buffer.
> +	 * configured mode and then calls this hook with a pointer to the new
> +	 * frame buffer.
>  	 *
>  	 * The driver must wait for any pending rendering to the new framebuffer
>  	 * to complete before executing the flip. It should also wait for any
> @@ -382,7 +383,7 @@ struct drm_crtc_funcs {
>  	 * RETURNS:
>  	 *
>  	 * 0 on success or a negative error code on failure. Note that if a
> -	 * ->page_flip() operation is already pending the callback should return
> +	 * page flip operation is already pending the callback should return
>  	 * -EBUSY. Pageflips on a disabled CRTC (either by setting a NULL mode
>  	 * or just runtime disabled through DPMS respectively the new atomic
>  	 * "ACTIVE" state) should result in an -EINVAL error code. Note that
> @@ -436,17 +437,17 @@ struct drm_crtc_funcs {
>  	 * Duplicate the current atomic state for this CRTC and return it.
>  	 * The core and helpers gurantee that any atomic state duplicated with

"guarantee"

>  	 * this hook and still owned by the caller (i.e. not transferred to the
> -	 * driver by calling ->atomic_commit() from struct
> -	 * &drm_mode_config_funcs) will be cleaned up by calling the
> -	 * @atomic_destroy_state hook in this structure.
> +	 * driver by calling &drm_mode_config_funcs.atomic_commit) will be
> +	 * cleaned up by calling the @atomic_destroy_state hook in this
> +	 * structure.
>  	 *
> -	 * Atomic drivers which don't subclass &struct drm_crtc should use
> +	 * Atomic drivers which don't subclass &struct drm_crtc_state should use
>  	 * drm_atomic_helper_crtc_duplicate_state(). Drivers that subclass the
>  	 * state structure to extend it with driver-private state should use
>  	 * __drm_atomic_helper_crtc_duplicate_state() to make sure shared state is
>  	 * duplicated in a consistent fashion across drivers.
>  	 *
> -	 * It is an error to call this hook before crtc->state has been
> +	 * It is an error to call this hook before &drm_crtc.state has been
>  	 * initialized correctly.
>  	 *
>  	 * NOTE:
> @@ -641,7 +642,7 @@ struct drm_crtc {
>  	 * This provides a read lock for the overall crtc state (mode, dpms
>  	 * state, ...) and a write lock for everything which can be update
>  	 * without a full modeset (fb, cursor data, crtc properties ...). Full
> -	 * modeset also need to grab dev->mode_config.connection_mutex.
> +	 * modeset also need to grab &drm_mode_config.connection_mutex.
>  	 */
>  	struct drm_modeset_lock mutex;
>  
> diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
> index 046c35e54099..04c77eee9c20 100644
> --- a/include/drm/drm_framebuffer.h
> +++ b/include/drm/drm_framebuffer.h
> @@ -40,8 +40,8 @@ struct drm_framebuffer_funcs {
>  	 *
>  	 * Clean up framebuffer resources, specifically also unreference the
>  	 * backing storage. The core guarantees to call this function for every
> -	 * framebuffer successfully created by ->fb_create() in
> -	 * &drm_mode_config_funcs. Drivers must also call
> +	 * framebuffer successfully created by calling
> +	 * &drm_mode_config_funcs.fb_create. Drivers must also call
>  	 * drm_framebuffer_cleanup() to release DRM core resources for this
>  	 * framebuffer.
>  	 */
> @@ -112,8 +112,8 @@ struct drm_framebuffer {
>  	 */
>  	struct drm_device *dev;
>  	/**
> -	 * @head: Place on the dev->mode_config.fb_list, access protected by
> -	 * dev->mode_config.fb_lock.
> +	 * @head: Place on the &drm_mode_config.fb_list, access protected by
> +	 * &drm_mode_config.fb_lock.
>  	 */
>  	struct list_head head;
>  
> @@ -187,8 +187,7 @@ struct drm_framebuffer {
>  	 */
>  	int hot_y;
>  	/**
> -	 * @filp_head: Placed on &struct drm_file fbs list_head, protected by
> -	 * fbs_lock in the same structure.
> +	 * @filp_head: Placed on &drm_file.fbs, protected by &drm_file.fbs_lock.
>  	 */
>  	struct list_head filp_head;
>  };
> @@ -260,8 +259,8 @@ static inline void drm_framebuffer_assign(struct drm_framebuffer **p,
>   * @fb: the loop cursor
>   * @dev: the DRM device
>   *
> - * Iterate over all framebuffers of @dev. User must hold the fb_lock from
> - * &drm_mode_config.
> + * Iterate over all framebuffers of @dev. User must hold
> + * &drm_mode_config.fb_lock.
>   */
>  #define drm_for_each_fb(fb, dev) \
>  	for (WARN_ON(!mutex_is_locked(&(dev)->mode_config.fb_lock)),		\
> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
> index fe230f161efc..26ff46ab26fb 100644
> --- a/include/drm/drm_mode_config.h
> +++ b/include/drm/drm_mode_config.h
> @@ -132,8 +132,8 @@ struct drm_mode_config_funcs {
>  	 *    that before calling this hook.
>  	 *
>  	 * See the documentation of @atomic_commit for an exhaustive list of
> -	 * error conditions which don't have to be checked at the
> -	 * ->atomic_check() stage?
> +	 * error conditions which don't have to be checked at the in this
> +	 * callback.
>  	 *
>  	 * See the documentation for &struct drm_atomic_state for how exactly
>  	 * an atomic modeset update is described.
> @@ -198,10 +198,10 @@ struct drm_mode_config_funcs {
>  	 * completed. These events are per-CRTC and can be distinguished by the
>  	 * CRTC index supplied in &drm_event to userspace.
>  	 *
> -	 * The drm core will supply a &struct drm_event in the event
> -	 * member of each CRTC's &drm_crtc_state structure. See the
> -	 * documentation for &drm_crtc_state for more details about the precise
> -	 * semantics of this event.
> +	 * The drm core will supply a &struct drm_event in each CRTC's
> +	 * &drm_crtc_state.event. See the documentation for
> +	 * &drm_crtc_state.event for more details about the precise semantics of
> +	 * this event.
>  	 *
>  	 * NOTE:
>  	 *
> diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
> index 43460b21d112..2c017adf6d74 100644
> --- a/include/drm/drm_mode_object.h
> +++ b/include/drm/drm_mode_object.h
> @@ -86,10 +86,15 @@ struct drm_object_properties {
>  	 *
>  	 * Note that atomic drivers do not store mutable properties in this
>  	 * array, but only the decoded values in the corresponding state
> -	 * structure. The decoding is done using the ->atomic_get_property and
> -	 * ->atomic_set_property hooks of the corresponding object. Hence atomic
> -	 * drivers should not use drm_object_property_set_value() and
> -	 * drm_object_property_get_value() on mutable objects, i.e. those
> +	 * structure. The decoding is done using the &drm_crtc.atomic_get_property and
> +	 * &drm_crtc.atomic_set_property hooks for &struct drm_crtc. For
> +	 * &struct drm_plane the hooks are &drm_plane_funcs.atomic_get_property and
> +	 * &drm_plane_funcs.atomic_set_property. And for &struct drm_connector
> +	 * the hooks are &drm_connector_funcs.atomic_get_property and
> +	 * &drm_connector_funcs.atomic_set_property .
> +	 *
> +	 * Hence atomic drivers should not use drm_object_property_set_value()
> +	 * and drm_object_property_get_value() on mutable objects, i.e. those
>  	 * without the DRM_MODE_PROP_IMMUTABLE flag set.
>  	 */
>  	uint64_t values[DRM_OBJECT_MAX_PROPERTY];
> diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
> index d918ce45ec2c..96d39fbd12ca 100644
> --- a/include/drm/drm_modeset_lock.h
> +++ b/include/drm/drm_modeset_lock.h
> @@ -64,7 +64,7 @@ struct drm_modeset_acquire_ctx {
>  /**
>   * struct drm_modeset_lock - used for locking modeset resources.
>   * @mutex: resource locking
> - * @head: used to hold it's place on state->locked list when
> + * @head: used to hold it's place on &drm_atomi_state.locked list when

"its", "drm_atomic_state"

>   *    part of an atomic update
>   *
>   * Used for locking CRTCs and other modeset resources.
> diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
> index e049bc52fb07..525a3340c1b2 100644
> --- a/include/drm/drm_plane.h
> +++ b/include/drm/drm_plane.h
> @@ -249,9 +249,9 @@ struct drm_plane_funcs {
>  	 * Duplicate the current atomic state for this plane and return it.
>  	 * The core and helpers gurantee that any atomic state duplicated with

"guarantee"

>  	 * this hook and still owned by the caller (i.e. not transferred to the
> -	 * driver by calling ->atomic_commit() from struct
> -	 * &drm_mode_config_funcs) will be cleaned up by calling the
> -	 * @atomic_destroy_state hook in this structure.
> +	 * driver by calling &drm_mode_config_funcs.atomic_commit) will be
> +	 * cleaned up by calling the @atomic_destroy_state hook in this
> +	 * structure.
>  	 *
>  	 * Atomic drivers which don't subclass &struct drm_plane_state should use
>  	 * drm_atomic_helper_plane_duplicate_state(). Drivers that subclass the
> @@ -259,7 +259,7 @@ struct drm_plane_funcs {
>  	 * __drm_atomic_helper_plane_duplicate_state() to make sure shared state is
>  	 * duplicated in a consistent fashion across drivers.
>  	 *
> -	 * It is an error to call this hook before plane->state has been
> +	 * It is an error to call this hook before &drm_plane.state has been
>  	 * initialized correctly.
>  	 *
>  	 * NOTE:
> @@ -423,8 +423,8 @@ enum drm_plane_type {
>  	 *
>  	 * Primary planes represent a "main" plane for a CRTC.  Primary planes
>  	 * are the planes operated upon by CRTC modesetting and flipping
> -	 * operations described in the page_flip and set_config hooks in struct
> -	 * &drm_crtc_funcs.
> +	 * operations described in the &drm_crtc_funcs.page_flip and
> +	 * &drm_crtc_funcs.set_config hooks.
>  	 */
>  	DRM_PLANE_TYPE_PRIMARY,
>  
> @@ -470,8 +470,8 @@ struct drm_plane {
>  	/**
>  	 * @mutex:
>  	 *
> -	 * Protects modeset plane state, together with the mutex of &drm_crtc
> -	 * this plane is linked to (when active, getting actived or getting
> +	 * Protects modeset plane state, together with the &drm_crtc.mutex of
> +	 * CRTC this plane is linked to (when active, getting actived or getting

"activated"

>  	 * disabled).
>  	 */
>  	struct drm_modeset_lock mutex;
> @@ -580,7 +580,7 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,
>   *
>   * Iterate over all legacy planes of @dev, excluding primary and cursor planes.
>   * This is useful for implementing userspace apis when userspace is not
> - * universal plane aware. See also enum &drm_plane_type.
> + * universal plane aware. See also &enum drm_plane_type.
>   */
>  #define drm_for_each_legacy_plane(plane, dev) \
>  	list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \
> diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
> index 43c4b6a2046d..f66fdb47551c 100644
> --- a/include/drm/drm_property.h
> +++ b/include/drm/drm_property.h
> @@ -30,7 +30,7 @@
>  /**
>   * struct drm_property_enum - symbolic values for enumerations
>   * @value: numeric property value for this enum entry
> - * @head: list of enum values, linked to enum_list in &drm_property
> + * @head: list of enum values, linked to &drm_property.enum_list
>   * @name: symbolic name for the enum
>   *
>   * For enumeration and bitmask properties this structure stores the symbolic
> @@ -191,9 +191,9 @@ struct drm_property {
>   * struct drm_property_blob - Blob data for &drm_property
>   * @base: base KMS object
>   * @dev: DRM device
> - * @head_global: entry on the global blob list in &drm_mode_config
> - *	property_blob_list.
> - * @head_file: entry on the per-file blob list in &drm_file blobs list.
> + * @head_global: entry on the global blob list in
> + * 	&drm_mode_config.property_blob_list.
> + * @head_file: entry on the per-file blob list in &drm_file.blobs list.
>   * @length: size of the blob in bytes, invariant over the lifetime of the object
>   * @data: actual data, embedded at the end of this structure
>   *
> -- 
> 2.11.0
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc]
  2017-01-25  6:26 ` [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc] Daniel Vetter
@ 2017-01-25 14:26   ` Eric Engestrom
  2017-01-25 15:36     ` Daniel Vetter
  0 siblings, 1 reply; 40+ messages in thread
From: Eric Engestrom @ 2017-01-25 14:26 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wednesday, 2017-01-25 07:26:57 +0100, Daniel Vetter wrote:
> After going through all the trouble of splitting out parts from
> drm_crtc.[hc] and then properly documenting each I've entirely
> forgotten to show the same TLC for CRTCs themselves!
> 
> Let's make amends asap.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  Documentation/gpu/drm-kms.rst |  6 ++++++
>  drivers/gpu/drm/drm_crtc.c    | 21 +++++++++++++++++++++
>  include/drm/drm_crtc.h        | 25 +++++++++++++++++++------
>  3 files changed, 46 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
> index 35c41cf84a1b..979cee853bb1 100644
> --- a/Documentation/gpu/drm-kms.rst
> +++ b/Documentation/gpu/drm-kms.rst
> @@ -284,6 +284,12 @@ Atomic Mode Setting Function Reference
>  CRTC Abstraction
>  ================
>  
> +.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
> +   :doc: overview
> +
> +CRTC Functions Reference
> +--------------------------------
> +
>  .. kernel-doc:: include/drm/drm_crtc.h
>     :internal:
>  
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 5f28e3a5a3e0..6915f897bd8e 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -47,6 +47,27 @@
>  #include "drm_internal.h"
>  
>  /**
> + * DOC: overview
> + *
> + * A CRTC represents the overall display pipeline. It receives pixel data from
> + * &drm_plane and blends them together. The &drm_display_mode is also attached
> + * to the CRTC, specifying display timings. On the output side the data is fed
> + * to one or more &drm_encoder, which are then each connected to one
> + * &drm_connector.
> + *
> + * To create a CRTC, a KMS drivers allocates and zeroes an instances of
> + * &struct drm_crtc (possibly as part of a larger structure) and registers it
> + * with a call to drm_crtc_init_with_planes().
> + *
> + * The CRTC is also the entry point for legacy modeset operations, see
> + * &drm_crtc_funcs.set_config, legacy plane operations, see
> + * &drm_crtc_funcs.page_flip and &drm_crtc_funcs.cursor_set2, and other legacy
> + * operations like &drm_crtc_funcs.gamma_set. For atomic drivers all these
> + * features are controlled through &drm_property and
> + * &drm_mode_config_funcs.atomic_check and &drm_mode_config_funcs.atomic_check.
> + */
> +
> +/**
>   * drm_crtc_from_index - find the registered CRTC at an index
>   * @dev: DRM device
>   * @idx: index of registered CRTC to find for
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 816edab054e6..d788c624f67a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -641,7 +641,7 @@ struct drm_crtc {
>  	 *
>  	 * This provides a read lock for the overall crtc state (mode, dpms
>  	 * state, ...) and a write lock for everything which can be update
> -	 * without a full modeset (fb, cursor data, crtc properties ...). Full
> +	 * without a full modeset (fb, cursor data, crtc properties ...). A full
>  	 * modeset also need to grab &drm_mode_config.connection_mutex.
>  	 */
>  	struct drm_modeset_lock mutex;
> @@ -774,10 +774,8 @@ struct drm_crtc {
>   * @connectors: array of connectors to drive with this CRTC if possible
>   * @num_connectors: size of @connectors array
>   *
> - * Represents a single crtc the connectors that it drives with what mode
> - * and from which framebuffer it scans out from.
> - *
> - * This is used to set modes.
> + * This represents a modeset configuration for the legacy SETCRTC ioctl and is
> + * also used internally. Atomic drivers instead use &drm_atomic_state.
>   */
>  struct drm_mode_set {
>  	struct drm_framebuffer *fb;
> @@ -832,7 +830,15 @@ int drm_crtc_force_disable_all(struct drm_device *dev);
>  int drm_mode_set_config_internal(struct drm_mode_set *set);
>  struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
>  
> -/* Helpers */
> +/**
> + * drm_crtc_find - look up a CRTC object from its ID
> + * @dev: DRM device
> + * @id: &drm_mode_object ID
> + *
> + * This can be used to look up a CRTC from its userspace ID. Only used by
> + * drivers for legacy IOCTLs and interface, nowadays extensions to the KMS
> + * userspace interface should be done using &drm_property.
> + */
>  static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
>  	uint32_t id)
>  {
> @@ -841,6 +847,13 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
>  	return mo ? obj_to_crtc(mo) : NULL;
>  }
>  
> +/**
> + * drm_for_each_crtc - iterate over all encoders

s/encoder/crtc/ :)

Other than that, this and #3 (btw I know you didn't introduce any of the
typos in #3, but you can fix them :P) are:
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

> + * @crtc: a &struct drm_crtc as the loop cursor
> + * @dev: the &struct drm_device
> + *
> + * Iterate over all CRTCs of @dev.
> + */
>  #define drm_for_each_crtc(crtc, dev) \
>  	list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
>  
> -- 
> 2.11.0
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs
  2017-01-25 12:48   ` [Intel-gfx] " Gustavo Padovan
@ 2017-01-25 15:19     ` Daniel Vetter
  0 siblings, 0 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25 15:19 UTC (permalink / raw)
  To: Gustavo Padovan, Daniel Vetter, DRI Development, Daniel Vetter,
	Intel Graphics Development

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 <gustavo.padovan@collabora.com>

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

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 05/15] drm/core: Use recommened kerneldoc for struct member refs
  2017-01-25 12:55   ` Gustavo Padovan
@ 2017-01-25 15:23     ` Daniel Vetter
  0 siblings, 0 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25 15:23 UTC (permalink / raw)
  To: Gustavo Padovan, Daniel Vetter, DRI Development, Daniel Vetter,
	Intel Graphics Development

On Wed, Jan 25, 2017 at 10:55:21AM -0200, Gustavo Padovan wrote:
> Otherwise looks good:

Fixed up all and applied

> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>

and 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

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Intel-gfx] [PATCH 06/15] drm/doc: Clarify connector overview
  2017-01-25 12:57   ` [Intel-gfx] " Gustavo Padovan
@ 2017-01-25 15:33     ` Daniel Vetter
  2017-01-25 18:08       ` Gustavo Padovan
  0 siblings, 1 reply; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25 15:33 UTC (permalink / raw)
  To: Gustavo Padovan, Daniel Vetter, DRI Development,
	Intel Graphics Development, Daniel Vetter

On Wed, Jan 25, 2017 at 10:57:17AM -0200, Gustavo Padovan wrote:
> Hi Daniel,
> 
> 2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:
> 
> > There was a bit of mix-up between initialization and registering.
> > 
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  drivers/gpu/drm/drm_connector.c | 9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> > index dd720d4cb4f7..c75ab242f907 100644
> > --- a/drivers/gpu/drm/drm_connector.c
> > +++ b/drivers/gpu/drm/drm_connector.c
> > @@ -40,11 +40,10 @@
> >   *
> >   * KMS driver must create, initialize, register and attach at a &struct
> >   * drm_connector for each such sink. The instance is created as other KMS
> > - * objects and initialized by setting the following fields.
> > - *
> > - * The connector is then registered with a call to drm_connector_init() with a
> > - * pointer to the connector functions and a connector type, and exposed through
> > - * sysfs with a call to drm_connector_register().
> > + * objects and initialized by setting the following fields. The connector is
> > + * initialized with a call to drm_connector_init() with a pointer to the
> > + * connector functions and a connector type, and then exposed to userspace with
> 
> &drm_connector_funcs

I'm not really clear what you want me to do here ...
-Daniel

> 
> Other than that:
> 
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc]
  2017-01-25 14:26   ` Eric Engestrom
@ 2017-01-25 15:36     ` Daniel Vetter
  0 siblings, 0 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-25 15:36 UTC (permalink / raw)
  To: Eric Engestrom
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Wed, Jan 25, 2017 at 02:26:09PM +0000, Eric Engestrom wrote:
> On Wednesday, 2017-01-25 07:26:57 +0100, Daniel Vetter wrote:
> > After going through all the trouble of splitting out parts from
> > drm_crtc.[hc] and then properly documenting each I've entirely
> > forgotten to show the same TLC for CRTCs themselves!
> > 
> > Let's make amends asap.
> > 
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  Documentation/gpu/drm-kms.rst |  6 ++++++
> >  drivers/gpu/drm/drm_crtc.c    | 21 +++++++++++++++++++++
> >  include/drm/drm_crtc.h        | 25 +++++++++++++++++++------
> >  3 files changed, 46 insertions(+), 6 deletions(-)
> > 
> > diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
> > index 35c41cf84a1b..979cee853bb1 100644
> > --- a/Documentation/gpu/drm-kms.rst
> > +++ b/Documentation/gpu/drm-kms.rst
> > @@ -284,6 +284,12 @@ Atomic Mode Setting Function Reference
> >  CRTC Abstraction
> >  ================
> >  
> > +.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
> > +   :doc: overview
> > +
> > +CRTC Functions Reference
> > +--------------------------------
> > +
> >  .. kernel-doc:: include/drm/drm_crtc.h
> >     :internal:
> >  
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index 5f28e3a5a3e0..6915f897bd8e 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -47,6 +47,27 @@
> >  #include "drm_internal.h"
> >  
> >  /**
> > + * DOC: overview
> > + *
> > + * A CRTC represents the overall display pipeline. It receives pixel data from
> > + * &drm_plane and blends them together. The &drm_display_mode is also attached
> > + * to the CRTC, specifying display timings. On the output side the data is fed
> > + * to one or more &drm_encoder, which are then each connected to one
> > + * &drm_connector.
> > + *
> > + * To create a CRTC, a KMS drivers allocates and zeroes an instances of
> > + * &struct drm_crtc (possibly as part of a larger structure) and registers it
> > + * with a call to drm_crtc_init_with_planes().
> > + *
> > + * The CRTC is also the entry point for legacy modeset operations, see
> > + * &drm_crtc_funcs.set_config, legacy plane operations, see
> > + * &drm_crtc_funcs.page_flip and &drm_crtc_funcs.cursor_set2, and other legacy
> > + * operations like &drm_crtc_funcs.gamma_set. For atomic drivers all these
> > + * features are controlled through &drm_property and
> > + * &drm_mode_config_funcs.atomic_check and &drm_mode_config_funcs.atomic_check.
> > + */
> > +
> > +/**
> >   * drm_crtc_from_index - find the registered CRTC at an index
> >   * @dev: DRM device
> >   * @idx: index of registered CRTC to find for
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index 816edab054e6..d788c624f67a 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -641,7 +641,7 @@ struct drm_crtc {
> >  	 *
> >  	 * This provides a read lock for the overall crtc state (mode, dpms
> >  	 * state, ...) and a write lock for everything which can be update
> > -	 * without a full modeset (fb, cursor data, crtc properties ...). Full
> > +	 * without a full modeset (fb, cursor data, crtc properties ...). A full
> >  	 * modeset also need to grab &drm_mode_config.connection_mutex.
> >  	 */
> >  	struct drm_modeset_lock mutex;
> > @@ -774,10 +774,8 @@ struct drm_crtc {
> >   * @connectors: array of connectors to drive with this CRTC if possible
> >   * @num_connectors: size of @connectors array
> >   *
> > - * Represents a single crtc the connectors that it drives with what mode
> > - * and from which framebuffer it scans out from.
> > - *
> > - * This is used to set modes.
> > + * This represents a modeset configuration for the legacy SETCRTC ioctl and is
> > + * also used internally. Atomic drivers instead use &drm_atomic_state.
> >   */
> >  struct drm_mode_set {
> >  	struct drm_framebuffer *fb;
> > @@ -832,7 +830,15 @@ int drm_crtc_force_disable_all(struct drm_device *dev);
> >  int drm_mode_set_config_internal(struct drm_mode_set *set);
> >  struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
> >  
> > -/* Helpers */
> > +/**
> > + * drm_crtc_find - look up a CRTC object from its ID
> > + * @dev: DRM device
> > + * @id: &drm_mode_object ID
> > + *
> > + * This can be used to look up a CRTC from its userspace ID. Only used by
> > + * drivers for legacy IOCTLs and interface, nowadays extensions to the KMS
> > + * userspace interface should be done using &drm_property.
> > + */
> >  static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
> >  	uint32_t id)
> >  {
> > @@ -841,6 +847,13 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
> >  	return mo ? obj_to_crtc(mo) : NULL;
> >  }
> >  
> > +/**
> > + * drm_for_each_crtc - iterate over all encoders
> 
> s/encoder/crtc/ :)
> 
> Other than that, this and #3 (btw I know you didn't introduce any of the
> typos in #3, but you can fix them :P) are:
> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

Typos all fixed and both of these applied, thanks for your review.
-Daniel

> 
> > + * @crtc: a &struct drm_crtc as the loop cursor
> > + * @dev: the &struct drm_device
> > + *
> > + * Iterate over all CRTCs of @dev.
> > + */
> >  #define drm_for_each_crtc(crtc, dev) \
> >  	list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
> >  
> > -- 
> > 2.11.0
> > 

-- 
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

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/
  2017-01-25  6:26 ` [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ Daniel Vetter
@ 2017-01-25 17:31   ` Alex Deucher
  2017-01-26  9:48     ` Daniel Vetter
  0 siblings, 1 reply; 40+ messages in thread
From: Alex Deucher @ 2017-01-25 17:31 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> The function operates on modes, not CRTCs. Also move it into
> drm_modes.[hc]. Spotted while reviewing CRTC docs.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_atomic_helper.c  |  2 +-
>  drivers/gpu/drm/drm_crtc.c           | 23 +----------------------
>  drivers/gpu/drm/drm_modes.c          | 21 +++++++++++++++++++++
>  drivers/gpu/drm/i915/intel_display.c |  4 ++--
>  include/drm/drm_crtc.h               |  2 --
>  include/drm/drm_modes.h              |  2 ++
>  6 files changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 5e512dd3a2c4..9633d12c4ed1 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -2369,7 +2369,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
>         if (ret != 0)
>                 return ret;
>
> -       drm_crtc_get_hv_timing(set->mode, &hdisplay, &vdisplay);
> +       drm_mode_get_hv_timing(set->mode, &hdisplay, &vdisplay);
>
>         drm_atomic_set_fb_for_plane(primary_state, set->fb);
>         primary_state->crtc_x = 0;
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index cea7a7efa43c..5f28e3a5a3e0 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -461,27 +461,6 @@ int drm_mode_set_config_internal(struct drm_mode_set *set)
>  EXPORT_SYMBOL(drm_mode_set_config_internal);
>
>  /**
> - * drm_crtc_get_hv_timing - Fetches hdisplay/vdisplay for given mode
> - * @mode: mode to query
> - * @hdisplay: hdisplay value to fill in
> - * @vdisplay: vdisplay value to fill in
> - *
> - * The vdisplay value will be doubled if the specified mode is a stereo mode of
> - * the appropriate layout.
> - */
> -void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
> -                           int *hdisplay, int *vdisplay)
> -{
> -       struct drm_display_mode adjusted;
> -
> -       drm_mode_copy(&adjusted, mode);
> -       drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY);
> -       *hdisplay = adjusted.crtc_hdisplay;
> -       *vdisplay = adjusted.crtc_vdisplay;
> -}
> -EXPORT_SYMBOL(drm_crtc_get_hv_timing);
> -
> -/**
>   * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the
>   *     CRTC viewport
>   * @crtc: CRTC that framebuffer will be displayed on
> @@ -498,7 +477,7 @@ int drm_crtc_check_viewport(const struct drm_crtc *crtc,
>  {
>         int hdisplay, vdisplay;
>
> -       drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
> +       drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay);
>
>         if (crtc->state &&
>             drm_rotation_90_or_270(crtc->primary->state->rotation))
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index e6b19bc9021a..73ed6399c3fb 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -797,6 +797,27 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
>  EXPORT_SYMBOL(drm_mode_vrefresh);
>
>  /**
> + * drm_mode_get_hv_timing - Fetches hdisplay/vdisplay for given mode
> + * @mode: mode to query
> + * @hdisplay: hdisplay value to fill in
> + * @vdisplay: vdisplay value to fill in
> + *
> + * The vdisplay value will be doubled if the specified mode is a stereo mode of
> + * the appropriate layout.
> + */
> +void drm_mode_get_hv_timing(const struct drm_display_mode *mode,
> +                           int *hdisplay, int *vdisplay)
> +{
> +       struct drm_display_mode adjusted;
> +
> +       drm_mode_copy(&adjusted, mode);
> +       drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY);
> +       *hdisplay = adjusted.crtc_hdisplay;
> +       *vdisplay = adjusted.crtc_vdisplay;
> +}
> +EXPORT_SYMBOL(drm_mode_get_hv_timing);
> +
> +/**
>   * drm_mode_set_crtcinfo - set CRTC modesetting timing parameters
>   * @p: mode
>   * @adjust_flags: a combination of adjustment flags
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 7af8ddcaa075..50096f9bc420 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11099,7 +11099,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
>                 return PTR_ERR(plane_state);
>
>         if (mode)
> -               drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
> +               drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay);
>         else
>                 hdisplay = vdisplay = 0;
>
> @@ -12992,7 +12992,7 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,
>          * computation to clearly distinguish it from the adjusted mode, which
>          * can be changed by the connectors in the below retry loop.
>          */
> -       drm_crtc_get_hv_timing(&pipe_config->base.mode,
> +       drm_mode_get_hv_timing(&pipe_config->base.mode,
>                                &pipe_config->pipe_src_w,
>                                &pipe_config->pipe_src_h);
>
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index bef18a1fa36e..816edab054e6 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -826,8 +826,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
>         return 1 << drm_crtc_index(crtc);
>  }
>
> -void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
> -                           int *hdisplay, int *vdisplay);
>  int drm_crtc_force_disable(struct drm_crtc *crtc);
>  int drm_crtc_force_disable_all(struct drm_device *dev);
>
> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> index 9934d91619c1..6dd34280e892 100644
> --- a/include/drm/drm_modes.h
> +++ b/include/drm/drm_modes.h
> @@ -459,6 +459,8 @@ int of_get_drm_display_mode(struct device_node *np,
>  void drm_mode_set_name(struct drm_display_mode *mode);
>  int drm_mode_hsync(const struct drm_display_mode *mode);
>  int drm_mode_vrefresh(const struct drm_display_mode *mode);
> +void drm_mode_get_hv_timing(const struct drm_display_mode *mode,
> +                           int *hdisplay, int *vdisplay);
>
>  void drm_mode_set_crtcinfo(struct drm_display_mode *p,
>                            int adjust_flags);
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 09/15] drm/mga: remove device_is_agp callback
  2017-01-25  6:26 ` [PATCH 09/15] drm/mga: remove " Daniel Vetter
@ 2017-01-25 17:33   ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2017-01-25 17:33 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> It's only for a device quirk, and we might as well do that in the load
> callback.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/mga/mga_dma.c | 20 +++++++++++++++++++-
>  drivers/gpu/drm/mga/mga_drv.c | 37 -------------------------------------
>  2 files changed, 19 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c
> index a1d8dd15b131..1ffdafea27e4 100644
> --- a/drivers/gpu/drm/mga/mga_dma.c
> +++ b/drivers/gpu/drm/mga/mga_dma.c
> @@ -392,6 +392,24 @@ int mga_driver_load(struct drm_device *dev, unsigned long flags)
>         drm_mga_private_t *dev_priv;
>         int ret;
>
> +       /* There are PCI versions of the G450.  These cards have the
> +        * same PCI ID as the AGP G450, but have an additional PCI-to-PCI
> +        * bridge chip.  We detect these cards, which are not currently
> +        * supported by this driver, by looking at the device ID of the
> +        * bus the "card" is on.  If vendor is 0x3388 (Hint Corp) and the
> +        * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
> +        * device.
> +        */
> +       if ((dev->pdev->device == 0x0525) && dev->pdev->bus->self
> +           && (dev->pdev->bus->self->vendor == 0x3388)
> +           && (dev->pdev->bus->self->device == 0x0021)
> +           && dev->agp) {
> +               /* FIXME: This should be quirked in the pci core, but oh well
> +                * the hw probably stopped existing. */
> +               arch_phys_wc_del(dev->agp->agp_mtrr);
> +               kfree(dev->agp);
> +               dev->agp = NULL;
> +       }
>         dev_priv = kzalloc(sizeof(drm_mga_private_t), GFP_KERNEL);
>         if (!dev_priv)
>                 return -ENOMEM;
> @@ -698,7 +716,7 @@ static int mga_do_pci_dma_bootstrap(struct drm_device *dev,
>  static int mga_do_dma_bootstrap(struct drm_device *dev,
>                                 drm_mga_dma_bootstrap_t *dma_bs)
>  {
> -       const int is_agp = (dma_bs->agp_mode != 0) && drm_pci_device_is_agp(dev);
> +       const int is_agp = (dma_bs->agp_mode != 0) && dev->agp;
>         int err;
>         drm_mga_private_t *const dev_priv =
>             (drm_mga_private_t *) dev->dev_private;
> diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
> index 25b2a1a424e6..63ba0699d107 100644
> --- a/drivers/gpu/drm/mga/mga_drv.c
> +++ b/drivers/gpu/drm/mga/mga_drv.c
> @@ -37,8 +37,6 @@
>
>  #include <drm/drm_pciids.h>
>
> -static int mga_driver_device_is_agp(struct drm_device *dev);
> -
>  static struct pci_device_id pciidlist[] = {
>         mga_PCI_IDS
>  };
> @@ -66,7 +64,6 @@ static struct drm_driver driver = {
>         .lastclose = mga_driver_lastclose,
>         .set_busid = drm_pci_set_busid,
>         .dma_quiescent = mga_driver_dma_quiescent,
> -       .device_is_agp = mga_driver_device_is_agp,
>         .get_vblank_counter = mga_get_vblank_counter,
>         .enable_vblank = mga_enable_vblank,
>         .disable_vblank = mga_disable_vblank,
> @@ -107,37 +104,3 @@ module_exit(mga_exit);
>  MODULE_AUTHOR(DRIVER_AUTHOR);
>  MODULE_DESCRIPTION(DRIVER_DESC);
>  MODULE_LICENSE("GPL and additional rights");
> -
> -/**
> - * Determine if the device really is AGP or not.
> - *
> - * In addition to the usual tests performed by \c drm_device_is_agp, this
> - * function detects PCI G450 cards that appear to the system exactly like
> - * AGP G450 cards.
> - *
> - * \param dev   The device to be tested.
> - *
> - * \returns
> - * If the device is a PCI G450, zero is returned.  Otherwise 2 is returned.
> - */
> -static int mga_driver_device_is_agp(struct drm_device *dev)
> -{
> -       const struct pci_dev *const pdev = dev->pdev;
> -
> -       /* There are PCI versions of the G450.  These cards have the
> -        * same PCI ID as the AGP G450, but have an additional PCI-to-PCI
> -        * bridge chip.  We detect these cards, which are not currently
> -        * supported by this driver, by looking at the device ID of the
> -        * bus the "card" is on.  If vendor is 0x3388 (Hint Corp) and the
> -        * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the
> -        * device.
> -        */
> -
> -       if ((pdev->device == 0x0525) && pdev->bus->self
> -           && (pdev->bus->self->vendor == 0x3388)
> -           && (pdev->bus->self->device == 0x0021)) {
> -               return 0;
> -       }
> -
> -       return 2;
> -}
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 10/15] drm: remove device_is_agp callback
  2017-01-25  6:26 ` [PATCH 10/15] drm: " Daniel Vetter
@ 2017-01-25 17:34   ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2017-01-25 17:34 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Alex Deucher, Daniel Vetter, Intel Graphics Development,
	Ben Skeggs, DRI Development

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> With that the drm_pci_device_is_agp function becomes trivial, so
> inline that too. And while at it, move the drm_pci_agp_destroy
> declaration into drm-internal.h, since it's not used by drivers.
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_internal.h          |  1 +
>  drivers/gpu/drm/drm_pci.c               |  2 +-
>  drivers/gpu/drm/nouveau/nouveau_abi16.c |  2 +-
>  drivers/gpu/drm/radeon/radeon_cs.c      |  3 ++-
>  drivers/gpu/drm/radeon/radeon_kms.c     |  2 +-
>  include/drm/drmP.h                      | 15 ---------------
>  include/drm/drm_drv.h                   | 14 --------------
>  7 files changed, 6 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
> index a6213f814345..f37388cb2fde 100644
> --- a/drivers/gpu/drm/drm_internal.h
> +++ b/drivers/gpu/drm/drm_internal.h
> @@ -31,6 +31,7 @@ void drm_lastclose(struct drm_device *dev);
>  /* drm_pci.c */
>  int drm_irq_by_busid(struct drm_device *dev, void *data,
>                      struct drm_file *file_priv);
> +void drm_pci_agp_destroy(struct drm_device *dev);
>
>  /* drm_prime.c */
>  int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
> diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
> index 50c732a95b5a..b347c92914cf 100644
> --- a/drivers/gpu/drm/drm_pci.c
> +++ b/drivers/gpu/drm/drm_pci.c
> @@ -191,7 +191,7 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
>  static void drm_pci_agp_init(struct drm_device *dev)
>  {
>         if (drm_core_check_feature(dev, DRIVER_USE_AGP)) {
> -               if (drm_pci_device_is_agp(dev))
> +               if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))
>                         dev->agp = drm_agp_init(dev);
>                 if (dev->agp) {
>                         dev->agp->agp_mtrr = arch_phys_wc_add(
> diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
> index 7bd4683216d0..4df4f6ed4886 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
> @@ -199,7 +199,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
>                 if (!nvxx_device(device)->func->pci)
>                         getparam->value = 3;
>                 else
> -               if (drm_pci_device_is_agp(dev))
> +               if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))
>                         getparam->value = 0;
>                 else
>                 if (!pci_is_pcie(dev->pdev))
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 510ea371dacc..a8442f7196d6 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -121,7 +121,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
>                    VRAM, also but everything into VRAM on AGP cards and older
>                    IGP chips to avoid image corruptions */
>                 if (p->ring == R600_RING_TYPE_UVD_INDEX &&
> -                   (i == 0 || drm_pci_device_is_agp(p->rdev->ddev) ||
> +                   (i == 0 || pci_find_capability(p->rdev->ddev->pdev,
> +                                                  PCI_CAP_ID_AGP) ||
>                      p->rdev->family == CHIP_RS780 ||
>                      p->rdev->family == CHIP_RS880)) {
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 116cf0d23595..56f35c06742c 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -105,7 +105,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
>         dev->dev_private = (void *)rdev;
>
>         /* update BUS flag */
> -       if (drm_pci_device_is_agp(dev)) {
> +       if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP)) {
>                 flags |= RADEON_IS_AGP;
>         } else if (pci_is_pcie(dev->pdev)) {
>                 flags |= RADEON_IS_PCIE;
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index e5882d5a68e5..21a3a666a2fd 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -790,21 +790,6 @@ extern void drm_sysfs_hotplug_event(struct drm_device *dev);
>
>  /*@}*/
>
> -/* PCI section */
> -static __inline__ int drm_pci_device_is_agp(struct drm_device *dev)
> -{
> -       if (dev->driver->device_is_agp != NULL) {
> -               int err = (*dev->driver->device_is_agp) (dev);
> -
> -               if (err != 2) {
> -                       return err;
> -               }
> -       }
> -
> -       return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
> -}
> -void drm_pci_agp_destroy(struct drm_device *dev);
> -
>  extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
>  extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
>  #ifdef CONFIG_PCI
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 5ab2459b4345..af75fc6ec830 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -151,20 +151,6 @@ struct drm_driver {
>         void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);
>
>         /**
> -        * @device_is_agp:
> -        *
> -        * Called by drm_device_is_agp().  Typically used to determine if a card
> -        * is really attached to AGP or not.
> -        *
> -        * Returns:
> -        *
> -        * One of three values is returned depending on whether or not the
> -        * card is absolutely not AGP (return of 0), absolutely is AGP
> -        * (return of 1), or may or may not be AGP (return of 2).
> -        */
> -       int (*device_is_agp) (struct drm_device *dev);
> -
> -       /**
>          * @get_scanout_position:
>          *
>          * Called by vblank timestamping code.
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 08/15] drm/i810: drop device_is_agp callback
  2017-01-25  6:26 ` [PATCH 08/15] drm/i810: drop " Daniel Vetter
@ 2017-01-25 17:36   ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2017-01-25 17:36 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Use the same trick we used for i915 when we still had ums support:
> Just initialize the agp support unconditionally in the driver load
> function.
>
> Unfortunately that means we need to export drm_agp_init again, but I
> think that's a lesser evil.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_agpsupport.c |  2 ++
>  drivers/gpu/drm/i810/i810_dma.c  | 24 ++++++++----------------
>  drivers/gpu/drm/i810/i810_drv.c  |  1 -
>  drivers/gpu/drm/i810/i810_drv.h  |  1 -
>  4 files changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
> index d621c8a4cf00..c89953449e96 100644
> --- a/drivers/gpu/drm/drm_agpsupport.c
> +++ b/drivers/gpu/drm/drm_agpsupport.c
> @@ -421,6 +421,8 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
>         head->base = head->agp_info.aper_base;
>         return head;
>  }
> +/* Only exported for i810.ko */
> +EXPORT_SYMBOL(drm_agp_init);
>
>  /**
>   * drm_legacy_agp_clear - Clear AGP resource list
> diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
> index ab4e6cbe1f8b..576a417690d4 100644
> --- a/drivers/gpu/drm/i810/i810_dma.c
> +++ b/drivers/gpu/drm/i810/i810_dma.c
> @@ -1190,6 +1190,14 @@ static int i810_flip_bufs(struct drm_device *dev, void *data,
>
>  int i810_driver_load(struct drm_device *dev, unsigned long flags)
>  {
> +       dev->agp = drm_agp_init(dev);
> +       if (dev->agp) {
> +               dev->agp->agp_mtrr = arch_phys_wc_add(
> +                       dev->agp->agp_info.aper_base,
> +                       dev->agp->agp_info.aper_size *
> +                       1024 * 1024);
> +       }
> +
>         /* Our userspace depends upon the agp mapping support. */
>         if (!dev->agp)
>                 return -EINVAL;
> @@ -1249,19 +1257,3 @@ const struct drm_ioctl_desc i810_ioctls[] = {
>  };
>
>  int i810_max_ioctl = ARRAY_SIZE(i810_ioctls);
> -
> -/**
> - * Determine if the device really is AGP or not.
> - *
> - * All Intel graphics chipsets are treated as AGP, even if they are really
> - * PCI-e.
> - *
> - * \param dev   The device to be tested.
> - *
> - * \returns
> - * A value of 1 is always retured to indictate every i810 is AGP.
> - */
> -int i810_driver_device_is_agp(struct drm_device *dev)
> -{
> -       return 1;
> -}
> diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
> index 02504a7cfaf2..37fd0906f807 100644
> --- a/drivers/gpu/drm/i810/i810_drv.c
> +++ b/drivers/gpu/drm/i810/i810_drv.c
> @@ -60,7 +60,6 @@ static struct drm_driver driver = {
>         .lastclose = i810_driver_lastclose,
>         .preclose = i810_driver_preclose,
>         .set_busid = drm_pci_set_busid,
> -       .device_is_agp = i810_driver_device_is_agp,
>         .dma_quiescent = i810_driver_dma_quiescent,
>         .ioctls = i810_ioctls,
>         .fops = &i810_driver_fops,
> diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
> index 93ec5dc4e7d3..c73d2f2da57b 100644
> --- a/drivers/gpu/drm/i810/i810_drv.h
> +++ b/drivers/gpu/drm/i810/i810_drv.h
> @@ -124,7 +124,6 @@ extern int i810_driver_load(struct drm_device *, unsigned long flags);
>  extern void i810_driver_lastclose(struct drm_device *dev);
>  extern void i810_driver_preclose(struct drm_device *dev,
>                                  struct drm_file *file_priv);
> -extern int i810_driver_device_is_agp(struct drm_device *dev);
>
>  extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
>  extern const struct drm_ioctl_desc i810_ioctls[];
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 11/15] drm: Nuke ums vgaarb support
  2017-01-25  6:26 ` [PATCH 11/15] drm: Nuke ums vgaarb support Daniel Vetter
@ 2017-01-25 17:40   ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2017-01-25 17:40 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> i915, nouveau (ever since merged to upstream) and radeon all lack ums
> support in upstream. No point keeping the ums vgaarb support around.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_irq.c | 26 --------------------------
>  include/drm/drm_drv.h     |  3 ---
>  2 files changed, 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 1c4da043eeda..954960cc68e7 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -415,29 +415,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
>  }
>  EXPORT_SYMBOL(drm_vblank_init);
>
> -static void drm_irq_vgaarb_nokms(void *cookie, bool state)
> -{
> -       struct drm_device *dev = cookie;
> -
> -       if (dev->driver->vgaarb_irq) {
> -               dev->driver->vgaarb_irq(dev, state);
> -               return;
> -       }
> -
> -       if (!dev->irq_enabled)
> -               return;
> -
> -       if (state) {
> -               if (dev->driver->irq_uninstall)
> -                       dev->driver->irq_uninstall(dev);
> -       } else {
> -               if (dev->driver->irq_preinstall)
> -                       dev->driver->irq_preinstall(dev);
> -               if (dev->driver->irq_postinstall)
> -                       dev->driver->irq_postinstall(dev);
> -       }
> -}
> -
>  /**
>   * drm_irq_install - install IRQ handler
>   * @dev: DRM device
> @@ -492,9 +469,6 @@ int drm_irq_install(struct drm_device *dev, int irq)
>                 return ret;
>         }
>
> -       if (drm_core_check_feature(dev, DRIVER_LEGACY))
> -               vga_client_register(dev->pdev, (void *)dev, drm_irq_vgaarb_nokms, NULL);
> -
>         /* After installing handler */
>         if (dev->driver->irq_postinstall)
>                 ret = dev->driver->irq_postinstall(dev);
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index af75fc6ec830..8391135b95f2 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -345,9 +345,6 @@ struct drm_driver {
>         int (*gem_prime_mmap)(struct drm_gem_object *obj,
>                                 struct vm_area_struct *vma);
>
> -       /* vga arb irq handler */
> -       void (*vgaarb_irq)(struct drm_device *dev, bool state);
> -
>         /**
>          * @dumb_create:
>          *
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such
  2017-01-25  6:26 ` [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such Daniel Vetter
@ 2017-01-25 17:43   ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2017-01-25 17:43 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> No point in documenting these, they only confuse.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  1 -
>  include/drm/drm_drv.h                   | 13 ++++++++-----
>  2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 2534adaebe30..38c22c3c0d54 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -686,7 +686,6 @@ static struct drm_driver kms_driver = {
>             DRIVER_USE_AGP |
>             DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
>             DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET,
> -       .dev_priv_size = 0,
>         .load = amdgpu_driver_load_kms,
>         .open = amdgpu_driver_open_kms,
>         .preclose = amdgpu_driver_preclose_kms,
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 8391135b95f2..732e85652d1e 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -81,7 +81,6 @@ struct drm_driver {
>          * Zero on success, non-zero value on failure.
>          */
>         int (*load) (struct drm_device *, unsigned long flags);
> -       int (*firstopen) (struct drm_device *);
>         int (*open) (struct drm_device *, struct drm_file *);
>         void (*preclose) (struct drm_device *, struct drm_file *file_priv);
>         void (*postclose) (struct drm_device *, struct drm_file *);
> @@ -103,9 +102,6 @@ struct drm_driver {
>          *
>          */
>         void (*unload) (struct drm_device *);
> -       int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
> -       int (*dma_quiescent) (struct drm_device *);
> -       int (*context_dtor) (struct drm_device *dev, int context);
>         int (*set_busid)(struct drm_device *dev, struct drm_master *master);
>
>         /**
> @@ -413,13 +409,20 @@ struct drm_driver {
>         char *date;
>
>         u32 driver_features;
> -       int dev_priv_size;
>         const struct drm_ioctl_desc *ioctls;
>         int num_ioctls;
>         const struct file_operations *fops;
>
> +       /* Everything below here is for legacy driver, never use! */
> +       /* private: */
> +
>         /* List of devices hanging off this driver with stealth attach. */
>         struct list_head legacy_dev_list;
> +       int (*firstopen) (struct drm_device *);
> +       int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
> +       int (*dma_quiescent) (struct drm_device *);
> +       int (*context_dtor) (struct drm_device *dev, int context);
> +       int dev_priv_size;
>  };
>
>  extern __printf(6, 7)
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 06/15] drm/doc: Clarify connector overview
  2017-01-25 15:33     ` Daniel Vetter
@ 2017-01-25 18:08       ` Gustavo Padovan
  0 siblings, 0 replies; 40+ messages in thread
From: Gustavo Padovan @ 2017-01-25 18:08 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

2017-01-25 Daniel Vetter <daniel@ffwll.ch>:

> On Wed, Jan 25, 2017 at 10:57:17AM -0200, Gustavo Padovan wrote:
> > Hi Daniel,
> > 
> > 2017-01-25 Daniel Vetter <daniel.vetter@ffwll.ch>:
> > 
> > > There was a bit of mix-up between initialization and registering.
> > > 
> > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > > ---
> > >  drivers/gpu/drm/drm_connector.c | 9 ++++-----
> > >  1 file changed, 4 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> > > index dd720d4cb4f7..c75ab242f907 100644
> > > --- a/drivers/gpu/drm/drm_connector.c
> > > +++ b/drivers/gpu/drm/drm_connector.c
> > > @@ -40,11 +40,10 @@
> > >   *
> > >   * KMS driver must create, initialize, register and attach at a &struct
> > >   * drm_connector for each such sink. The instance is created as other KMS
> > > - * objects and initialized by setting the following fields.
> > > - *
> > > - * The connector is then registered with a call to drm_connector_init() with a
> > > - * pointer to the connector functions and a connector type, and exposed through
> > > - * sysfs with a call to drm_connector_register().
> > > + * objects and initialized by setting the following fields. The connector is
> > > + * initialized with a call to drm_connector_init() with a pointer to the
> > > + * connector functions and a connector type, and then exposed to userspace with
> > 
> > &drm_connector_funcs
> 
> I'm not really clear what you want me to do here ...

You said "a pointer to the connector functions" thus
&drm_connector_funcs. Sorry for not being clear enough, I should have 
justified what I wrote.

> -Daniel
> 
> > 
> > Other than that:
> > 
> > Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> 
> -- 
> 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

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 07/15] drm/gma500: Nuke device_is_agp callback
  2017-01-25  6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
  2017-01-25 12:58   ` Gustavo Padovan
@ 2017-01-26  0:11   ` Patrik Jakobsson
  1 sibling, 0 replies; 40+ messages in thread
From: Patrik Jakobsson @ 2017-01-26  0:11 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Jan 25, 2017 at 7:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Returning 0 for an on-chip gpu doesn't change anything at all.
>
> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

> ---
>  drivers/gpu/drm/gma500/psb_drv.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
> index 0dc7ba2fdc22..5ee93ff55608 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -406,11 +406,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
>         return ret;
>  }
>
> -static int psb_driver_device_is_agp(struct drm_device *dev)
> -{
> -       return 0;
> -}
> -
>  static inline void get_brightness(struct backlight_device *bd)
>  {
>  #ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
> @@ -487,7 +482,6 @@ static struct drm_driver driver = {
>         .set_busid = drm_pci_set_busid,
>
>         .num_ioctls = ARRAY_SIZE(psb_ioctls),
> -       .device_is_agp = psb_driver_device_is_agp,
>         .irq_preinstall = psb_irq_preinstall,
>         .irq_postinstall = psb_irq_postinstall,
>         .irq_uninstall = psb_irq_uninstall,
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/
  2017-01-25 17:31   ` Alex Deucher
@ 2017-01-26  9:48     ` Daniel Vetter
  0 siblings, 0 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-26  9:48 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Wed, Jan 25, 2017 at 12:31:44PM -0500, Alex Deucher wrote:
> On Wed, Jan 25, 2017 at 1:26 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > The function operates on modes, not CRTCs. Also move it into
> > drm_modes.[hc]. Spotted while reviewing CRTC docs.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Pulled in all the ones you've reviewed, thanks a lot for going through
them.
-Daniel

> 
> > ---
> >  drivers/gpu/drm/drm_atomic_helper.c  |  2 +-
> >  drivers/gpu/drm/drm_crtc.c           | 23 +----------------------
> >  drivers/gpu/drm/drm_modes.c          | 21 +++++++++++++++++++++
> >  drivers/gpu/drm/i915/intel_display.c |  4 ++--
> >  include/drm/drm_crtc.h               |  2 --
> >  include/drm/drm_modes.h              |  2 ++
> >  6 files changed, 27 insertions(+), 27 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > index 5e512dd3a2c4..9633d12c4ed1 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -2369,7 +2369,7 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
> >         if (ret != 0)
> >                 return ret;
> >
> > -       drm_crtc_get_hv_timing(set->mode, &hdisplay, &vdisplay);
> > +       drm_mode_get_hv_timing(set->mode, &hdisplay, &vdisplay);
> >
> >         drm_atomic_set_fb_for_plane(primary_state, set->fb);
> >         primary_state->crtc_x = 0;
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index cea7a7efa43c..5f28e3a5a3e0 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -461,27 +461,6 @@ int drm_mode_set_config_internal(struct drm_mode_set *set)
> >  EXPORT_SYMBOL(drm_mode_set_config_internal);
> >
> >  /**
> > - * drm_crtc_get_hv_timing - Fetches hdisplay/vdisplay for given mode
> > - * @mode: mode to query
> > - * @hdisplay: hdisplay value to fill in
> > - * @vdisplay: vdisplay value to fill in
> > - *
> > - * The vdisplay value will be doubled if the specified mode is a stereo mode of
> > - * the appropriate layout.
> > - */
> > -void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
> > -                           int *hdisplay, int *vdisplay)
> > -{
> > -       struct drm_display_mode adjusted;
> > -
> > -       drm_mode_copy(&adjusted, mode);
> > -       drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY);
> > -       *hdisplay = adjusted.crtc_hdisplay;
> > -       *vdisplay = adjusted.crtc_vdisplay;
> > -}
> > -EXPORT_SYMBOL(drm_crtc_get_hv_timing);
> > -
> > -/**
> >   * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the
> >   *     CRTC viewport
> >   * @crtc: CRTC that framebuffer will be displayed on
> > @@ -498,7 +477,7 @@ int drm_crtc_check_viewport(const struct drm_crtc *crtc,
> >  {
> >         int hdisplay, vdisplay;
> >
> > -       drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
> > +       drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay);
> >
> >         if (crtc->state &&
> >             drm_rotation_90_or_270(crtc->primary->state->rotation))
> > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > index e6b19bc9021a..73ed6399c3fb 100644
> > --- a/drivers/gpu/drm/drm_modes.c
> > +++ b/drivers/gpu/drm/drm_modes.c
> > @@ -797,6 +797,27 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
> >  EXPORT_SYMBOL(drm_mode_vrefresh);
> >
> >  /**
> > + * drm_mode_get_hv_timing - Fetches hdisplay/vdisplay for given mode
> > + * @mode: mode to query
> > + * @hdisplay: hdisplay value to fill in
> > + * @vdisplay: vdisplay value to fill in
> > + *
> > + * The vdisplay value will be doubled if the specified mode is a stereo mode of
> > + * the appropriate layout.
> > + */
> > +void drm_mode_get_hv_timing(const struct drm_display_mode *mode,
> > +                           int *hdisplay, int *vdisplay)
> > +{
> > +       struct drm_display_mode adjusted;
> > +
> > +       drm_mode_copy(&adjusted, mode);
> > +       drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY);
> > +       *hdisplay = adjusted.crtc_hdisplay;
> > +       *vdisplay = adjusted.crtc_vdisplay;
> > +}
> > +EXPORT_SYMBOL(drm_mode_get_hv_timing);
> > +
> > +/**
> >   * drm_mode_set_crtcinfo - set CRTC modesetting timing parameters
> >   * @p: mode
> >   * @adjust_flags: a combination of adjustment flags
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 7af8ddcaa075..50096f9bc420 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -11099,7 +11099,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
> >                 return PTR_ERR(plane_state);
> >
> >         if (mode)
> > -               drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
> > +               drm_mode_get_hv_timing(mode, &hdisplay, &vdisplay);
> >         else
> >                 hdisplay = vdisplay = 0;
> >
> > @@ -12992,7 +12992,7 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,
> >          * computation to clearly distinguish it from the adjusted mode, which
> >          * can be changed by the connectors in the below retry loop.
> >          */
> > -       drm_crtc_get_hv_timing(&pipe_config->base.mode,
> > +       drm_mode_get_hv_timing(&pipe_config->base.mode,
> >                                &pipe_config->pipe_src_w,
> >                                &pipe_config->pipe_src_h);
> >
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index bef18a1fa36e..816edab054e6 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -826,8 +826,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc)
> >         return 1 << drm_crtc_index(crtc);
> >  }
> >
> > -void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
> > -                           int *hdisplay, int *vdisplay);
> >  int drm_crtc_force_disable(struct drm_crtc *crtc);
> >  int drm_crtc_force_disable_all(struct drm_device *dev);
> >
> > diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> > index 9934d91619c1..6dd34280e892 100644
> > --- a/include/drm/drm_modes.h
> > +++ b/include/drm/drm_modes.h
> > @@ -459,6 +459,8 @@ int of_get_drm_display_mode(struct device_node *np,
> >  void drm_mode_set_name(struct drm_display_mode *mode);
> >  int drm_mode_hsync(const struct drm_display_mode *mode);
> >  int drm_mode_vrefresh(const struct drm_display_mode *mode);
> > +void drm_mode_get_hv_timing(const struct drm_display_mode *mode,
> > +                           int *hdisplay, int *vdisplay);
> >
> >  void drm_mode_set_crtcinfo(struct drm_display_mode *p,
> >                            int adjust_flags);
> > --
> > 2.11.0
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 13/15] drm/doc: Fix typos for early_unregister doc
  2017-01-25  6:26 ` [PATCH 13/15] drm/doc: Fix typos for early_unregister doc Daniel Vetter
@ 2017-01-26  9:49   ` Daniel Vetter
  0 siblings, 0 replies; 40+ messages in thread
From: Daniel Vetter @ 2017-01-26  9:49 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter, Intel Graphics Development

On Wed, Jan 25, 2017 at 07:26:55AM +0100, Daniel Vetter wrote:
> There's no late_unregister. While at it switch to the new canonical
> reference style.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Applied with Chris' irc-ack.
-Daniel

> ---
>  include/drm/drm_crtc.h    | 2 +-
>  include/drm/drm_encoder.h | 2 +-
>  include/drm/drm_plane.h   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 496324d3416b..bef18a1fa36e 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -560,7 +560,7 @@ struct drm_crtc_funcs {
>  	 *
>  	 * This optional hook should be used to unregister the additional
>  	 * userspace interfaces attached to the crtc from
> -	 * late_unregister(). It is called from drm_dev_unregister(),
> +	 * @late_register. It is called from drm_dev_unregister(),
>  	 * early in the driver unload sequence to disable userspace access
>  	 * before data structures are torndown.
>  	 */
> diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h
> index 5f58f65344e0..8d8245ec0181 100644
> --- a/include/drm/drm_encoder.h
> +++ b/include/drm/drm_encoder.h
> @@ -75,7 +75,7 @@ struct drm_encoder_funcs {
>  	 *
>  	 * This optional hook should be used to unregister the additional
>  	 * userspace interfaces attached to the encoder from
> -	 * late_unregister(). It is called from drm_dev_unregister(),
> +	 * @late_register. It is called from drm_dev_unregister(),
>  	 * early in the driver unload sequence to disable userspace access
>  	 * before data structures are torndown.
>  	 */
> diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
> index 525a3340c1b2..953c174bf8a1 100644
> --- a/include/drm/drm_plane.h
> +++ b/include/drm/drm_plane.h
> @@ -372,7 +372,7 @@ struct drm_plane_funcs {
>  	 *
>  	 * This optional hook should be used to unregister the additional
>  	 * userspace interfaces attached to the plane from
> -	 * late_unregister(). It is called from drm_dev_unregister(),
> +	 * @late_register. It is called from drm_dev_unregister(),
>  	 * early in the driver unload sequence to disable userspace access
>  	 * before data structures are torndown.
>  	 */
> -- 
> 2.11.0
> 

-- 
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

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2017-01-26  9:49 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25  6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
2017-01-25  6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
2017-01-25 12:48   ` [Intel-gfx] " Gustavo Padovan
2017-01-25 15:19     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 02/15] drm/bridge: " Daniel Vetter
2017-01-25  9:33   ` Archit Taneja
2017-01-25 12:40     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 03/15] drm/kms-core: " Daniel Vetter
2017-01-25 13:52   ` Eric Engestrom
2017-01-25  6:26 ` [PATCH 04/15] drm/gem|prime|mm: " Daniel Vetter
2017-01-25 12:51   ` Gustavo Padovan
2017-01-25  6:26 ` [PATCH 05/15] drm/core: " Daniel Vetter
2017-01-25 12:55   ` Gustavo Padovan
2017-01-25 15:23     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 06/15] drm/doc: Clarify connector overview Daniel Vetter
2017-01-25 12:57   ` [Intel-gfx] " Gustavo Padovan
2017-01-25 15:33     ` Daniel Vetter
2017-01-25 18:08       ` Gustavo Padovan
2017-01-25  6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
2017-01-25 12:58   ` Gustavo Padovan
2017-01-26  0:11   ` Patrik Jakobsson
2017-01-25  6:26 ` [PATCH 08/15] drm/i810: drop " Daniel Vetter
2017-01-25 17:36   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 09/15] drm/mga: remove " Daniel Vetter
2017-01-25 17:33   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 10/15] drm: " Daniel Vetter
2017-01-25 17:34   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 11/15] drm: Nuke ums vgaarb support Daniel Vetter
2017-01-25 17:40   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such Daniel Vetter
2017-01-25 17:43   ` Alex Deucher
2017-01-25  6:26 ` [PATCH 13/15] drm/doc: Fix typos for early_unregister doc Daniel Vetter
2017-01-26  9:49   ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ Daniel Vetter
2017-01-25 17:31   ` Alex Deucher
2017-01-26  9:48     ` Daniel Vetter
2017-01-25  6:26 ` [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc] Daniel Vetter
2017-01-25 14:26   ` Eric Engestrom
2017-01-25 15:36     ` Daniel Vetter
2017-01-25  7:54 ` ✗ Fi.CI.BAT: warning for More kerneldoc cleanup Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.