diff options
author | Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> | 2019-03-14 15:48:45 -0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-29 11:56:52 +0100 |
commit | fe61692886669bbcc260f980903eacb4ddebaf59 (patch) | |
tree | ae296bf0447978d404ca24bf7aaf74d70a4583d3 /include | |
parent | 36a1da15b5df493241b0011d2185fdd724ac1ed1 (diff) | |
download | linux-fe61692886669bbcc260f980903eacb4ddebaf59.tar.gz linux-fe61692886669bbcc260f980903eacb4ddebaf59.tar.bz2 linux-fe61692886669bbcc260f980903eacb4ddebaf59.zip |
drm/atomic-helper: Make atomic_enable/disable crtc callbacks optional
Allow atomic_enable and atomic_disable operations from
drm_crtc_helper_funcs struct optional. With this, the target display
drivers don't need to define a dummy function if they don't need one.
Changes since v2:
* Don't make funcs optional
* Update kerneldoc for atomic_enable/disable
* Replace "if (funcs->atomic_enable)" by "if (funcs->commit)"
* Improve commit message
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20190314184845.gjmvkamobj4dilyp@smtp.gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_modeset_helper_vtables.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index cfb7be40bed7..ce4de6b1e444 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -418,6 +418,8 @@ struct drm_crtc_helper_funcs { * Drivers can use the @old_crtc_state input parameter if the operations * needed to enable the CRTC don't depend solely on the new state but * also on the transition between the old state and the new state. + * + * This function is optional. */ void (*atomic_enable)(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state); @@ -441,6 +443,8 @@ struct drm_crtc_helper_funcs { * parameter @old_crtc_state which could be used to access the old * state. Atomic drivers should consider to use this one instead * of @disable. + * + * This function is optional. */ void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state); |