]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Initialize struct drm_crtc_state.no_vblank from device settings
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 29 Jan 2020 12:05:17 +0000 (13:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:46 +0000 (16:43 +0100)
commit1f06c18281ab24d83435247f09df9cad5af68225
tree58d4d5e062796d094eda14c7cf7865647f6acec7
parent6f5298f740511153f5c68ca4012de0d9a7b62e08
drm: Initialize struct drm_crtc_state.no_vblank from device settings

[ Upstream commit 2f1994baa2e5f6382874d0e2dc14f8ff8179f4a8 ]

At the end of a commit, atomic helpers can generate a fake VBLANK event
automatically. Originally implemented for writeback connectors, the
functionality can be used by any driver and/or hardware without proper
VBLANK interrupt.

The patch updates the documentation to make this behaviour official:
settings struct drm_crtc_state.no_vblank to true enables automatic
generation of fake VBLANK events.

The new interface drm_dev_has_vblank() returns true if vblanking has
been initialized for a device, or false otherwise. Atomic helpers use
this function when initializing no_vblank in the CRTC state in
drm_atomic_helper_check_modeset(). If vblanking has been initialized
for a device, no_blank is disabled. Otherwise it's enabled. Hence,
atomic helpers will automatically send out fake VBLANK events with any
driver that did not initialize vblanking.

v5:
* more precise documentation and commit message
v4:
* replace drm_crtc_has_vblank() with drm_dev_has_vblank()
* add drm_dev_has_vblank() in this patch
* move driver changes into separate patches
v3:
* squash all related changes patches into this patch

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200129120531.6891-2-tzimmermann@suse.de
Stable-dep-of: 13fcfcb2a9a4 ("drm/msm/mdp5: Add check for kzalloc")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_vblank.c
include/drm/drm_crtc.h
include/drm/drm_simple_kms_helper.h
include/drm/drm_vblank.h