[PATCH 5/5] compositor: Document refs for alternatives/assumptions for backend configs

Bryce Harrington bryce at osg.samsung.com
Wed Apr 13 04:44:50 UTC 2016


On Wed, Apr 06, 2016 at 11:46:28AM +0300, Pekka Paalanen wrote:
> On Wed,  9 Mar 2016 16:49:32 -0800
> Bryce Harrington <bryce at osg.samsung.com> wrote:
> 
> > Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> > ---
> >  src/main.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/src/main.c b/src/main.c
> > index 7370292..310382a 100644
> > --- a/src/main.c
> > +++ b/src/main.c
> > @@ -748,6 +748,19 @@ load_drm_backend(struct weston_compositor *c, const char *backend,
> >  					 "gbm-format", &config->base.format,
> >  					 NULL);
> >  
> > +	/* Use a major/minor versioning scheme to enable backends to detect
> > +	 * ABI changes in the config struct we're passing in.
> > +	 *
> > +	 * NOTE: Alternate designs were proposed for using opaque structures[1]
> > +	 * and for section+key/value getter/setters[2].  The rationale for
> > +	 * selecting the transparent structure design is based on several
> > +	 * assumptions[3] which may require re-evaluating the design choice
> > +	 * if they fail to hold.
> > +	 *
> > +	 * 1: https://lists.freedesktop.org/archives/wayland-devel/2016-February/026989.html
> > +	 * 2: https://lists.freedesktop.org/archives/wayland-devel/2016-February/026929.html
> > +	 * 3: https://lists.freedesktop.org/archives/wayland-devel/2016-February/027228.html
> > +	 */
> >  	config->base.base.struct_version = 1;
> >  	config->base.base.struct_size = sizeof(struct weston_drm_backend_config);
> >  	config->base.configure_output = drm_configure_output;
> 
> Hi,
> 
> shouldn't this be in compositor.h, with the struct
> weston_backend_config definition?

Yep, for the next patchset I've moved it.
 
> Otherwise looks good.
> 
> 
> Thanks,
> pq

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> 
> iQIVAwUBVwTM5CNf5bQRqqqnAQj8Eg/8C1JTvLKA93EGbRkTtyD6qfUeO5ZnWweD
> osVK8GC3af0KD63bItZAJ7MhxVO87fXVINfY5sLHkczTK/csCYdagcQHBxDyeP1/
> zl4ScGhbnFQmcBClbs9/ISb3BXtBijerUdFYUbYRYeAEgL0iavfePyE0xzvCWwff
> El0nbdinEfS5N4b8gKIYyNl5kK1nGcHQ+DgePrlZoUb6a/ZpQNqFZ4NwPlkgcWRI
> uOK2AoKOy/OQZek1NRmvH9iZKicnH7B0DSkho6gWEJiPGEJ7siqIlo1HHXXlfHZ3
> 7nhr6fJ5zDsigLaJb5XuirAmpgD8bocUhXyB1wLnQn1yQ+sqBFTQDUufObR/zD6u
> xF8xmTnV2YQT8Tg6KZ0LxLQN5k1kV7U8V4YeN2P7VSsHeeyD/WOJYxa2idANS8zb
> mK0uSEBr9V8lzeFCfcZD6fMEuhMDF9elBFVcI7xm7EDFtvE38P3xvd1lWV/kGRIx
> H30H7qOyyko/UB6n5uh/VqNZ1bKEuJB7vE+ykEwxNtJNEpRTrOJGs8K5GyN/IJsY
> YKjzgsvNBDqGYO2+w1xGyvz3fiaW3iFsmBuhh9oKQO5qqYApXYz/PDfnoV9rcTH5
> O0wMjc3Ln8VO3SWxXXECG62d8orhh1I9zPB+1GumsEFqD8aMBZ2y4Ti6sW+/aPOX
> b6W8L3GiOzk=
> =lHNr
> -----END PGP SIGNATURE-----



More information about the wayland-devel mailing list