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 74EE4414A3B for ; Tue, 7 Jul 2026 13:16:29 +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=1783430193; cv=pass; b=oJtIgWQMrdwg1OZTnIsFLKDZx76K13A1DOPDjUmMjtClqYIiAugObT27MkJ4ImKl5i5/mG30/uxpy2ylE5HTLPAovXq7o6AjlyJTuIRFaHAgxLLbNEq2BHlMvStLOs6S0ZBFGLWvdq03/L6rBpTr+9oFI+FkT4tPV/xhMz8tJgA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783430193; c=relaxed/simple; bh=Rb0g3fZmR+3LAQCDvqGEGDWhZbLYICXe4Gzhn5HLAJg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JHf0am+icNr2w5VjiOzDy5qUm0fol64Cq0ldXnsVSicD8s1RrRkZ+I9NNDif7FqZBjDGDp9QrjMZAV9icfpfxt2xcIGLGUffW/BtCCnfRkxogm3Dgu9l6wCMxhmSy8jRT7GcPNOBvmt3CjOQU00v5J5nIfaRipJ76Az6F2LsQws= 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=ASeBTo/0; 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="ASeBTo/0" ARC-Seal: i=1; a=rsa-sha256; t=1783430152; cv=none; d=zohomail.com; s=zohoarc; b=cpB50S59VRu/EKC48+ikzc9YvMgOjb8U5Ft9BR+34AcvftHQpubdQBUO8Kp4Tnii0393/df63cZZWxlNSwXV4v0ADaursX12DTXLdDvztPK3+WDFhKLayAGs93KKU7mTe+BhEHRKybK8GyB/oCR0BQ3XtAoMXHQDJooynakP84I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783430152; 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=AjiMAH+aUOZ1T5Y6Winl/yzirQDCF30FfDqJLLs3nI0=; b=XoWvc7PgKPbRe4euzkb03O8L74Ui6RFjRRTnMIVj5k8XLyU5cC08klbz52cMlKejV/iRE57KxNzWliZ8uZU+4BYdLqxOiD3QiDORLVPkWlLFGsMY+mHa9xAFOh3OOZJIcPr67eK/rLI4OR2Juo29HJNFJAPBerrU9I+YVUEUak8= 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=1783430152; 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=AjiMAH+aUOZ1T5Y6Winl/yzirQDCF30FfDqJLLs3nI0=; b=ASeBTo/0jYpDQViBrlxcZh+DVqaQYOejqc0HosMJJCUeUhh3KnToXBT9njL+QcZS 2EviRqwfOu3LymyGLKAQA/8h/xP46I0WIfn73TyYz9z4eTcF8Em/cStE2RdpKaAQ7+I sibf1iY/kf4kvEOvgoO763I/JthTOnYTbiTppsmc= Received: by mx.zohomail.com with SMTPS id 1783430149837990.5307558137384; Tue, 7 Jul 2026 06:15:49 -0700 (PDT) Message-ID: Date: Tue, 7 Jul 2026 15:15:44 +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 , "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, de-DE From: Robert Mader In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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). Robert > > ~Maarten -- Robert Mader Consultant Software Developer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718