kzalloc might fail to allocate physically contiguous
memory which may not be available always and hence use
vzalloc to allocate virtually contiguous memory
Change-Id: I8ad89ef107da301217f3d1ec307b9b27b4edd2de
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
Use client input buffer queuing rate for power
calculations for non-realtime sessions
Change-Id: I498422ba1ae9ae96b782a2096dc0cd0aa7b05798
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
packetize dynamic controls set via request api along
with corresponding input buffer under the same hfi header
and queue to FW.
Change-Id: I8bf82f7ccb1ab16c42ce02189a208f5f7cb8dc70
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
[1] Remove CAP_FLAG_ROOT flag. Root willbe identified
with has_parents() api.
[2] Replace field(struct msm_vidc_inst_cap) cap -> cap_id.
[3] Rename below pool apis.
msm_memory_alloc -> msm_memory_pool_alloc
msm_memory_free -> msm_memory_pool_free
[4] Remove struct msm_vidc_inst_cap_entry usage in inst.
inst->firmware.list -> inst->firmware_list
inst->children.list -> inst->children_list
[5] Organize msm_vidc_inst_capability_type enums in such
a way that all parents placed first then children. It
will save CPU cycles while preparing caps_list.
Change-Id: I376f4e6ddec37ce326c393fba133e19ba70bab09
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Added change to avoid unnecessary list iteration during
msm_memory_free also added logic to catch double free
request.
Change-Id: Ie3fb8019fd039e95ea75ba8f3fbd266af515e5cd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Track dmabuf refcount during dma_buf_get() and dma_buf_put().
So if any dmabuf present with non-zero refcount during close,
then i.e a dmabuf leak. So during session close print error
and call dma_buf_put_refcount_completely() api to recursively
reduce the count to zero and will call dma_buf_put() to avoid
dmabuf leak from video driver side.
Change-Id: I2028c18ca067977eac3cdf0ce7d6cc4200739408
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
- Maintain free & busy pool to track buffers separately
- track double-free cases during msm_memory_free()
- track memory leak, by checking busy pool buffer count.
it is expected to be zero at the end of a session.
- maintain common api's to init, alloc, free, destroy
for all below buffer types.
- struct msm_vidc_buffer
- struct msm_vidc_alloc
- struct msm_vidc_map
- struct msm_vidc_timestamp.
Change-Id: Ib8655047c3883ea6601344661058d7a629ffd5bd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
- add support to skip lazy unmapping for decoder
output buffers only. Map twice for these buffers.
- v4l2 client owned RO SMMU mapped buffers are
maintained separately in read_only list.
- For FBD with RO flag from fw, add buffer to read_only
list. Else remove from this list.
- During FTB, if buffer present in read_only list,
add RO flag to hfi buffer and queue to fw.
- During streamoff output, unmap all buffers except
those present in read_only list.
- During close, unmap completely and clean up read_only
list, output list.
Change-Id: Iacee7d298dfbff0b9cb6f17dff27ad98574b489b
Signed-off-by: Darshana Patil <darshana@codeaurora.org>