display-legacy: fix gralloc module

Change-Id: I0b596a3193114eedc806905749854f1b60aa7a77
gralloc: use module define

Change-Id: I3ec322168134f6177e3ce305140dd24793be5039
make necessary changes for display-legacy

Change-Id: Ibc3afc16ccf9c0974c4243ceb28073b2cfa5b29d
hwc: Refactor of allowing virtual displays to HWC

  1. Since SF doesnt invoke blank for virtual display,
     handle pipe clean up as part of Primary display
     blank.
  2. Support virtual display to query display attributes.

This refactor is done to address Framework reboot issue.

Change-Id: I266a87228193fd85252a22242b66dd4af5f3033f

Conflicts:
	libhwcomposer/hwc.cpp
	libhwcomposer/hwc_utils.cpp
	libhwcomposer/hwc_utils.h
Revert "libgralloc: Change CAMERA_HEAP to ADSP_HEAP"

This reverts commit 9f5423c18e048744e6640b96883b2f57195c096e.
gralloc: Allow legacy devices to use PMEM for ADSP (camera).

Partially bring back PMEM support for legacy devices having proprietary camera
libraries stuck in PMEM. This change allows these devices to continue using
PMEM for the camera, and ION for everything else.

Based on https://github.com/Blefish/android_hardware_qcom_display-caf/commit/41c51319b03cab926a64964d29296b1127274ee0