From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com [136.143.188.11]) (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 107FE3264FC for ; Tue, 7 Jul 2026 08:32:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783413149; cv=pass; b=YHL39JXgmHpphU7EzsXFb2KdtOBydCvu9Hbz1xIlhWAZ5KjT+6J7qzf3kJgjfIiJbEQdn4Oqbs/I+F2sGozO81ZQp4ndf/PGGJAGPEwB9uHeWpIWU936YutecSR4Gblwp1Yazqjf7txnRyUJaPxDQKGf5Nd/h+sTZb1ydu3yj4U= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783413149; c=relaxed/simple; bh=nWeaICO+NsOMluq1f4Y6Pt8RUJuvGcKRp97ureQXLO4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kNwkgZTsc2lxytRy0iruu7HA+tpS1CB3exZ/pp4f0yoiRKvvVJrBaB6ViTVvSMsq/S3sDICQj2n1hoN6V1Zc2kNMA6VGNq+KNXWVVwpu3YTOeR4Sc/CmdRQSqgtY3hiDM1yS9OyqTRwYAMn31I/LuHRMUltrbKzYnLRfeOXKxH4= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=robert.mader@collabora.com header.b=LQK+/f4U; arc=pass smtp.client-ip=136.143.188.11 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 (1024-bit key) header.d=collabora.com header.i=robert.mader@collabora.com header.b="LQK+/f4U" ARC-Seal: i=1; a=rsa-sha256; t=1783413118; cv=none; d=zohomail.com; s=zohoarc; b=V4gYb7A3o1r/fFfzojvNy8u0/ppoQJ90AqzY1DwDIt1Y7SkTxX/mrFXg2t/D3VwaijCDk4mbIHCoT+zEBwGHSXUltmgJ3YrnRgq0bCAjt3P/8u5iek/bv0v7Hkidkwk78z0Q4kZohOYrBO0kWwXzDB/+lLrdiEMWbpckkCz6roc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783413118; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=anpLiGeSvRsdlXNJRpFP5O/x+/fyL2CxxAyNwmMmqB4=; b=XHjQ4vG+Zj/8t6FM+fUGaRKMmd5c+rSsXC08orWQXv1l/a3gUrA6tetmozTB756KmEU2Aio3HpOgKOdIN/eYpgA9ANyGpnrzVShZdos/DTDUlGnPCq36e1AaD2qdVkOYXbvpQUtbZxj8sJkqsGKIRChJKpLuA8lmws2syJgF+Vc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1783413118; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=anpLiGeSvRsdlXNJRpFP5O/x+/fyL2CxxAyNwmMmqB4=; b=LQK+/f4UMZ4AWlUSWpIa1woLUnOlX4FQic6nPt+xRioiEJyfZlyNRuIS0mlW7DPG wYWuZxEswhsfONGfzCyG60FnC4JCD3WRj8PHAQOluEkW7RQOZTTtPhwM+wNzOS9ws/A 0bgHGgS2i7Qn1xSvrwLXq3IfXFuA9q6TV1jVyCLs= Received: by mx.zohomail.com with SMTPS id 178341311694473.32983461955064; Tue, 7 Jul 2026 01:31:56 -0700 (PDT) Message-ID: <270321d6-9ff5-443a-ab5a-5690adb04241@collabora.com> Date: Tue, 7 Jul 2026 10:31:51 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE To: Maarten Lankhorst , dri-devel@lists.freedesktop.org Cc: Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Harry Wentland , Daniel Stone , Chaitanya Kumar Borah , Uma Shankar , Louis Chauvet , Melissa Wen , Simon Ser , Pekka Paalanen , Leandro Ribeiro References: <20260703073230.19982-1-robert.mader@collabora.com> Content-Language: en-US, de-DE From: Robert Mader In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hey, On 07.07.26 10:26, Maarten Lankhorst wrote: > Hey, > > This probably would be useful to backport to stable, can I add those tags and merge it? yes, also please feel free to apply any suggestions by Chaitanyaand. Thanks! > > Fixes: 179ab8e7d7b3 ("drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE") > Cc: # v6.19+ > > Kind regards, > ~Maarten Lankhorst > > On 7/3/26 09:32, Robert Mader wrote: >> The client cap is currently advertised unconditionally, even for drivers >> that do not support plane color pipelines. If clients supporting the later, >> like Wayland compositors or tools like drm_info, enable the client cap on >> such drivers they will be left without both color pipeline and the legacy >> properties COLOR_ENCODING and COLOR_RANGE, effectively breaking YUV->RGB >> conversion support. >> >> Prevent that by only marking the cap supported if there are actually planes >> with color pipelines. >> >> Note: while the color pipeline replacement for the legacy properties is >> still under review (1), we can assume that it will work as a drop-in >> replacement. That means any plane on any hardware currently supporting >> the legacy properties will be able to offer a functionally equal color >> pipeline and there will be no technical reason keep using the legacy >> properties if both the driver and the client support the new API. >> >> 1: https://lore.kernel.org/dri-devel/20260623164812.81110-1-harry.wentland@amd.com/ >> >> Signed-off-by: Robert Mader >> >> --- >> >> Changes in v3: >> - Move the new check behind the existing EINVAL ones >> - Rebase on latest drm-misc-next >> >> Changes in v2: >> - Replace the driver feature with a simple check (suggested by Maarten >> Lankhorst ) >> - Expand the commit message slightly and change the title >> --- >> drivers/gpu/drm/drm_ioctl.c | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c >> index e2df4becce62..9039a39c4324 100644 >> --- a/drivers/gpu/drm/drm_ioctl.c >> +++ b/drivers/gpu/drm/drm_ioctl.c >> @@ -373,13 +373,25 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) >> return -EINVAL; >> file_priv->supports_virtualized_cursor_plane = req->value; >> break; >> - case DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE: >> + case DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE: { >> + struct drm_plane *plane; >> + bool has_plane_with_color_pipeline = false; >> + >> if (!file_priv->atomic) >> return -EINVAL; >> if (req->value > 1) >> return -EINVAL; >> + drm_for_each_plane(plane, dev) { >> + if (plane->color_pipeline_property) { >> + has_plane_with_color_pipeline = true; >> + break; >> + } >> + } >> + if (!has_plane_with_color_pipeline) >> + return -EOPNOTSUPP; >> file_priv->plane_color_pipeline = req->value; >> break; >> + } >> default: >> return -EINVAL; >> } -- Robert Mader Consultant Software Developer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718