msm: vidc: Cancel userptr validation during secure decode

Secure decode doesn't need userptr and uses ion fd instead. We were
conducting userptr validation regardless of the decode mode (secure/
unsecure). This forced user to populate userptr with a dummy value
during QBUF in secure mode decode on both output and capture ports
to avoid a userptr validation fail.

CRs-Fixed: 2049213
Change-Id: I0060efb52792201a2634072f648a537ebb02d17c
Signed-off-by: Prabhakar Reddy Krishnappa <prkrishn@codeaurora.org>
This commit is contained in:
Prabhakar Reddy Krishnappa 2017-05-18 17:43:17 -07:00
parent 5404e35069
commit c3f5cca88f

View file

@ -970,7 +970,7 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
b->m.planes[i].m.userptr = buffer_info->uvaddr[i];
b->m.planes[i].reserved[0] = buffer_info->fd[i];
b->m.planes[i].reserved[1] = buffer_info->buff_off[i];
if (!b->m.planes[i].m.userptr) {
if (!(inst->flags & VIDC_SECURE) && !b->m.planes[i].m.userptr) {
dprintk(VIDC_ERR,
"%s: Failed to find user virtual address, %#lx, %d, %d\n",
__func__, b->m.planes[i].m.userptr, b->type, i);