mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/dumb-buffers: document abuses in the UAPI document
Date: Fri, 27 Feb 2026 00:06:58 +0800	[thread overview]
Message-ID: <6bfa80c659d0f1336bcddd844874693766791b6e.camel@iscas.ac.cn> (raw)
In-Reply-To: <4380ab4e-6b40-4f72-91f3-2dc0362ce2a5@suse.de>

在 2026-02-26四的 17:01 +0100,Thomas Zimmermann写道:
> Hi
> 
> Am 26.02.26 um 07:37 schrieb Icenowy Zheng:
> > Although the current DRM_IOCTL_MODE_CREATE_DUMB interface design
> > only
> > suits linear buffers, some KMS drivers abuse it for AFBC
> > framebuffers.
> > 
> > Mention it in the interface document, and clarifying that it's not
> > recommended.
> > 
> > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > ---
> >   include/uapi/drm/drm_mode.h | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/include/uapi/drm/drm_mode.h
> > b/include/uapi/drm/drm_mode.h
> > index cbbbfc1dfe2b8..02b6fa7ade355 100644
> > --- a/include/uapi/drm/drm_mode.h
> > +++ b/include/uapi/drm/drm_mode.h
> > @@ -1256,6 +1256,10 @@ struct drm_mode_crtc_page_flip_target {
> 
> Since you're at it, you should move the line at [1] right here as the
> first sentence of this paragraph. Then continue with 'Do not
> attempt'.
> 
> With that change, the previous paragraphs refer to pixel formats and
> the 
> final one refers to framebuffer layout.
> 
> 
> >    * Do not attempt to allocate anything but linear framebuffer
> > memory
> >    * with single-plane RGB data. Allocation of other framebuffer
> >    * layouts requires dedicated ioctls in the respective DRM
> > driver.
> > + * There exists drivers exploiting this interface for framebuffers
> 
> 'exists user-space software'

Ah the drivers seem to be also criminal to accept this kind of usage,
it's why I thought about writing "drivers" here.

Thanks
Icenowy

> 
> > + * with modifiers other than DRM_FORMAT_MOD_LINEAR, but this is
> 
> Rather 'with non-linear layout'.  The reference to MOD_LINEAR seems
> out 
> of place here.
> 
> > + * incorrect usage with undefined behavior, and should not be
> > + * replicated.
> 
> Best regards
> Thomas
> 
> [1] 
> https://elixir.bootlin.com/linux/v6.19/source/include/uapi/drm/drm_mode.h#L1216
> 
> >    */
> >   struct drm_mode_create_dumb {
> >   	__u32 height;


  reply	other threads:[~2026-02-26 16:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26  6:37 [PATCH 1/2] drm/dumb-buffers: reference the ioctl interface for its constraints Icenowy Zheng
2026-02-26  6:37 ` [PATCH 2/2] drm/dumb-buffers: document abuses in the UAPI document Icenowy Zheng
2026-02-26 16:01   ` Thomas Zimmermann
2026-02-26 16:06     ` Icenowy Zheng [this message]
2026-02-26 16:28       ` Thomas Zimmermann
2026-02-26 16:06 ` [PATCH 1/2] drm/dumb-buffers: reference the ioctl interface for its constraints Thomas Zimmermann

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=6bfa80c659d0f1336bcddd844874693766791b6e.camel@iscas.ac.cn \
    --to=zhengxingda@iscas.ac.cn \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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®