diff options
| author | Maxime Ripard <mripard@kernel.org> | 2026-09-04 11:07:19 +0200 |
|---|---|---|
| committer | Maxime Ripard <mripard@kernel.org> | 2026-09-11 15:08:21 +0200 |
| commit | 7e5d178cbc47b1df2f0b5c1865973534fbc4460b (patch) | |
| tree | 5d48bd08db94dc639f812d5771db2481b1b4c145 /include | |
| parent | f2aaaa8c6cddeba98a6e906581ceb34466e0c336 (diff) | |
drm/crtc: Introduce hw_reset helper hook
The CRTC reset hook conflates initial software state allocation with
hardware reset. The atomic_create_state hook addresses the software
state side, but drivers may still need to reset hardware to a known good
state during drm_mode_config_reset(), for example during suspend/resume.
Separating hardware reset from state allocation is also useful for the
pending atomic state readout and userspace atomic reset flag series,
which need to create pristine software state without affecting the
hardware.
Introduce a hw_reset hook in struct drm_crtc_helper_funcs that only
resets the hardware, without touching the software state at all. Call it
from drm_mode_config_crtc_reset_with_create_state() after the state has
been successfully created.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20260904-drm-no-more-crtc-reset-v3-1-27d9891512ce@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drm_modeset_helper_vtables.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index ca6268945c28..4965356a6314 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -282,6 +282,20 @@ struct drm_crtc_helper_funcs { void (*disable)(struct drm_crtc *crtc); /** + * @hw_reset: + * + * Optional hook for CRTC hardware reset. + * + * Unlike @drm_crtc_funcs.reset, which both resets hardware and + * creates new software state, this hook only resets the + * hardware to a known good state without touching the software + * state at all. + * + * This hook is called by drm_mode_config_reset(). + */ + void (*hw_reset)(struct drm_crtc *crtc); + + /** * @atomic_check: * * Drivers should check plane-update related CRTC constraints in this |
