Commit Graph

188 Commits

Author SHA1 Message Date
Chinmay Sawarkar
02f5b95ce6 msm: vidc: Do not vote bw on ftb
Parameter that affect BW change during ETB and EBD.
During FTB BW calculation and voting is redundant.

Change-Id: I418d422f614670c2543a19709b36b3f39fd0d0e1
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-08-05 12:06:15 +08:00
qctecmdr
b098e7cf4e Merge "msm: vidc: handle dynamic framerate or operating rate changes" 2019-07-31 23:28:48 -07:00
Darshana Patil
e047e8e387 msm: venc: remove volatile flag from LTR control
Remove volatile flag associated with LTR control.

Change-Id: I86c7fdb8b50adecf84d97145fad406f0e23002df
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-31 15:10:20 -07:00
qctecmdr
8ce34de1fe Merge "msm: venc: fix ltrmode for unsupported codec/RC type" 2019-07-30 23:59:11 -07:00
Darshana Patil
bd8775b802 msm: vidc: remove volatile flag for certain controls
Reverting the volatile flag added to GOP size, bframe
and max hier layer controls.

Change-Id: I3f74bc59e7a73882ff1ce95832b8f248a8ddb80e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-30 18:45:10 -07:00
Darshana Patil
353089d3be msm: venc: fix ltrmode for unsupported codec/RC type
Do a get control before accessing the control value
to make sure right structure is accessed.

Change-Id: Iabf2ca85c342fe46d2236232794bbe9b9981fb18
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-30 17:07:24 -07:00
qctecmdr
8fd369bab9 Merge "msm: vidc: Add window based bitrate check in decoder" 2019-07-29 22:28:26 -07:00
qctecmdr
e8df88c30b Merge "msm: venc: Set LTR info only when LTR is enabled" 2019-07-29 21:26:34 -07:00
Qiwei Liu
15f3510a38 msm: vidc: Add window based bitrate check in decoder
In decoder, window based bitrate check will help
identify usecases where, input bitrate exceeds hw
capabilities.

CRs-Fixed: 2497423
Change-Id: Ic68bd66584ed84382ba03777d39775d08278a8a0
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-07-29 18:38:22 -07:00
Darshana Patil
a7967f7038 msm: venc: Set LTR info only when LTR is enabled
Set LTR use mask and mark index information to
firmware only when LTR count is non zero.

Change-Id: Icdcd0e8e29841e0cf4d2222ad3c2331aed2e3968
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-29 14:55:47 -07:00
Darshana Patil
1af4075b33 msm: vidc: adding support of driver editable control values using volatile flags in v4l2 control
Due to various feature constraint and best effort encode/decode, driver needs to update client
updated or default control value.Later these driver updated values are used in programming video
firmware. Hence, we need various controls as volatile

Change-Id: Ied22665addda921b0ef4827fb7a2b1fd47be5bbb
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-29 14:45:52 -07:00
qctecmdr
5a31d042fe Merge "msm: vidc: send dmabuf pointer instead of fd" 2019-07-27 14:33:08 -07:00
qctecmdr
048032c021 Merge "msm: vidc: Check image encode capabilities" 2019-07-25 17:21:42 -07:00
Amit Shekhar
61344c1970 msm: vidc: Check image encode capabilities
For heic/hevc image session, check respective capabilities to
allow or reject.

Change-Id: I4e565e6614a7863f75ecd4719480b850e1af43ae
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2019-07-25 15:10:35 -07:00
Shi Zhongbo
bc901062aa msm: venc: add blur constraints
Add blur constraints to reject external
blur when rotation/flip/scalar enabled.

Change-Id: Ia3fd1240a7788b89736889751f8a905e06e30f12
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-07-25 17:59:15 +08:00
Chinmay Sawarkar
b00fc8327b msm: vidc: Fix default_bus_vote
Update all struct values in default_bus_vote.
Calculate bw only when function available.

CRs-Fixed: 2494775
Change-Id: I70a137494c4469f928efe3ddf1f0297e2281c689
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-07-22 14:56:39 -07:00
Maheshwar Ajja
f9c4430e8b msm: vidc: handle dynamic framerate or operating rate changes
Update CVP driver clocks, buses and preprocess frame skip logic
if framerate or operating rate changed dynamically.

Change-Id: Iebed437a1d7e0e136ebf703db76528cbd102363c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-07-19 16:50:44 -07:00
qctecmdr
5c854678be Merge "msm: vidc: fix some BW and freq calculation issues" 2019-07-19 08:43:36 -07:00
qctecmdr
ff9b687e95 Merge "msm: venc: add all intra encoding supports" 2019-07-18 21:48:31 -07:00
Shi Zhongbo
c074c474fb msm: venc: add all intra encoding supports
1. Add all intra encoding capability;
2. Disable LTR, HP, Slice mode and IR settings;
3. Use WorkMode2, HQ and Pipeline 4 by force;
4. Ignore dynamic switch between IPPP and all intra;
5. Reject sessions if static/dynamic frame rate
   larger than 240;
