hwc: fix initialization race condition

hwc_dev->idle is initialized, without taking a lock, after the uevent
thread (which uses the value of ->idle) is started.  Start the uevent
thread later in order to avoid this race.

Change-Id: Ib4dec3024cb04e2ea2dfff7323c59acbf654ccbe
hwc: disable idle timeouts until hwc_set() has been called at least once

The OMAP hwcomposer's uevents listening thread has an idle timeout; if
the timeout (250ms by default) is reached without an event being
recorded, it calls invalidate() to update the screen.  The thread is
started when the hwcomposer module is opened, early in SurfaceFlinger
initialization.   As a result, it's possible that the timeout triggers
before SurfaceFlinger finishes initializing; in that case, the
subsequent call into invalidate() crashes SurfaceFlinger.

Fix this by disabling idle timeouts when the thread starts; this way,
they won't be enabled until hwc_set() has been called, at which point we
know SurfaceFlinger is up and running.

Change-Id: Ic75e7b19efe10b0a20fbc943633ca090006bf5df
hwc: only assemble debug logging info in hwc_set() if debug logging is enabled

Change-Id: I5c2eead289d757e94db395ef39b5f668bda145a7
hwc: add a flag for devices with displays initialized by bootloader

Change-Id: Id3b36a0fb0c1ae1e15432aaf3a164a81ae448b92