1
0
Fork 0

drm/kms-helpers: Use recommened kerneldoc for struct member refs

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

v2: Comments from Gustavo.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Rewiewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-2-daniel.vetter@ffwll.ch
hifive-unleashed-5.1
Daniel Vetter 2017-01-25 07:26:43 +01:00
parent 7b0a89a6db
commit 6806cdf9aa
11 changed files with 196 additions and 180 deletions

View File

@ -458,22 +458,25 @@ mode_fixup(struct drm_atomic_state *state)
* Check the state object to see if the requested state is physically possible. * 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 * This does all the crtc and connector related computations for an atomic
* update and adds any additional connectors needed for full modesets and calls * update and adds any additional connectors needed for full modesets and calls
* down into ->mode_fixup functions of the driver backend. * 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.
* *
* crtc_state->mode_changed is set when the input mode is changed. * &drm_crtc_state.mode_changed is set when the input mode is changed.
* crtc_state->connectors_changed is set when a connector is added or * &drm_crtc_state.connectors_changed is set when a connector is added or
* removed from the crtc. * removed from the crtc. &drm_crtc_state.active_changed is set when
* crtc_state->active_changed is set when crtc_state->active changes, * &drm_crtc_state.active changes, which is used for DPMS.
* which is used for dpms.
* See also: drm_atomic_crtc_needs_modeset() * See also: drm_atomic_crtc_needs_modeset()
* *
* IMPORTANT: * IMPORTANT:
* *
* Drivers which set ->mode_changed (e.g. in their ->atomic_check hooks if a * Drivers which set &drm_crtc_state.mode_changed (e.g. in their
* plane update can't be done without a full modeset) _must_ call this function * &drm_plane_helper_funcs.atomic_check hooks if a plane update can't be done
* afterwards after that change. It is permitted to call this function multiple * without a full modeset) _must_ call this function afterwards after that
* times for the same update, e.g. when the ->atomic_check functions depend upon * change. It is permitted to call this function multiple times for the same
* the adjusted dotclock for fifo space allocation and watermark computation. * 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: * RETURNS:
* Zero for success or -errno * 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. * 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 * 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. * updated planes.
* *
* RETURNS: * 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. * 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) * 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. * 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() * Drivers without such needs can directly use this as their
* callback. * &drm_mode_config_funcs.atomic_check callback.
* *
* This just wraps the two parts of the state checking for planes and modeset * 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() * 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 * and then drm_atomic_helper_check_planes(). The assumption is that the
* ->atomic_check functions depend upon an updated adjusted_mode.clock to * @drm_plane_helper_funcs.atomic_check and @drm_crtc_helper_funcs.atomic_check
* e.g. properly compute watermarks. * functions depend upon an updated adjusted_mode.clock to e.g. properly compute
* watermarks.
* *
* RETURNS: * RETURNS:
* Zero for success or -errno * 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 * drm_atomic_helper_commit_tail - commit atomic update to hardware
* @old_state: atomic state object with old state structures * @old_state: atomic state object with old state structures
* *
* This is the default implemenation for the ->atomic_commit_tail() hook of the * This is the default implementation for the
* &drm_mode_config_helper_funcs vtable. * &drm_mode_config_helper_funcs.atomic_commit_tail hook.
* *
* Note that the default ordering of how the various stages are called is to * 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 * 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. * drm_atomic_helper_setup_commit() and related functions.
* *
* Committing the actual hardware state is done through the * Committing the actual hardware state is done through the
* ->atomic_commit_tail() callback of the &drm_mode_config_helper_funcs vtable, * &drm_mode_config_helper_funcs.atomic_commit_tail callback, or it's default
* or it's default implementation drm_atomic_helper_commit_tail(). * implementation drm_atomic_helper_commit_tail().
* *
* RETURNS: * RETURNS:
* Zero for success or -errno. * Zero for success or -errno.
@ -1371,14 +1376,15 @@ static void release_crtc_commit(struct completion *completion)
* *
* This function prepares @state to be used by the atomic helper's support for * This function prepares @state to be used by the atomic helper's support for
* nonblocking commits. Drivers using the nonblocking commit infrastructure * 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 * 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 * functions. drm_atomic_helper_wait_for_dependencies() must be called before
* actually committing the hardware state, and for nonblocking commits this call * 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() * 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 * 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 * Completion of the hardware commit step must be signalled using
* drm_atomic_helper_commit_hw_done(). After this step the driver is not allowed * drm_atomic_helper_commit_hw_done(). After this step the driver is not allowed
@ -1487,8 +1493,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 * 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 * @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 * 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 * by calling drm_crtc_vblank_send_event() on the &drm_crtc_state.event).
* &drm_crtc_state).
* *
* This is part of the atomic helper support for nonblocking commits, see * This is part of the atomic helper support for nonblocking commits, see
* drm_atomic_helper_setup_commit() for an overview. * drm_atomic_helper_setup_commit() for an overview.
@ -1625,8 +1630,9 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_cleanup_done);
* @state: atomic state object with new state structures * @state: atomic state object with new state structures
* *
* This function prepares plane state, specifically framebuffers, for the new * This function prepares plane state, specifically framebuffers, for the new
* configuration. If any failure is encountered this function will call * configuration, by calling &drm_plane_helper_funcs.prepare_fb. If any failure
* ->cleanup_fb on any already successfully prepared framebuffer. * is encountered this function will call &drm_plane_helper_funcs.cleanup_fb on
* any already successfully prepared framebuffer.
* *
* Returns: * Returns:
* 0 on success, negative error code on failure. * 0 on success, negative error code on failure.
@ -1706,10 +1712,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 * 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 * 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 * disabled. This function would skip the &drm_plane_helper_funcs.atomic_disable
* the CRTC of the old plane state needs a modesetting operation. Of course, * call for a plane if the CRTC of the old plane state needs a modesetting
* the drivers need to disable the planes in their CRTC disable callbacks * operation. Of course, the drivers need to disable the planes in their CRTC
* since no one else would do that. * disable callbacks since no one else would do that.
* *
* The drm_atomic_helper_commit() default implementation doesn't set the * The drm_atomic_helper_commit() default implementation doesn't set the
* ACTIVE_ONLY flag to most closely match the behaviour of the legacy helpers. * ACTIVE_ONLY flag to most closely match the behaviour of the legacy helpers.
@ -1872,7 +1878,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_planes_on_crtc);
* planes. * planes.
* *
* It is a bug to call this function without having implemented the * 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 void
drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_state, drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_state,
@ -1959,8 +1965,8 @@ EXPORT_SYMBOL(drm_atomic_helper_cleanup_planes);
* contains the old state. Also do any other cleanup required with that state. * 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 * @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 * the &drm_plane.state, &drm_crtc.state or &drm_connector.state pointer. With
* current atomic helpers this is almost always the case, since the helpers * the current atomic helpers this is almost always the case, since the helpers
* don't pass the right state structures to the callbacks. * don't pass the right state structures to the callbacks.
*/ */
void drm_atomic_helper_swap_state(struct drm_atomic_state *state, void drm_atomic_helper_swap_state(struct drm_atomic_state *state,
@ -2890,8 +2896,8 @@ EXPORT_SYMBOL(drm_atomic_helper_page_flip_target);
* *
* This is the main helper function provided by the atomic helper framework for * This is the main helper function provided by the atomic helper framework for
* implementing the legacy DPMS connector interface. It computes the new desired * implementing the legacy DPMS connector interface. It computes the new desired
* ->active state for the corresponding CRTC (if the connector is enabled) and * &drm_crtc_state.active state for the corresponding CRTC (if the connector is
* updates it. * enabled) and updates it.
* *
* Returns: * Returns:
* Returns 0 on success, negative errno numbers on failure. * Returns 0 on success, negative errno numbers on failure.
@ -2963,11 +2969,11 @@ backoff:
EXPORT_SYMBOL(drm_atomic_helper_connector_dpms); EXPORT_SYMBOL(drm_atomic_helper_connector_dpms);
/** /**
* drm_atomic_helper_best_encoder - Helper for &drm_connector_helper_funcs * drm_atomic_helper_best_encoder - Helper for
* ->best_encoder callback * &drm_connector_helper_funcs.best_encoder callback
* @connector: Connector control structure * @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 * connectors that support exactly 1 encoder, statically determined at driver
* init time. * init time.
*/ */
@ -3001,7 +3007,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 * @crtc: drm CRTC
* *
* Resets the atomic state for @crtc by freeing the state pointer (which might * Resets the atomic state for @crtc by freeing the state pointer (which might
@ -3108,7 +3114,7 @@ void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state); 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 * @plane: drm plane
* *
* Resets the atomic state for @plane by freeing the state pointer (which might * Resets the atomic state for @plane by freeing the state pointer (which might
@ -3212,8 +3218,9 @@ EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state);
* @conn_state: connector state to assign * @conn_state: connector state to assign
* *
* Initializes the newly allocated @conn_state and assigns it to * Initializes the newly allocated @conn_state and assigns it to
* #connector ->state, usually required when initializing the drivers * the &drm_conector->state pointer of @connector, usually required when
* or when called from the ->reset hook. * initializing the drivers or when called from the &drm_connector_funcs.reset
* hook.
* *
* This is useful for drivers that subclass the connector state. * This is useful for drivers that subclass the connector state.
*/ */
@ -3229,7 +3236,7 @@ __drm_atomic_helper_connector_reset(struct drm_connector *connector,
EXPORT_SYMBOL(__drm_atomic_helper_connector_reset); 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 * @connector: drm connector
* *
* Resets the atomic state for @connector by freeing the state pointer (which * Resets the atomic state for @connector by freeing the state pointer (which

View File

@ -53,9 +53,9 @@
* configuration on resume with drm_helper_resume_force_mode(). * configuration on resume with drm_helper_resume_force_mode().
* *
* Note that this helper library doesn't track the current power state of CRTCs * 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 * and encoders. It can call callbacks like &drm_encoder_helper_funcs.dpms even
* already in the desired state. This deficiency has been fixed in the atomic * though the hardware is already in the desired state. This deficiency has been
* helpers. * fixed in the atomic helpers.
* *
* The driver callbacks are mostly compatible with the atomic modeset 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 * 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 * drm_crtc_helper_set_config - set a new config from userspace
* @set: mode set configuration * @set: mode set configuration
* *
* The drm_crtc_helper_set_config() helper function implements the set_config * The drm_crtc_helper_set_config() helper function implements the of
* callback of &struct drm_crtc_funcs for drivers using the legacy CRTC helpers. * &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 * It first tries to locate the best encoder for each connector by calling the
* connector ->best_encoder() (&struct drm_connector_helper_funcs) helper * connector @drm_connector_helper_funcs.best_encoder helper operation.
* operation.
* *
* After locating the appropriate encoders, the helper function will call the * After locating the appropriate encoders, the helper function will call the
* mode_fixup encoder and CRTC helper operations to adjust the requested mode, * 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 * 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 * 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 * will call the CRTC &drm_crtc_helper_funcs.mode_set_base helper operation.
* operation.
* *
* If the adjusted mode differs from the current mode, or if the * If the adjusted mode differs from the current mode, or if the
* ->mode_set_base() helper operation is not provided, the helper function * ->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 * @connector: affected connector
* @mode: DPMS mode * @mode: DPMS mode
* *
* The drm_helper_connector_dpms() helper function implements the ->dpms() * The drm_helper_connector_dpms() helper function implements the
* callback of &struct drm_connector_funcs for drivers using the legacy CRTC helpers. * &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 * This is the main helper function provided by the CRTC helper framework for
* implementing the DPMS connector attribute. It computes the new desired DPMS * 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() * state for all encoders and CRTCs in the output mesh and calls the
* callbacks provided by the driver in &struct drm_crtc_helper_funcs and struct * &drm_crtc_helper_funcs.dpms and &drm_encoder_helper_funcs.dpms callbacks
* &drm_encoder_helper_funcs appropriately. * provided by the driver.
* *
* This function is deprecated. New drivers must implement atomic modeset * This function is deprecated. New drivers must implement atomic modeset
* support, for which this function is unsuitable. Instead drivers should use * support, for which this function is unsuitable. Instead drivers should use

View File

@ -725,7 +725,7 @@ MODULE_PARM_DESC(dp_aux_i2c_speed_khz,
/* /*
* Transfer a single I2C-over-AUX message and handle various error conditions, * Transfer a single I2C-over-AUX message and handle various error conditions,
* retrying the transaction as appropriate. It is assumed that the * 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. * reply field.
* *
* Returns bytes transferred on success, or a negative error code on failure. * Returns bytes transferred on success, or a negative error code on failure.

View File

@ -66,11 +66,11 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
* Teardown is done with drm_fb_helper_fini(). * Teardown is done with drm_fb_helper_fini().
* *
* At runtime drivers should restore the fbdev console by calling * At runtime drivers should restore the fbdev console by calling
* drm_fb_helper_restore_fbdev_mode_unlocked() from their ->lastclose callback. * drm_fb_helper_restore_fbdev_mode_unlocked() from their &drm_driver.lastclose
* They should also notify the fb helper code from updates to the output * callback. They should also notify the fb helper code from updates to the
* configuration by calling drm_fb_helper_hotplug_event(). For easier * output configuration by calling drm_fb_helper_hotplug_event(). For easier
* integration with the output polling code in drm_crtc_helper.c the modeset * 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 * All other functions exported by the fb helper library can be used to
* implement the fbdev driver interface by the driver. * 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() * hotplug detection using the fbdev helpers. The drm_fb_helper_prepare()
* helper must be called first to initialize the minimum required to make * 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 * 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 * it is safe to enable interrupts and start processing hotplug events. At the
* same time, drivers should initialize all modeset objects such as CRTCs, * same time, drivers should initialize all modeset objects such as CRTCs,
* encoders and connectors. To finish up the fbdev helper initialization, the * 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 * should call drm_fb_helper_single_add_all_connectors() followed by
* drm_fb_helper_initial_config(). * 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 * 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 * 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 * 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 * 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 * @info: fbdev registered by the helper
*/ */
int drm_fb_helper_debug_enter(struct fb_info *info) 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 * @info: fbdev registered by the helper
*/ */
int drm_fb_helper_debug_leave(struct fb_info *info) 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 * drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration
* @fb_helper: fbcon to restore * @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 * 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. * 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 * @blank: desired blanking state
* @info: fbdev registered by the helper * @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 * @info: fb_info struct pointer
* @pagelist: list of dirty mmap framebuffer pages * @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. * callback function for flushing the fbdev mmap writes.
*/ */
void drm_fb_helper_deferred_io(struct fb_info *info, 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. * due to all the printk activity.
* *
* This function can be called multiple times with the same state since * 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. * 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 * @cmap: cmap to set
* @info: fbdev registered by the helper * @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); 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 * @var: screeninfo to check
* @info: fbdev registered by the helper * @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); 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 * @info: fbdev registered by the helper
* *
* This will let fbcon do the mode init and is called at initialization time by * This will let fbcon do the mode init and is called at initialization time by
@ -1422,7 +1422,7 @@ backoff:
} }
/** /**
* 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 * @var: updated screen information
* @info: fbdev registered by the helper * @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. * additional constraints need to set up their own limits.
* *
* Drivers should call this (or their equivalent setup code) from their * 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, void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
uint32_t depth) uint32_t depth)
@ -1636,11 +1636,11 @@ EXPORT_SYMBOL(drm_fb_helper_fill_fix);
* @fb_height: desired fb height * @fb_height: desired fb height
* *
* Sets up the variable fbdev metainformation from the given fb helper instance * 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 * Drivers should call this (or their equivalent setup code) from their
* ->fb_probe callback after having allocated the fbdev backing * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev
* storage framebuffer. * backing storage framebuffer.
*/ */
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
uint32_t fb_width, uint32_t fb_height) uint32_t fb_width, uint32_t fb_height)
@ -2207,9 +2207,9 @@ out:
* Note that this also registers the fbdev and so allows userspace to call into * Note that this also registers the fbdev and so allows userspace to call into
* the driver through the fbdev interfaces. * the driver through the fbdev interfaces.
* *
* This function will call down into the ->fb_probe callback to let * This function will call down into the &drm_fb_helper_funcs.fb_probe callback
* the driver allocate and initialize the fbdev info structure and the drm * to let the driver allocate and initialize the fbdev info structure and the
* framebuffer used to back the fbdev. drm_fb_helper_fill_var() and * 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 * drm_fb_helper_fill_fix() are provided as helpers to setup simple default
* values for the fbdev info structure. * values for the fbdev info structure.
* *

View File

@ -39,9 +39,9 @@
* *
* This helper library has two parts. The first part has support to implement * This helper library has two parts. The first part has support to implement
* primary plane support on top of the normal CRTC configuration interface. * primary plane support on top of the normal CRTC configuration interface.
* Since the legacy ->set_config interface ties the primary plane together with * Since the legacy &drm_mode_config_funcs.set_config interface ties the primary
* the CRTC state this does not allow userspace to disable the primary plane * plane together with the CRTC state this does not allow userspace to disable
* itself. To avoid too much duplicated code use * the primary plane itself. To avoid too much duplicated code use
* drm_plane_helper_check_update() which can be used to enforce the same * drm_plane_helper_check_update() which can be used to enforce the same
* restrictions as primary planes had thus. The default primary plane only * restrictions as primary planes had thus. The default primary plane only
* expose XRBG8888 and ARGB8888 as valid pixel formats for the attached * 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 * is called in response to a userspace SetPlane operation on the plane with a
* NULL framebuffer parameter. It unconditionally fails the disable call with * NULL framebuffer parameter. It unconditionally fails the disable call with
* -EINVAL the only way to disable the primary plane without driver support is * -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 * Note that some hardware may be able to disable the primary plane without
* disabling the whole CRTC. Drivers for such hardware should provide their * disabling the whole CRTC. Drivers for such hardware should provide their

View File

@ -43,7 +43,7 @@
* DOC: output probing helper overview * DOC: output probing helper overview
* *
* This library provides some helper code for output probing. It provides an * 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. * drm_helper_probe_single_connector_modes.
* *
* It also provides support for polling connectors with a work item and for * It also provides support for polling connectors with a work item and for
@ -174,9 +174,9 @@ drm_connector_detect(struct drm_connector *connector, bool force)
* be added to the connector's probed_modes list, then culled (based on validity * 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. * and the @maxX, @maxY parameters) and put into the normal modes list.
* *
* Intended to be used as a generic implementation of the ->fill_modes() * Intended to be used as a generic implementation of the
* @connector vfunc for drivers that use the CRTC helpers for output mode * &drm_connector_funcs.fill_modes() vfunc for drivers that use the CRTC helpers
* filtering and detection. * for output mode filtering and detection.
* *
* The basic procedure is as follows * The basic procedure is as follows
* *
@ -188,7 +188,7 @@ drm_connector_detect(struct drm_connector *connector, bool force)
* *
* - debugfs 'override_edid' (used for testing only) * - debugfs 'override_edid' (used for testing only)
* - firmware EDID (drm_load_edid_firmware()) * - 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 * - if the connector status is connector_status_connected, standard
* VESA DMT modes up to 1024x768 are automatically added * VESA DMT modes up to 1024x768 are automatically added
* (drm_add_modes_noedid()) * (drm_add_modes_noedid())
@ -209,8 +209,8 @@ drm_connector_detect(struct drm_connector *connector, bool force)
* (if specified) * (if specified)
* - drm_mode_validate_flag() checks the modes againt basic connector * - drm_mode_validate_flag() checks the modes againt basic connector
* capabilites (interlace_allowed,doublescan_allowed,stereo_allowed) * capabilites (interlace_allowed,doublescan_allowed,stereo_allowed)
* - the optional connector ->mode_valid() helper can perform driver and/or * - the optional &drm_connector_helper_funcs.mode_valid helper can perform
* hardware specific checks * driver and/or hardware specific checks
* *
* 5. Any mode whose status is not OK is pruned from the connector's modes list, * 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 * accompanied by a debug message indicating the reason for the mode's

View File

@ -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 * This iterates over the current state, useful (for example) when applying
* atomic state after it has been checked and swapped. To iterate over the * 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(). * drm_atomic_crtc_state_for_each_plane().
*/ */
#define drm_atomic_crtc_for_each_plane(plane, crtc) \ #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 * @crtc_state: the incoming crtc-state
* *
* Similar to drm_crtc_for_each_plane(), but iterates the planes that will be * 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) * attached if the specified state is applied. Useful during for example
* ->atomic_check() operations, to validate the incoming state. * 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) \ #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) 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 * @crtc_state: the incoming crtc-state
* *
* Similar to drm_crtc_for_each_plane(), but iterates the planes that will be * 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) * attached if the specified state is applied. Useful during for example
* ->atomic_check() operations, to validate the incoming state. * 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 * 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 * const plane_state. This is useful when a driver just wants to peek at other

