On Tue, Sep 17, 2013 at 3:20 PM, Damien Lespiau <damien.lespiau@xxxxxxxxx> wrote: > On Tue, Sep 17, 2013 at 12:37:48PM +0200, Daniel Vetter wrote: >> I guess we should start to check that. For 3d framebuffers with 2 >> separate buffer handles for each plane I think we need to add another flag >> to addfb2, e.g. >> >> #define DRM_MODE_FB_3D_2_FRAMES (1<<1) /* separate left/right buffers, doubles plane count */ >> >> and then also throw in the respective check code into the core that >> userspace supplies sufficient amounts of buffers in framebuffer_check() >> by adjusting drM_format_num_planes and drm_format_plane_cpp. > > Would we really need that flag? we can just count the number of buffers > and decide from that number whether we're in the 1 or 2 buffer(s) case? We do not know at addfb2 time that it'll be a 3d mode buffer, and drivers might want to know that to internally assign the buffers to left/right buffer handle pointers. Similar to how we already have a flag for when the buffer is interlaced, which atm we don't support (since we only support scan-out of progressive buffers to interlaced modes, not interlaced to interlaced). So imo a flag here makes sense so that the driver can properly check constraints and make sense of the handles. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx