On Mon, Sep 16, 2013 at 06:48:53PM +0100, Damien Lespiau wrote: > There are a few things to be flushed out if we want to allow multiple > buffers stereo framebuffers: > - What with drm_planes? what semantics do they follow, what is the > hardware able to do with them? > - How do we define which buffer if the right/left one > - Do we allow flips between 1 buffer fbs and 2 buffers fbs (No.) > > So for now, and until I get access to hardware that can do that, let's > just disallow 2 buffers stereo framebuffers to not introduce ABI we > wouldn't be able to change afterwards. > > Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> > --- > drivers/gpu/drm/drm_crtc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 39f60ec..91d1c4b 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -2131,6 +2131,17 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, > goto out; > } > > + /* > + * Do not allow the use of framebuffers consisting of multiple > + * buffers with stereo modes until all the details API details > + * are fleshed out (eg. interaction with drm_planes, switch > + * between a 1 buffers and a 2 buffers fb, ...) > + */ > + if (fb->num_buffers > 1 && drm_mode_is_stereo(mode)) { > + ret = -EINVAL; > + goto out; > + } This would prevent planar buffers in stereo modes. I'm think we just ignore the matter for now and let drivers deal with it. We don't have enough handles anyway for planar stereo, so maybe we even want to add separate left/right fb attachment properties to the planes instead of tying it up in inside a single fb. Or we cook up addfb3 when we hit this problem for real. I think we'd anyway need some kind of flag for the fb if it contains both left and right buffers. > + > drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); > > hdisplay = mode->hdisplay; > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel