Commit Graph

682 Commits

Author SHA1 Message Date
Chandrakant I Viraktamath
e2f86b092a msm: vidc: fix ts reorder for heif
Fix logic for ts reorder in heif decoder
since default value of disable timestamp
reorder control is 0.

Change-Id: I56cb8c40d99c3a3de867da659005faebd201be80
Signed-off-by: Chandrakant I Viraktamath <civirakt@codeaurora.org>
2020-10-16 17:40:29 +05:30
Shi Zhongbo
6090ef6b02 msm: venc: distinguish client frame rate handling from auto detection of frame rate
By default, encoder needs to enable VUI timing info.
Frame rate change triggers new header and timing info.
Hence, we need to distinguish client trigger fps change
vs auto detection of fps change.
Introduced new HFI for setting auto detection of fps.
In auto fps case, VUI timing is not re-generated.

Change-Id: I6b579d1e6ef0c49a849b7b7e0383f593a949bab3
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-10-15 16:11:18 -07:00
Priyanka Gujjula
cbfcd83f51 msm: vidc: Update enc scratch2 buffer size calc
Consider downscaling buffer size with unrotated
wxh when rotation or flip is enabled along with
downscaling. Also correct wxh to all buffer calc
if rotation is enabled.

Change-Id: I5b89a5206057c4bbfed793b439aa2fb2c5d2601e
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-10-15 22:11:35 +05:30
qctecmdr
c643318569 Merge "msm: venc: fix the VUI timing info" 2020-10-12 15:49:56 -07:00
Vikash Garodia
48957371a4 msm: venc: fix the VUI timing info
The timing info should represent the number of time
units in one seconds, as per the timescale and time
units per tick. Update the same while setting the HFI
to video firmware.

Change-Id: Ifb6bc34ad295e472715fb72813a236c851d4480f
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-10-09 13:20:03 +05:30
Govindaraj Rajagopal
63b9cfe02d msm: vidc: enable mark_target and mark_data
Currently firmware populates tag_data and produces
FBD for all ETB's only if mark_target and mark_data
is enabled. So sending dummy value as a WA.

Change-Id: I93a80d59e4f0f52eac94391ff86afc341468677f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-10-09 11:38:34 +05:30
qctecmdr
fa7e892e79 Merge "msm-vidc: fix final BW voting to ICC" 2020-10-07 16:15:38 -07:00
qctecmdr
f153ecfe10 Merge "msm: vidc: Add support for hw stability test" 2020-10-05 12:26:08 -07:00
qctecmdr
a6485e3cb3 Merge "msm: vidc: Add fn pointer for ar50lt bw calc" 2020-10-05 12:26:08 -07:00
Priyanka Gujjula
cb18964770 msm: vidc: Add support for hw stability test
Add support for noc error and vcodec hung HFI
to test hardware stability via ssr_type and
to input the sub client id and test address
accordingly.

<test_addr><subclient_id><ssr_type>
ssr_type: 0-3 bits
sub_client_id: 4-7 bits
reserved: 8-31 bits
test_addr: 32-63 bits

Change-Id: I05970d3dc3e54da50688319eabccd5d11f8f55e2
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org
2020-10-02 11:31:04 -07:00
Dikshita Agarwal
f033016e9e msm-vidc: fix final BW voting to ICC
Currently, Required BW is calculated in bytes per second but
when setting it to ICC, kbps_to_icc macro is applied to
calculated BW which again divides the value by 8 and resulting
into less final vote to icc.

Change-Id: I7a645478d05909308edea2170d7c5cb911cbf6f0
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2020-10-01 16:32:22 +05:30
qctecmdr
fbff1f488b Merge "msm: vidc: always use HQ for HEIC and lossless encoder" 2020-09-30 12:59:24 -07:00
qctecmdr
7b9be557d2 Merge "msm: vidc: reduce shima max spec" 2020-09-30 12:59:24 -07:00
Priyanka Gujjula
7c4bb220ce msm: vidc: Add fn pointer for ar50lt bw calc
Add ar50lt bw calc function pointer in
core ops.

Change-Id: I83cb81dde373a14b5b07594ca5af286bc01eefd1
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-09-29 17:57:13 +05:30
qctecmdr
e93fd8adfa Merge "msm: vidc: Add control to handle timestamp reorder" 2020-09-28 09:55:29 -07:00
qctecmdr
0fb5c58c90 Merge "msm: vidc: Force nominal for high bitrate decode usecases" 2020-09-28 09:55:29 -07:00
qctecmdr
e53fcca85f Merge "msm: vdec: Do not consider 10bit size for specific video hardware" 2020-09-28 09:55:29 -07:00
qctecmdr
6e6740b2e5 Merge "msm: venc: reject unsupported sessions with VPSS enabled" 2020-09-28 09:55:29 -07:00
Govindaraj Rajagopal
5d0c3973bc msm: vidc: reduce shima max spec
Update max-hw-load to be inline with shima
pro-sku spec.

