From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 F2E1D34404B for ; Wed, 1 Jul 2026 14:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782916015; cv=none; b=NcRK0uSM/KqaNoQ8DKqgkDgJnq0E11rUm+4+CRl2fMcX2kKvkug25mDd0j0bEwnY6xpzU4Q7HwWzpOPokn8Zx1u7hUTOLX/XYMpGbxx6mhifK2xwqpH4W3OddGRb8fpAn+JS3bjvykqnQGA/GusJeG+IvtMy32mqSlM/x8NLKs0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782916015; c=relaxed/simple; bh=LeJ4Etb/bs+mMpVgZ7+XfiR2eSv6eMXWa+iNgsnuWZs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=t813MCZ68qp699wwb4dR8/6DKjNHQu359LMH/rN4lNk4QOzAWUCFJ3Taweowb02Owu3necFJe5BcTB5+ps/U0jDDg7tsPxHjLwlNQzj0IFxSDOIfWvlwtc2NHIB0+Zn+ZGb6Zw9xkRkH7nzv/JdCZPA+vxGbzAYSgG7XKgUXJGM= 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=U1uHbPDN; arc=none smtp.client-ip=198.175.65.20 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="U1uHbPDN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1782916014; x=1814452014; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=LeJ4Etb/bs+mMpVgZ7+XfiR2eSv6eMXWa+iNgsnuWZs=; b=U1uHbPDNr3bOc575KKRyvexuthKtNR0I3/F+u4357wFCqcp5m/fCr3Uy gkph2v3ljqmvBft9D++FuyamcGsuJQAxzey2Ej1AL/7anC8tQVqaB1j50 dsTzjXdoDqembHGEoIRJgbe+B03qqQS/7YT3lkJD0jN3abqkJZQdGAenP CVIX/4zQ+GLFFGKTOn+4EVn0HhR6g9feMDLeYdceuByBLOWOSye03Cu19 l8xZx/5lGDTSmwUl/AESXbVm0492v9PvRG3/TRISCDe+RjdF2fjNq1ein pvhA+E4+qG0EyDdFgyno1hB/zkHQiHpQxTVfEitvgfmXGwjbPaVDWl9eW w==; X-CSE-ConnectionGUID: jZY/toldSuS4DcAINwhN1g== X-CSE-MsgGUID: yskDWX3lRbaoz1zoiWbfDg== X-IronPort-AV: E=McAfee;i="6800,10657,11834"; a="83426280" X-IronPort-AV: E=Sophos;i="6.25,141,1779174000"; d="scan'208";a="83426280" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2026 07:26:53 -0700 X-CSE-ConnectionGUID: z2oPJFEWTwmjm8Ns9riNdA== X-CSE-MsgGUID: yWS2qhZITMeQi1FbaIgtCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,141,1779174000"; d="scan'208";a="256162220" Received: from abityuts-desk1.ger.corp.intel.com (HELO [10.245.244.143]) ([10.245.244.143]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2026 07:26:47 -0700 Message-ID: <853a147c-6565-4286-ba4f-60decd3b23e0@linux.intel.com> Date: Wed, 1 Jul 2026 16:26:45 +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 0/4] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature 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: <20260630084229.529682-1-robert.mader@collabora.com> <3bc9d27b-2886-48df-a897-7e73f14a88a2@linux.intel.com> <11792a51-aeeb-428f-a793-607ff09558f3@collabora.com> Content-Language: en-US From: Maarten Lankhorst In-Reply-To: <11792a51-aeeb-428f-a793-607ff09558f3@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hey, On 7/1/26 15:32, Robert Mader wrote: > Hi Maarten, > > On 01.07.26 12:41, Maarten Lankhorst wrote: >> Hello, >> >> All you have to do is iterate over all planes at runtime until >> one is found that has the pipeline property attached, it's not >> a performance sensitive area and no locking is required for >> testing if plane->color_pipeline_property is NULL. > > that's correct - I checked that before and while the amount of code changes necessary to support such a "check-planes-with-cap-enabled-and-reinitialize-without-cap-otherwise" is not big (AFAICS it should be possible with under 100 lines in Weston), it would need to be replicated in various Wayland compositors and lots of apps with native DRM backend (drm_info, Gstreamer KMS sink, MPV, Kodi etc.). The small change proposed here seems like a more elegant solution to me. > > In a previous chat Pekka and Simon seemed to agree, quoting: "< emersion> pq, you mean the cap is advertised regardless of driver support? that sounds like a bug". You misunderstand my comment, I meant this from the kernel side. >> You can also make drm_plane_create_color_pipeline_property set >> the flag in drm_device::driver_features that the cap is supported. > Automatically enabling the driver feature sounds like a reasonable improvement - I'll try that, thanks! >> >> But the cap setting code's not really performance sensitive, it will >> be called only a few times during boot at most. Perhaps check whether >> the first crtc->primary plane has the cap is also sufficient. >> >> If you want to continue with a special driver cap, then please set >> the flag for the xe driver too. > Indeed, will do in case the approach mentioned above doesn't work out for some reason. >> Kind regards, >> ~Maarten Lankhorst > > Regards and thanks for the feedback!e >> >> On 6/30/26 10:42, Robert Mader wrote: >>>  From the main commit: >>> >>> 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. >>> >>> In case of VKMS make the client cap depend on the enable_plane_pipeline. >>> >>> The series can be easily tested with drm_info >= v2.10.0 and VKMS. Without the >>> enable_plane_pipeline option - currently the default - the legacy flags >>> COLOR_ENCODING and COLOR_RANGE should be advertised, just like older drm_info >>> versions. >>> >>> --- >>> >>> Related series actually implementing the color pipeline replacement for the >>> legacy flags: >>> https://lists.freedesktop.org/archives/dri-devel/2026-June/575655.html >>> >>> >>> Robert Mader (4): >>>    drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE behind driver feature >>>    drm/amdgpu: Add DRIVER_PLANE_COLOR_PIPELINE driver feature >>>    drm/i915: Add DRIVER_PLANE_COLOR_PIPELINE driver feature >>>    drm/vkms: Add DRIVER_PLANE_COLOR_PIPELINE driver feature >>> >>>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- >>>   drivers/gpu/drm/drm_ioctl.c             | 2 ++ >>>   drivers/gpu/drm/i915/i915_driver.c      | 2 +- >>>   drivers/gpu/drm/vkms/vkms_drv.c         | 6 +++++- >>>   include/drm/drm_drv.h                   | 6 ++++++ >>>   5 files changed, 15 insertions(+), 3 deletions(-) >>>