Commit Graph

105 Commits

Author SHA1 Message Date
qctecmdr
8daa6110c7 Merge "msm-vidc: Update capabilities for VP8 codec" 2019-06-20 10:49:53 -07:00
Dikshita Agarwal
cfa9b00d0c msm-vidc: Update capabilities for VP8 codec
- Higher SKU supports 4k@30.
- Lower SKU supports 1080p@60.

Change-Id: I2581e9061eedb680e49d1b040a7291211417c31a
2019-06-20 11:15:56 +05:30
qctecmdr
97b0836ed1 Merge "msm: vidc: fix encoder reference buffer count" 2019-06-19 17:21:49 -07:00
qctecmdr
2829ba22c6 Merge "msm: venc: Modify vbvdelay logic" 2019-06-19 17:21:49 -07:00
qctecmdr
a540f6e64d Merge "msm-vidc: calculate encode output buffer size considering 10-bit" 2019-06-19 17:21:49 -07:00
Akshata Sahukar
2d58b33183 msm: vidc: fix to pass correct buffer count to fw
Remove msm_vidc_calculate_output_buffer_count function
calls while g_ctrl event to avoid overwriting of
buffer count to old buffer count value that is set by
client.

Change-Id: I76135a88948ad7e2845c054a48e9f148bf367abb
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-18 18:24:26 -07:00
Darshana Patil
979119ba67 msm: vidc: fix encoder reference buffer count
Fixed encoder reference buffer count to use maximum
number of hier players set by client.

Change-Id: I7fe55aff9ee3ac5065e6cab4af37013577e3c4c0
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-06-18 16:47:17 -07:00
Akshata Sahukar
b491becf08 msm: vidc: Update Max Allowed MB per frame
Updated maximun allowed mdbf to support one 8K
session and one 4K session at a time.

Change-Id: I64ad3820aaddf5a3f89f97fe34c158b30f1e3675
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-18 15:11:00 -07:00
Darshana Patil
307e05c5f8 msm: venc: Modify vbvdelay logic
Modified vbvdelay logic with default behavior as
CBR+. Enable legacy CBR if resolution is < 720p.

Client can overwrite default behavior if
resolution is between VGA & 720p.

Change-Id: I9bd5ede782959780e5a5cb56eda0ae5e344e66aa
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-06-18 12:55:32 -07:00
Dikshita Agarwal
185d24cddd msm-vidc: calculate encode output buffer size considering 10-bit
In case of opaque color format the bit depth will be known with
first ETB. Existing logic calculates output buffer size based on 
8-bit which won't be sufficient for 10-bit.
So consider 10-bit by default while calculating encoder output
buffer size. 

Change-Id: I51eee2fcb0dc137c596babd04659cd1fc087ebd6
2019-06-17 18:27:48 +05:30
qctecmdr
7c73b4c8b5 Merge "msm: vidc: add sanity checks for clocks and regulators" 2019-06-14 23:41:47 -07:00
qctecmdr
495a0403e4 Merge "msm: vidc: Update bitstream buffer size for secure case" 2019-06-14 23:41:47 -07:00
qctecmdr
28bf999dd6 Merge "msm: vidc: add additional check to avoid out of bound access" 2019-06-14 23:41:47 -07:00
qctecmdr
2b53225bae Merge "msm: vidc: add caps for batch mode decode" 2019-06-14 22:45:09 -07:00
qctecmdr
2e161c01f5 Merge "msm: vidc: Update all height and width alignment to 16" 2019-06-14 21:55:19 -07:00
qctecmdr
4f7323e6d7 Merge "msm: vidc: Add bw for cbcr dbp read and write" 2019-06-14 21:55:19 -07:00
Akshata Sahukar
82b6884d19 msm: vidc: Update all height and width alignment to 16
Updated corresponding variables of size_vpss_lb
to align height to 16. This is needed to fix internal buffer mismatch
of H264 decoder with firmware which was caused due to height alignment
to 8. Also updated SIZE_VP9D_LB_FE_TOP_DATA, SIZE_VP9D_LB_PE_TOP_DATA
and SIZE_VP9D_LB_VSP_TOP macros width alignment to 16 from 8.

Change-Id: I308a64ec69ac2a63fae9a9481652119f55834cae
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-14 15:17:05 -07:00
Maheshwar Ajja
eb66c84844 msm: vidc: amend reconfiguration buffer requirements
Do not reset buffer counts while session is running and
modify in case of insufficient event processing.