Change-Id: I98aaa4d870156812a240fecdf31feaa242aca4a8
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-09-28 11:32:34 +05:30
Qiwei Liu
3486a7e10a msm: vidc: always use HQ for HEIC and lossless encoder
Always use HQ mode for HEIC and lossless encoder.
Refine FW version retrieve to support version
string start with lower case v.

Change-Id: I092956b34250da55a4cfc2c7b88815c05a64375f
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-09-26 11:46:47 +08:00
Priyanka Gujjula
173068c67f msm: vidc: Add max-image-load caps to holi and shima
Add max-image-load caps as 8k for holi and
16k for shima for all variants.

Change-Id: I5d1483c0e2dc06af61eca4944bc269e36baa6d73
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-09-23 21:38:09 +05:30
Shi Zhongbo
7377b0c454 msm: venc: reject unsupported sessions with VPSS enabled
Reject any sessions with non-multiple 8 of resolution and
rotation/flip is enabled.

Change-Id: Ifac0cc8884461fe8d2502e92481643d9443aa527
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-09-21 23:03:41 -07:00
Chandrakant I Viraktamath
70a2ee6e3c msm: vidc: Add control to handle timestamp reorder
Add control to enable/disable timestamp reordering
in driver.

Change-Id: I50c3f60bb8af053881073b40c6df0c74f3f0aafb
Signed-off-by: Chandrakant I Viraktamath <civirakt@codeaurora.org>
2020-09-21 19:24:02 +05:30
Chinmay Sawarkar
2efb0193b3 msm: vidc: Force nominal for high bitrate decode usecases
Force the clocks to NOM if bitrate nears or exceeds maximum
supported for VP9 usecases.

Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>

Change-Id: I917b0f6c624837403fd9f1499a68812acb00b568
2020-09-17 22:18:53 -07:00
qctecmdr
3de9db9637 Merge "msm: vidc: cleanup unsupported profile and levels for VP9" 2020-09-17 10:04:47 -07:00
qctecmdr
9cdb05ab74 Merge "msm: vidc: update calculation for BSE LB write for decoder" 2020-09-17 10:04:47 -07:00
qctecmdr
ea32d6bf6b Merge "msm: venc: enable VUI timing for native recorder" 2020-09-17 10:04:47 -07:00
qctecmdr
6f06f41bfe Merge "msm: vidc: Disable timestamp store-fetch logic" 2020-09-17 10:04:47 -07:00
qctecmdr
be45c1081c Merge "msm: vidc: Optimize enc scratch and scratch_2 buffer sizes" 2020-09-17 10:04:47 -07:00
Govindaraj Rajagopal
b03e989d89 msm: vidc: cleanup unsupported profile and levels for VP9
VP9 decoder spec is reduced. So cleaning up unsupported
profiles & levels for VP9.
Supported Profile - 0 & 2
Max supported level - 5.1

Change-Id: I5b131f5bbd3c50aea2949f62ab6b16d51728ba7d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-09-17 11:39:32 +05:30
Dikshita Agarwal
31f9744ab8 msm: vidc: update calculation for BSE LB write for decoder
For h264 BSE LB write should be half of BSE LB read for decoder.
Update the calculation for the same.

Change-Id: I5ebceff4fa0795eaaf67b569e754d174be4a8146
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2020-09-17 01:53:42 +05:30
Priyanka Gujjula
5bef15ac09 msm: vidc: Add query support for HEIC caps
Add support to VIDIOC_ENUM_FRAMESIZES for
querying HEIC frame size.

Change-Id: I9ceba027c798e0c0fb7781702ccb2873fc8276ac
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-09-16 18:51:19 +05:30
qctecmdr
39f4bc3665 Merge "msm: vidc: Increase decoder persist_1 buffer size" 2020-09-14 14:14:19 -07:00
Shi Zhongbo
3e7994b2a0 msm: venc: enable VUI timing for native recorder
Enable VUI timing info when using native recorder
by default.

Change-Id: I1edb9d8b9bcd84e06bcd0f52429bda96af5d0de3
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-09-14 16:40:28 +08:00
Akshay Chandrashekhar Kalghatgi
2f691c151e msm: vidc: Disable timestamp store-fetch logic
Sometimes during sequence change, timestamps may be repeated. This corner
case breaks the TS store-fetch logic. Disabling this logic for secure
decoder sessions.

