]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/atomic: Let drivers decide which planes to async flip
authorAndré Almeida <andrealmeid@igalia.com>
Mon, 27 Jan 2025 19:59:39 +0000 (16:59 -0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 13 Feb 2025 22:54:29 +0000 (00:54 +0200)
commitfd40a63c63a182aeea1089a343e2f729de7e514d
tree75a339de5d817715f988efc55675d1d4f05002fe
parent6fe52b63f569c11a70b737751055afd46c4454b3
drm/atomic: Let drivers decide which planes to async flip

Currently, DRM atomic uAPI allows only primary planes to be flipped
asynchronously. However, each driver might be able to perform async
flips in other different plane types. To enable drivers to set their own
restrictions on which type of plane they can or cannot flip, use the
existing atomic_async_check() from struct drm_plane_helper_funcs to
enhance this flexibility, thus allowing different plane types to be able
to do async flips as well.

Create a new parameter for the atomic_async_check(), `bool flip`. This
parameter is used to distinguish when this function is being called from
a plane update from a full page flip.

In order to prevent regressions and such, we keep the current policy: we
skip the driver check for the primary plane, because it is always
allowed to do async flips on it.

Signed-off-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Christopher Snowhill <chris@kode54.net>
Tested-by: Christopher Snowhill <chris@kode54.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20250127-tonyk-async_flip-v12-1-0f7f8a8610d3@igalia.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_atomic_uapi.c
drivers/gpu/drm/loongson/lsdc_plane.c
drivers/gpu/drm/mediatek/mtk_plane.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/vc4/vc4_plane.c
include/drm/drm_modeset_helper_vtables.h