drm_hwcomposer: add AutoLock to automatically handle pthread_mutex_lock

For functions that need to hold locks and also handle errors, using AutoLock
will make them much simpler and less prone to mutex handling errors.

Change-Id: Ida6545850e89186c552e3d58b2973c14852494ad
3 files changed