Update session admission check to enforce max MBPF limit
by considering both realtime and non-realtime sessions.
Change-Id: I2556a6d7e4220f3151406febef3f0ebde9b4a20b
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
[1] Added return type to strict_check() api and bail out if
strict_check fails.
[2] Fix all the failures with #1.
[3] Added WARN_ON() for strict_check failure.
[4] Ensured &core->lock is acquired before calling below api's.
- __write_register
- __write_register_masked
- __iface_cmdq_write_relaxed
- __suspend
- __resume
- venus_hfi_core_init
- venus_hfi_core_deinit.
Change-Id: I7f0a3ca6c2aec2758220c90bff9260367f10820b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
In low latency mode, for a decode session, low latency
is being configured properly. But the log still indicates
that low latency is not enabled. The change fixes the same.
Change-Id: I65a88fb6dff639dd78522316e839fc05d43ec39c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Add support to honor client enablement of csc custom
matrix and set csc coeff to video firmware.
Change-Id: I14d702eb7033541aa439bebe11df7fc4aa49ffdb
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
update alignment to 128 for stride in pixel
calculation for p010 color format.
Change-Id: I0fda66f06409bb9947c88a60a88a9ea8f70505a5
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
vb2 is not allowing client to pass data in output meta plane.
adjust the bytesused as client will send buffer tag metadata
in output meta plane if DPB_TAG_LIST metadata enabled.
Change-Id: I2d99d0acf559c4b92e0610d518f6cfbdd54a2c19
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Unmap only those entries with refcount 1 and
which are not present in read_only buffers
list.
Change-Id: I0bc918c3f5c1fe1a1ed62a0c16b578155a8e6d6e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
If workqueue creation fails, driver is accessing buffer lists
in session close sequence, which is not yet inited and leading
to NULL ptr dereferrence issue, while traversing uninitialized
list. So added change to avoid accessing list without init
completion.
Change-Id: Icb3aa6b7edaf27e73873ec289d6a921a2613e77e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Add index check in enum fmt call and add the missing
break statement in handle_session_property.
Change-Id: Ida294f9ad4b8fa5c86d73b0e5bbd5297d8dbcd1b
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Deprecate custom pipe setting and use the hfi setter
to configure it alongwith other configurations.
Change-Id: Iffbd25df89f43cf77c1fa85ffa97601a31998410
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Latency property is set to firmware during streamon output port,
if set as part of initial configuration by client.
During runtime, the property is set as and when configured by
client.
1. Make the latency property dynamic for decoder.
2. For encoder, the same gets set to firmware with regular
v4l2 set properties.
3. For decoder, set the property explicitly during streamon
output port.
Change-Id: I35990614b95e57f113ddacfc2272cad6ae0dde82
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Allow max 1 enh layers when cvp metadata is disabled for HB
layer type.
Change-Id: If6e33462e8be36a4ca1fb1f253875678b697c05a
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Core is moved to init state before completing full init sequence.
So subsequent new open request assumes core is already inited and
attempts to initiate a hfi_session with firmware, which is not
correct and core_init is a sync cmd, so core->lock() is released,
so that reverse thread can issue sys_init_done. But new session is
acquiring core->lock() and corroupting core->init_done.task_list
completion structure variable i.e leading to list_corruption issues.
So added change to address these issues.
Change-Id: I0b983a06b8ea58134ea93831246309c9ccbdf0d1
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
V4l2 clears buffer state related flags. So for driver errors
send state as error to avoid skipping V4L2_BUF_FLAG_ERROR
flag at v4l2 side.
Change-Id: Ifcb96d390746a71e8dbcf261f718439ef9ecfc91
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
In V4L2 definition, bytesused contains both data_offset
and actual payload size, whereas in HFI definition, data_size
only contain actual payload size after data_offset.
Add conversions to correctly support non-zero data_offset.
Change-Id: Ib581e942e39e0adbb673c53d1b31e669bdb2b998
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
[1] External blur is disbled to firmware if either blur width or
blur height exceeds driver crop width or crop height.
Also, it is disabled when both blur width and blur height is
equal to blur width and blur height.
[2] fix b_frame adjustment calculation formula.
Change-Id: I71458b72095542f12c31094f7b9fc3bd34a7c66b
Signed-off-by: Akshata Sahukar <asahukar@quicinc.com>
Added support for V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE.
It willbe used in 10bit image encoding usecases.
Change-Id: I14877547f1f4792eefb0ea6bcecf2643627c125a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
- check total mbps is within range(including current session)
- check total mbpf is within range(including current session)
- image session:
- decode: Only non-secure allowed
- encode: check basic image_encode requirements
- wxh should be within allowed cap range
- only linear fmt
- input & output is 512 aligned
- only CQ bitrate mode
- GOP size should be zero
- b-frame count is zero
- timedelta based RC disabled
- still-pic profile for 8bit and main10 for 10bit
- interlace resolution should be less than (1920*1088)/256.
- reject odd input or output resolution
- output resolution is with in inst->cap [min, max] range.
- current session mbpf is less than inst->cap[MBPF].max
Change-Id: I81c46950a8ef5b64bf5ac94564613998b1079b52
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
if any one of the luma/chroma is not 8 bit, then treat as
10 bit content. So expose only 10-bit colorfmts for such
contents during enumFmt ioctl.
Change-Id: Ied6bacae25aa900918744730807a476f5762d49d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Fix the issue where bitrate cap database value is
incorrectly updated to dynamically client set layer bitrate
value when layer bitarte is not set.
Change-Id: I0f66c056c8ea0d053f8347dd003b61193258687e
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
In fwd thread, for sync cmd timeout, core->response_packet willbe
freed as part of venus_hfi_core_deinit. So i.e leading to a crash
at reverse thread, which is, in the middle of processing response
packet as part of handle_response api. So added change to avoid
this race issue.
Change-Id: Ice7e52c46e8858c89439c17213a08d01b358fe9d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
To avoid memory leakage, clean children and firmware lists
at session close, error cases, and at the end of each usage.
Change-Id: I1eadbf81da207bd987c50428c0c7cf4967a8885f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>