From: Damien Lespiau <damien.lespiau@intel.com>
To: Joakim Plate <elupus@ecce.se>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 7/9] drm/edid: Expose mandatory stereo modes for HDMI sinks
Date: Mon, 16 Sep 2013 18:35:12 +0100 [thread overview]
Message-ID: <20130916173512.GA29268@strange.amr.corp.intel.com> (raw)
In-Reply-To: <loom.20130913T180539-921@post.gmane.org>
On Fri, Sep 13, 2013 at 04:10:24PM +0000, Joakim Plate wrote:
> Damien Lespiau <damien.lespiau <at> intel.com> writes:
>
> > +static const struct s3d_mandatory_mode s3d_mandatory_modes[] = {
> > + { 1920, 1080, 24, 0,
> > + DRM_MODE_FLAG_3D_TOP_AND_BOTTOM | DRM_MODE_FLAG_3D_FRAME_PACKING
> },
> > + { 1920, 1080, 50, DRM_MODE_FLAG_INTERLACE,
> > + DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF },
> > + { 1920, 1080, 60, DRM_MODE_FLAG_INTERLACE,
> > + DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF },
> > + { 1280, 720, 50, 0,
> > + DRM_MODE_FLAG_3D_TOP_AND_BOTTOM | DRM_MODE_FLAG_3D_FRAME_PACKING
> },
> > + { 1280, 720, 60, 0,
> > + DRM_MODE_FLAG_3D_TOP_AND_BOTTOM | DRM_MODE_FLAG_3D_FRAME_PACKING }
> > +};
>
>
> I may be missing something here... But..
Oops, did not see your answer, please don't forget to include me in Cc:
next time and not just the list.
> The frame packed modes are much higher in pixels than this and include frame
> packing.
> 1080*2+45=2050
> 720*2+30=1470
>
> Unless you intend to hide the left/right split in mesa or other place, we
> need to get the ability to render to both fields somehow.
>
> Either as the full 2050 pixels high or at 1080*2 and the driver adds the
> blanking.
Right, so at the moment, my proposition is that userspace is responsible for
giving us a framebuffer with the right dimensions. For instance in
intel-gpu-tools's testdisplay I have:
struct box {
int x, y, width, height;
};
struct stereo_fb_layout {
int fb_width, fb_height;
struct box left, right;
};
static void stereo_fb_layout_from_mode(struct stereo_fb_layout *layout,
drmModeModeInfo *mode)
{
unsigned int format = mode->flags & DRMTEST_MODE_FLAG_3D_MASK;
const int hdisplay = mode->hdisplay, vdisplay = mode->vdisplay;
switch (format) {
[...]
case DRM_MODE_FLAG_3D_FRAME_PACKING:
{
int vactive_space = mode->vtotal - vdisplay;
layout->fb_width = hdisplay;
layout->fb_height = 2 * vdisplay + vactive_space;
box_init(&layout->left,
0, 0, hdisplay, vdisplay);
box_init(&layout->right,
0, vdisplay + vactive_space, hdisplay, vdisplay);
break;
}
and then adjust the timings if needed:
static void adjust_stereo_timings(drmModeModeInfo *mode)
{
unsigned int layout = mode->flags & DRMTEST_MODE_FLAG_3D_MASK;
uint16_t vdisplay, vactive_space;
switch (layout) {
case DRM_MODE_FLAG_3D_TOP_AND_BOTTOM:
case DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF:
return;
case DRM_MODE_FLAG_3D_FRAME_PACKING:
vactive_space = mode->vtotal - mode->vdisplay;
vdisplay = mode->vdisplay;
mode->vdisplay += vdisplay + vactive_space;
mode->vsync_start += vdisplay + vactive_space;
mode->vsync_end += vdisplay + vactive_space;
mode->vtotal += vdisplay + vactive_space;
mode->clock = (mode->vtotal * mode->htotal * mode->vrefresh) /
1000;
return;
[...]
I think it makes quite a bit of sense to have the "underlying 2D mode" in the
mode structure as this 2d mode is relevant to the 3d mode:
- HDMI stereo modes are defined based on the unerdlying 2D mode. (eg the
extra, non-mandatory, modes in the EDID have their definitions pointing to
CEA 2D VICs)
- HDMI VIC infoframe: one needs to indicate the CEA VIC of this underlying 2d
mode when setting the stereo mode.
Note that in the future, we also want to allow framebuffers with 2 distinct
buffers for right and left.
> Also, some logic aught to indicate pixel aspect ratio for the modes since
> they are non square for the half res modes.
As Daniel already answered, aspect ration in CEA modes is an orthogonal issue
(that we want to sort out as well sooner rather than later)
--
Damien
next prev parent reply other threads:[~2013-09-16 17:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 18:57 Stereo 3D v3 Damien Lespiau
2013-09-06 18:57 ` [PATCH 1/9] drm: Move the GET_CAP macros next to the corresponding ioctl structure Damien Lespiau
2013-09-08 13:20 ` David Herrmann
2013-09-06 18:57 ` [PATCH 2/9] drm: Sort userspace typedefs by ioctl number Damien Lespiau
2013-09-06 18:57 ` [PATCH 3/9] drm: Make sure every ioctl structure has a typedef Damien Lespiau
2013-09-08 11:58 ` Daniel Vetter
2013-09-08 19:36 ` Damien Lespiau
2013-09-08 20:04 ` Daniel Vetter
2013-09-06 18:57 ` [PATCH 4/9] drm: Add a SET_CAP ioctl Damien Lespiau
2013-09-06 18:57 ` [PATCH 5/9] drm: Add HDMI stereo 3D flags to struct drm_mode_modeinfo Damien Lespiau
2013-09-06 18:57 ` [PATCH 6/9] drm: Add a DRM_CAP_STEREO_3D capability for SET_CAP ioctl Damien Lespiau
2013-09-08 13:50 ` David Herrmann
2013-09-08 14:49 ` Damien Lespiau
2013-09-13 16:04 ` Joakim Plate
2013-09-16 17:39 ` [PATCH 6/9] drm: Add a DRM_CAP_STEREO_3D capability for SET_CAP?ioctl Damien Lespiau
2013-09-06 18:57 ` [PATCH 7/9] drm/edid: Expose mandatory stereo modes for HDMI sinks Damien Lespiau
2013-09-13 16:10 ` Joakim Plate
2013-09-13 16:31 ` Daniel Vetter
2013-09-16 17:35 ` Damien Lespiau [this message]
2013-09-16 17:56 ` Ville Syrjälä
2013-09-16 18:20 ` Daniel Vetter
2013-09-16 18:04 ` Daniel Vetter
2013-09-17 9:22 ` Damien Lespiau
2013-09-06 18:57 ` [PATCH 8/9] drm: Reject modes with more than 1 stereo flags set Damien Lespiau
2013-09-06 18:57 ` [PATCH 9/9] drm: Set the relevant infoframe field when scanning out a 3D mode Damien Lespiau
2013-09-06 19:11 ` Stereo 3D v3 Chris Wilson
2013-09-08 11:59 ` Daniel Vetter
2013-09-08 13:46 ` David Herrmann
2013-09-08 15:03 ` Damien Lespiau
2013-09-08 20:05 ` Daniel Vetter
2013-09-10 14:14 ` Chris Wilson
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=20130916173512.GA29268@strange.amr.corp.intel.com \
--to=damien.lespiau@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=elupus@ecce.se \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.