Skip to content

Commit afe09e4

Browse files
committed
drm: simple_kms_helper: Fix .mode_valid() documentation
This fixes up the .mode_valid() vtable entry documentation by copyediting the documentation from the .mode_valid() documentation in the drm_modeset_helper_vtables.h file. Fixes: 40275dc ("drm: simple_kms_helper: Add mode_valid() callback support") Suggested-by: Daniel Vetter <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent bbce9ad commit afe09e4

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

include/drm/drm_simple_kms_helper.h

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,30 @@ struct drm_simple_display_pipe_funcs {
2424
/**
2525
* @mode_valid:
2626
*
27-
* This function is called to filter out valid modes from the
28-
* suggestions suggested by the bridge or display. This optional
29-
* hook is passed in when initializing the pipeline.
27+
* This callback is used to check if a specific mode is valid in the
28+
* crtc used in this simple display pipe. This should be implemented
29+
* if the display pipe has some sort of restriction in the modes
30+
* it can display. For example, a given display pipe may be responsible
31+
* to set a clock value. If the clock can not produce all the values
32+
* for the available modes then this callback can be used to restrict
33+
* the number of modes to only the ones that can be displayed. Another
34+
* reason can be bandwidth mitigation: the memory port on the display
35+
* controller can have bandwidth limitations not allowing pixel data
36+
* to be fetched at any rate.
37+
*
38+
* This hook is used by the probe helpers to filter the mode list in
39+
* drm_helper_probe_single_connector_modes(), and it is used by the
40+
* atomic helpers to validate modes supplied by userspace in
41+
* drm_atomic_helper_check_modeset().
42+
*
43+
* This function is optional.
44+
*
45+
* NOTE:
46+
*
47+
* Since this function is both called from the check phase of an atomic
48+
* commit, and the mode validation in the probe paths it is not allowed
49+
* to look at anything else but the passed-in mode, and validate it
50+
* against configuration-invariant hardware constraints.
3051
*
3152
* RETURNS:
3253
*

0 commit comments

Comments
 (0)