[PATCH weston v5 03/11] drm: port the drm backend to the new init api

Pekka Paalanen ppaalanen at gmail.com
Mon Apr 18 08:49:15 UTC 2016


On Sat, 16 Apr 2016 08:49:22 +0300
Giulio Camuffo <giuliocamuffo at gmail.com> wrote:

> 2016-04-16 1:02 GMT+03:00 Bryce Harrington <bryce at osg.samsung.com>:
> > On Fri, Apr 15, 2016 at 02:32:04PM +0200, Benoit Gschwind wrote:  
> >> > +   /** The seat to be used by the output. Set to NULL to use the
> >> > +    * default seat. */
> >> > +   char *seat;
> >> > +   /** The modeline to be used by the output. Refer to the documentation
> >> > +    * of WESTON_DRM_BACKEND_OUTPUT_PREFERRED for details. */
> >> > +   char *modeline;  
> >>
> >> Maybe enum with drmModeModeInfo* is better API than free string API?  
> >
> > I think you're probably right that weston_drm_backend_output_config
> > could hold a pointer to the enum rather than the string.  I've moved
> > weston_drm_backend_output_config to be a private struct in
> > compositor-drm.c so this should be doable.  
> 
> One of the earlier revisions had that but after a discussion with
> Quentin we decided to put the parsing in the backend rather than every
> compositor.

Also using a libdrm struct in the config API is a bit awkward. It would
be the only reason why compositor-drm.h needed libdrm headers. A string
can also easily use a shortcut notation like "800x600" instead of a
full modeline.

But, I expect the output configuration API to have a complete rewrite
and redesign in the future, to move into a pattern where libweston
notifies about new outputs and then the compositor decides to take them
into use and set them up, rather than the backend in libweston like it
does now.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160418/1c2f47d4/attachment.sig>


More information about the wayland-devel mailing list