6. Reject any non HEVC or AVC sessions;
7. Reject any HEVC Main10 profile sessions;
8. Reset all intra flag to false when stream off;

Change-Id: I9f405a7712c84bc6f8319025a7fb2a0a7f9064df
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-07-19 10:05:06 +08:00
Maheshwar Ajja
ba78735a86 msm: vidc: send dmabuf pointer instead of fd
Send dmabuf pointer in reserved fields instead of fd
to CVP driver for internal CVP usage buffers as fd is
not available for these buffers.

Change-Id: Ic25a445253b4ae05748d47b7caf0b88e909aad7e
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-07-18 11:54:05 -07:00
Qiwei Liu
8daa8ee72f msm: vidc: fix some BW and freq calculation issues
- Modify max UBWC_CR from 3 to 5, as this value can
exceed 4 in real usecases.
- Decoder dpb read/write has already added cbcr by
dpb_factor, no need to add again.
- Decoder dpb_read BW saving factor for LLC should
be 1.3 for H264 and 1.14 for HEVC.
- VSP base cycle should be 0 for Iris/Iris2.
- Encoder ref_read_cbcr should multiply by
ref_cbcr_read_bw_factor.
- Encoder ref_write should multiply by
recon_write_bw_factor when tile enabled.
- Add fw_vpp_cycles when calculating vpp_cycles.
- Add multi-pipe factor for vpp_cycles.
- Add B-frame factor for encoder vpp_cycles.

Change-Id: I9e40203c5c89d8abdc77787a752ca240e11791f6
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-07-18 15:35:02 +08:00
Priyanka Gujjula
9abcce52a6 msm: vidc: remove key frame flag usage from ebd
Remove HAL_BUFFERFLAG_SYNCFRAME flag usage support
from hfi_msg_session_empty_buffer_done_packet and
its corresponding usage in handle_ebd.

Change-Id: I2dafd35a462a443e6efa165cbf46d4b78833c765
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2019-07-18 12:01:22 +05:30
Akshata Sahukar
4c65367a07 msm: vidc: Enable LTR use contraint by default
Encoder shall encode subsequent frames in encoding order subject to the 
following constraints:
- It shall not use short-term reference frames in display/input
  order older than the current frame with the LTR command applied
  for future encoding in encoding order.
- It shall not use LTR frames not described by the most recent USELTRFRAME.
- It may use LTR frames updated after the current frame in encoding order.

Change-Id: I167bb0e211c46f892fedb88f8054bc98543ebe8a
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-07-17 13:13:10 -07:00
qctecmdr
8e381af8e9 Merge "msm: vidc: Initialize 10bit bw variable" 2019-07-17 01:09:43 -07:00
qctecmdr
34c7c333cd Merge "msm: vidc: Update minimum GOP size calculation" 2019-07-16 19:24:51 -07:00
qctecmdr
03172d2c37 Merge "msm: vidc: Remove mese bw vote for video encoder" 2019-07-16 16:17:26 -07:00
qctecmdr
653e7ca445 Merge "msm: vidc: Optimize bw calculations" 2019-07-16 16:17:25 -07:00
Chinmay Sawarkar
1fc298872a msm: vidc: Initialize 10bit bw variable
In certain scenarios, y_bw_no_ubwc_10bpp and y_bw_10bpp_p010
will be used with unitialized and incorrect values.

CRs-Fixed: 2487664
Change-Id: I292ed33b60c3994886bb3756babc8ab706ceab8b
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-07-16 15:53:38 -07:00
qctecmdr
9a80003090 Merge "msm: vidc: queue batched buffers upon timeout" 2019-07-16 15:26:34 -07:00
Akshata Sahukar
9e0c71bb6e msm: vidc: Update minimum GOP size calculation
Use max layers allowed in a session to calculate min GOP size
instead of variable number of layers enabled during each frame
encode to avoid GOP size not being multiple of sub-GOP size issue.

Change-Id: I3bb6e5320385acea9cb892c04b586ac3ca8c753f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-07-16 11:27:54 -07:00
qctecmdr
ce34a06ee0 Merge "msm: vidc: Ensure size of the data available before typecasting" 2019-07-16 04:00:30 -07:00
qctecmdr
760ff0acd6 Merge "msm: vidc: Fix criteria for hybrid hierp enablement" 2019-07-16 02:27:02 -07:00
Govindaraj Rajagopal
38b1e119c8 msm: vidc: queue batched buffers upon timeout
Client expects all the buffers to be returned in certain scenarios
but driver does not return due to decode batching feature. Add
delayed_work functionality to queue batched buffers to video hardware
upon timeout, so that all the buffers will be returned to client.

