Due to delayed unmap feature on decoder output buffers,
refcount will become one when no one uses the buffer
in driver. In release done functonality, remove the
buffer from maps list only if refcount equal to one.
If refcount is more than one indicates the buffer is
being used, so do not remove from maps list. There are
chances that same decoder output buffer might be queued
by the client in which case we are not supposed to
unmap it from maps list in release done.
Change-Id: I69250c3efa89d77055e89770fd441af1fb50b755
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
add extra size for input meta buffer
when ROI metadata is enabled.
add dependency of rate control and
color format.
Change-Id: Icefd3f9e319d596f88090cee331417c0b2946180
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
- subscribe for dpb list property in combined
mode on output port.
- copy dpb list property payload from fw to
static array.
- using this array, mark read_only list buffers
as non-reference if not part of array. if count
of such buffers is greater than output min count,
send to fw for release.
- once fw returns them, destroy these buffers.
- unmap stale output mappings due to lazy unmap feature.
- unify release internal functions into common function.
Change-Id: Id32f04efb19eecaff453cc4383ee8296a0246263
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Handled below items as part of this change.
- print buffer_name instead of hex value.
- enable dcvs only for realtime sessions.
- enhanced max_input_data_size handling at
msm_vidc_scale_power.
Change-Id: If5ac810f4e020bee54364161596c5547af94161a
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>
Add support to deliver HFI_PROP_BUFFER_TAG via FTB metadata buffer
to receive HFI_PROP_DPB_TAG_LIST from fw via FBD metadata buffer.
Change-Id: Id9eeee26135379975f55923505d9c91905fa0b9e
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Following changes are added with this:
1. Handle and adjust session priority.
2. Session addmission based on priority.
3. Power (clock and bus) scaling based on priority.
4. Handle s_parm influence on priority.
Change-Id: I12dec5fb03d733f07b0b0a24b4d74d1ccd4bf791
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Remove separate fault_work_handler and print all needed
debug info as part of smmu_fault_handler callback itself,
to avoid race between fault handler invocation and core
deinit sequence.
Change-Id: Ib47e3d457a5a3e33497c71d5920382cb43baed79
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
add RGBA and RGBA_UBWC color format support
for encoder.
Change-Id: I3e179ae9769d851afc5a6f11e1afb14d96e92073
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Initialize subscribe params for colorspace using OUTPUT
port params and use right mapper function
Change-Id: Ie6be50c1de20e351bad0fc4b015bcc4d72d1711b
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
- Add support for a new non-secure pix context bank.
- Remove usage of deprecated 'buffer-types' in context banks.
Change-Id: I3a21eb8ce1d9aff277568d54aadb54193ad0ce75
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
update input port sizeimage for a decode session
during set control of bitsream size overwrite
control.
Change-Id: I4cb7d6c8d416f187e1ac557d3b423acfdbcb7a60
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Currently stramoff releases inst->lock and waits for response from
firmware i.e race issue. Streamoff released int->lock and that got
acquired by qbuf. So 2 FTB's were queued to firmware after streamoff
request.
Receiving qbuf after streamoff is treated as fatal at firmware side
and it sends session error as response to host. Added change to
avoid such issues.
Change-Id: I6da8ac0d3d30b540784e3c03c423270cb5212af2
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
v4l2 enums for color space info are not one to one
mappings with hevc spec values. Hence, introduce and
use corresponding mapper functions.
Change-Id: I37a79a9b34b66184ece9a284ae98c9fa4efd248f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Instead of formulating session_id, codec_type, domain at
each log print, used pre-formatted char array to print
the vidc logs.
Change-Id: If7a93ecb25a7b1b98ebca6f39e3990079c00b5dd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Added smmu_fault_handler support and printing all buffers,
allocations, mappings list details as part of smmu fault
handling.
Change-Id: Idb5d28357f9fb885adf7ae16f328b4963c56aa8c
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
While removing driver fw should be unloaded.
Also improved error handling.
Change-Id: Ia9f224da6f176c8a50c153f67fe8a77a92b7b08f
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
- introduce STRIDE_BYTES and STRIDE_PIX to
calculate size is bytes and pxls respectively.
- DEPRECATE VENUS_BUFFER_SIZE and introduce
VIDEO_RAW_BUFFER_SIZE. All buffer sizes are
calculated by using STRIDE_BYTES.
- For s_fmt, use STRIDE_PIX to calculate size.
- For v4l2 bytesperline, use STRIDE_IN_BYTES to
calculates size in bytes
Change-Id: I3db4d843d1834b25c6160ebc318572ac67e22806
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
set default header property once per session for decoder.
Change-Id: I5ca9088b8bed09907f2c9f829acec3db23e65a7c
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
- do not ignore last flag buffer in last flag not allowed
case also
- ignore stop command if input port is not streaming
instead of returning -EBUSY error.
- defer input port settings change in few states instead of
ignoring it.
Change-Id: I705f0c8ae2da899a5d262f6246aa65de5591ac26
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
- destroy enc internal buffers when firmware returns these
buffers after its usage.
- fix some incorrect log masks that result in false error
logs.
Change-Id: I4707e915b725769bbbaa0a2c4c4e0d9cd10805a4
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
If required, Firmware can be unloaded after every session.
Power collapse is enabled by default.
Change-Id: Ie014a26ae600816d8713cd34826f1f9a77088e4a
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
- Set correct metadata buffer sizes/counts in initialization.
- Update metadata buffer sizes/count when a metadata control is set.
Change-Id: Ib695b267efac26caa5858cdcdec1868d85182b90
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Add below support
- kill session in case of errors
- core deinit in case of timeout errors
- flush buffers in streamoff
- decide supported colorformats based on
bitdepth and interlace info
- print level based logs
Change-Id: I45b9b0eae4220a818de23308da8802a9e12ae255
Signed-off-by: Maheshwar Ajja <majja@quicinc.com>
- post input psc, output psc and last flag
events to response work handler
- fix issue with release and create internal
buffers during input psc
- clear last flag after session continue
Change-Id: Ic0278a09a0f6ee8ffff8840a47cd80c046ecadc4
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
- update basic functionality controls with their parents
and children list.
- deprecate MPEG2 related code.
- rename driver internal color formats.
Change-Id: I918d6fd238486098f10c5b9ce40c895bcd9468e5
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Add support for all the required instance states and
move the states accordingly.
Change-Id: Iac1046ab8c7a0116df6ed3069d566c7a1b65e61c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
create a new work handler and post and handle
events like psc.
introduce reuse concept for internal buffers.
Change-Id: Ibeaabae1b5923681756e959389df00b287206fb6
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
-Add support to set metadata controls.
-Adjust set/get format for metadata ports.
-Add check when queuing metadata buffers.
Change-Id: I73725e26106621386dcb62cbf916186b9bc43995
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
below are the fixes added to get enc start/stop working
along with setting default values to firmware for basic
functionality controls.
- Create and queue COMV and NON COMV internal buffers
- Use HFI_PAYLOAD_64_PACKED as payload_info type instead
of HFI_PAYLOAD_32_PACKED HFI_PROP_CROP_OFFSETS
- Introduce new control port specifier flags in instance
database to help set correct port to controls while
packetization
- Add support to map basic functionality controls
v4l2 enum values to hfi enum values
- Enable static adjust and set controls support
Change-Id: Idc0dc3e3d07d8f6349c74136327a45d77ced1035
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
add support for input port settings change raised
by fw. update driver subscribed port settings
properties with instance. Raise event to client.
Release, get, create and queue input internal buffers.
Send resume commond to fw on input port.
Add support to destroy internal buffers.
Change-Id: Ic979cf2d0c7298b8083347173a973d553ed52af8
Signed-off-by: Darshana Patil <darshana@codeaurora.org>