From: Ville Syrjälä <[email protected]> The "bypass update" stuff has nothing to do with async vs. sync updates as far as the hardware is concerned (as in tearing vs. not). What it does is bypass the normal commit machinery and just let the driver directly perform the update (as it sees fit) and swap the plane state without involving the whole crtc commit machinery.
The actual hardware update it does could be an async flip (as in tearing) or a mailbox flip, depending on how the driver decides to do it. The use of bypass updates vs. not is a driver decision, and the high level atomic code should not be making incorrect assumptions about it. Toss in some FIXMEs in the hopes that people will relocate this stuff to a more appropriate place. Cc: [email protected] Cc: André Almeida <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Christopher Snowhill <[email protected]> Cc: Dave Stevenson <[email protected]> Cc: Dharma Balasubiramani <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: [email protected] Cc: Gustavo Padovan <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Icenowy Zheng <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Jianmin Lv <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Liviu Dudau <[email protected]> Cc: Maíra Canal <[email protected]> Cc: Manikandan Muralidharan <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Mingcong Bai <[email protected]> Cc: [email protected] Cc: Qianhai Wu <[email protected]> Cc: Raspberry Pi Kernel Maintenance <[email protected]> Cc: Simon Ser <[email protected]> Cc: [email protected] Cc: Xaver Hugl <[email protected]> Cc: Xi Ruoyao <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> --- drivers/gpu/drm/drm_atomic_uapi.c | 6 ++++++ include/drm/drm_modeset_helper_vtables.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 04fcaa72c46f..eb002799497c 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1290,6 +1290,12 @@ int drm_atomic_set_property(struct drm_atomic_commit *state, break; } + /* + * FIXME this is in the wrong place. Whether to do a + * bypass commit for async flips would is a driver + * decision. Drivers that want this need to just do + * these checks themselves somewhere. + */ if (ret && plane->type != DRM_PLANE_TYPE_PRIMARY) { /* ask the driver if this non-primary plane is supported */ if (plane_funcs && plane_funcs->atomic_bypass_check) diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index cc511068f53a..d28d8ffc66b4 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -1430,10 +1430,10 @@ struct drm_plane_helper_funcs { * given update can be committed bypassing the atomic commit machinery. * That is, if it can jump ahead of the state currently queued for update. * - * This function is also used by drm_atomic_set_property() to determine + * This function is also abused by drm_atomic_set_property() to determine * if the plane can be flipped in async. The flip flag is used to * distinguish if the function is used for just the plane state or for a - * flip. + * flip. FIXME this is wrong, and needs to be moved into the drivers. * * RETURNS: * -- 2.56.0
