Re: [PATCH 1/3] Input: mt - prevent balanced slot assignment to assign twice the slot

From: Henrik Rydberg
Date: Tue Mar 31 2015 - 03:40:14 EST


Hi Benjamin,

> If two touches are under the dmax distance, it looks like they can now
> be assigned to the same slot. Add a band aid to prevent such situation
> and be able to use the balanced slot assignment.

Yes, great find. You patch is correct, but it is not a band aid, but a
result stemming from a limitation in how equality constraints (read
unique assignments) can be handled in the iterative algorithm. This
cannot happen in the original algorithm, because of the extra
penalization for overcovers.

Here is an alternative version which cleans up the loop logic
somewhat, together with a different commit message. I did not have any
opportunity to check this in hardware. I you like it and find it
working, then please take over the authorship and just add a
signed-off from me.

Thanks,
Henrik

---