From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796118748; b=UTk2g1tyF1yNuKKHkNNiWauooP08bQ9fcKoC32+eLEO3Bdykfx2RryjmcFongqKuslVR hTFoH2zsybcqg4g/2gLGxJz+1WO9n+SzTx/IPrQrc8YuMU0/ltHdd65S74a5vPj0k1EYQ Odpv5OlwDOIroAEBj33c8VNQG4u0/oyy/8f/gt5mgbZUXm40C92D0Jr5nQsAtDaoS2TqE Lz3Mnq3EgGHwI5ChPkYqL+T2au2Nb+qjRPhDZNqdIdQswBhskN1B+TpUSrluu61eOpkCm soLLmThKnGq3xiWJ2o0+P99qDTMXHteQGlK8NuOp9eN6mYq1dNBQgqlgVsAQbHcF1XQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796118748; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=X5Ckk/KkqcubrPAK754RCx40fuV6w6DCtqkN+wzLvdw=; b=vD9RmNiR5kQBSUBX/OnGpi3RCFe1YVktybJ/HIY/w65yhR06eFqW8A+MlsyRrqmDPsCy RWmi9v09Bjy28Wz8M6Eumqx7kXGqavOBmA+31VU4YEduZC8UjILwzdytSTiYO1+8WOvoK F8v4c1SlWpN/n9UUCW8HeDpDbgCl4ti+kEYBdiGj75HVfey7C6u7o7+aXqTKv5b/p6Xu9 f5uE8+f5Xg/azwXiVM62ZKTwY9Ankr5oJHj1KpxuPO10D1ii0wNnex3IDqh/y9v+/hP4B kfqY6pO2sRvkAKOX31razdJ2OBdCw81UwJwNRwKuwGaWU3OZWOBPYv0bfrqw65IMyEw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fnCpV83w; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D3AD606A338 for ; Tue, 1 Dec 2026 09:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fnCpV83w Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F95E1F0089F; Tue, 1 Dec 2026 09:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796118747; bh=X5Ckk/KkqcubrPAK754RCx40fuV6w6DCtqkN+wzLvdw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fnCpV83wc+/lApWut05IAaY7S/vZ7yuObfyxOS65ricx30hCmpLFLT67GyegGbqP0 JDb1jINY2xfebbTsqvGldAY6VOPy0NGAD8nDPFuxETSAd/aoHpoQjoc8rjrJxEiTdJ iq3XTX9LaiYe7ZKNrcATRbeF8ygr2xVP3dxY1c+xsDtC2WJzQ5006bRR6KpWGcPleo PLDsX5cpFAAFheIFk18zc119FYsjGAn0ktzH8ngADnJdU88O2ScmgdPzkNsGQ2RITD Mu5pO+j4LfG2bodm9FYWFRTck/aM4Aw+16SkvyF/YHGUItiXR00up3avoapsT6CcZD F8M8ZCAHqijnw== Date: Tue, 1 Dec 2026 10:52:23 +0100 From: Maxime Ripard To: Thomas Zimmermann Cc: Maarten Lankhorst , David Airlie , Simona Vetter , Louis Chauvet , Haneen Mohammed , Melissa Wen , Daniel Stone , Harry Wentland , Jocelyn Falempe , Jonas =?utf-8?B?w4VkYWhs?= , Michel =?utf-8?Q?D=C3=A4nzer?= , Pekka Paalanen , Sebastian Wick , Simon Ser , Victoria Brekenfeld , Xaver Hugl , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v12 3/9] drm/atomic: Allow filling a commit with pristine object states Message-ID: References: <20261120-drm-reset-state-flag-v12-0-42d63d7417fc@kernel.org> <20261120-drm-reset-state-flag-v12-3-42d63d7417fc@kernel.org> <4653f381-cee3-4407-b393-5fc3352b3a39@suse.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="x24axwucisn6hawg" Content-Disposition: inline In-Reply-To: <4653f381-cee3-4407-b393-5fc3352b3a39@suse.de> --x24axwucisn6hawg Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v12 3/9] drm/atomic: Allow filling a commit with pristine object states MIME-Version: 1.0 On Tue, Dec 01, 2026 at 10:08:13AM +0100, Thomas Zimmermann wrote: > Hi >=20 > 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. > >=20 > > 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. > >=20 > > 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 >=20 > 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= =2Ec#L841 --x24axwucisn6hawg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCaw6Y1wAKCRAnX84Zoj2+ dth4AYC30Ak7J7WCkKb4nwJWu0Anf8KBj2fZniHGgsMUYaiEgv1ugfxjIW/ieFnM p2iMNbwBfjhSXR+vTfvCWaRBo4dxO0OaxSFp4wOiJz53HhEFY3X4PCpYzxaY3Nca a24YADdT4g== =cRrP -----END PGP SIGNATURE----- --x24axwucisn6hawg--