summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-02-27 13:11:09 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-03-08 00:38:59 +0300
commitafe09e43b4000503a50a20577d44e16050ccf6ca (patch)
tree5c4528b61e97b9b0ccaca485c89cc97a557c7789 /include/drm
parentbbce9ad9c26136a1581fa7cc6b576353b1a76ce9 (diff)
downloadlinux-afe09e43b4000503a50a20577d44e16050ccf6ca.tar.xz
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: 40275dc4edb4 ("drm: simple_kms_helper: Add mode_valid() callback support") Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180227101109.6088-1-linus.walleij@linaro.org
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_simple_kms_helper.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_kms_helper.h
index c4e32c5a18fc..1b4e352143fd 100644
--- a/include/drm/drm_simple_kms_helper.h
+++ b/include/drm/drm_simple_kms_helper.h
@@ -24,9 +24,30 @@ struct drm_simple_display_pipe_funcs {
/**
* @mode_valid:
*
- * This function is called to filter out valid modes from the
- * suggestions suggested by the bridge or display. This optional
- * hook is passed in when initializing the pipeline.
+ * This callback is used to check if a specific mode is valid in the
+ * crtc used in this simple display pipe. This should be implemented
+ * if the display pipe has some sort of restriction in the modes
+ * it can display. For example, a given display pipe may be responsible
+ * to set a clock value. If the clock can not produce all the values
+ * for the available modes then this callback can be used to restrict
+ * the number of modes to only the ones that can be displayed. Another
+ * reason can be bandwidth mitigation: the memory port on the display
+ * controller can have bandwidth limitations not allowing pixel data
+ * to be fetched at any rate.
+ *
+ * This hook is used by the probe helpers to filter the mode list in
+ * drm_helper_probe_single_connector_modes(), and it is used by the
+ * atomic helpers to validate modes supplied by userspace in
+ * drm_atomic_helper_check_modeset().
+ *
+ * This function is optional.
+ *
+ * NOTE:
+ *
+ * Since this function is both called from the check phase of an atomic
+ * commit, and the mode validation in the probe paths it is not allowed
+ * to look at anything else but the passed-in mode, and validate it
+ * against configuration-invariant hardware constraints.
*
* RETURNS:
*