As part of stop done, check if firmware has returned drain
last flag only for decoder.
Change-Id: I9738fe316b4e3081a8ab9c8066ef5f59ac0720f0
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
- hierarchical state model which comprises of
top level states and sub states
- top level states include OPEN, CLOSE, ERROR,
INPUT_STREAMING, OUTPUT_STREAMING, STREAMING.
- sub states include DRAIN, DRC, DRAIN_LAST_BUFFER,
DRC_LAST_BUFFER, INPUT_PAUSE, OUTPUT_PAUSE.
- follows deterministic approach for key sequences
like DRC, DRAIN and last flag handling i.e none
of these events are ignored or discarded.
- removal of auto start of firmware input port as
part of ipsc handling.
- introduction of hfi commands for host controlled
PAUSE and RESUME of firmware ports.
- introduction of information last flag packets
for DRC and DRAIN when FW has insufficient
output buffers.
Change-Id: Ie8c8f44af464d06f5a7bb76822f749c9874f869a
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Incase of synchronous cmd(HFI_CMD_INIT, HFI_CMD_STOP, HFI_CMD_CLOSE)
timeout cases, video driver will attempt to do core_deinit sequence
and will free all interface queues mappings as part of core_deinit.
If at same time ISR handler is fired then reverse thread will attempt
to dequeue packets from message and debug queue. Reverse thread will
not acquire core->lock for performance reasone. Dequeueing packets
without acquiring core->lock might lead to use-after-free issues.
Uploaded change to address above mentioned issue.
Change-Id: I2047b28d69611129c4fdefcfb8a843c895e11dbb
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
For HEVC 8 bit usecase, QP values are being capped
from [-11,51] to [1,51]. Modifying the same in
CAP_TO_8BIT_QP macro.
Change-Id: Id17fab4c62770140131f0f8454fc480090732d0b
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
As part of firmware stress test with QP range of [0, 5],
FW gets a divide by zero exception with QP 0, and RC
validation happens with QP range of [1, MaxQP].
Modifing Min QP from 0 to 1 for 8 bit and from
-12 to -11 for 10 bit usecases to avoid multiple FW issues.
Change-Id: I29d8fd785cfafbcb1b73984b3f79900307c22c10
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
__flush_debug_queue() currently uses core->response_packet
or core->packet for flushing debug queue. So these were
allocated only 4096 bytes, but in read_queue(), boundaries
were checked against VIDC_IFACEQ_VAR_HUGE_PKT_SIZE macro
which is of size 1024 * 12 bytes.
So if FW log packet size is in between 4 KB to 12 KB then
read_queue() allows memcpy() into core->response_packet
or core->packet that will lead to redzone corruption issue
with adjacent alive/valid allocations i.e futher lead to
kernel panic at kfree() sequence(during object validation).
Uploaded change to use same sizes during allocation and
read_queue() validation.
Change-Id: If82766c1479d7589605386f3e314ff2ccd97f6d0
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
1. Introduce new v4l2 control to get HAL session id and
print the same in driver to have unqiue session id
between HAL and driver
2. Copy input buffer timestamp into input meta buffer
to track input meta buffer done at HAL side. Required
specially for fence use case.
Change-Id: I146b153fa0baea3b684a482de5da19e736df3736
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
delete fence node from the list and then call
fence_put(). This fixes random crashes in fence
testcase
Change-Id: Ib2cdc3a4046a6065bff991fdebe178dddc8847b2
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Sometimes uninitialized local pointer variables were passed to
msm_vidc_vmem_alloc() call for allocating memory. Uninitialized
variables might garbage value, so msm_vidc_vmem_alloc() is
treating that double alloc request and returning error. So i.e
leading to undefined behaviour.
For e.x, msm_vidc_update_input_cr() call will never add any
entries into &inst->enc_input_crs(due to above mentioned issue),
So i.e leading to populate invalid input compression ratio in
encoder usecase.
Change-Id: I4507b343bee8eec7252cf946ad8d3120efd7bacb
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Use TARGET_KERNEL_DLKM_DISABLE and TARGET_KERNEL_DLKM_VIDEO_OVERRIDE
to compile video driver.
Change-Id: Id824aac78c4c0ce856ba1c92ab1bda4e679475cc
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
Calculate AV1 VSP cycles using calculations in Kalama perf model.
For legacy codecs, VSP cycles are still calculated using
legacy MB_CYCLES_VSP.
Change-Id: I2535924d650bffd4da32e187fe9e84a27d03ad37
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
1. do not update input_rate until 30 inputs are
received.
2. Fixes unwated downgrade from RT to NRT in UHD cases
Change-Id: I8d38a64829b44a0e335b69329ac5279a7b8a782d
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
Add mising capabilites in msm_vidc_waipio.c
for the changes done in msm_vidc_kalama.c
Change-Id: Idc75533162c977333efb4caec992ee13408ce422
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
For AV1 bitstreams with film grain, split mode is used for
UBWC colorformats as well. Consider split mode to calculate
bandwidth votes.
Change-Id: I98bf07b8be7f0e829af5e55ed6d0c3659ae099f2
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
Optimize HEVC Bin buffer allocation by allocating 25% additional
bitstream buffer size for 10 bit HEVC usecase and avoiding the
extra memory allocation for 8 bit usecases.
Change-Id: Iebbedf43e80fad852807349cbe7f70cf7a632a73
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
1. Host will use HQ quality mode for all INTRA encoding case
2. Cap bitarate and bit rate boost to max bitrate of current
session config
Change-Id: I8e8d19998ebeff992c290fbd18c072b2b93ffef2
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
1. add DolbyVision metadata cap and V4L2 id;
2. Increase decoder persist buffer size;
3. Increase decoder output meta buffer size;
4. Increase encoder input meta buffer size;
5. Parse buffer overflow flag and set buffer flag
accordingly;
Change-Id: I8fa5e89068dd479033d28f627e585edc3a1c58bb
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
Allow client to set slice mode control to slice off for
HEIC codec.
Change-Id: Iffc8be23990a5dad451550cccb8236cc32951b2a
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Acquire client and inst lock for s_ctrl and g_volatile_ctrl
Change-Id: I97341b69ea5390133c46711c38be51326c80b224
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Store unaligned resolution in driver inst formats
to avoid crop resolution getting updated to aligned
resolution whenever client did g_fmt and s_fmt again
after setting raw input resolution.
Change-Id: Ic2b6cf6e7d418d2bf0c35270199b914648e933d4
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
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>
Acquire client lock for every entry point
in driver. This is needed especially for
streamoff and close calls where inst lock
is released while driver is waiting for
stop_done and close_done responses from fw.
When inst lock is released, client can send
a new ioctl call and driver state machine
can get updated leading to unexpected behaviour.
Change-Id: Ibb62c3431c88e2f1d9088d54fe7c9e53b1c284fd
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>