FROMGIT: [Encode] Fix for flags in PAK_OBJECT_INSERT command

During HW JPEG encode on devices using iHD media driver, whenever,
application data is split into several payloads for AddMfxInsertObject
and appDataSizeResidue is 0, first payload is marked as end of slice
irrespective of pending application data so, when the next payload
requests AddMfxInsertObject, gpu hang is observed. This patch ensures
that only last payload is marked as last header/end of slice so, gpu
hang issue will be resolved.

cherry picked from commit - https://github.com/intel/media-driver/commit/1f70472c765c086aef77d7ca9604d2754c333ec2

BUG=b:171340559, b:171369066
TEST=After reverting https://chromium-review.googlesource.com/c/chromium/src/+/2554180 and https://chromium-review.googlesource.com/c/chromium/src/+/2566722, capture pictures continuously using camera application for few minutes

Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Change-Id: Ibd19e3135ea569524f1743b0e63bc6b4c6ac6a0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2566891
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
3 files changed