gralloc: Add support for PRIV_FLAGS_DISP_CONSUMER

On 8976, venus h/w can support 4k decoding but mdss
can handle only upto 2k. So, in usecases where
the resolution of the video is more than 2k,
venus h/w would downscale the content to 2k and allocate
the output decoded buffers at 2k.

In cases where display(SF) is not the consumer of the
decoded buffers(for ex:transcoding, etc), downscaling
neednot happen.

So, video f/w needs a mechanism to identify the consumer
of the decoded buffers and allocate them accordingly.

The buffers would be allocated at the incoming video
resolution by default. During allocation, the gralloc private
flag PRIV_FLAGS_DISP_CONSUMER would be set to indicate to the
video f/w if display is the consumer of the content.

If display happens to be the consumer and the resolution
of the incoming video is more than 2k, video f/w would
cancel the earlier allocated buffers and would allocate
the new buffers at 2k

Change-Id: Ic6e562d357eadb8d49b166b454746f91ccc85ed8
2 files changed