From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 DF2E63128CC for ; Tue, 7 Jul 2026 08:26:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783412779; cv=none; b=joP7TfsloJfRR0fWZgSrjT7rKHHjAoILohfhW8cB5tR1Hr5VsHiohFkyCE/A9szBXticIdFbxCllgaJVfaRVZTAlOy1jdD8Svjfify7yHjfj31aX+iooYU0xKBQxQnAF7YuaPa0C0zkMDBkXubCWgJ7cwbTOcWLZ6kofzlOy5tE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783412779; c=relaxed/simple; bh=EHF2oSbGSPPkpOykLgyw6jvocrRYRW4CAx4KAQFdmno=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=layBFpPHuuUN7w+nbVMdzoYZdlheUiOREXKKGrukEAAEn+tHlTkqTKDAGDUcLKa+9R/s2vXM+gK7ReZme78nVEK+tnrKo8UfQk8V5V4utYMd3Gx2EgfpgzpGBPyZaM1otlCWsPwG4p59pZ6ed25vo8gUP3aL3IvlnOFJxt5DcUM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jpPCFJY6; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jpPCFJY6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1783412778; x=1814948778; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=EHF2oSbGSPPkpOykLgyw6jvocrRYRW4CAx4KAQFdmno=; b=jpPCFJY6O+FrkdtD8ol3f+go+ICZU52dwuekJ1Zm6xANWgfNGt7wNll6 wWyH1s6pDd0oxc8GW4lGU8AEplsEiiYT3Pv7pXc+sWMd5tLHWeiCHSu7j XtZi4hr6W/+KIzthyAQaK9lgqtHQmaGiKZF11DwHs2sORbtII3CFbQIhl 6xH/jyNs+Ateu5+6eznaNcaM5U/p6hE3v2jjmSwoBNT1Mz5Jfu7qRYvYz gGtep+JBSDyHH+XgMffE/9R1gSW82J40mNLOUxtgQvQnoVcAM/5hF0BMt 1xEAA/WUwndLtlLvXIVE+XmvW5BvbBuVzG1KKEeNq+BRc8A/uIH6+RSii w==; X-CSE-ConnectionGUID: brj3GOT9STivAwEqx2xOXw== X-CSE-MsgGUID: x+MsPQPsR8azmhFnCndpbA== X-IronPort-AV: E=McAfee;i="6800,10657,11839"; a="94658488" X-IronPort-AV: E=Sophos;i="6.25,153,1779174000"; d="scan'208";a="94658488" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2026 01:26:17 -0700 X-CSE-ConnectionGUID: 5nBjQhTMS3WwD8M1Xo+umg== X-CSE-MsgGUID: Bj6oZUU0R36maRYnFp6VVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,153,1779174000"; d="scan'208";a="253468518" Received: from ettammin-mobl3.ger.corp.intel.com (HELO [10.245.244.223]) ([10.245.244.223]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2026 01:26:12 -0700 Message-ID: Date: Tue, 7 Jul 2026 10:26:52 +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: Robert Mader , 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 From: Maarten Lankhorst In-Reply-To: <20260703073230.19982-1-robert.mader@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hey, This probably would be useful to backport to stable, can I add those tags and merge it? 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; > }