> -----Original Message----- > From: Intel-gfx <intel-gfx-boun...@lists.freedesktop.org> On Behalf Of Alex > Deucher > Sent: Tuesday, July 29, 2025 12:30 AM > To: Xaver Hugl <xaver.h...@kde.org> > Cc: dri-devel@lists.freedesktop.org; andrealm...@igalia.com; > ch...@kode54.net; Kumar, Naveen1 <naveen1.ku...@intel.com>; > ville.syrj...@linux.intel.com; mdaen...@redhat.com; intel- > g...@lists.freedesktop.org; amd-...@lists.freedesktop.org > Subject: Re: [PATCH] drm: don't run atomic_async_check for disabled planes > > On Wed, Jul 23, 2025 at 11:08 AM Xaver Hugl <xaver.h...@kde.org> wrote: > > > > It's entirely valid and correct for compositors to include disabled > > planes in the atomic commit, and doing that should not prevent async > > flips from working. To fix that, this commit skips the async checks if > > the plane was and still is not visible. > > > > Fixes: fd40a63c drm/atomic: Let drivers decide which planes to async > > flip > > This should be: > Fixes: fd40a63c63a1 ("drm/atomic: Let drivers decide which planes to async > flip") > > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4263 > > > > Signed-off-by: Xaver Hugl <xaver.h...@kde.org> > > --- > > drivers/gpu/drm/drm_atomic_uapi.c | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c > > b/drivers/gpu/drm/drm_atomic_uapi.c > > index c2726af6698e..2e62561fd94d 100644 > > --- a/drivers/gpu/drm/drm_atomic_uapi.c > > +++ b/drivers/gpu/drm/drm_atomic_uapi.c > > @@ -1066,6 +1066,7 @@ int drm_atomic_set_property(struct > drm_atomic_state *state, > > } > > case DRM_MODE_OBJECT_PLANE: { > > struct drm_plane *plane = obj_to_plane(obj); > > + struct drm_plane_state *old_plane_state; > > struct drm_plane_state *plane_state; > > struct drm_mode_config *config = &plane->dev->mode_config; > > const struct drm_plane_helper_funcs *plane_funcs = > > plane->helper_private; @@ -1086,8 +1087,15 @@ int > drm_atomic_set_property(struct drm_atomic_state *state, > > ret = drm_atomic_check_prop_changes(ret, > > old_val, > prop_value, prop); > > } > > > > + old_plane_state = > > drm_atomic_get_old_plane_state(state, > plane); > > + if (IS_ERR(old_plane_state)) { > > + ret = PTR_ERR(plane_state);
This should be PTR_ERR(old_plane_state) > > + break; > > + } > > + > > /* ask the driver if this non-primary plane is > > supported */ > > - if (plane->type != DRM_PLANE_TYPE_PRIMARY) { > > + if (plane->type != DRM_PLANE_TYPE_PRIMARY && > > + (plane_state->visible || > > + old_plane_state->visible)) { The present plane_state->visible will be updated based on the current list of properties in atomic_check() which is called after this set_property(). For ex in the present flip the FB is NULL then we disable the plane, the flag for doing this is done later in atomic_check(). Thanks and Regards, Arun R Murthy ------------------- > > ret = -EINVAL; > > > > if (plane_funcs && > > plane_funcs->atomic_async_check) > > -- > > 2.50.1 > >