From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06B9F5C613 for ; Thu, 30 Jul 2026 14:41:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785422469; cv=none; b=H8n2vCyKfxf2TeIp3itUkSpzWx/J64uhf2YC/DuKY6Gg1FxaOBt2L6x1azrpJDCFhPqZeGbqO2eYbwKTHWeyvMXskJJEtCbCgXcf1R32chYZM/GxVxMNpc8PlD0UZ6r+UAUyrOChE20eiNgMvfYr6NX9/6XAQ2oIp6I8muvIAR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785422469; c=relaxed/simple; bh=mdTc5rjthYe6OBOSeP3TClZU1ojn4OYqc64zIAcSwkE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ulg+B7EZRchiMd/UO+idR8I8yu//r2nWE3nPOtO6UgaJDKeAiKhEkAjmU/1NnHtmMcPSnKZB5Wg4QHJ3PY5OJS2Vv3E2jJI9ld4+PHReD9laKcskmtCCsKL8gorKL6wa1v0F2vKNQ3bvHoQA4F9X/+lMarwb5p2quJg2fU3WD6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=kmAc9mAt; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="kmAc9mAt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1785422465; bh=mdTc5rjthYe6OBOSeP3TClZU1ojn4OYqc64zIAcSwkE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kmAc9mAtaVvr3cFAyqmzFONsWN6cgwzMkEqQxrA6QwKhQsNmmxH26l0ERRRpQ91f2 mvV9MiJentZA3A4vHEsb6Jco1lms29x14sYDAG5MomX1bEyWv8zbkeyoFiXAVO4f+X ay+C9xtTzEkhWa/PNXEQFK6RyolSkt3ssXWPCFNaGq6TDAPe+BQVBVDVrWLY3fpCEy O9zLncmZ898Gp4ehym9jphIrZAwZ54zF8td4vDQaUX5UuocXO1+HsUY6K3Z875UeOv fAiPcTqLg3e2elXnKEhg+jmWvyvNNaUA7I0t8g+UlLwswLyhLwA5HTmkpeyaN7DgTy OD3FZrnn8peZg== Received: from fluorite (unknown [100.64.0.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pq) by bali.collaboradmins.com (Postfix) with ESMTPSA id 2B42117E0213; Thu, 30 Jul 2026 16:41:05 +0200 (CEST) Date: Thu, 30 Jul 2026 17:41:00 +0300 From: Pekka Paalanen To: Robert Mader Cc: dri-devel@lists.freedesktop.org, Maxime Ripard , Daniel Stone , Harry Wentland , Jonas =?UTF-8?B?w4VkYWhs?= , Michel =?UTF-8?B?RMOkbnplcg==?= , Sebastian Wick , Simon Ser , Victoria Brekenfeld , Xaver Hugl , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] drm/atomic: Clear plane pipeline for legacy clients Message-ID: <20260730174100.017a1b5a@fluorite> In-Reply-To: <20260709115855.53725-1-robert.mader@collabora.com> References: <20260709115855.53725-1-robert.mader@collabora.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/OMHslgD.2KbRLIGyomXP+fZ"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_/OMHslgD.2KbRLIGyomXP+fZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 9 Jul 2026 13:58:55 +0200 Robert Mader wrote: > Clients that do not enable DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE and try to > apply a new plane state currently have no way to unset/reset an existing > non-bypass color pipeline, resulting in unexpected behavior. >=20 > As we can be sure that such clients do not expect plane pipelines to be > set, let's reset the later for them, ensuring clean bypass-only pipeline > states. >=20 > This is a less comprehensive but more backward compatible approach compar= ed > to a DRM_MODE_ATOMIC_RESET flag (link) that is currently being discussed. > Considering the simplicity and clearly defined behavior of this case, > this change could serve as an additional stop-gap solution to smoothen the > transition to the new APIs, resulting in less breakage on systems with > existing clients. >=20 > Link: https://lore.kernel.org/all/CAFZQkGzw2MZGivy=3DoyYgZE3_dmxu-z-NbDgz= h9uyqSsj=3DMG=3D2w@mail.gmail.com/ >=20 > Signed-off-by: Robert Mader >=20 > --- >=20 > If an approach like this was previously rejected or clearly goes against > API rules (or is unacceptable for other reason), please excuse me (and > just let me know). >=20 > The main motivation for the patch came up during testing the Weston > implementation (link) for the fixed-matrix color-ops. The test there chec= ks > both the color pipeline and legacy property ways of offloading YCbCr > buffers and the current reset-less situation results in the legacy one > failing once the color pipeline test ran before. >=20 > Link: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/2133 > --- > drivers/gpu/drm/drm_atomic.c | 3 +++ > 1 file changed, 3 insertions(+) Hi Robert, this sounds reasonable indeed. Acked-by: Pekka Paalanen Thanks, pq > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index 735ab7badc2e..581fde90dbd8 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -656,6 +656,9 @@ drm_atomic_get_plane_state(struct drm_atomic_commit *= state, > state->planes[index].new_state =3D plane_state; > plane_state->state =3D state; > =20 > + if (!state->plane_color_pipeline) > + plane_state->color_pipeline =3D NULL; > + > drm_dbg_atomic(plane->dev, "Added [PLANE:%d:%s] %p state to %p\n", > plane->base.id, plane->name, plane_state, state); > =20 --Sig_/OMHslgD.2KbRLIGyomXP+fZ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAmprYnwACgkQI1/ltBGq qqc9NBAAjd+8qJIov3iv9e/hSncWRbtA/6mrQ2FKhV2B15dRjfyj/X9Y4rJcXVKo yRghJ3oPNZO3zpJKKUVTHhAnXZ/qsPxUAQGUbC2tlVD95NEMowaSftNRXFbjTaI5 b/TEgb4iau6lHYQzUWRrmB0kExnkVwZZCisWeMBC0etN+fdsr01bzFvMXuK0Hj3J ImFCfua5YxHm65to7VTKbBGWLqNQ6DYMZ+831gbkhZ91Ht5utBg/ntnndn39h6Bf Z3tCXKcBTLTDSeSKRRhfDQV9LjedHAVoTx8ZfCi1L7yhyspqWpaqAvAubqEIM1Ee Z9F/iyZLRR7drV7GyCfDXt0nbrPyWDoYkbGqwk1HcPq9ubul47dNPdnYl6FFLdFF gL7lK1UTBEuo5HBpJhjGdgFOEV0c190IRkETCoEN1fj7W2Rqp3LThpJRsCLfXbb2 +6khGzvORJyUsoXSe0ktskAH7vjEsblzyEWuF4ID3EVJWuIYYycZI8Woyz8/N8N6 YP45QG+TObIzOybDZsOiwxkToynd6GJOq4FrLdHRGqvdpG65/UZjvJ2X+RLqssml tZm+Hp1NjKicw5BrEm1BBpCjvUfRa7PLAIRWy0QRzRyZ2ON2mm15HYksBo86z9cd 00xCf9rmJQiuI1bnC/cJCKDtC5yOLclAx1rqx+lWgxBg+HfN5dI= =zoKo -----END PGP SIGNATURE----- --Sig_/OMHslgD.2KbRLIGyomXP+fZ--