Change-Id: I5425e54702339e768f3c3a6182fa62dd7a8b484a
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-14 08:01:56 -07:00
Vikash Garodia
ac11cf2022 msm: vidc: Update bitstream buffer size for secure case
Existing logic to calculate buffer size is based on
the max bitrate supported during a secure session. Even
the peak bitrate calculation is not sufficient to arrive
at the required frame size.
Going back to earlier logic based on macroblocks per frame.

CRs-Fixed: 2467242
Change-Id: I0fe1768036f19ad2f1d08222e3ed239be7a2e27c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-06-14 14:39:11 +05:30
Maheshwar Ajja
82b121236b msm: vidc: amend buffer counts calculation
- Consider thumbnail mode while calculating buffer counts
- decide batching in reconfiguration event so that driver
  returns proper min buffer count when client query for it

Change-Id: I4d5373e78d43592caf0cef59f2f8801d20014efd
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-13 17:17:10 -07:00
Chinmay Sawarkar
fb9ec98d70 msm: vidc: Add bw for cbcr dbp read and write
As per system requirements this additional bw is needed
for decode session.

Change-Id: Ia435aadcf78e4e2fd7b01ed00633fa2f38729bc6
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-06-13 14:57:40 -07:00
Chinmay Sawarkar
d6ab63aafe msm: vidc: Use frame statistics for decode bw calculations
FW provides UBWC_CR_STATS_INFO with every EBD which can be used
to accurately calculate BW requirements. Also renamed reconbufs
to refbufs, which is common to encode and decode.

CRs-Fixed: 2467542
Change-Id: I29afdcd466bd61f455507d30ab7ca951d0e9911c
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-06-13 14:51:15 -07:00
Chinmay Sawarkar
7e866a6a3c msm: vidc: Initialize max cf and max cr values
CF and CR cannot be zero. Initialization of Min/Max values
keeps the values within limits, when FW does not provide them.
Also, do not modify CF, CR value based on DCVS. Always use
worst case values.

CRs-Fixed: 2467542
Change-Id: I91ed83cb5c9e1a8cda5775c491d99b97c4043a12
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-06-13 14:51:05 -07:00
qctecmdr
b9dc8d7ed3 Merge "msm: vidc: add VIDC_BUS log mask" 2019-06-12 20:11:55 -07:00
Dikshita Agarwal
56010535ad msm: vidc: add caps for batch mode decode
- Add caps for batch mode decode for lito.
- fix min value for few caps.

Change-Id: I24ae2baf506f885398ef9f121e6a25a141078db8
2019-06-12 17:33:15 +05:30
Maheshwar Ajja
d4b95d4a4e msm: vidc: add sanity checks for clocks and regulators
Add sanity checks before and after clocks and regulator
operations to get more information if these operations
not functional as expected.

Change-Id: Ib4985113200ed065e6acf6cb7ae406b88cc7f432
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-11 16:41:38 -07:00
qctecmdr
c8babda925 Merge "msm: vidc: Provide default profile type in s_fmt" 2019-06-11 16:25:15 -07:00
qctecmdr
635c29dcf0 Merge "msm: vidc: limit gop size to firmware max supported value" 2019-06-11 16:25:14 -07:00
Govindaraj Rajagopal
cb789feb4e msm: vidc: limit gop size to firmware max supported value
Change gop size to firmware max supported range.

Change-Id: Ic84dc498b9399b8cc453127c42acf42d31c0f3d4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-11 10:25:49 -07:00
Akshata Sahukar
1f3b5821fe msm: vidc: Provide default profile type in s_fmt
Set default profile type to avoid error when client
has not set any profile type.

Change-Id: I89b81f5167f65685e47073b5e73d3bd7c4fe81d6
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-11 10:25:19 -07:00
Maheshwar Ajja
1dcfc5752d msm: vidc: decide batching while configuration
driver returns min buffer count to client which includes
extra buffers count which is required for batching even
though batching may be disabled in start_streaming() later.
So decide batching in set format (configuration) to avoid
adding extra buffers count to reduce memory usage in
non-batching cases.

Change-Id: I147f7aaf928074a23c9dcda2dbf69a744cec382d
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-11 10:16:12 -07:00
qctecmdr
5db23dd1f4 Merge "msm: vidc: support disable all blur feature" 2019-06-11 01:07:19 -07:00
Shi Zhongbo
2a820b1c52 msm: vidc: add VIDC_BUS log mask
Add new VIDC_BUS log mask for bus parameters
related logs.

Change-Id: If933c8c88ec2e0ccb283606da7f46a3c3c49756a
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-06-11 13:44:52 +08:00
Govindaraj Rajagopal
fc8664564a msm: vidc: add additional check to avoid out of bound access
pkt->msg_size can be corrupted, that leads to OOB access. So added
additional conditional check to avoid OOB access in debug queue
packet handling.

