From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E837606A680 for ; Tue, 1 Dec 2026 09:52:40 +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: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C4AE610E19F; Tue, 1 Dec 2026 09:52:34 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9AE9310E19F for ; Tue, 1 Dec 2026 09:52:28 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E10AB61CFD; Tue, 1 Dec 2026 09:52:27 +0000 (UTC) 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-Archived-By: 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> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --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--