From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 174C827732 for ; Tue, 7 Jul 2026 14:17:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783433852; cv=none; b=KYpvgSYO8NanLuba+vCUKMeEEqH3bTZBKKY0fVmeYzRNlmPDj/4tvrUTP156Pu3zA9iwJ5zPJfwi2CIk4GOhJI8NYThgXjjM2VFV1p6BoCWAQuHVfTUuFuN5SznQ7cYJnN8aDr0CHziICc1jjUgK6/rEpIzayEy68Ga2Cg3V/fc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783433852; c=relaxed/simple; bh=n6IDX0ZcCgLBKVR2hEqdAQZ+aHjY/cRF0MzfnOL8oQc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tkKDoMKMZcH5lBMaesWjVMpsnljPJy9nqfgM1s+yQk9oJVs67W5etMYhldVwmfGpa07pMuFdn0Q9E1nvEHEzMKp8kbxV5TJmn0/nwee+RT+t9yEMxYbId9+TszfVU5FshVdF5FLW17JOSmyyEO4ar5ye7BYiA9BtZiWV1WsNRag= 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=YBFrS3Pi; arc=none smtp.client-ip=192.198.163.7 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="YBFrS3Pi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1783433845; x=1814969845; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=n6IDX0ZcCgLBKVR2hEqdAQZ+aHjY/cRF0MzfnOL8oQc=; b=YBFrS3PiQUC0MsrKnEDGT4iigrWh8IRuUzHIDi0ZdG4w1uu4eve7oOBt aWZ3xfcDBMKWzyfjI9PAw/UOr9qLyYmpv5wTqTkGUmqs9XnkC1w8+UzR4 I3U2055Rgj08e/vo1WrmjLdn8xB0RANySMrTuaqh000i9ybKpX6TICqQ6 +mS0PGucImCyMAGL1Zmvx/X6o156DCxd2e3bIH1SiI/qgK8PouuHopKer iLJKRl19+w6x0cRtGcg2aWH3xYQPHirsGOhBfzUm9EUNdVfuEm90qWigo +DeJMg1Oe7CYGTzB0Gd8nEBa3o7TNiXAUjgYFPmLR1NgEmeOolzlOdaf9 A==; X-CSE-ConnectionGUID: UQM4OH5CSROHx9/NlchWvg== X-CSE-MsgGUID: mnMwoi7lRnuLemVwnoNWEg== X-IronPort-AV: E=McAfee;i="6800,10657,11840"; a="109623893" X-IronPort-AV: E=Sophos;i="6.25,153,1779174000"; d="scan'208";a="109623893" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2026 07:17:21 -0700 X-CSE-ConnectionGUID: azXCJv3QRBqATUv6ZUoP7g== X-CSE-MsgGUID: 86IffxY4TpGK38ceQPgUYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,153,1779174000"; d="scan'208";a="250653344" Received: from ettammin-mobl3.ger.corp.intel.com (HELO [10.245.244.223]) ([10.245.244.223]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2026 07:17:17 -0700 Message-ID: Date: Tue, 7 Jul 2026 16:17:57 +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 , "Borah, Chaitanya Kumar" , 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 , Uma Shankar , Louis Chauvet , Melissa Wen , Simon Ser , Pekka Paalanen , Leandro Ribeiro References: <20260703073230.19982-1-robert.mader@collabora.com> <6d8806b8-fc71-4699-82c4-7189a0ea2284@intel.com> Content-Language: en-US From: Maarten Lankhorst In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Robert, On 7/7/26 15:15, Robert Mader wrote: > Hi, > > On 07.07.26 15:01, Maarten Lankhorst wrote: >> Hey, >> >> On 7/7/26 10:03, Borah, Chaitanya Kumar wrote: >>> >>> On 7/3/2026 1:02 PM, 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, >>> s/later/latter >>> >>>> 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. >>> This change will but a driver can also choose to export colorops like programmable CTM_3x4 to achieve the same. >>> >>> We should also perhaps document this somewhere that if a driver supports LEGACY properties, it is imperative to implement some version of it with the color pipeline line property. >> Would this be doable inside drm core? Implement the color pipeline properties, get the fixed pipeline for free? >> >> But thanks for all feedback, as I was about to push this patch, I noticed it still uses -EOPNOTSUPP, can it be changed to -EINVAL? > > For existing users it shouldn't make a difference. drm_info and Weston just check for "drmSetClientCap() == 0" - and old kernels without the cap will also return -EINVAL AFAICS. > > I personally find -EOPNOTSUPP more appropriate and more in line with other return values in that function - but no strong opinion, thus feel free to change while applying (or I can resend the patch accordingly if you prefer). Yeah no worries, I looked at the code and it seems -EOPNOTSUPP is used a lot in getcap/setcap. In particular when driver support is missing for features, I'll leave it as is and push it now. Kind regards, ~Maarten