]> git.baikalelectronics.ru Git - kernel.git/commit
drm: handle kernel fences in drm_gem_plane_helper_prepare_fb v2
authorChristian König <christian.koenig@amd.com>
Thu, 21 Apr 2022 18:20:49 +0000 (20:20 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 2 May 2022 07:01:51 +0000 (09:01 +0200)
commit468f69ad36e4ce7c1c6aaed39200f888b838d68a
tree7ebc43267b925156feb1e39c3f5cad0f0ada1d8c
parent23af906637ebd28fa5bb27d5751b4f9176483764
drm: handle kernel fences in drm_gem_plane_helper_prepare_fb v2

drm_gem_plane_helper_prepare_fb() was using
drm_atomic_set_fence_for_plane() which ignores all implicit fences when an
explicit fence is already set. That's rather unfortunate when the fb still
has a kernel fence we need to wait for to avoid presenting garbage on the
screen.

So instead update the fence in the plane state directly. While at it also
take care of all potential GEM objects and not just the first one.

Also remove the now unused drm_atomic_set_fence_for_plane() function, new
drivers should probably use the atomic helpers directly.

v2: improve kerneldoc, use local variable and num_planes, WARN_ON_ONCE
    on missing planes.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429134230.24334-1-christian.koenig@amd.com
drivers/gpu/drm/drm_atomic_uapi.c
drivers/gpu/drm/drm_gem_atomic_helper.c
include/drm/drm_atomic_uapi.h
include/drm/drm_plane.h