On Tue, Dec 01, 2026 at 10:08:13AM +0100, Thomas Zimmermann wrote: > Hi > > Am 20.11.26 um 14:10 schrieb Maxime Ripard: > > The upcoming DRM_MODE_ATOMIC_RESET flag will need to create an atomic > > commit that brings the entire device back to a pristine state, as if > > no configuration had ever been applied. > > > > Create drm_atomic_commit_fill_with_defaults() which iterates over all > > CRTCs, planes, connectors, and color operations in the device and > > inserts a fresh default state for each one into the commit. This uses > > the atomic_create_state() hooks rather than atomic_duplicate_state(), > > since atomic_create_state() provides exactly this pristine state on a > > per-object basis. > > > > A lessee only gets the objects of its lease reset, the other ones > > keeping their current state. Partial pipelines aren't supported > > though: detaching a plane or a connector from its CRTC, and disabling > > a CRTC driving them, both need the two sides in the commit, so a lease > > that splits a pipeline is rejected with -ENOENT. validate_lease() is > > I returning -ENOENT consistent with other places in the lease code? I'm > asking because the code usually means "no such file or directory". The rest of the code is inconsistent, we have EACCESS [1] and EFAULT [2]. I used ENOENT here because we were asked to reset an entity that isn't part of the lease, but EACCESS would work too I guess. Maxime 1: https://elixir.bootlin.com/linux/v7.3.4/source/drivers/gpu/drm/drm_crtc.c#L744 2: https://elixir.bootlin.com/linux/v7.3.4/source/drivers/gpu/drm/drm_plane.c#L841