From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: InKi Dae <daeinki@gmail.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm: add an fb creation ioctl that takes a pixel format
Date: Mon, 7 Nov 2011 08:12:45 -0800 [thread overview]
Message-ID: <20111107081245.1b9351d5@jbarnes-desktop> (raw)
In-Reply-To: <CAAQKjZPhqYdMAUkbCbc68muPLN7azuVr0yod7hFC=i+MigwNhw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1854 bytes --]
On Mon, 7 Nov 2011 23:55:02 +0900
InKi Dae <daeinki@gmail.com> wrote:
> > +struct drm_mode_fb_cmd2 {
> > + __u32 fb_id;
> > + __u32 width, height;
> > + __u32 pixel_format; /* fourcc code from videodev2.h */
> > +
> > + /*
> > + * In case of planar formats, this ioctl allows one
> > + * buffer object with offets and pitches per plane.
> > + * The pitch and offset order is dictated by the fourcc,
> > + * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as:
> > + *
> > + * YUV 4:2:0 image with a plane of 8 bit Y samples
> > + * followed by an interleaved U/V plane containing
> > + * 8 bit 2x2 subsampled colour difference samples.
> > + *
> > + * So it would consist of Y as offset[0] and UV as
> > + * offeset[1]. Note that offset[0] will generally
> > + * be 0.
> > + */
> > + __u32 handle;
> > + __u32 pitches[4]; /* pitch for each plane */
> > + __u32 offsets[4]; /* offset of each plane */
> > +};
>
> I think that it doesn't pitches[] and offsets[] because we can
> calulate pitch and offset per plane in kernel side through pixel
> format information from user. (PS. pixel format has unique value) I
> think it's good to remove them if unnecessary. there could be my
> missing point. so Rob, could you please tell me about why do you need
> them.?
Daniel seemed to think that some of the formats might have ambiguous
pitches or offsets, so being able to specify one for each possible
component seems like a good idea.
Also, for planar formats packed into a single buffer object handle
(through driver specific multiplexing or non-zero offsets), individual
pitches and offsets may be required.
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2011-11-07 16:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 20:03 [PATCH] DRM planes Jesse Barnes
2011-11-02 20:03 ` [PATCH 1/5] drm: add plane support Jesse Barnes
2011-11-02 22:33 ` Jesse Barnes
2011-11-03 18:21 ` Jesse Barnes
2011-11-03 22:48 ` Jesse Barnes
2011-11-03 22:56 ` Daniel Vetter
2011-11-04 2:22 ` Joonyoung Shim
2011-11-04 14:10 ` Jesse Barnes
2011-11-02 20:03 ` [PATCH 2/5] drm: add an fb creation ioctl that takes a pixel format Jesse Barnes
2011-11-03 18:22 ` Jesse Barnes
2011-11-04 7:34 ` Joonyoung Shim
2011-11-04 14:13 ` Jesse Barnes
[not found] ` <CAAQKjZPhqYdMAUkbCbc68muPLN7azuVr0yod7hFC=i+MigwNhw@mail.gmail.com>
2011-11-07 16:12 ` Jesse Barnes [this message]
2011-11-07 17:02 ` Rob Clark
2011-11-02 20:03 ` [PATCH 3/5] drm/i915: rename existing overlay support to "legacy" Jesse Barnes
2011-11-03 18:22 ` Jesse Barnes
2011-11-02 20:03 ` [PATCH 4/5] drm/i915: add SNB and IVB video sprite support Jesse Barnes
2011-11-03 18:22 ` Jesse Barnes
2011-11-04 2:29 ` [Intel-gfx] " Lan, Hai
2011-11-02 20:03 ` [PATCH 5/5] drm/i915: add destination color key support Jesse Barnes
2011-11-03 18:23 ` Jesse Barnes
2011-11-03 14:11 ` [PATCH] DRM planes Daniel Vetter
2011-11-03 15:12 ` Jesse Barnes
2011-11-03 17:29 ` Daniel Vetter
2011-11-03 17:36 ` Jesse Barnes
2011-11-03 18:55 ` Rob Clark
2011-11-03 19:14 ` Jesse Barnes
2011-11-03 17:47 ` Alan Cox
2011-11-03 18:58 ` Daniel Vetter
2011-11-03 22:20 ` Alan Cox
2011-11-03 22:24 ` Jesse Barnes
-- strict thread matches above, loose matches on Subject: below --
2011-11-07 18:02 Jesse Barnes
2011-11-07 18:02 ` [PATCH 2/5] drm: add an fb creation ioctl that takes a pixel format Jesse Barnes
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=20111107081245.1b9351d5@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=daeinki@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/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