Limit auto frame rate to [1,platform frame rate capability]
before sending to firmware.
Change-Id: I96dc4b8d76b7752a76f6c15dcb6b20817857372f
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
While processing the response from video hardware, video
driver is accessing a register which does not exist. It
is even not needed for functionality purpose. Removing
the access for the same.
Change-Id: Ib4fec718d2f057860878bf8928b96fb46be47b13
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Certain clients enables all intra tests for 720p @42 fps.
To allow such configuration, which is within the allowed
specification, extend the capability.
Change-Id: I0a0247e95bb040635c92404c5a342c92c340154c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
It's better to put inline function in header files
If not, gcc would complain "function body not available".
Change-Id: I81c363dc96bb4135593087e726d7a872b1bc3451
Signed-off-by: Jean Xiao <jianxiao@codeaurora.org>
Need to pass menu_skip_mask instead of step_size to
v4l2_ctrl_modify_range for menu type controls. Otherwise
step_size will override skip mask. Mostly step size value
is 1. So any menu_item with ctrl.val == 1, will not be
allowed at runtime.
Change-Id: If33f340a6e85335f80e3cf0a0b13266263e318ed
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
if msm_comm_qbuf_to_hfi is failed at msm_vidc_batch_handler
path, then vb2_buffer refcount is still held at v4l2 layer.
So added error handling for qbuf failure at batch timeout
sequence.
Change-Id: I61b14210ae382944e456df5c11790dc115ab2a15
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
if msm_comm_qbuf_to_hfi is failed at msm_vidc_batch_handler
path, then vb2_buffer refcount is still held at v4l2 layer.
So added error handling for qbuf failure at decode_batching
sequence.
Change-Id: Ic900ff95faec075620323c989430dea7ce34f26b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
For targets that doesn't support 4k, current buffer size
of 3MB is modified for FWVGA and below resolution to 6 MB.
Change-Id: Id9152bf4b88a1b86d790bc061cd7265896c62a98
Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
Currently for map failure inst->state updated to
MSM_VIDC_CORE_INVALID. So during flush driver issues
session_abort to firmware. So firmware asserts and
sends sys_error back. So added change to avoid
updating inst->state.
Change-Id: I30f90726d21cb13bf5a27dd3d259a8d026260746
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Print dma_buffer inode and file refcount details for all
dma buffers including dpb and driver internal buffers.
Change-Id: I3c22ccc1aaba555a3748d4607617737bd24adb12
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
disable error_recovery for non-NOC error if VIDC_DISABLE_NON_NOC_ERR_RECOV
is set. but error_recovery is getting disabled even for type NOC error
when VIDC_DISABLE_NON_NOC_ERR_RECOV is set.
[1] Only NOC error
adb shell "echo 1 > /d/msm_vidc/disable_err_recovery"
[2] Only non-NOC error
adb shell "echo 2 > /d/msm_vidc/disable_err_recovery"
[3] Both NOC & non-NOC error
adb shell "echo 3 > /d/msm_vidc/disable_err_recovery"
Change-Id: Ia09ca23708d41a77f1d77cf6ed57506a16b32c73
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
For HEIC encode, output buffer dimension is 512 x 512.
Updating total output buffer size as twice the frame
size of 512 x 512 for image sessions.
Change-Id: I69311b485072ef7f43afd23da690e77eecee180d
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Limit max number of temporal layers to 4 if hybrid_hp
is not enabled as per POR. Also, inline num_ref
calculations with FW.
Change-Id: Iad1deaf757a8aa3715b2dce861b1454faeed7a39
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
For holi, boost is set as 15%. With the change,
a level of 15% can be set to video firmware.
Also ensure that the boost is set only when client
has set the boost control.
CRs-Fixed: 2810440
Change-Id: Ib4e4c5511c57daa78b405f8a92c2ee924b1cc1bd
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
When update limits for MENU type controls, should keep
original menu_skip_mask, shouldn't replace it with step_size.
Change-Id: I9706f139fd299f7ca931d812e1a95017606a2267
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
change default step size for encoders
on different targets to 2.
Change-Id: I0db827920f6c452154296b79e8641e1aba0b03ab
Signed-off-by: Uma Mehta <umamehta@codeaurora.org>
For worst complexity factor received in fbd, also need
to divide it by frame_size, otherwise will cause
bus BW overvote.
Change-Id: Ibb20103c4ab8e3830eea8cf8a04b32f421b60362
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Some vp9 clips contains alt-ref frames(decode only) at
periodic intervals and that particular frames buffer ts
delta is very low(as low as 1 ms). So dynamic framerate
calculation in driver is going for a toss.
To mitigate above problem, taking avg framerate instead
of max value.
Change-Id: I0f320c6a24199efe28d357d53c7cc9ddf6fc3062
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Currently session_end() accesses &dev->sess_head without device->lock.
So there are high chances of use-after-free in &dev->sess_head.
Change-Id: I34593e6507da9bad13c6d92faf40c4d790825d39
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
msm_vidc_open() failure is freeing the inst structure which might have
been under use by other threads and hence use kref_put instead of kfree
instance in msm_vidc_open() to resolve use-after-free problem.
Change-Id: I611aa6347da6c884345890153c7f7e4525a4307c
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Increase vpp cycles to bump frequency to 366MHz
for encoder 960fps use case.
Change-Id: If0f9d0f084dfcefa9f8614ec6774588dec6b7007
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Codec2 HAL sets V4L2_CID_MPEG_VIDC_VIDEO_BUFFER_SIZE_LIMIT for all
session and it is very low value. So decoder input buffer size is
always limited by buffer_size_limit. Memory budget estimation is
going for toss in msm_comm_check_memory_supported. So video driver
started allowing all sessions during concurrency run without any
restriction. Added change to use correct buffer size during
memory estimation.
Change-Id: Ic7c5e51a91615fdba8965b3a359c2d3a37c9a14b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
For certain video hardware which doesn't support higher resolutions
like 4k or above, allocate maximum input buffer size
Change-Id: I30a908573cf4d0dce8bcbaeb813913130f051884
Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
HFR recording usecases, batch mode is enabled by default.
Currently no interrupt is raised to firmware for ETB write
on command queue. So firmware was not reading the queue,
though there are lot of pending messages in the command
queue, So complete encoder pipeline is getting stalled
after encoding couple of frames.
To avoid above problem, raising interrupt to firmware
every time(Only for last ETB in the batch).
Change-Id: If584a8175bfa54402087d1888dd032d08e1f3c15
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
dma_buf_put does not happen in case of failure while mapping dma_buf.
This leads to ion_dma_buf leak as refcount is 1 even after session
close. In memory pressure scenario while running concurrency usecase
such scenario can occur.
Change-Id: I2084538162b54d87acd6fa57bb5cc5bd2096c08d
Signed-off-by: Brijesh Patel <pbrijesh@codeaurora.org>