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

Pekka Paalanen ppaalanen at gmail.com
Fri Apr 15 13:29:38 UTC 2016


On Fri, 15 Apr 2016 14:32:04 +0200
Benoit Gschwind <gschwind at gnu-log.net> wrote:

> Hello Bryce and Giulio,
> 
> Thanks for your contribution :), here is my comments.
> 
> Le 13/04/2016 12:25, Bryce Harrington a écrit :
> > From: Giulio Camuffo <giuliocamuffo at gmail.com>
> > 
> > Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> > Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> > Acked-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > ---
> > v5:
> >  - Update to reflect format rename to gdb_format
> >  - Initialize width/height (suggested by pq)
> >  - squash drm structure versioning (suggested by pq)
> > 
> >  Makefile.am          |   3 +
> >  src/compositor-drm.c | 197 ++++++++++++++++++++-------------------------------
> >  src/compositor-drm.h | 111 +++++++++++++++++++++++++++++
> >  src/compositor.h     |   2 -
> >  src/main.c           |  96 ++++++++++++++++++++++++-
> >  5 files changed, 283 insertions(+), 126 deletions(-)
> >  create mode 100644 src/compositor-drm.h

> > @@ -3095,18 +3053,18 @@ drm_backend_create(struct weston_compositor *compositor,
> >  	 */
> >  	b->sprites_are_broken = 1;
> >  	b->compositor = compositor;
> > +	b->use_pixman = config->use_pixman;  
> 
> Duplicate configuration variable, while config structure is kept during
> the backend life (line below), just keep the config->use_pixman.
> 
> > +	b->config = config;  
> 
> When I did this with headless and x11 drm, a question raised: "Should I
> copy or should I take the ownership ?". Taking the ownership leave to
> the developer the possibility to change the configuration easily while
> running. Maybe some documentation may explicit that it's forbidden to
> change configuration after run is started.

Hi,

a later patch removes that assignment.

Changing configuration by simply changing a value without notifying the
backend is going to end up in tears. If anything needs to be
changeable, it must be done with a function call.

Btw. the plugin registry RFC I sent a while ago might offer a nice way
for the compositor to access backend-specific functions, if the backend
registers an API.


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/20160415/e4b96b2f/attachment.sig>


More information about the wayland-devel mailing list