Change-Id: I926de1da93d941ff2a64bfec1bbd351de2f3a601
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-07-16 10:23:09 +05:30
Chinmay Sawarkar
c5b079d201 msm: vidc: Optimize bw calculations
Calculate DDR and LLCC bw simulteneously to avoid
redundant calculations. This reduces number of calculations
required by 50% and hence reduces cpu load.

CRs-Fixed: 2487664
Change-Id: I6e1768cd63d9b6651fbaf4a8ed8d5706929d7743
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-07-15 14:30:18 -07:00
Chinmay Sawarkar
fcc05b6aac msm: vidc: Remove mese bw vote for video encoder
MESE BW vote is not applicable for Kona. We can reduce overall BW
requirement by removing this vote.

CRs-Fixed: 2487664
Change-Id: I7cd6e3937e8884a2e4790a49713bd33aaab9c4bf
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-07-15 14:09:29 -07:00
Priyanka Gujjula
3be0ff3910 msm: vidc: Ensure size of the data available before typecasting
Ensure the available data size with in the packet before type
casting from a smaller data type to larger data type in order
to avoid information leak or packet out of boundary access.

Change-Id: I8614a8b3f930c87af8aa49f77ea9d768a73ea203
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2019-07-15 16:57:05 +05:30
qctecmdr
ac0ba4c8f7 Merge "msm: vidc: Fix scaling capability for encoders" 2019-07-12 19:30:34 -07:00
Amit Shekhar
c97d00e59f msm: vidc: Fix criteria for hybrid hierp enablement
If client doesn't request hybrid hierp or sets zero as max
enhancement layer count, then, hybrid hierp is not enabled.

Change-Id: I4284fd5c25d4dc812dac3e134ab5dfc53833bfbf
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2019-07-12 15:43:19 -07:00
qctecmdr
01ee3c3978 Merge "msm: vidc: Fix validate_pkt_size macro definition" 2019-07-11 22:57:24 -07:00
qctecmdr
a35b41478f Merge "msm: vidc: fix downscale resolution calculation" 2019-07-11 21:46:10 -07:00
qctecmdr
71350c044f Merge "msm: vidc: Fix work mode for rate control CQ" 2019-07-11 18:17:43 -07:00
Akshata Sahukar
99aa37e4ae msm: vidc: fix downscale resolution calculation
Compare unmodified width and height instead of modified values to
resolve downscale resolution calculation issue.

Change-Id: I06e753e416c356ca0e97a6ad53dc12fe04c5cfa3
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-07-11 17:32:03 -07:00
qctecmdr
c1c807954d Merge "msm: vidc: add cvp session priority" 2019-07-11 12:45:52 -07:00
Amit Shekhar
10eb14941d msm: vidc: Fix work mode for rate control CQ
Set single stage work mode for HEIC sessions. Currently, with two
stages, encoded tiles are missing at random.

Change-Id: Iadb59102447e1873e99ae1fd03a1d7b6ce3cba1a
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2019-07-11 12:43:21 -07:00
Vikash Garodia
b77f91e4fb msm: vidc: Fix scaling capability for encoders
Scaling capability are defined in Q16 format. Existing
capability indicates that the capability is 16 times i.e
output dimension can be scaled to 1/16th of input dimension.
As per specification, the achievable ratio is 8.

Change-Id: Ib9e005a055e604d3173dd8cd376d3b6666f2c12c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-07-11 18:03:51 +05:30
Priyanka Gujjula
7b837fbb71 msm: vidc: Fix validate_pkt_size macro definition
Convert validate_pkt_size macro to an inline function
as this macro definition always returns true.

Change-Id: I9e7eadfe82c041721565c880eca3a46e4e3e98d9
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2019-07-11 16:51:08 +05:30
Darshana Patil
7db4d9a424 msm: vidc: define common macro for DB disable slice boundary
Defined a common macro for disable slice boundary
deblocking mode.

Change-Id: Ie163b1268a91f278e8ed6821c88ebff32e80d9cd
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-08 13:23:17 -07:00
qctecmdr
d89f059e3a Merge "msm: vidc: Avoid information leak while accessing the packet" 2019-07-08 02:57:07 -07:00
qctecmdr
11c1adfed0 Merge "msm-vidc: update decoder scaling capability" 2019-07-06 20:44:26 -07:00