Change-Id: I360812c40369ecef2dd99464d400661bc785074b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-11 10:16:06 +05:30
Chinmay Sawarkar
fe44bca0c0 Revert "msm: vidc: Enable ubwc cr stat by default"
This reverts commit 52ae7a5f1b.
2019-06-10 13:15:54 -07:00
Qiwei Liu
48e20d6e8f msm: vidc: support disable all blur feature
Add support to disable both auto blur and
external blur.

Change-Id: I5200f738ffa5849a3e840f90f0da66c38607ceae
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-06-10 21:42:11 +08:00
Maheshwar Ajja
994366e082 msm: vidc: use batch enable instead of decode_batching
Use the existing batch enable variable instead of extra
variable decode_batching.

Change-Id: Ic7875caf2b0d2c47d77b0c0c0ce9b5792920cafc
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-07 21:59:09 -07:00
qctecmdr
c27dd191a0 Merge "msm: vidc: Release non-requested internal buffers" 2019-06-07 21:28:17 -07:00
Chinmay Sawarkar
52ae7a5f1b msm: vidc: Enable ubwc cr stat by default
Decode session needs UBWC CR statistics for BW calculations.
Hence need to enable this exetradata by default.

CRs-Fixed: 2467542
Change-Id: I3955a0b09cf82f97478c31704be6b16f297b011b
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-06-07 21:14:59 -07:00
Govindaraj Rajagopal
12ac83a8c5 msm: vidc: Release non-requested internal buffers
during load resource firmware will check input buffer type
against requested buffer type. If there a mismatch it will
throw an error. So cleared non-requested buffer from the
scratch buffer list

Change-Id: Ifabf532982a393d4fc356ff3cad0ca3fd715fce0
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-07 21:14:30 -07:00
qctecmdr
0df3d37992 Merge "msm: vidc: Update perf mode for different video hardwares" 2019-06-07 19:21:19 -07:00
Manikanta Kanamarlapudi
3418f42be4 msm: vidc: Update device clock after cx ipeak logic
Existing code updates the device clock before cx ipeak logic.
As a result, the cx ipeak takes a decision based on updated
clock rather than the clock at which the device was running.
With the change, device clock is updated after the cx ipeak
is decided.

Change-Id: Icfde29176f8adb3a12c68a611f47b83ca7a8e4a9
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2019-06-07 13:56:51 -07:00
Vikash Garodia
31021fce6a msm: vidc: Update perf mode for different video hardwares
Perf mode can be either predefined or can be decided dynamically.
It is configured differently for different video hardware versions.
Perf mode is now updated with below
1. Remove multicore calculation as it is not applicable for single core
   hardware.
2. Rate control type CQ is considered during load calculation
3. If the clocks are available, keep higher perf mode, unless restricted
   by the hardware specification.

CRs-Fixed: 2462264
Change-Id: I9328e07ea3d1667b15a431c624112f1e8f8c92e0
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-06-07 13:36:51 -07:00
qctecmdr
3c7535842c Merge "msm: vidc: fix f/w logging route checking" 2019-06-07 13:26:11 -07:00
qctecmdr
0b7cd621d3 Merge "msm: vidc: remove decoder operating rate setting to firmware" 2019-06-07 13:26:10 -07:00
qctecmdr
ec4616697c Merge "msm: vidc: Update in VP9 decoder height alignment" 2019-06-07 13:26:10 -07:00
Govindaraj Rajagopal
762f815ddc msm: vidc: remove decoder operating rate setting to firmware
operating rate setting to firmware is not required for decoder.

Change-Id: I271a42822f4a00e95d875400e5ad273697c94ab1
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-07 12:48:52 -07:00
qctecmdr
671a044e76 Merge "msm: vidc: amend cvp module structures" 2019-06-07 12:48:17 -07:00
Vikash Garodia
612a31d1ac msm: vidc: update video resolution during reconfig event
Video port resolution can be updated during reconfig event itself.
With this, reconfig height and width was removed. Also relevant
code cleanup was made accordingly.

Change-Id: I4fb38563b4c747eb356f28b7df7e99bd397ff8d1
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-06-06 23:06:24 -07:00
Shi Zhongbo
b0cae0e825 msm: vidc: fix f/w logging route checking
Fix to check f/w logging route based on
local flag variant instead of the global one.
Because route maybe updated when error occurred.

Change-Id: Ia67e138a2b494da465f4868553d33509e70020eb
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-06-06 23:04:36 -07:00