From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 D4251314A98 for ; Tue, 30 Jun 2026 16:57:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782838678; cv=none; b=K8hMWJDl86u2l0eQ5IRe97J+ACDgbk/ZOjgclt85UfNEW2llMZyGkp9Hqv5M5ueQO3uc8rkUAYIVJbbMNIdeNC0Bpos3fO9KfW086RyU4dmtatmslgiRdKOhMG2M1QWLb9JFXaJOFy/bU7u/Qsr6Hdz+eiGNcYetkdBr5mt3B9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782838678; c=relaxed/simple; bh=gLt1do70ZjDIhZ/PLvXs+AnmvqxlvcAz8lGOW1C/caE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fVyev3zxOS3hz/SrSyqEJRLqw4GbEnHx0JvAPxVnNqxUqDGNJwQL7fXFfZ7H3OV7Xk/3Kc702aI0NSX4NKDia1jzpXQ0Ij2J81mnhrFQqZgW6RCuGM5+pzgQVeLeANCu/1tuLclhG8VY5kWWSWWXd2BDnEd8B2KRyqyN3uSwQOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=e4brlJz0; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="e4brlJz0" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Qrq29s1UmcG3ZbaxpiVVbSt+a5Mn05Ll4PFR7ojZOso=; b=e4brlJz0fiay1/iAA2Rhi9OPP6 bG1+8VfWCnz87sz/T3sHuxkBBAvZTYVhPfUSomlqxkdTb1ClIs2bYzESk3aCB0MzEn3ATF+MT6J1S kWOG8t6zQAH0fcG/cEVfNm+FApVGSBv9R8Dhq/RX8hfxZTrMxiwBkmnVlW9TzRkisJ8g/A5x8lWkx /wPzHsZUJ0Cg/MYxa/2XhUCtds4mL5VJ5oDscP5DWiHTnlLL1AcW55JtlbSmWOVPvD3E+9mYWI+O5 0zCN6nt6qgioPyGVxuaQH7lfxwrsQz4BrOORt6KFrKnOSjbjH2eIFPsDbVpkH/TK1YRk0r0MIObGN U0Ca56SQ==; Received: from 100.red-79-144-92.dynamicip.rima-tde.net ([79.144.92.100] helo=[192.168.1.128]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1webm3-007Bke-Tz; Tue, 30 Jun 2026 18:57:27 +0200 Message-ID: <0570d22d-bf3c-4c17-b50e-58f522f25ffb@igalia.com> Date: Tue, 30 Jun 2026 18:57:20 +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 v1 1/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature To: Robert Mader , dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst , 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 , Simon Ser , Pekka Paalanen , Leandro Ribeiro References: <20260630084229.529682-1-robert.mader@collabora.com> <20260630084229.529682-2-robert.mader@collabora.com> Content-Language: en-US From: Melissa Wen In-Reply-To: <20260630084229.529682-2-robert.mader@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 30/06/2026 10:42, 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 and drm_info, enable the client cap on sich drivers they will be > left without both color pipeline and the legacy properties COLOR_ENCODING and > COLOR_RANGE, effectively breaking YUV->RGB conversion support. > > Add a new driver feature and guard the client cap behind it, allowing > plane color pipeline and legacy YUV->RGB support to co-exist. Ouch, that's indeed a problem. Nice catch! I'm not sure if this is the right way to go because plane color pipeline can be supported per plane and per hw family. My suggestion would be to only deprecate COLOR_ENCODING and COLOR_RANGE in drm_mode_object_get_properties() if a plane COLOR_PIPELINE property is attached. WDYT? Melissa > > Signed-off-by: Robert Mader > --- > drivers/gpu/drm/drm_ioctl.c | 2 ++ > include/drm/drm_drv.h | 6 ++++++ > 2 files changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > index ff193155129e..96fda92e31b9 100644 > --- a/drivers/gpu/drm/drm_ioctl.c > +++ b/drivers/gpu/drm/drm_ioctl.c > @@ -374,6 +374,8 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) > file_priv->supports_virtualized_cursor_plane = req->value; > break; > case DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE: > + if (!drm_core_check_feature(dev, DRIVER_PLANE_COLOR_PIPELINE)) > + return -EOPNOTSUPP; > if (!file_priv->atomic) > return -EINVAL; > if (req->value > 1) > diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h > index e09559495c5b..108ddd2c8d30 100644 > --- a/include/drm/drm_drv.h > +++ b/include/drm/drm_drv.h > @@ -116,6 +116,12 @@ enum drm_driver_feature { > * the cursor planes to work correctly). > */ > DRIVER_CURSOR_HOTSPOT = BIT(9), > + /** > + * @DRIVER_PLANE_COLOR_PIPELINE: > + * > + * Driver supports PLANE_COLOR_PIPELINE. > + */ > + DRIVER_PLANE_COLOR_PIPELINE = BIT(10), > > /* IMPORTANT: Below are all the legacy flags, add new ones above. */ >