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

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

+196 -180
+51 -44
drivers/gpu/drm/drm_atomic_helper.c
··· 458 458 * Check the state object to see if the requested state is physically possible. 459 459 * This does all the crtc and connector related computations for an atomic 460 460 * update and adds any additional connectors needed for full modesets and calls 461 - * down into ->mode_fixup functions of the driver backend. 461 + * down into &drm_crtc_helper_funcs.mode_fixup and 462 + * &drm_encoder_helper_funcs.mode_fixup or 463 + * &drm_encoder_helper_funcs.atomic_check functions of the driver backend. 462 464 * 463 - * crtc_state->mode_changed is set when the input mode is changed. 464 - * crtc_state->connectors_changed is set when a connector is added or 465 - * removed from the crtc. 466 - * crtc_state->active_changed is set when crtc_state->active changes, 467 - * which is used for dpms. 465 + * &drm_crtc_state.mode_changed is set when the input mode is changed. 466 + * &drm_crtc_state.connectors_changed is set when a connector is added or 467 + * removed from the crtc. &drm_crtc_state.active_changed is set when 468 + * &drm_crtc_state.active changes, which is used for DPMS. 468 469 * See also: drm_atomic_crtc_needs_modeset() 469 470 * 470 471 * IMPORTANT: 471 472 * 472 - * Drivers which set ->mode_changed (e.g. in their ->atomic_check hooks if a 473 - * plane update can't be done without a full modeset) _must_ call this function 474 - * afterwards after that change. It is permitted to call this function multiple 475 - * times for the same update, e.g. when the ->atomic_check functions depend upon 476 - * the adjusted dotclock for fifo space allocation and watermark computation. 473 + * Drivers which set &drm_crtc_state.mode_changed (e.g. in their 474 + * &drm_plane_helper_funcs.atomic_check hooks if a plane update can't be done 475 + * without a full modeset) _must_ call this function afterwards after that 476 + * change. It is permitted to call this function multiple times for the same 477 + * update, e.g. when the &drm_crtc_helper_funcs.atomic_check functions depend 478 + * upon the adjusted dotclock for fifo space allocation and watermark 479 + * computation. 477 480 * 478 481 * RETURNS: 479 482 * Zero for success or -errno ··· 587 584 * 588 585 * Check the state object to see if the requested state is physically possible. 589 586 * This does all the plane update related checks using by calling into the 590 - * ->atomic_check hooks provided by the driver. 587 + * &drm_crtc_helper_funcs.atomic_check and &drm_plane_helper_funcs.atomic_check 588 + * hooks provided by the driver. 591 589 * 592 - * It also sets crtc_state->planes_changed to indicate that a crtc has 590 + * It also sets &drm_crtc_state.planes_changed to indicate that a crtc has 593 591 * updated planes. 594 592 * 595 593 * RETURNS: ··· 652 648 * Check the state object to see if the requested state is physically possible. 653 649 * Only crtcs and planes have check callbacks, so for any additional (global) 654 650 * checking that a driver needs it can simply wrap that around this function. 655 - * Drivers without such needs can directly use this as their ->atomic_check() 656 - * callback. 651 + * Drivers without such needs can directly use this as their 652 + * &drm_mode_config_funcs.atomic_check callback. 657 653 * 658 654 * This just wraps the two parts of the state checking for planes and modeset 659 655 * state in the default order: First it calls drm_atomic_helper_check_modeset() 660 656 * and then drm_atomic_helper_check_planes(). The assumption is that the 661 - * ->atomic_check functions depend upon an updated adjusted_mode.clock to 662 - * e.g. properly compute watermarks. 657 + * @drm_plane_helper_funcs.atomic_check and @drm_crtc_helper_funcs.atomic_check 658 + * functions depend upon an updated adjusted_mode.clock to e.g. properly compute 659 + * watermarks. 663 660 * 664 661 * RETURNS: 665 662 * Zero for success or -errno ··· 1130 1125 * drm_atomic_helper_commit_tail - commit atomic update to hardware 1131 1126 * @old_state: atomic state object with old state structures 1132 1127 * 1133 - * This is the default implemenation for the ->atomic_commit_tail() hook of the 1134 - * &drm_mode_config_helper_funcs vtable. 1128 + * This is the default implementation for the 1129 + * &drm_mode_config_helper_funcs.atomic_commit_tail hook. 1135 1130 * 1136 1131 * Note that the default ordering of how the various stages are called is to 1137 1132 * match the legacy modeset helper library closest. One peculiarity of that is ··· 1208 1203 * drm_atomic_helper_setup_commit() and related functions. 1209 1204 * 1210 1205 * Committing the actual hardware state is done through the 1211 - * ->atomic_commit_tail() callback of the &drm_mode_config_helper_funcs vtable, 1212 - * or it's default implementation drm_atomic_helper_commit_tail(). 1206 + * &drm_mode_config_helper_funcs.atomic_commit_tail callback, or it's default 1207 + * implementation drm_atomic_helper_commit_tail(). 1213 1208 * 1214 1209 * RETURNS: 1215 1210 * Zero for success or -errno. ··· 1376 1371 * 1377 1372 * This function prepares @state to be used by the atomic helper's support for 1378 1373 * nonblocking commits. Drivers using the nonblocking commit infrastructure 1379 - * should always call this function from their ->atomic_commit hook. 1374 + * should always call this function from their 1375 + * &drm_mode_config_funcs.atomic_commit hook. 1380 1376 * 1381 1377 * To be able to use this support drivers need to use a few more helper 1382 1378 * functions. drm_atomic_helper_wait_for_dependencies() must be called before 1383 1379 * actually committing the hardware state, and for nonblocking commits this call 1384 1380 * must be placed in the async worker. See also drm_atomic_helper_swap_state() 1385 1381 * and it's stall parameter, for when a driver's commit hooks look at the 1386 - * ->state pointers of &struct drm_crtc, &drm_plane or &drm_connector directly. 1382 + * &drm_crtc.state, &drm_plane.state or &drm_connector.state pointer directly. 1387 1383 * 1388 1384 * Completion of the hardware commit step must be signalled using 1389 1385 * drm_atomic_helper_commit_hw_done(). After this step the driver is not allowed ··· 1493 1487 * This function waits for all preceeding commits that touch the same CRTC as 1494 1488 * @old_state to both be committed to the hardware (as signalled by 1495 1489 * drm_atomic_helper_commit_hw_done) and executed by the hardware (as signalled 1496 - * by calling drm_crtc_vblank_send_event on the event member of 1497 - * &drm_crtc_state). 1490 + * by calling drm_crtc_vblank_send_event() on the &drm_crtc_state.event). 1498 1491 * 1499 1492 * This is part of the atomic helper support for nonblocking commits, see 1500 1493 * drm_atomic_helper_setup_commit() for an overview. ··· 1630 1625 * @state: atomic state object with new state structures 1631 1626 * 1632 1627 * This function prepares plane state, specifically framebuffers, for the new 1633 - * configuration. If any failure is encountered this function will call 1634 - * ->cleanup_fb on any already successfully prepared framebuffer. 1628 + * configuration, by calling &drm_plane_helper_funcs.prepare_fb. If any failure 1629 + * is encountered this function will call &drm_plane_helper_funcs.cleanup_fb on 1630 + * any already successfully prepared framebuffer. 1635 1631 * 1636 1632 * Returns: 1637 1633 * 0 on success, negative error code on failure. ··· 1712 1706 * 1713 1707 * Drivers may set the NO_DISABLE_AFTER_MODESET flag in @flags if the relevant 1714 1708 * display controllers require to disable a CRTC's planes when the CRTC is 1715 - * disabled. This function would skip the ->atomic_disable call for a plane if 1716 - * the CRTC of the old plane state needs a modesetting operation. Of course, 1717 - * the drivers need to disable the planes in their CRTC disable callbacks 1718 - * since no one else would do that. 1709 + * disabled. This function would skip the &drm_plane_helper_funcs.atomic_disable 1710 + * call for a plane if the CRTC of the old plane state needs a modesetting 1711 + * operation. Of course, the drivers need to disable the planes in their CRTC 1712 + * disable callbacks since no one else would do that. 1719 1713 * 1720 1714 * The drm_atomic_helper_commit() default implementation doesn't set the 1721 1715 * ACTIVE_ONLY flag to most closely match the behaviour of the legacy helpers. ··· 1878 1872 * planes. 1879 1873 * 1880 1874 * It is a bug to call this function without having implemented the 1881 - * ->atomic_disable() plane hook. 1875 + * &drm_plane_helper_funcs.atomic_disable plane hook. 1882 1876 */ 1883 1877 void 1884 1878 drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_state, ··· 1965 1959 * contains the old state. Also do any other cleanup required with that state. 1966 1960 * 1967 1961 * @stall must be set when nonblocking commits for this driver directly access 1968 - * the ->state pointer of &drm_plane, &drm_crtc or &drm_connector. With the 1969 - * current atomic helpers this is almost always the case, since the helpers 1962 + * the &drm_plane.state, &drm_crtc.state or &drm_connector.state pointer. With 1963 + * the current atomic helpers this is almost always the case, since the helpers 1970 1964 * don't pass the right state structures to the callbacks. 1971 1965 */ 1972 1966 void drm_atomic_helper_swap_state(struct drm_atomic_state *state, ··· 2896 2890 * 2897 2891 * This is the main helper function provided by the atomic helper framework for 2898 2892 * implementing the legacy DPMS connector interface. It computes the new desired 2899 - * ->active state for the corresponding CRTC (if the connector is enabled) and 2900 - * updates it. 2893 + * &drm_crtc_state.active state for the corresponding CRTC (if the connector is 2894 + * enabled) and updates it. 2901 2895 * 2902 2896 * Returns: 2903 2897 * Returns 0 on success, negative errno numbers on failure. ··· 2969 2963 EXPORT_SYMBOL(drm_atomic_helper_connector_dpms); 2970 2964 2971 2965 /** 2972 - * drm_atomic_helper_best_encoder - Helper for &drm_connector_helper_funcs 2973 - * ->best_encoder callback 2966 + * drm_atomic_helper_best_encoder - Helper for 2967 + * &drm_connector_helper_funcs.best_encoder callback 2974 2968 * @connector: Connector control structure 2975 2969 * 2976 - * This is a &drm_connector_helper_funcs ->best_encoder callback helper for 2970 + * This is a &drm_connector_helper_funcs.best_encoder callback helper for 2977 2971 * connectors that support exactly 1 encoder, statically determined at driver 2978 2972 * init time. 2979 2973 */ ··· 3007 3001 */ 3008 3002 3009 3003 /** 3010 - * drm_atomic_helper_crtc_reset - default ->reset hook for CRTCs 3004 + * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs 3011 3005 * @crtc: drm CRTC 3012 3006 * 3013 3007 * Resets the atomic state for @crtc by freeing the state pointer (which might ··· 3114 3108 EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state); 3115 3109 3116 3110 /** 3117 - * drm_atomic_helper_plane_reset - default ->reset hook for planes 3111 + * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for planes 3118 3112 * @plane: drm plane 3119 3113 * 3120 3114 * Resets the atomic state for @plane by freeing the state pointer (which might ··· 3218 3212 * @conn_state: connector state to assign 3219 3213 * 3220 3214 * Initializes the newly allocated @conn_state and assigns it to 3221 - * #connector ->state, usually required when initializing the drivers 3222 - * or when called from the ->reset hook. 3215 + * the &drm_conector->state pointer of @connector, usually required when 3216 + * initializing the drivers or when called from the &drm_connector_funcs.reset 3217 + * hook. 3223 3218 * 3224 3219 * This is useful for drivers that subclass the connector state. 3225 3220 */ ··· 3236 3229 EXPORT_SYMBOL(__drm_atomic_helper_connector_reset); 3237 3230 3238 3231 /** 3239 - * drm_atomic_helper_connector_reset - default ->reset hook for connectors 3232 + * drm_atomic_helper_connector_reset - default &drm_connector_funcs.reset hook for connectors 3240 3233 * @connector: drm connector 3241 3234 * 3242 3235 * Resets the atomic state for @connector by freeing the state pointer (which
+14 -14
drivers/gpu/drm/drm_crtc_helper.c
··· 53 53 * configuration on resume with drm_helper_resume_force_mode(). 54 54 * 55 55 * Note that this helper library doesn't track the current power state of CRTCs 56 - * and encoders. It can call callbacks like ->dpms() even though the hardware is 57 - * already in the desired state. This deficiency has been fixed in the atomic 58 - * helpers. 56 + * and encoders. It can call callbacks like &drm_encoder_helper_funcs.dpms even 57 + * though the hardware is already in the desired state. This deficiency has been 58 + * fixed in the atomic helpers. 59 59 * 60 60 * The driver callbacks are mostly compatible with the atomic modeset helpers, 61 61 * except for the handling of the primary plane: Atomic helpers require that the ··· 477 477 * drm_crtc_helper_set_config - set a new config from userspace 478 478 * @set: mode set configuration 479 479 * 480 - * The drm_crtc_helper_set_config() helper function implements the set_config 481 - * callback of &struct drm_crtc_funcs for drivers using the legacy CRTC helpers. 480 + * The drm_crtc_helper_set_config() helper function implements the of 481 + * &drm_crtc_funcs.set_config callback for drivers using the legacy CRTC 482 + * helpers. 482 483 * 483 484 * It first tries to locate the best encoder for each connector by calling the 484 - * connector ->best_encoder() (&struct drm_connector_helper_funcs) helper 485 - * operation. 485 + * connector @drm_connector_helper_funcs.best_encoder helper operation. 486 486 * 487 487 * After locating the appropriate encoders, the helper function will call the 488 488 * mode_fixup encoder and CRTC helper operations to adjust the requested mode, ··· 493 493 * 494 494 * If the adjusted mode is identical to the current mode but changes to the 495 495 * frame buffer need to be applied, the drm_crtc_helper_set_config() function 496 - * will call the CRTC ->mode_set_base() (&struct drm_crtc_helper_funcs) helper 497 - * operation. 496 + * will call the CRTC &drm_crtc_helper_funcs.mode_set_base helper operation. 498 497 * 499 498 * If the adjusted mode differs from the current mode, or if the 500 499 * ->mode_set_base() helper operation is not provided, the helper function ··· 850 851 * @connector: affected connector 851 852 * @mode: DPMS mode 852 853 * 853 - * The drm_helper_connector_dpms() helper function implements the ->dpms() 854 - * callback of &struct drm_connector_funcs for drivers using the legacy CRTC helpers. 854 + * The drm_helper_connector_dpms() helper function implements the 855 + * &drm_connector_funcs.dpms callback for drivers using the legacy CRTC 856 + * helpers. 855 857 * 856 858 * This is the main helper function provided by the CRTC helper framework for 857 859 * implementing the DPMS connector attribute. It computes the new desired DPMS 858 - * state for all encoders and CRTCs in the output mesh and calls the ->dpms() 859 - * callbacks provided by the driver in &struct drm_crtc_helper_funcs and struct 860 - * &drm_encoder_helper_funcs appropriately. 860 + * state for all encoders and CRTCs in the output mesh and calls the 861 + * &drm_crtc_helper_funcs.dpms and &drm_encoder_helper_funcs.dpms callbacks 862 + * provided by the driver. 861 863 * 862 864 * This function is deprecated. New drivers must implement atomic modeset 863 865 * support, for which this function is unsuitable. Instead drivers should use
+1 -1
drivers/gpu/drm/drm_dp_helper.c
··· 725 725 /* 726 726 * Transfer a single I2C-over-AUX message and handle various error conditions, 727 727 * retrying the transaction as appropriate. It is assumed that the 728 - * aux->transfer function does not modify anything in the msg other than the 728 + * &drm_dp_aux.transfer function does not modify anything in the msg other than the 729 729 * reply field. 730 730 * 731 731 * Returns bytes transferred on success, or a negative error code on failure.
+24 -24
drivers/gpu/drm/drm_fb_helper.c
··· 66 66 * Teardown is done with drm_fb_helper_fini(). 67 67 * 68 68 * At runtime drivers should restore the fbdev console by calling 69 - * drm_fb_helper_restore_fbdev_mode_unlocked() from their ->lastclose callback. 70 - * They should also notify the fb helper code from updates to the output 71 - * configuration by calling drm_fb_helper_hotplug_event(). For easier 69 + * drm_fb_helper_restore_fbdev_mode_unlocked() from their &drm_driver.lastclose 70 + * callback. They should also notify the fb helper code from updates to the 71 + * output configuration by calling drm_fb_helper_hotplug_event(). For easier 72 72 * integration with the output polling code in drm_crtc_helper.c the modeset 73 - * code provides a ->output_poll_changed callback. 73 + * code provides a &drm_mode_config_funcs.output_poll_changed callback. 74 74 * 75 75 * All other functions exported by the fb helper library can be used to 76 76 * implement the fbdev driver interface by the driver. ··· 79 79 * hotplug detection using the fbdev helpers. The drm_fb_helper_prepare() 80 80 * helper must be called first to initialize the minimum required to make 81 81 * hotplug detection work. Drivers also need to make sure to properly set up 82 - * the dev->mode_config.funcs member. After calling drm_kms_helper_poll_init() 82 + * the &drm_mode_config.funcs member. After calling drm_kms_helper_poll_init() 83 83 * it is safe to enable interrupts and start processing hotplug events. At the 84 84 * same time, drivers should initialize all modeset objects such as CRTCs, 85 85 * encoders and connectors. To finish up the fbdev helper initialization, the ··· 88 88 * should call drm_fb_helper_single_add_all_connectors() followed by 89 89 * drm_fb_helper_initial_config(). 90 90 * 91 - * If &drm_framebuffer_funcs ->dirty is set, the 91 + * If &drm_framebuffer_funcs.dirty is set, the 92 92 * drm_fb_helper_{cfb,sys}_{write,fillrect,copyarea,imageblit} functions will 93 - * accumulate changes and schedule &drm_fb_helper ->dirty_work to run right 93 + * accumulate changes and schedule &drm_fb_helper.dirty_work to run right 94 94 * away. This worker then calls the dirty() function ensuring that it will 95 95 * always run in process context since the fb_*() function could be running in 96 96 * atomic context. If drm_fb_helper_deferred_io() is used as the deferred_io ··· 247 247 } 248 248 249 249 /** 250 - * drm_fb_helper_debug_enter - implementation for ->fb_debug_enter 250 + * drm_fb_helper_debug_enter - implementation for &fb_ops.fb_debug_enter 251 251 * @info: fbdev registered by the helper 252 252 */ 253 253 int drm_fb_helper_debug_enter(struct fb_info *info) ··· 296 296 } 297 297 298 298 /** 299 - * drm_fb_helper_debug_leave - implementation for ->fb_debug_leave 299 + * drm_fb_helper_debug_leave - implementation for &fb_ops.fb_debug_leave 300 300 * @info: fbdev registered by the helper 301 301 */ 302 302 int drm_fb_helper_debug_leave(struct fb_info *info) ··· 445 445 * drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration 446 446 * @fb_helper: fbcon to restore 447 447 * 448 - * This should be called from driver's drm ->lastclose callback 448 + * This should be called from driver's drm &drm_driver.lastclose callback 449 449 * when implementing an fbcon on top of kms using this helper. This ensures that 450 450 * the user isn't greeted with a black screen when e.g. X dies. 451 451 * ··· 585 585 } 586 586 587 587 /** 588 - * drm_fb_helper_blank - implementation for ->fb_blank 588 + * drm_fb_helper_blank - implementation for &fb_ops.fb_blank 589 589 * @blank: desired blanking state 590 590 * @info: fbdev registered by the helper 591 591 */ ··· 912 912 * @info: fb_info struct pointer 913 913 * @pagelist: list of dirty mmap framebuffer pages 914 914 * 915 - * This function is used as the &fb_deferred_io ->deferred_io 915 + * This function is used as the &fb_deferred_io.deferred_io 916 916 * callback function for flushing the fbdev mmap writes. 917 917 */ 918 918 void drm_fb_helper_deferred_io(struct fb_info *info, ··· 1103 1103 * due to all the printk activity. 1104 1104 * 1105 1105 * This function can be called multiple times with the same state since 1106 - * &fb_info->state is checked to see if fbdev is running or not before locking. 1106 + * &fb_info.state is checked to see if fbdev is running or not before locking. 1107 1107 * 1108 1108 * Use drm_fb_helper_set_suspend() if you need to take the lock yourself. 1109 1109 */ ··· 1181 1181 } 1182 1182 1183 1183 /** 1184 - * drm_fb_helper_setcmap - implementation for ->fb_setcmap 1184 + * drm_fb_helper_setcmap - implementation for &fb_ops.fb_setcmap 1185 1185 * @cmap: cmap to set 1186 1186 * @info: fbdev registered by the helper 1187 1187 */ ··· 1238 1238 EXPORT_SYMBOL(drm_fb_helper_setcmap); 1239 1239 1240 1240 /** 1241 - * drm_fb_helper_check_var - implementation for ->fb_check_var 1241 + * drm_fb_helper_check_var - implementation for &fb_ops.fb_check_var 1242 1242 * @var: screeninfo to check 1243 1243 * @info: fbdev registered by the helper 1244 1244 */ ··· 1338 1338 EXPORT_SYMBOL(drm_fb_helper_check_var); 1339 1339 1340 1340 /** 1341 - * drm_fb_helper_set_par - implementation for ->fb_set_par 1341 + * drm_fb_helper_set_par - implementation for &fb_ops.fb_set_par 1342 1342 * @info: fbdev registered by the helper 1343 1343 * 1344 1344 * This will let fbcon do the mode init and is called at initialization time by ··· 1422 1422 } 1423 1423 1424 1424 /** 1425 - * drm_fb_helper_pan_display - implementation for ->fb_pan_display 1425 + * drm_fb_helper_pan_display - implementation for &fb_ops.fb_pan_display 1426 1426 * @var: updated screen information 1427 1427 * @info: fbdev registered by the helper 1428 1428 */ ··· 1607 1607 * additional constraints need to set up their own limits. 1608 1608 * 1609 1609 * Drivers should call this (or their equivalent setup code) from their 1610 - * ->fb_probe callback. 1610 + * &drm_fb_helper_funcs.fb_probe callback. 1611 1611 */ 1612 1612 void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, 1613 1613 uint32_t depth) ··· 1636 1636 * @fb_height: desired fb height 1637 1637 * 1638 1638 * Sets up the variable fbdev metainformation from the given fb helper instance 1639 - * and the drm framebuffer allocated in fb_helper->fb. 1639 + * and the drm framebuffer allocated in &drm_fb_helper.fb. 1640 1640 * 1641 1641 * Drivers should call this (or their equivalent setup code) from their 1642 - * ->fb_probe callback after having allocated the fbdev backing 1643 - * storage framebuffer. 1642 + * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev 1643 + * backing storage framebuffer. 1644 1644 */ 1645 1645 void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, 1646 1646 uint32_t fb_width, uint32_t fb_height) ··· 2207 2207 * Note that this also registers the fbdev and so allows userspace to call into 2208 2208 * the driver through the fbdev interfaces. 2209 2209 * 2210 - * This function will call down into the ->fb_probe callback to let 2211 - * the driver allocate and initialize the fbdev info structure and the drm 2212 - * framebuffer used to back the fbdev. drm_fb_helper_fill_var() and 2210 + * This function will call down into the &drm_fb_helper_funcs.fb_probe callback 2211 + * to let the driver allocate and initialize the fbdev info structure and the 2212 + * drm framebuffer used to back the fbdev. drm_fb_helper_fill_var() and 2213 2213 * drm_fb_helper_fill_fix() are provided as helpers to setup simple default 2214 2214 * values for the fbdev info structure. 2215 2215 *
+5 -4
drivers/gpu/drm/drm_plane_helper.c
··· 39 39 * 40 40 * This helper library has two parts. The first part has support to implement 41 41 * primary plane support on top of the normal CRTC configuration interface. 42 - * Since the legacy ->set_config interface ties the primary plane together with 43 - * the CRTC state this does not allow userspace to disable the primary plane 44 - * itself. To avoid too much duplicated code use 42 + * Since the legacy &drm_mode_config_funcs.set_config interface ties the primary 43 + * plane together with the CRTC state this does not allow userspace to disable 44 + * the primary plane itself. To avoid too much duplicated code use 45 45 * drm_plane_helper_check_update() which can be used to enforce the same 46 46 * restrictions as primary planes had thus. The default primary plane only 47 47 * expose XRBG8888 and ARGB8888 as valid pixel formats for the attached ··· 384 384 * is called in response to a userspace SetPlane operation on the plane with a 385 385 * NULL framebuffer parameter. It unconditionally fails the disable call with 386 386 * -EINVAL the only way to disable the primary plane without driver support is 387 - * to disable the entier CRTC. Which does not match the plane ->disable hook. 387 + * to disable the entire CRTC. Which does not match the plane 388 + * &drm_plane_funcs.disable_plane hook. 388 389 * 389 390 * Note that some hardware may be able to disable the primary plane without 390 391 * disabling the whole CRTC. Drivers for such hardware should provide their
+7 -7
drivers/gpu/drm/drm_probe_helper.c
··· 43 43 * DOC: output probing helper overview 44 44 * 45 45 * This library provides some helper code for output probing. It provides an 46 - * implementation of the core connector->fill_modes interface with 46 + * implementation of the core &drm_connector_funcs.fill_modes interface with 47 47 * drm_helper_probe_single_connector_modes. 48 48 * 49 49 * It also provides support for polling connectors with a work item and for ··· 174 174 * be added to the connector's probed_modes list, then culled (based on validity 175 175 * and the @maxX, @maxY parameters) and put into the normal modes list. 176 176 * 177 - * Intended to be used as a generic implementation of the ->fill_modes() 178 - * @connector vfunc for drivers that use the CRTC helpers for output mode 179 - * filtering and detection. 177 + * Intended to be used as a generic implementation of the 178 + * &drm_connector_funcs.fill_modes() vfunc for drivers that use the CRTC helpers 179 + * for output mode filtering and detection. 180 180 * 181 181 * The basic procedure is as follows 182 182 * ··· 188 188 * 189 189 * - debugfs 'override_edid' (used for testing only) 190 190 * - firmware EDID (drm_load_edid_firmware()) 191 - * - connector helper ->get_modes() vfunc 191 + * - &drm_connector_helper_funcs.get_modes vfunc 192 192 * - if the connector status is connector_status_connected, standard 193 193 * VESA DMT modes up to 1024x768 are automatically added 194 194 * (drm_add_modes_noedid()) ··· 209 209 * (if specified) 210 210 * - drm_mode_validate_flag() checks the modes againt basic connector 211 211 * capabilites (interlace_allowed,doublescan_allowed,stereo_allowed) 212 - * - the optional connector ->mode_valid() helper can perform driver and/or 213 - * hardware specific checks 212 + * - the optional &drm_connector_helper_funcs.mode_valid helper can perform 213 + * driver and/or hardware specific checks 214 214 * 215 215 * 5. Any mode whose status is not OK is pruned from the connector's modes list, 216 216 * accompanied by a debug message indicating the reason for the mode's
+8 -5
include/drm/drm_atomic_helper.h
··· 177 177 * 178 178 * This iterates over the current state, useful (for example) when applying 179 179 * atomic state after it has been checked and swapped. To iterate over the 180 - * planes which *will* be attached (for ->atomic_check()) see 180 + * planes which *will* be attached (more useful in code called from 181 + * &drm_mode_config_funcs.atomic_check) see 181 182 * drm_atomic_crtc_state_for_each_plane(). 182 183 */ 183 184 #define drm_atomic_crtc_for_each_plane(plane, crtc) \ ··· 190 189 * @crtc_state: the incoming crtc-state 191 190 * 192 191 * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be 193 - * attached if the specified state is applied. Useful during (for example) 194 - * ->atomic_check() operations, to validate the incoming state. 192 + * attached if the specified state is applied. Useful during for example 193 + * in code called from &drm_mode_config_funcs.atomic_check operations, to 194 + * validate the incoming state. 195 195 */ 196 196 #define drm_atomic_crtc_state_for_each_plane(plane, crtc_state) \ 197 197 drm_for_each_plane_mask(plane, (crtc_state)->state->dev, (crtc_state)->plane_mask) ··· 204 202 * @crtc_state: the incoming crtc-state 205 203 * 206 204 * Similar to drm_crtc_for_each_plane(), but iterates the planes that will be 207 - * attached if the specified state is applied. Useful during (for example) 208 - * ->atomic_check() operations, to validate the incoming state. 205 + * attached if the specified state is applied. Useful during for example 206 + * in code called from &drm_mode_config_funcs.atomic_check operations, to 207 + * validate the incoming state. 209 208 * 210 209 * Compared to just drm_atomic_crtc_state_for_each_plane() this also fills in a 211 210 * const plane_state. This is useful when a driver just wants to peek at other
+3 -4
include/drm/drm_dp_mst_helper.h
··· 493 493 int total_pbn; 494 494 495 495 /** 496 - * @qlock: protects @tx_msg_downq, the tx_slots in struct 497 - * &drm_dp_mst_branch and txmsg->state once they are queued 496 + * @qlock: protects @tx_msg_downq, the &drm_dp_mst_branch.txslost and 497 + * &drm_dp_sideband_msg_tx.state once they are queued 498 498 */ 499 499 struct mutex qlock; 500 500 /** ··· 508 508 struct mutex payload_lock; 509 509 /** 510 510 * @proposed_vcpis: Array of pointers for the new VCPI allocation. The 511 - * VCPI structure itself is embedded into the corresponding 512 - * &drm_dp_mst_port structure. 511 + * VCPI structure itself is &drm_dp_mst_port.vcpi. 513 512 */ 514 513 struct drm_dp_vcpi **proposed_vcpis; 515 514 /**
+1 -1
include/drm/drm_flip_work.h
··· 54 54 /** 55 55 * struct drm_flip_task - flip work task 56 56 * @node: list entry element 57 - * @data: data to pass to work->func 57 + * @data: data to pass to &drm_flip_work.func 58 58 */ 59 59 struct drm_flip_task { 60 60 struct list_head node;
+76 -70
include/drm/drm_modeset_helper_vtables.h
··· 111 111 * This callback is used to validate a mode. The parameter mode is the 112 112 * display mode that userspace requested, adjusted_mode is the mode the 113 113 * encoders need to be fed with. Note that this is the inverse semantics 114 - * of the meaning for the &drm_encoder and &drm_bridge 115 - * ->mode_fixup() functions. If the CRTC cannot support the requested 116 - * conversion from mode to adjusted_mode it should reject the modeset. 114 + * of the meaning for the &drm_encoder and &drm_bridge_funcs.mode_fixup 115 + * vfunc. If the CRTC cannot support the requested conversion from mode 116 + * to adjusted_mode it should reject the modeset. 117 117 * 118 118 * This function is used by both legacy CRTC helpers and atomic helpers. 119 119 * With atomic helpers it is optional. ··· 134 134 * 135 135 * Also beware that neither core nor helpers filter modes before 136 136 * passing them to the driver: While the list of modes that is 137 - * advertised to userspace is filtered using the connector's 138 - * ->mode_valid() callback, neither the core nor the helpers do any 139 - * filtering on modes passed in from userspace when setting a mode. It 140 - * is therefore possible for userspace to pass in a mode that was 141 - * previously filtered out using ->mode_valid() or add a custom mode 142 - * that wasn't probed from EDID or similar to begin with. Even though 143 - * this is an advanced feature and rarely used nowadays, some users rely 144 - * on being able to specify modes manually so drivers must be prepared 145 - * to deal with it. Specifically this means that all drivers need not 146 - * only validate modes in ->mode_valid() but also in ->mode_fixup() to 147 - * make sure invalid modes passed in from userspace are rejected. 137 + * advertised to userspace is filtered using the 138 + * &drm_connector.mode_valid callback, neither the core nor the helpers 139 + * do any filtering on modes passed in from userspace when setting a 140 + * mode. It is therefore possible for userspace to pass in a mode that 141 + * was previously filtered out using &drm_connector.mode_valid or add a 142 + * custom mode that wasn't probed from EDID or similar to begin with. 143 + * Even though this is an advanced feature and rarely used nowadays, 144 + * some users rely on being able to specify modes manually so drivers 145 + * must be prepared to deal with it. Specifically this means that all 146 + * drivers need not only validate modes in &drm_connector.mode_valid but 147 + * also in this or in the &drm_encoder_helper_funcs.mode_fixup callback 148 + * to make sure invalid modes passed in from userspace are rejected. 148 149 * 149 150 * RETURNS: 150 151 * ··· 206 205 * optimized fast-path instead of a full mode set operation with all the 207 206 * resulting flickering. If it is not present 208 207 * drm_crtc_helper_set_config() will fall back to a full modeset, using 209 - * the ->mode_set() callback. Since it can't update other planes it's 208 + * the @mode_set callback. Since it can't update other planes it's 210 209 * incompatible with atomic modeset support. 211 210 * 212 211 * This callback is only used by the CRTC helpers and deprecated. ··· 239 238 /** 240 239 * @load_lut: 241 240 * 242 - * Load a LUT prepared with the @gamma_set functions from 243 - * &drm_fb_helper_funcs. 241 + * Load a LUT prepared with the &drm_fb_helper_funcs.gamma_set vfunc. 244 242 * 245 243 * This callback is optional and is only used by the fbdev emulation 246 244 * helpers. ··· 257 257 * 258 258 * This callback should be used to disable the CRTC. With the atomic 259 259 * drivers it is called after all encoders connected to this CRTC have 260 - * been shut off already using their own ->disable hook. If that 261 - * sequence is too simple drivers can just add their own hooks and call 262 - * it from this CRTC callback here by looping over all encoders 263 - * connected to it using for_each_encoder_on_crtc(). 260 + * been shut off already using their own 261 + * &drm_encoder_helper_funcs.disable hook. If that sequence is too 262 + * simple drivers can just add their own hooks and call it from this 263 + * CRTC callback here by looping over all encoders connected to it using 264 + * for_each_encoder_on_crtc(). 264 265 * 265 266 * This hook is used both by legacy CRTC helpers and atomic helpers. 266 267 * Atomic drivers don't need to implement it if there's no need to ··· 290 289 * 291 290 * This callback should be used to enable the CRTC. With the atomic 292 291 * drivers it is called before all encoders connected to this CRTC are 293 - * enabled through the encoder's own ->enable hook. If that sequence is 294 - * too simple drivers can just add their own hooks and call it from this 295 - * CRTC callback here by looping over all encoders connected to it using 296 - * for_each_encoder_on_crtc(). 292 + * enabled through the encoder's own &drm_encoder_helper_funcs.enable 293 + * hook. If that sequence is too simple drivers can just add their own 294 + * hooks and call it from this CRTC callback here by looping over all 295 + * encoders connected to it using for_each_encoder_on_crtc(). 297 296 * 298 297 * This hook is used only by atomic helpers, for symmetry with @disable. 299 298 * Atomic drivers don't need to implement it if there's no need to ··· 317 316 * beforehand. This is calling order used by the default helper 318 317 * implementation in drm_atomic_helper_check(). 319 318 * 320 - * When using drm_atomic_helper_check_planes() CRTCs' ->atomic_check() 321 - * hooks are called after the ones for planes, which allows drivers to 322 - * assign shared resources requested by planes in the CRTC callback 323 - * here. For more complicated dependencies the driver can call the provided 324 - * check helpers multiple times until the computed state has a final 325 - * configuration and everything has been checked. 319 + * When using drm_atomic_helper_check_planes() this hook is called 320 + * after the &drm_plane_helper_funcs.atomc_check hook for planes, which 321 + * allows drivers to assign shared resources requested by planes in this 322 + * callback here. For more complicated dependencies the driver can call 323 + * the provided check helpers multiple times until the computed state 324 + * has a final configuration and everything has been checked. 326 325 * 327 326 * This function is also allowed to inspect any other object's state and 328 327 * can add more state objects to the atomic commit if needed. Care must 329 - * be taken though to ensure that state check&compute functions for 328 + * be taken though to ensure that state check and compute functions for 330 329 * these added states are all called, and derived state in other objects 331 330 * all updated. Again the recommendation is to just call check helpers 332 331 * until a maximal configuration is reached. ··· 401 400 * 402 401 * This callback should be used to disable the CRTC. With the atomic 403 402 * drivers it is called after all encoders connected to this CRTC have 404 - * been shut off already using their own ->disable hook. If that 405 - * sequence is too simple drivers can just add their own hooks and call 406 - * it from this CRTC callback here by looping over all encoders 407 - * connected to it using for_each_encoder_on_crtc(). 403 + * been shut off already using their own 404 + * &drm_encoder_helper_funcs.disable hook. If that sequence is too 405 + * simple drivers can just add their own hooks and call it from this 406 + * CRTC callback here by looping over all encoders connected to it using 407 + * for_each_encoder_on_crtc(). 408 408 * 409 409 * This hook is used only by atomic helpers. Atomic drivers don't 410 410 * need to implement it if there's no need to disable anything at the ··· 485 483 * Also beware that neither core nor helpers filter modes before 486 484 * passing them to the driver: While the list of modes that is 487 485 * advertised to userspace is filtered using the connector's 488 - * ->mode_valid() callback, neither the core nor the helpers do any 489 - * filtering on modes passed in from userspace when setting a mode. It 490 - * is therefore possible for userspace to pass in a mode that was 491 - * previously filtered out using ->mode_valid() or add a custom mode 492 - * that wasn't probed from EDID or similar to begin with. Even though 493 - * this is an advanced feature and rarely used nowadays, some users rely 494 - * on being able to specify modes manually so drivers must be prepared 495 - * to deal with it. Specifically this means that all drivers need not 496 - * only validate modes in ->mode_valid() but also in ->mode_fixup() to 497 - * make sure invalid modes passed in from userspace are rejected. 486 + * &drm_connector_helper_funcs.mode_valid callback, neither the core nor 487 + * the helpers do any filtering on modes passed in from userspace when 488 + * setting a mode. It is therefore possible for userspace to pass in a 489 + * mode that was previously filtered out using 490 + * &drm_connector_helper_funcs.mode_valid or add a custom mode that 491 + * wasn't probed from EDID or similar to begin with. Even though this 492 + * is an advanced feature and rarely used nowadays, some users rely on 493 + * being able to specify modes manually so drivers must be prepared to 494 + * deal with it. Specifically this means that all drivers need not only 495 + * validate modes in &drm_connector.mode_valid but also in this or in 496 + * the &drm_crtc_helper_funcs.mode_fixup callback to make sure 497 + * invalid modes passed in from userspace are rejected. 498 498 * 499 499 * RETURNS: 500 500 * ··· 548 544 * use this hook, because the helper library calls it only once and not 549 545 * every time the display pipeline is suspend using either DPMS or the 550 546 * new "ACTIVE" property. Such drivers should instead move all their 551 - * encoder setup into the ->enable() callback. 547 + * encoder setup into the @enable callback. 552 548 * 553 549 * This callback is used both by the legacy CRTC helpers and the atomic 554 550 * modeset helpers. It is optional in the atomic helpers. ··· 574 570 * use this hook, because the helper library calls it only once and not 575 571 * every time the display pipeline is suspended using either DPMS or the 576 572 * new "ACTIVE" property. Such drivers should instead move all their 577 - * encoder setup into the ->enable() callback. 573 + * encoder setup into the @enable callback. 578 574 * 579 575 * This callback is used by the atomic modeset helpers in place of the 580 576 * @mode_set callback, if set by the driver. It is optional and should ··· 625 621 * 626 622 * This callback should be used to disable the encoder. With the atomic 627 623 * drivers it is called before this encoder's CRTC has been shut off 628 - * using the CRTC's own ->disable hook. If that sequence is too simple 629 - * drivers can just add their own driver private encoder hooks and call 630 - * them from CRTC's callback by looping over all encoders connected to 631 - * it using for_each_encoder_on_crtc(). 624 + * using their own &drm_crtc_helper_funcs.disable hook. If that 625 + * sequence is too simple drivers can just add their own driver private 626 + * encoder hooks and call them from CRTC's callback by looping over all 627 + * encoders connected to it using for_each_encoder_on_crtc(). 632 628 * 633 629 * This hook is used both by legacy CRTC helpers and atomic helpers. 634 630 * Atomic drivers don't need to implement it if there's no need to ··· 655 651 * 656 652 * This callback should be used to enable the encoder. With the atomic 657 653 * drivers it is called after this encoder's CRTC has been enabled using 658 - * the CRTC's own ->enable hook. If that sequence is too simple drivers 659 - * can just add their own driver private encoder hooks and call them 660 - * from CRTC's callback by looping over all encoders connected to it 661 - * using for_each_encoder_on_crtc(). 654 + * their own &drm_crtc_helper_funcs.enable hook. If that sequence is 655 + * too simple drivers can just add their own driver private encoder 656 + * hooks and call them from CRTC's callback by looping over all encoders 657 + * connected to it using for_each_encoder_on_crtc(). 662 658 * 663 659 * This hook is used only by atomic helpers, for symmetry with @disable. 664 660 * Atomic drivers don't need to implement it if there's no need to ··· 720 716 * @get_modes: 721 717 * 722 718 * This function should fill in all modes currently valid for the sink 723 - * into the connector->probed_modes list. It should also update the 719 + * into the &drm_connector.probed_modes list. It should also update the 724 720 * EDID property by calling drm_mode_connector_update_edid_property(). 725 721 * 726 722 * The usual way to implement this is to cache the EDID retrieved in the ··· 729 725 * them by calling drm_add_edid_modes(). But connectors that driver a 730 726 * fixed panel can also manually add specific modes using 731 727 * drm_mode_probed_add(). Drivers which manually add modes should also 732 - * make sure that the @display_info, @width_mm and @height_mm fields of the 733 - * &struct drm_connector are filled in. 728 + * make sure that the &drm_connector.display_info, 729 + * &drm_connector.width_mm and &drm_connector.height_mm fields are 730 + * filled in. 734 731 * 735 732 * Virtual drivers that just want some standard VESA mode with a given 736 733 * resolution can call drm_add_modes_noedid(), and mark the preferred ··· 740 735 * Finally drivers that support audio probably want to update the ELD 741 736 * data, too, using drm_edid_to_eld(). 742 737 * 743 - * This function is only called after the ->detect() hook has indicated 738 + * This function is only called after the @detect hook has indicated 744 739 * that a sink is connected and when the EDID isn't overridden through 745 740 * sysfs or the kernel commandline. 746 741 * ··· 773 768 * 774 769 * RETURNS: 775 770 * 776 - * Either MODE_OK or one of the failure reasons in enum 777 - * &drm_mode_status. 771 + * Either &drm_mode_status.MODE_OK or one of the failure reasons in &enum 772 + * drm_mode_status. 778 773 */ 779 774 enum drm_mode_status (*mode_valid)(struct drm_connector *connector, 780 775 struct drm_display_mode *mode); ··· 880 875 * RETURNS: 881 876 * 882 877 * 0 on success or one of the following negative error codes allowed by 883 - * the atomic_commit hook in &drm_mode_config_funcs. When using helpers 878 + * the &drm_mode_config_funcs.atomic_commit vfunc. When using helpers 884 879 * this callback is the only one which can fail an atomic commit, 885 880 * everything else must complete successfully. 886 881 */ ··· 903 898 * 904 899 * Drivers should check plane specific constraints in this hook. 905 900 * 906 - * When using drm_atomic_helper_check_planes() plane's ->atomic_check() 901 + * When using drm_atomic_helper_check_planes() plane's @atomic_check 907 902 * hooks are called before the ones for CRTCs, which allows drivers to 908 903 * request shared resources that the CRTC controls here. For more 909 904 * complicated dependencies the driver can call the provided check helpers ··· 912 907 * 913 908 * This function is also allowed to inspect any other object's state and 914 909 * can add more state objects to the atomic commit if needed. Care must 915 - * be taken though to ensure that state check&compute functions for 910 + * be taken though to ensure that state check and compute functions for 916 911 * these added states are all called, and derived state in other objects 917 912 * all updated. Again the recommendation is to just call check helpers 918 913 * until a maximal configuration is reached. ··· 941 936 * @atomic_update: 942 937 * 943 938 * Drivers should use this function to update the plane state. This 944 - * hook is called in-between the ->atomic_begin() and 945 - * ->atomic_flush() of &drm_crtc_helper_funcs. 939 + * hook is called in-between the &drm_crtc_helper_funcs.atomic_begin and 940 + * drm_crtc_helper_funcs.atomic_flush callbacks. 946 941 * 947 942 * Note that the power state of the display pipe when this function is 948 943 * called depends upon the exact helpers and calling sequence the driver ··· 958 953 * @atomic_disable: 959 954 * 960 955 * Drivers should use this function to unconditionally disable a plane. 961 - * This hook is called in-between the ->atomic_begin() and 962 - * ->atomic_flush() of &drm_crtc_helper_funcs. It is an alternative to 956 + * This hook is called in-between the 957 + * &drm_crtc_helper_funcs.atomic_begin and 958 + * drm_crtc_helper_funcs.atomic_flush callbacks. It is an alternative to 963 959 * @atomic_update, which will be called for disabling planes, too, if 964 960 * the @atomic_disable hook isn't implemented. 965 961 * 966 962 * This hook is also useful to disable planes in preparation of a modeset, 967 963 * by calling drm_atomic_helper_disable_planes_on_crtc() from the 968 - * ->disable() hook in &drm_crtc_helper_funcs. 964 + * &drm_crtc_helper_funcs.disable hook. 969 965 * 970 966 * Note that the power state of the display pipe when this function is 971 967 * called depends upon the exact helpers and calling sequence the driver
+6 -6
include/drm/drm_simple_kms_helper.h
··· 77 77 /** 78 78 * @prepare_fb: 79 79 * 80 - * Optional, called by &struct drm_plane_helper_funcs ->prepare_fb . 81 - * Please read the documentation for the ->prepare_fb hook in 82 - * &struct drm_plane_helper_funcs for more details. 80 + * Optional, called by &drm_plane_helper_funcs.prepare_fb. Please read 81 + * the documentation for the &drm_plane_helper_funcs.prepare_fb hook for 82 + * more details. 83 83 */ 84 84 int (*prepare_fb)(struct drm_simple_display_pipe *pipe, 85 85 struct drm_plane_state *plane_state); ··· 87 87 /** 88 88 * @cleanup_fb: 89 89 * 90 - * Optional, called by &struct drm_plane_helper_funcs ->cleanup_fb . 91 - * Please read the documentation for the ->cleanup_fb hook in 92 - * &struct drm_plane_helper_funcs for more details. 90 + * Optional, called by &drm_plane_helper_funcs.cleanup_fb. Please read 91 + * the documentation for the &drm_plane_helper_funcs.cleanup_fb hook for 92 + * more details. 93 93 */ 94 94 void (*cleanup_fb)(struct drm_simple_display_pipe *pipe, 95 95 struct drm_plane_state *plane_state);