mm-video: vidc: Fix bug when sufficient resources event is received

Video driver maintains two different queues for events and
buffers because of which the order between events and buffers
is lost. This order needs to be preserved only for sufficient
resources event. Video firmware might queue messages in following
order to the driver:

FBD_QVGA
FBD_QVGA
SUFFICIENT_RESOURCES
FBD_QCIF
FBD_QCIF

To openmax component this appears as:
Buffer queue      Event Queue
FBD_QVGA          SUFFICIENT_RESOURCES
FBD_QVGA
FBD_QCIF
FBD_QCIF

Since, openmax component gives more priority to buffer queues,
so all QVGA/QCIF buffers are dequeued first and then it becomes
aware of port settings changed event. This may result in displaying
some QCIF buffers with QVGA settings. This change fixes this issue
by informing the client about change in resolution on receiving
the FBD with that resolution.

Change-Id: Ic1805b6b79e183e63b90f4ca557c053fe9aee2bf
2 files changed