Change-Id: Ib5c00cc509364ce29b0f69f9b7441edd11b1eef2
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>
2020-09-11 16:52:06 -07:00
qctecmdr
b580a91082 Merge "msm: vidc: Cleanup HFI_CMD_SESSION_SYNC support" 2020-09-11 12:41:38 -07:00
qctecmdr
4d71ce668e Merge "msm: vidc: update iris2 clock calculation" 2020-09-11 12:41:38 -07:00
Mihir Ganu
fecdc2cd76 msm: vidc: Increase decoder persist_1 buffer size
Increase H264/H265 decoder persist_1 buffer size to acommodate
t35 userdata.

Change-Id: Ifb38d32ee0f3e737b3f8e518976511cf727d295f
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-09-10 17:17:59 -07:00
qctecmdr
9f6ff22e5b Merge "msm: venc: add bitrate boost QP range interface" 2020-09-10 11:05:16 -07:00
Priyanka Gujjula
ad4f5e8670 msm: vidc: Cleanup HFI_CMD_SESSION_SYNC support
HFI_CMD_SESSION_SYNC is used for synchronization
of encode batching between driver and FW.
Currently, encode batching is only between camera
and driver. To FW, it is always regular encode
session without batching. Hence cleaning up the
encode batching HFI's.

Change-Id: I5d493c98a350e36cd8bb85bf9b82d3f8d41451cf
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-09-10 20:38:42 +05:30
Govindaraj Rajagopal
253c43239c msm: vidc: update iris2 clock calculation
As per vperf sheet, VSP FW Overhead factor(1.05) needs
to be applied to both entropy mode CABAC & CAVLC.

Change-Id: I93dc00137e0633ac2a79862c58970ba43b515ad6
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-09-10 18:25:24 +05:30
Vikash Garodia
10cba22262 msm: vdec: Do not consider 10bit size for specific video hardware
Certain video hardware does not have support for hdr. Avoid adding
size for the same for such video hardware.

CRs-Fixed: 2772982
Change-Id: Iceb64dab0d346fb483976dac16fed4888a2f0277
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-09-09 17:21:59 +05:30
Shi Zhongbo
ec74a635f5 msm: venc: add bitrate boost QP range interface
Add bitrate boost QP range interface to
support additional configs for boost QP range.
Boost QP range should only be effective
when bitrate boost is enabled. And, common vendor
extension QP range overwrites boost QP range.

Change-Id: I9b6601cd7e9bbf4326f67b9e0f40788e915040b0
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-09-07 16:45:06 +08:00
qctecmdr
5ce35308a9 Merge "msm: vidc: shima: Update max profile level caps" 2020-09-04 09:56:45 -07:00
Priyanka Gujjula
541b40c072 msm: vidc: Optimize enc scratch and scratch_2 buffer sizes
Optimize scratch and scratch_2 internal buffer size
calculators for encoder.

Change-Id: Idfaf7df13a427788cbb983a17fc2137be154bce8
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-09-04 20:33:44 +05:30
Priyanka Gujjula
08b43c99a2 msm: vidc: shima: Update max profile level caps
Update level values for ENC and DEC based on
shima caps.

Change-Id: I967b4ef65a59b711815e09e03547b895cc572e39
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-09-03 20:40:16 +05:30
Govindaraj Rajagopal
fcad90b130 msm: vidc: reverse sort allowed_clock_tbl for shima
Clock_table entries are kept as ascending order. So always
highest clk corner is picked from clock_table during clock
calculation. So enable reverse sort for clk table entries
to pick the right corner.

Change-Id: I5adc61368aa15ae69c11a0539dcb05437bf686b4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-09-03 18:29:14 +05:30
qctecmdr
f2c416e44e Merge "msm-vidc: update bw calculation for ar50LT" 2020-09-01 02:28:46 -07:00
qctecmdr
f22ff30abf Merge "msm: vidc: Update cycle count requirement of B frames." 2020-08-30 12:54:25 -07:00
Priyanka Gujjula
372b7136f5 msm: vidc: Add support for 128x32 alignment of NV12
Introduce new internal driver color format
V4L2_PIX_FMT_NV12_128 and uapi color format
COLOR_FMT_NV12_128 to map with NV12 128x32
alignment. Also, clean up intermediate HAL
color formats.

Change-Id: Ia28d0f422f2777bda865c2fc6c7499cce9dabb54
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-08-29 00:42:28 +05:30