Update all functions in msm_media_info.h to use vidc color formats
instead of v4l2 color formats macros to restrict the usage of private
color format defines in only helper functions.
Change-Id: Ib308c76af7b16ddac93023202191a47b21d68f5c
Signed-off-by: Dikshita Agarwal <quic_dikshita@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>
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>
v4l2-compliance test does not support private codecs. Hence
added check to not return HEIC codec when enum_fmt is called.
Change-Id: Iff6fbb45b436e39e8b7c181859dbc1519338d003
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
v4l2 compliance fixes for test formats
fixes:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
Change-Id: I23c193ab5785bb10d070fa3085678d9669f53a92
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Update input, output and crop resolution based in client provided
resolution on input port as per the v4l2 compliance test expectation.
Change-Id: I56f197d72cc132f38c00842b28b23b20c508cf23
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Added change at decoder side to use adjust/set functions for
static(streamon) and dynamic(s_ctrl) cases.
Change-Id: I3d8c32baaf2fa2c3a077cc936a8ff2159ababfe3
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Handle invalid format 0xfffff by invoking try_fmt in
s_fmt. It is expected from driver to return EINVAL for only
unsupported buf type and if color format is unsupported,
driver should fill the fmt structure with valid values.
Partially Fixes: v4l2-compliance:
TestSetFormat(VIDIOC_S_FMT)
Change-Id: I27e82866e8ad4a13661431f2a38a66ac3ef7dd80
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Client can enable V4L2_CID_MPEG_VIDC_INPUT_METADATA_VIA_REQUEST_ENABLE
control and send input metadata buffer via request.
Change-Id: Icccdada8253d1d0291c01e2e539968141f7ddd2c
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Client may do g_fmt on output port to fetch output port
color info. Hence, update output port color info with
client set input port color info.
Change-Id: Ifa3b16763d7389cd063493e25ce8b266ce1cb8c6
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Invoke correct APIs to handle different types of events.
Fixes: v4l2-compliance:
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT.
Change-Id: I442fae3111d65a9612c73f2d16f9ed8031c77ec0
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
- Request api allows to synchronize controls along
with buffers.
- Client allocates a request fd. This request fd is
associated with control and set using s_ext_ctrls.
Such controls are stored by the framework and not
applied immediately.
- Request fd is also associated with input qbuf and
queued to driver. Following this actual request is
queued. Buffers do not enter the queue untill the
request is queued.
- As part of qbuf, driver call request_setup() which
inturn sets the control to driver.
Change-Id: I316c4dc2a0091b21059230be5ee5fd6379259456
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Added changes to update the proper stride and scanline info to firmware.
Change-Id: Ic8e119a48af8c3203fc21a320255d930f5c8585f
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
-Removed unwanted functions
-Removed unwanted part of code from function definitions
-Added proper format specifier according to the data type.
Change-Id: I700202f1cf588506b329d202ce3e2729c027dcae
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Any video device which supports capture multiplanar buf type
should implement VIDIOC_TRY_FMT.
Fixes: v4l2-compliance: testTryFormats (VIDIOC_TRY_FMT).
Change-Id: Id7ec171115c9374c6173fcf74a609382c3acf2d0
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
- CROP should be supported only for V4L2_SEL_TGT_CROP selection
target.
- Compose should be supported only for V4L2_SEL_TGT_COMPOSE
selecion target.
Fixes: v4l2-compliance: testCrop/testCompose (VIDIOC_S_SELECTION)
on encoder.
Change-Id: Iaada9e0078602ab5ddcdd25d94c9abb29c053811
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
- Set capability for capture and output plane.
- Update denominator and numerator of timeperframe structure
to default values if set with zero.
Fixes: v4l2-compliance: testParm(VIDIOC_S/G_PARM) for encoder.
Change-Id: Ib9d92f07fc526a11253ac5d1adc1b639eef3632e
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
If client fails to configure color aspects to driver, driver does not set
required color space flags to firmware. For RGBA enc session, there is
implicit CSC. Hence, resultant color space should be BT709 LR. But
firmware fails to generate this color space info assuming that color
space info is not required. Hence, fix this by setting BT709 LR as
default color space info for RGBA enc session.
Change-Id: I6f9fa0986dd8657b1d6bcc2c86286aa51813f518
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
move driver state to ERROR if any session pkt processing failed.
Change-Id: Id9c653eb01a0845d6d25cf16383f34707d76ba96
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
The driver should update field variable of format
structure with a value other than V4L2_FIELD_ANY.
Update it with V4L2_FIELD_NONE.
Fixes: v4l2-compliance: testGetFormats(VIDIOC_G_FMT).
Change-Id: I2338c867b543b2964c0c6a84f76cfad6862a935f
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
At the time of codec change, only properties related to that
particular port gets updated. So other port is still referring
default values from previous codec type, which is not correct.
So added change to properly update buffer count during codec
change.
Change-Id: I320a0916cbf48f06448a959b07e13b74ebb0fd1c
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
1. Calculate framerate based on buffer timestamp
2. If framerate changed and stable for 2 frames,
update it to firmware and in driver internally.
Change-Id: I7feda86dec8fcfc1dff6defac8c15a97c1b8393e
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Priority level was not determined at few sequences.
Determine the priority level and set to firmware, if
there is a change in driver and firmware priority.
Change-Id: I97861fd4ce8cfb7cf828a8da9a5ce8ba900280ef
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Currently driver prints hex values for codec type, pixel
format and port number. So added change to print strings
instead of hex values.
Removed unnecessary logs to avoid overlogging timeout
issues.
Change-Id: Ia44401990797dc20eae0a35631e9ed6a0b094c20
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Update metadata buffer size after port resolution
changes.
Change-Id: Ieb9ce986500b4f06b5b0a324b4cd42ebae5c4d9e
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Encoder supports downscale with scaling ratio upto 1/8 of width
and 1/8 of height. So added necessary scaling checks at streamon.
Change-Id: I3a29b43c79cf4e693ba2c0d9f98ec24410d50fbd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Add strict check in msm_vidc_check_mbpf_supported() to
reject image session, if total image load exceeds 16K.
Added msm_vidc_print_insts_info() support to print all
running instance info, if new session is rejected due
to mbpf/mbps checks.
Change-Id: I98bab985fcf4f4d20c6f263c48e0c701ec86ab6f
Signed-off-by: Govindaraj Rajagopal <grajagop@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>
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>