[PATCH weston 01/21] libweston: move weston_output::mode_list init to core

Pekka Paalanen ppaalanen at gmail.com
Wed Oct 4 12:03:10 UTC 2017

On Tue, 26 Sep 2017 06:30:16 +0000
"Ray, Ian (GE Healthcare)" <ian.ray at ge.com> wrote:

> On 22/09/2017, 17.32, "wayland-devel on behalf of Pekka Paalanen" <wayland-devel-bounces at lists.freedesktop.org on behalf of ppaalanen at gmail.com> wrote:
> > 
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > Initialize the list in weston_output_init() instead of doing it
> > separately in each backend.
> > 
> > One would expect weston_output_init() to initialize all weston_output
> > members, at least those that are not NULL.
> > 
> > We rely on the set_size() functions to be called only once, as is
> > assert()'d. If set_size() becomes callable multiple times, this patch
> > will force them to be fixed to properly manage the mode list instead of
> > losing all members.
> > 
> > compositor-wayland.c is strange in
> > wayland_output_create_for_parent_output(): it first called
> > wayland_output_set_size() that initialized the mode list with a single
> > mode manufactured from width and height and set that mode as current.
> > Then it continued to reset the mode list and adding the list of modes
> > from the parent output, leaving the current mode left to point to a mode
> > struct that is no longer in the mode list and with a broken 'link'
> > element. This patch changes things such that the manufactured mode is
> > left in the list, and the parent mode list is added. This is probably
> > not quite right either.
> > 
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>  
> What's the policy on creating/tracking follow-up work -- regarding your
> concern about the manufactured mode being left in the list?  Anyway:

Hi Ian,

we don't have a set policy on this. If people feel it there is a danger
it can be forgotten and should not, they could file a Phabricator task
or a bug and even mention it in the commit message. Up to the
individual so far.

> Reviewed-by: Ian Ray <ian.ray at ge.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20171004/2ea9c355/attachment.sig>

More information about the wayland-devel mailing list