Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2664499rdb; Mon, 4 Dec 2023 04:20:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWJQMzXg0kZ8bm0mGzBqXzLCzWgt9dSRZCYh6EmEnhvYTCTyOrVXyysyO+89bkmcpN7Q0Q X-Received: by 2002:a17:902:d2c5:b0:1d0:af28:25a with SMTP id n5-20020a170902d2c500b001d0af28025amr612719plc.41.1701692413621; Mon, 04 Dec 2023 04:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701692413; cv=none; d=google.com; s=arc-20160816; b=uaozlt5jF0moKkgfFVUZ052SeQND8i8ooAw8cC4wTfTleN5rNGxqVLLY6OTt9EYX3L +OmOOsJqjpuWi784nfIlRd4YwVV7zclf5zUegYub6RFq399yKjZgizS0cz0I3AOmKO8a rM3LthDJ8n/Y6zjYExyGEe7lqJ65ATxy5JzDWLHlbLBUu5xOQB6Or8MW8gOSY3XmwwYl q6o1t9Rv3XKKfSr65O06U9dfDI/7/2O93R4s/8SN9axxnF8gFZ5/Xy8C9Yux+JQGcHkR AzDfk4x0OcA7sA13xLQQ/Kb2gVeCWkOUSvI+GsVgmrNKYKb4kKD6/7gJJb9vcCESI/mi hkAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0qvMhFDnM/7yiCgOLoXikHI+tn389Ae71sX3tu1wBsk=; fh=7IvR+jpOS2iXdQstJC3uZd2uW4UGFNyt8CK3b23s+hU=; b=JL5bB7Xqtallq75jdB/zar8kVXbtvR1WohP4UNC5hWoGYX8R/Z3/bVB2c/3xmGHAAZ co5HmxVGuPoYr0jy05HZYQ91ggP+X99X3qnpV9wJrp7wY1fN9VXrM8UWytzWUSmy4qTq /dp+H+uTQboooaJsidXMyNaFOZ0cVSdNoDFY5MzfBhscx7EP7qqWwNfUkxMFoRY7fvid l2D6CM0NF+RpDoxvmGaD4mnU7yPZPTB4A9OiNgOD0y2WZyYm5yeTQJrjHDKHmnC2jahr NKUYIhcVEUqQlOhuy+acvZpivEcy26+YgDK+IIEktmLvqE6CJSI/KHb+85c5MzdeKDQD KrHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rQBSuz20; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id jg11-20020a17090326cb00b001d07859f340si3363940plb.593.2023.12.04.04.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:20:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rQBSuz20; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3C0908080EE9; Mon, 4 Dec 2023 04:20:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232970AbjLDMT6 (ORCPT + 99 others); Mon, 4 Dec 2023 07:19:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjLDMT5 (ORCPT ); Mon, 4 Dec 2023 07:19:57 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE375C3 for ; Mon, 4 Dec 2023 04:20:03 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C7D2C433C8; Mon, 4 Dec 2023 12:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701692403; bh=0qvMhFDnM/7yiCgOLoXikHI+tn389Ae71sX3tu1wBsk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rQBSuz20375Yd2A4Th4NyYhFUSw5dUpR7u3d5g2SWqweNcGTMC05TZw7w98hdkJwW nAgj1cY/sNIgPQEIyzzC1h13fVGHTQIMXnd5qby7ctA9JxrQYOS/wogPGrToxzPldE dJZvj9RTKQNMaIFSDmIBKMMNmFb7DHJp7SHbTy/eMDdabXbsUSUfgUQzT7bLMhitKt /K21c/RXLkMbNrC3RN+ffzSBoI9m8JdnWYmcluzEVxwskt7Woj2lqDlpvcYFe0f1nm W2df/dqn9acBHOMhBypdCfU4DCR9vv22WZIk5V9vRpVXey9NliU99ouT4rIDR2iW0p mVT31Wewa36/A== Date: Mon, 4 Dec 2023 13:20:00 +0100 From: Maxime Ripard To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: Pekka Paalanen , =?utf-8?B?QW5kcsOp?= Almeida , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jonathan Corbet , 'Marek =?utf-8?B?T2zFocOhayc=?= , Michel =?utf-8?Q?D=C3=A4nzer?= , Randy Dunlap , linux-doc@vger.kernel.org, Thomas Zimmermann , kernel-dev@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com Subject: Re: [PATCH] drm/doc: Define KMS atomic state set Message-ID: References: <20231130200740.53454-1-andrealmeid@igalia.com> <20231201181616.4c1f0acc.pekka.paalanen@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pz2s7ou5ixdylful" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 04:20:11 -0800 (PST) --pz2s7ou5ixdylful Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 01, 2023 at 08:09:22PM +0200, Ville Syrj=E4l=E4 wrote: > > When I was working on Weston atomic KMS support many years ago, I > > created a framework that emitted KMS property changes only when they > > actually needed changing. By review feedback (*), all that machinery was > > dropped in a re-design, and today Weston always emits all KMS > > properties it knows to program for a specific CRTC update including all > > relevant planes and connectors. > >=20 > > (*) Why do we need to repeat the same state tracking that the kernel > > does anyway, and also risk getting out of sync with the kernel due to > > bugs which then become more difficult to diagnose. I guess (assumed) > > kernel internals leaked to userspace. Oops. >=20 > The kernel does track the full state sure, but it doesn't generally > go out of its way to figure out what specifically changed in that state. > Doing so would be a lot of extra checks, and kinda less convenient to > do inside the driver since at that point the state is already spread=20 > all over the various structures. And the fact that those structures > are a mismash of uapi and internal bits of state (and other metadata=20 > for the single commit that really shouldn't be stored there) doesn't > help matters. I did propose to split the state cleanly into pure uapi > vs. internal stuff but that didn't gain any traction unfortunately. Also, that's not how drivers are modelled, so even though we could possibly figure out the entire state of the device, we don't have any code for it because no one really needs to. Maxime --pz2s7ou5ixdylful Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZW3D8AAKCRDj7w1vZxhR xfuBAP44RTvwxwTOGMBqJ8ApzDoUdsKylzTHDJ1y7Xp8o9Eb5QD+PrvitvNf4ZWM mUo/xz1bP19ktkumOT0biPRVFs6ZiAc= =CVBx -----END PGP SIGNATURE----- --pz2s7ou5ixdylful--