Merge pull request #144 from groleo/master

code style janitor
Merge pull request #145 from groleo/master

remove extra parameter of HYBRIS_TRACE_RECORD
egl: fbdev: Use refcounting to manage window and buffer lifetime

As per the promises made in ANativeWindow interface, we can't assume that
we hold the only references to the buffers. Although not mentioned out loud,
in practice this seems to be true for windows as well.

Supporting multiple windows seems nontrivial due to limited buffer space
in the framebuffer so currently we will quite likely fail to allocate buffers
for a second window. In some cases even when the previous window has been
released by us (but not by eg. EGL drivers).

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
elg: fbdev: Fix cancelBuffer() behaviour, clean up dead code

We should make the cancelled buffer available for use again and update
our bookkeeping in cancelBuffer().

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
Merge pull request #146 from kvahlman/fbdev-lifetime

Fbdev buffer management fixes
egl: fbdev: Allow multiple eglGetDisplay() calls

We don't support multiple windows but if the previous window has been
dealt with there is no reason why starting from scratch with eglGetDisplay()
would not work.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
tests: test_egl should destroy the EglImageKHR it creates

test_egl creates an EglImageKHR but never destroys it so the EGL
drivers might be holding on to the native buffer even after test_egl
releases it.

Signed-off-by: Kalle Vahlman <kalle.vahlman@movial.com>
Merge pull request #147 from kvahlman/fdev-multidisplay

egl: fbdev: Allow multiple eglGetDisplay() calls
Merge pull request #148 from kvahlman/cleanup-in-test_egl

tests: test_egl should destroy the EglImageKHR it creates
hooks: return 0xD15EA5E for unsafe pthread functions

if a crash was caused by an unsafe pthread function,
the backtrace had the last PC=0xFFFFFx, which isn't helping much.

To make it easier to identify the crash cause,
return 0xD15EA5E ("disease") for those unsafe pthread functions.

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>