[PATCH] ilmControl: fix wrong order of ilm_getScreenIDs output array

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Wed Jan 13 08:52:12 EST 2016


Hi Frederico,

It is an issue of wl_list(s).

When an wl_output is reported by compositor, the first output gets the screen ID 0, and it is inserted to the screen_list.
Next wl_output gets the screen ID 1 and it is again inserted to the screen_list. In the end, we have a list of screens with incremented ids:

0, 1, 2, 3, --- N-1 N:= number of screens.

But wl_list_for_each macro returns the last insterted element first. Therefore, if we create a new array within wl_list_for_each.
The order of outputs will be:

N-1, ..., 3, 2, 1, 0.

To avoid this I modified wl_list_for_each to wl_list_for_each_reverse.

Best regards

Emre Ucan
Software Group I (ADITG/SW1)

Tel. +49 5121 49 6937

> -----Original Message-----
> From: Frederico Cadete [mailto:frederico.cadete at awtce.be]
> Sent: Mittwoch, 13. Januar 2016 14:26
> To: Ucan, Emre (ADITG/SW1)
> Cc: genivi-ivi-layer-management at lists.genivi.org
> Subject: Re: [PATCH] ilmControl: fix wrong order of ilm_getScreenIDs output
> array
> 
> On Wed, Jan 13, 2016 at 12:14:51PM +0000, Ucan, Emre (ADITG/SW1) wrote:
> > Hi,
> >
> > Compositor sends screens in opposite order.
> > write ids from back to front to turn them around.
> 
> Just curious, what is the correct and the opposite order?
> Is the wayland protocol guaranteeing an order for the reporting of wl_output
> objects, or are we relying on an implementation detail of the current
> weston?
> 
> >
> > Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> > ---
> >  .../ilmControl/src/ilm_control_wayland_platform.c  |    4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > Best regards
> >
> > Emre Ucan
> >
> > Advanced Driver Information Technology GmbH Software Group I
> > (ADITG/SW1) Robert-Bosch-Str. 200
> > 31139 Hildesheim
> > Germany
> >
> > Tel. +49 5121 49 6937
> > Fax +49 5121 49 6999
> > eucan at de.adit-jv.com
> >
> > ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car
> > Multimedia GmbH and DENSO Corporation
> > Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438
> > Geschaeftsfuehrung: Wilhelm Grabow, Ken Yaguchi
> >
> 
> 
> > _______________________________________________
> > genivi-ivi-layer-management mailing list
> > genivi-ivi-layer-management at lists.genivi.org
> > https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management




More information about the genivi-ivi-layer-management mailing list