From: Robert Mader <robert.mader@collabora.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org,
Harry Wentland <harry.wentland@amd.com>,
Daniel Stone <daniels@collabora.com>,
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
Uma Shankar <uma.shankar@intel.com>,
Louis Chauvet <louis.chauvet@bootlin.com>,
Melissa Wen <mwen@igalia.com>, Simon Ser <contact@emersion.fr>,
Pekka Paalanen <pekka.paalanen@collabora.com>,
Leandro Ribeiro <leandro.ribeiro@collabora.com>
Subject: Re: [PATCH v2] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
Date: Thu, 2 Jul 2026 11:31:14 +0200 [thread overview]
Message-ID: <0f495406-a3c9-4c72-8419-a647a864e0fb@collabora.com> (raw)
In-Reply-To: <83f324a2-abe1-4b32-8782-439569f651d2@linux.intel.com>
Hi,
On 02.07.26 10:34, Maarten Lankhorst wrote:
> Hello,
<snip>
> On 7/2/26 10:16, Robert Mader wrote:
>> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
>> index e2df4becce62..b2c0234eaf14 100644
>> --- a/drivers/gpu/drm/drm_ioctl.c
>> +++ b/drivers/gpu/drm/drm_ioctl.c
>> @@ -373,13 +373,26 @@ 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;
>> +
>> + 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;
>> +
>> if (!file_priv->atomic)
>> return -EINVAL;
>> if (req->value > 1)
>> return -EINVAL;
>> file_priv->plane_color_pipeline = req->value;
>> break;
>> + }
> Perhaps put the most specific check (is there a plane with color pipeline?)
> last, and return -EINVAL, as that is the default before
> DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE was added.
>
> Kind regards,
> ~Maarten Lankhorst
Thanks, will do so in v3. Will wait a bit more for further feedback and
send it out tomorrow.
--
Robert Mader
Consultant Software Developer
Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718
prev parent reply other threads:[~2026-07-02 9:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 8:16 Robert Mader
2026-07-02 8:34 ` Maarten Lankhorst
2026-07-02 9:31 ` Robert Mader [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f495406-a3c9-4c72-8419-a647a864e0fb@collabora.com \
--to=robert.mader@collabora.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chaitanya.kumar.borah@intel.com \
--cc=contact@emersion.fr \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=leandro.ribeiro@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=pekka.paalanen@collabora.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=uma.shankar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®