View File

@ -493,8 +493,8 @@ struct drm_dp_mst_topology_mgr {
int total_pbn; int total_pbn;
/** /**
* @qlock: protects @tx_msg_downq, the tx_slots in struct * @qlock: protects @tx_msg_downq, the &drm_dp_mst_branch.txslost and
* &drm_dp_mst_branch and txmsg->state once they are queued * &drm_dp_sideband_msg_tx.state once they are queued
*/ */
struct mutex qlock; struct mutex qlock;
/** /**
@ -508,8 +508,7 @@ struct drm_dp_mst_topology_mgr {
struct mutex payload_lock; struct mutex payload_lock;
/** /**
* @proposed_vcpis: Array of pointers for the new VCPI allocation. The * @proposed_vcpis: Array of pointers for the new VCPI allocation. The
* VCPI structure itself is embedded into the corresponding * VCPI structure itself is &drm_dp_mst_port.vcpi.
* &drm_dp_mst_port structure.
*/ */
struct drm_dp_vcpi **proposed_vcpis; struct drm_dp_vcpi **proposed_vcpis;
/** /**

View File

@ -54,7 +54,7 @@ typedef void (*drm_flip_func_t)(struct drm_flip_work *work, void *val);
/** /**
* struct drm_flip_task - flip work task * struct drm_flip_task - flip work task
* @node: list entry element * @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 drm_flip_task {
struct list_head node; struct list_head node;

View File

@ -111,9 +111,9 @@ struct drm_crtc_helper_funcs {
* This callback is used to validate a mode. The parameter mode is the * This callback is used to validate a mode. The parameter mode is the
* display mode that userspace requested, adjusted_mode is the mode 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 * encoders need to be fed with. Note that this is the inverse semantics
* of the meaning for the &drm_encoder and &drm_bridge * of the meaning for the &drm_encoder and &drm_bridge_funcs.mode_fixup
* ->mode_fixup() functions. If the CRTC cannot support the requested * vfunc. If the CRTC cannot support the requested conversion from mode
* conversion from mode to adjusted_mode it should reject the modeset. * to adjusted_mode it should reject the modeset.
* *
* This function is used by both legacy CRTC helpers and atomic helpers. * This function is used by both legacy CRTC helpers and atomic helpers.
* With atomic helpers it is optional. * 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 * Also beware that neither core nor helpers filter modes before
* passing them to the driver: While the list of modes that is * passing them to the driver: While the list of modes that is
* advertised to userspace is filtered using the connector's * advertised to userspace is filtered using the
* ->mode_valid() callback, neither the core nor the helpers do any * &drm_connector.mode_valid callback, neither the core nor the helpers
* filtering on modes passed in from userspace when setting a mode. It * do any filtering on modes passed in from userspace when setting a
* is therefore possible for userspace to pass in a mode that was * mode. It is therefore possible for userspace to pass in a mode that
* previously filtered out using ->mode_valid() or add a custom mode * was previously filtered out using &drm_connector.mode_valid or add a
* that wasn't probed from EDID or similar to begin with. Even though * custom mode that wasn't probed from EDID or similar to begin with.
* this is an advanced feature and rarely used nowadays, some users rely * Even though this is an advanced feature and rarely used nowadays,
* on being able to specify modes manually so drivers must be prepared * some users rely on being able to specify modes manually so drivers
* to deal with it. Specifically this means that all drivers need not * must be prepared to deal with it. Specifically this means that all
* only validate modes in ->mode_valid() but also in ->mode_fixup() to * drivers need not only validate modes in &drm_connector.mode_valid but
* make sure invalid modes passed in from userspace are rejected. * 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: * RETURNS:
* *
@ -205,7 +206,7 @@ struct drm_crtc_helper_funcs {
* optimized fast-path instead of a full mode set operation with all the * optimized fast-path instead of a full mode set operation with all the
* resulting flickering. If it is not present * resulting flickering. If it is not present
* drm_crtc_helper_set_config() will fall back to a full modeset, using * 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. * incompatible with atomic modeset support.
* *
* This callback is only used by the CRTC helpers and deprecated. * This callback is only used by the CRTC helpers and deprecated.
@ -238,8 +239,7 @@ struct drm_crtc_helper_funcs {
/** /**
* @load_lut: * @load_lut:
* *
* Load a LUT prepared with the @gamma_set functions from * Load a LUT prepared with the &drm_fb_helper_funcs.gamma_set vfunc.
* &drm_fb_helper_funcs.
* *
* This callback is optional and is only used by the fbdev emulation * This callback is optional and is only used by the fbdev emulation
* helpers. * helpers.
@ -257,10 +257,11 @@ struct drm_crtc_helper_funcs {
* *
* This callback should be used to disable the CRTC. With the atomic * This callback should be used to disable the CRTC. With the atomic
* drivers it is called after all encoders connected to this CRTC have * drivers it is called after all encoders connected to this CRTC have
* been shut off already using their own ->disable hook. If that * been shut off already using their own
* sequence is too simple drivers can just add their own hooks and call * &drm_encoder_helper_funcs.disable hook. If that sequence is too
* it from this CRTC callback here by looping over all encoders * simple drivers can just add their own hooks and call it from this
* connected to it using for_each_encoder_on_crtc(). * 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. * 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 * 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 * This callback should be used to enable the CRTC. With the atomic
* drivers it is called before all encoders connected to this CRTC are * drivers it is called before all encoders connected to this CRTC are
* enabled through the encoder's own ->enable hook. If that sequence is * enabled through the encoder's own &drm_encoder_helper_funcs.enable
* too simple drivers can just add their own hooks and call it from this * hook. If that sequence is too simple drivers can just add their own
* CRTC callback here by looping over all encoders connected to it using * hooks and call it from this CRTC callback here by looping over all
* for_each_encoder_on_crtc(). * encoders connected to it using for_each_encoder_on_crtc().
* *
* This hook is used only by atomic helpers, for symmetry with @disable. * 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 * 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 * beforehand. This is calling order used by the default helper
* implementation in drm_atomic_helper_check(). * implementation in drm_atomic_helper_check().
* *
* When using drm_atomic_helper_check_planes() CRTCs' ->atomic_check() * When using drm_atomic_helper_check_planes() this hook is called
* hooks are called after the ones for planes, which allows drivers to * after the &drm_plane_helper_funcs.atomc_check hook for planes, which
* assign shared resources requested by planes in the CRTC callback * allows drivers to assign shared resources requested by planes in this
* here. For more complicated dependencies the driver can call the provided * callback here. For more complicated dependencies the driver can call
* check helpers multiple times until the computed state has a final * the provided check helpers multiple times until the computed state
* configuration and everything has been checked. * has a final configuration and everything has been checked.
* *
* This function is also allowed to inspect any other object's state and * 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 * 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 * these added states are all called, and derived state in other objects
* all updated. Again the recommendation is to just call check helpers * all updated. Again the recommendation is to just call check helpers
* until a maximal configuration is reached. * 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 * This callback should be used to disable the CRTC. With the atomic
* drivers it is called after all encoders connected to this CRTC have * drivers it is called after all encoders connected to this CRTC have
* been shut off already using their own ->disable hook. If that * been shut off already using their own
* sequence is too simple drivers can just add their own hooks and call * &drm_encoder_helper_funcs.disable hook. If that sequence is too
* it from this CRTC callback here by looping over all encoders * simple drivers can just add their own hooks and call it from this
* connected to it using for_each_encoder_on_crtc(). * 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 * 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 * 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 * Also beware that neither core nor helpers filter modes before
* passing them to the driver: While the list of modes that is * passing them to the driver: While the list of modes that is
* advertised to userspace is filtered using the connector's * advertised to userspace is filtered using the connector's
* ->mode_valid() callback, neither the core nor the helpers do any * &drm_connector_helper_funcs.mode_valid callback, neither the core nor
* filtering on modes passed in from userspace when setting a mode. It * the helpers do any filtering on modes passed in from userspace when
* is therefore possible for userspace to pass in a mode that was * setting a mode. It is therefore possible for userspace to pass in a
* previously filtered out using ->mode_valid() or add a custom mode * mode that was previously filtered out using
* that wasn't probed from EDID or similar to begin with. Even though * &drm_connector_helper_funcs.mode_valid or add a custom mode that
* this is an advanced feature and rarely used nowadays, some users rely * wasn't probed from EDID or similar to begin with. Even though this
* on being able to specify modes manually so drivers must be prepared * is an advanced feature and rarely used nowadays, some users rely on
* to deal with it. Specifically this means that all drivers need not * being able to specify modes manually so drivers must be prepared to
* only validate modes in ->mode_valid() but also in ->mode_fixup() to * deal with it. Specifically this means that all drivers need not only
* make sure invalid modes passed in from userspace are rejected. * 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: * RETURNS:
* *
@ -544,7 +548,7 @@ struct drm_encoder_helper_funcs {
* use this hook, because the helper library calls it only once and not * 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 * every time the display pipeline is suspend using either DPMS or the
* new "ACTIVE" property. Such drivers should instead move all their * 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 * This callback is used both by the legacy CRTC helpers and the atomic
* modeset helpers. It is optional in the atomic helpers. * 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 * 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 * every time the display pipeline is suspended using either DPMS or the
* new "ACTIVE" property. Such drivers should instead move all their * 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 * 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 * @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 * 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 * 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 * using their own &drm_crtc_helper_funcs.disable hook. If that
* drivers can just add their own driver private encoder hooks and call * sequence is too simple drivers can just add their own driver private
* them from CRTC's callback by looping over all encoders connected to * encoder hooks and call them from CRTC's callback by looping over all
* it using for_each_encoder_on_crtc(). * encoders connected to it using for_each_encoder_on_crtc().
* *
* This hook is used both by legacy CRTC helpers and atomic helpers. * 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 * 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 * 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 * 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 * their own &drm_crtc_helper_funcs.enable hook. If that sequence is
* can just add their own driver private encoder hooks and call them * too simple drivers can just add their own driver private encoder
* from CRTC's callback by looping over all encoders connected to it * hooks and call them from CRTC's callback by looping over all encoders
* using for_each_encoder_on_crtc(). * connected to it using for_each_encoder_on_crtc().
* *
* This hook is used only by atomic helpers, for symmetry with @disable. * 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 * 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: * @get_modes:
* *
* This function should fill in all modes currently valid for the sink * 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(). * EDID property by calling drm_mode_connector_update_edid_property().
* *
* The usual way to implement this is to cache the EDID retrieved in the * 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 * them by calling drm_add_edid_modes(). But connectors that driver a
* fixed panel can also manually add specific modes using * fixed panel can also manually add specific modes using
* drm_mode_probed_add(). Drivers which manually add modes should also * 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 * make sure that the &drm_connector.display_info,
* &struct drm_connector are filled in. * &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 * Virtual drivers that just want some standard VESA mode with a given
* resolution can call drm_add_modes_noedid(), and mark the preferred * 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 * Finally drivers that support audio probably want to update the ELD
* data, too, using drm_edid_to_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 * that a sink is connected and when the EDID isn't overridden through
* sysfs or the kernel commandline. * sysfs or the kernel commandline.
* *
@ -768,8 +773,8 @@ struct drm_connector_helper_funcs {
* *
* RETURNS: * RETURNS:
* *
* Either MODE_OK or one of the failure reasons in enum * Either &drm_mode_status.MODE_OK or one of the failure reasons in &enum
* &drm_mode_status. * drm_mode_status.
*/ */
enum drm_mode_status (*mode_valid)(struct drm_connector *connector, enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
struct drm_display_mode *mode); struct drm_display_mode *mode);
@ -875,7 +880,7 @@ struct drm_plane_helper_funcs {
* RETURNS: * RETURNS:
* *
* 0 on success or one of the following negative error codes allowed by * 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, * this callback is the only one which can fail an atomic commit,
* everything else must complete successfully. * everything else must complete successfully.
*/ */
@ -898,7 +903,7 @@ struct drm_plane_helper_funcs {
* *
* Drivers should check plane specific constraints in this hook. * 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 * hooks are called before the ones for CRTCs, which allows drivers to
* request shared resources that the CRTC controls here. For more * request shared resources that the CRTC controls here. For more
* complicated dependencies the driver can call the provided check helpers * 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 * 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 * 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 * these added states are all called, and derived state in other objects
* all updated. Again the recommendation is to just call check helpers * all updated. Again the recommendation is to just call check helpers
* until a maximal configuration is reached. * until a maximal configuration is reached.
@ -936,8 +941,8 @@ struct drm_plane_helper_funcs {
* @atomic_update: * @atomic_update:
* *
* Drivers should use this function to update the plane state. This * Drivers should use this function to update the plane state. This
* hook is called in-between the ->atomic_begin() and * hook is called in-between the &drm_crtc_helper_funcs.atomic_begin and
* ->atomic_flush() of &drm_crtc_helper_funcs. * drm_crtc_helper_funcs.atomic_flush callbacks.
* *
* Note that the power state of the display pipe when this function is * Note that the power state of the display pipe when this function is
* called depends upon the exact helpers and calling sequence the driver * called depends upon the exact helpers and calling sequence the driver
@ -953,14 +958,15 @@ struct drm_plane_helper_funcs {
* @atomic_disable: * @atomic_disable:
* *
* Drivers should use this function to unconditionally disable a plane. * Drivers should use this function to unconditionally disable a plane.
* This hook is called in-between the ->atomic_begin() and * This hook is called in-between the
* ->atomic_flush() of &drm_crtc_helper_funcs. It is an alternative to * &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 * @atomic_update, which will be called for disabling planes, too, if
* the @atomic_disable hook isn't implemented. * the @atomic_disable hook isn't implemented.
* *
* This hook is also useful to disable planes in preparation of a modeset, * This hook is also useful to disable planes in preparation of a modeset,
* by calling drm_atomic_helper_disable_planes_on_crtc() from the * 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 * Note that the power state of the display pipe when this function is
* called depends upon the exact helpers and calling sequence the driver * called depends upon the exact helpers and calling sequence the driver

View File

@ -77,9 +77,9 @@ struct drm_simple_display_pipe_funcs {
/** /**
* @prepare_fb: * @prepare_fb:
* *
* Optional, called by &struct drm_plane_helper_funcs ->prepare_fb . * Optional, called by &drm_plane_helper_funcs.prepare_fb. Please read
* Please read the documentation for the ->prepare_fb hook in * the documentation for the &drm_plane_helper_funcs.prepare_fb hook for
* &struct drm_plane_helper_funcs for more details. * more details.
*/ */
int (*prepare_fb)(struct drm_simple_display_pipe *pipe, int (*prepare_fb)(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state); struct drm_plane_state *plane_state);
@ -87,9 +87,9 @@ struct drm_simple_display_pipe_funcs {
/** /**
* @cleanup_fb: * @cleanup_fb:
* *
* Optional, called by &struct drm_plane_helper_funcs ->cleanup_fb . * Optional, called by &drm_plane_helper_funcs.cleanup_fb. Please read
* Please read the documentation for the ->cleanup_fb hook in * the documentation for the &drm_plane_helper_funcs.cleanup_fb hook for
* &struct drm_plane_helper_funcs for more details. * more details.
*/ */
void (*cleanup_fb)(struct drm_simple_display_pipe *pipe, void (*cleanup_fb)(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state); struct drm_plane_state *plane_state);