Commit Graph

540 Commits

Author SHA1 Message Date
Dikshita Agarwal
a88ec175cd msm: vidc: update core ops for AR50LT bus calculation
Update core ops to invoke calc_bw_ar50lt API to
calculate bus bw requirement for ar50lt.

Change-Id: I1c8e1766d9aa2f8ad44498587b171c2827759ddb
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-01-02 12:25:27 -08:00
Chinmay Sawarkar
bcd5ad8e90 msm: vidc: Update cycle count for vpx
VPx cycle requirement is not same as CABAC.
Hence update required as per system recommendation.

CRs-Fixed: 2560714
Change-Id: If600bc9c4abb364dba5f807c944976be992567c9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2020-01-02 12:22:49 -08:00
Vikash Garodia
c7abb94cc3 msm: vidc: add 32 bit support in video driver
The commit adds the following
1 Keep DMA mask aligned with api definition.
2 Replace the various division operations with 32 bit compatible modules.

Change-Id: I7bc931ffd124ef2b0be8d2bec44fbebf29d4cfb3
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-01-02 12:18:58 -08:00
qctecmdr
237897b02f Merge "msm: vidc: Update bitrate and frame-size capabilities" 2020-01-02 11:09:16 -08:00
Manikanta Kanamarlapudi
57b101caf9 msm: vidc: Update bitrate and frame-size capabilities
Update max bitrate, min frame width & height.
Add cabac bitrate capability.

CRs-Fixed: 2572200
Change-Id: I41caf4100a2f018d295fb9d802eb8353f9e67168
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2019-12-30 17:34:26 -08:00
qctecmdr
012bf64164 Merge "msm: venc: fix custom matrix enablement" 2019-12-30 17:27:42 -08:00
Shi Zhongbo
6fe257d27f msm: venc: fix custom matrix enablement
Fix to set 7 instead of 1 to firmware to
enable all custom bias, matrix and limit.

Change-Id: Idd8bf0f6036ef2919855f379fffa51d5339eba1d
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-12-30 16:32:50 -08:00
qctecmdr
d36a642601 Merge "msm: vidc: Fix Power Collapse issue" 2019-12-30 16:32:35 -08:00
qctecmdr
c18d461926 Merge "msm: vidc: Add video param capabilities" 2019-12-30 15:50:24 -08:00
qctecmdr
7fe2a8bf78 Merge "msm-vidc: add bw calculation for ar50LT" 2019-12-30 15:05:46 -08:00
Manikanta Kanamarlapudi
fb13af1aa4 msm: vidc: Add video param capabilities
Add heic & B-frame QP capabilities for
bengal target.

CRs-Fixed: 2558188
Change-Id: I3bfd4f2fc83792395e0a6bd9b4596d7823f92bc8
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2019-12-30 12:09:30 -08:00
Shi Zhongbo
a0e884a3b0 msm: venc: set operating rate to 1 for HEIC
Set operating rate to 1 by force for HEIC, so as
to avoid overloads.

Change-Id: If3f980e096c7e30368b9c6a280e78bbe1625e87a
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-12-30 11:00:51 -08:00
Manikanta Kanamarlapudi
f0cfef2440 msm: vidc: Fix Power Collapse issue
Driver is not polling for the PC Ready to be
set and truning of the regulators/clocks. Fix the
same.
H2X Interrupt has to be enabled for every boot.

CRs-Fixed: 2572953
Change-Id: Ib24b35dcebedf464bcd461718a18e732531ea4ce
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2019-12-30 11:00:30 -08:00
Dikshita Agarwal
c4f845c6e4 msm-vidc: add bw calculation for ar50LT
Add bw calculation logic for ar50LT.

Change-Id: I326a2d1999248cc189922cb124732e087ad9ff9e
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2019-12-30 10:59:44 -08:00
Shi Zhongbo
2b6da92f88 msm: vidc: fix CSC coefficients
Fix to use correct CSC coefficients for
BT601 to BT709 CSC.

Change-Id: I8365603fed10151db0efbea0058bb896c419c3f4
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-12-27 16:57:48 -08:00
qctecmdr
32e3693d10 Merge "msm: venc: use output resolution for vbv delay" 2019-12-27 13:12:36 -08:00
qctecmdr
b7e38e6b61 Merge "msm: venc: increase output buffer size only for hevc" 2019-12-27 12:26:39 -08:00
Shi Zhongbo
45a07678d1 msm: venc: use output resolution for vbv delay
Fix to use output port resolution to determine
vbv delay.

Change-Id: Id6dc80f1349d0f5b10be2fa6343fb98816156f58
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-12-27 10:52:20 -08:00
Govindaraj Rajagopal
18c386f2f5 msm: venc: increase output buffer size only for hevc
10 bit support is available only for hevc codec type.
So increase encoder output buffer size(factor - 1.25)
only for hevc.

Change-Id: I49f6bccc074814d8c737f47fd82907a018ac169a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-12-27 10:27:30 -08:00
Govindaraj Rajagopal
abe5948313 msm: vdec: reduce decoder input buffer count for > 480fps case
For HFR(like 960 fps) usecases requires higher buffer count-24.
But due to framework change(277033), We don't need any addtional
buffers for HFR usecases also. So reducing the count back to 12.

Change-Id: Ia3669858cde0962275d00f31d2bbb7308a3ce983
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-12-27 10:27:09 -08:00
Shi Zhongbo
73fa002b9b msm: venc: set perf mode for HEIC buffers
1. Set perf mode for image session buffers so that
they will be processed quickly.
2. Set max frequency for any turbo sessions.

Change-Id: Icf9b0af5cffcd395356783a9ff7a9421a309f52c
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-12-21 11:58:40 -08:00
Dikshita Agarwal
923758b884 msm: vidc: Add check to avoid NULL ptr dereference
Check ubwc_config for not being NULL before
dereferencing.

Change-Id: Ia4c87ea4a0e963b33165b0ea9a9c39339cc65832
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2019-12-20 15:52:40 -08:00
Manikanta Kanamarlapudi
0d502cfe48 msm: vidc: Update capabilities for bengal
Update few capabilities like B-frames, Max-MB's,
Codecs for bengal target.

Change-Id: I52bdf3e03ed78915aa3ca218cad89b6da938a606
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-20 15:51:02 -08:00
Qiwei Liu
f15e24f19f msm: vidc: support ROI map type query
Add new ioctl to query the supported ROI map type.
Based on vpu version, report whether support 2-bit type
ROI map, or 2-byte type ROI map.

Change-Id: I6db970f5f36e4cc61365867c2a07d63aaf9365ea
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-20 15:37:16 -08:00
qctecmdr
cba83aa665 Merge "msm: vidc: Add support to H264 CABAC bitrate" 2019-12-20 11:43:18 -08:00
qctecmdr
90df874a0c Merge "msm: vidc: align capabilities to 32 considering hevc" 2019-12-20 10:38:50 -08:00
qctecmdr
57625bccc6 Merge "msm: vidc: Update Enc/Dec o/p and i/p buffer calculations" 2019-12-19 21:26:35 -08:00
qctecmdr
64f370825e Merge "msm: vidc: Update input buffer counts in set format" 2019-12-19 16:13:39 -08:00
Akshata Sahukar
0867a4fbe9 msm: vidc: Add support to H264 CABAC bitrate
Update HEVC, VP8, and H264 CABAC supported bitrate ranges.
And also, added support to distinguish between H264 CABAC
and CAVLC bitrate.

Change-Id: I8e37aa78dbbc7e26faf99b9c1c27cba5a3462cb8
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-19 14:48:58 -08:00
Vikash Garodia
f6dab215cd msm: vidc: align capabilities to 32 considering hevc
For hevc codec, LCU sizes are 32x32 or 64x64. Existing
capabilities consider alignment with 16. Considering a
hevc clip of dimension 4096x2160, the coded resolution
becomes 4096x2176. Limiting the cap with 4096x2160 will
break such usecase, hence keeping the capabilities
considering 32-byte alignment.

Change-Id: I505843878f177c63b88959f92ce3a7d5a06b996b
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-19 14:44:36 -08:00
qctecmdr
610124440b Merge "msm: venc: modify log messages for vbvdelay" 2019-12-19 01:17:22 -08:00
Maheshwar Ajja
2264ab291f msm: vidc: Update Enc/Dec o/p and i/p buffer calculations
-Fix to add 4 extra dcvs buffers at encoder input and decoder
 output side irrespective of fps and resolution.
-Decrease total encoder input buffer count from 16 to 8 for non-hfr
 use-cases.
-Increase total encoder output buffer count for hfr use-cases
 irrespective of resolution.

Change-Id: I2fcda6e8c93bcc0df8c3168049ebf4a60e6bb5f1
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-12-18 20:41:58 -08:00
Darshana Patil
84b5664f36 msm: venc: modify log messages for vbvdelay
Modify log messages for vbvdelay.

Change-Id: I3f1b9458d73dbd2a1f18d1f8d8896e51cd513a07
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-12-18 14:39:29 -08:00
Chinmay Sawarkar
3f1571ff52 msm: vidc: Update input buffer counts in set format
Input buffer counts, ie Dec Bitstream and Enc Yuv,
depend on input resolution. Hence they should be recalculated
in set format. Stale values can result in excess memory usage.

CRs-Fixed: 2548727
Change-Id: I57c87270a6613da290f14484897cef16e964e27a
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-12-18 14:30:44 -08:00
Darshana Patil
e937ff6a51 msm: venc: Bump freq to next level for 1080p@480
Increase vpp cycles by 2% for 1080P@HSR480 encode
usecase so that the video core runs at higher
frequency(366Mhz) helping to achieve the desired
performance.

Change-Id: Id81abd36ab79067d52da9371d1dd5bdcfe622389
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-12-18 14:26:08 -08:00
Maheshwar Ajja
749c6aa9a9 msm: vidc: make video driver as module
make changes in video driver to make it as module.

Change-Id: I00788a1b72cc799f655b16e1bc6b7d6d6e0441f9
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-12-18 14:22:43 -08:00
Priyanka Gujjula
16e264d6fa msm: vidc: reject the buffer iova for incorrect mapping
Reject the buffer device address mapping when the device
address is mapped in secure context bank for a non-secure
instance and for the converse as well.

Change-Id: Ic2fc578acd23d3582b390b24cc9d829d49d00d4d
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2019-12-17 17:36:09 -08:00
Darshana Patil
a491b399dd msm: venc: Disable input extradata plane for secure encoding
For secure encoding case, there is no camera usage. Hence,
by default make number of planes as 1. If any input requires
extradata, client will enable it and driver will update
number of planes.

Change-Id: Id9afd0a286a53d5d4c6045ba58227f57a0a8e0ca
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-12-17 17:35:25 -08:00
Shi Zhongbo
3498fb8bbc msm: venc: fix to skip mbpf checking for HEIF
Fix to add condition to skip mbpf capability checking
for HEIF image encoding.

Change-Id: Ife323366b8c08040c3f6fab8a0d15b89fe6f6777
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-12-17 17:19:21 -08:00
Govindaraj Rajagopal
16c8cdbaaf msm: vidc: vdec: recalculate input buffer count for HFR
Default buffer count will not be sufficient for HFR(fps > 480).
So recalculate buffer count, if fps is updated before calling
vidioc_reqbuf.

Change-Id: Iec792892d283072f064c4148c65560b6a7e31d45
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-12-17 17:17:41 -08:00
Mihir Ganu
8bb21b0ecf msm: vidc: Set CABAC as the default entropy mode
Set CABAC as the default entropy mode for h264.
Also, check profile settings to ensure that CABAC mode
is set only for applicable profiles.

Change-Id: Id5e67c1a7ac0862ea963312ebdaee58945bf8bc0
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-17 17:15:49 -08:00
Akshata Sahukar
9e9698a05c msm: vidc: Fix to set correct profile levels to Video Firmware
Avoid setting incorrect profile level to Video Firmware.

Change-Id: I4f7af01fe77269758d7bcead383e284e995238a2
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-17 17:04:52 -08:00
qctecmdr
347fcf6c7e Merge "msm: vidc: Update encoder scratch1 size" 2019-12-17 13:45:44 -08:00
qctecmdr
5aa8ec341f Merge "msm: vidc: Make sku index an optional property" 2019-12-17 13:04:19 -08:00
qctecmdr
0def9e80f6 Merge "msm: vidc: Update ddr type macro values" 2019-12-17 12:13:11 -08:00
qctecmdr
c4dc072632 Merge "msm: vidc: Increase hfr enc input buffers" 2019-12-13 18:12:27 -08:00
Darshana Patil
8830606bd6 msm: vidc: Update encoder scratch1 size
Update encoder scratch1 buffer size to
match hfi ccb change for downscalar cases.

Change-Id: I6d46227291d8ff3621a19c02940dd555f9103981
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-12-13 14:07:43 -08:00
Chinmay Sawarkar
185f5585f1 msm: vidc: Increase hfr enc input buffers
Increase total input buffers used for HFR cases. Required
for smooth performance.

Change-Id: Ia7dd49ead71239c2fb669e016d5e9fd2f94ca862
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-12-12 18:02:39 -08:00
Chinmay Sawarkar
85b4a06821 msm: vidc: Modify DCVS scaling window
DCVS scaling window should be equal to the additional buffers
allocated for DCVS and independent of the buffer count required
by Client and FW.

CRs-Fixed: 2527739
Change-Id: I665a3d9792f44ea031d6c8d05d6e7a546a22f9a8
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-12-12 17:20:03 -08:00
Chinmay Sawarkar
d8fbf67e63 msm: vidc: Make sku index an optional property
SKU index is not applicable for all targets. Hence no need
to keep it mandatory. SKU related changes will happen only
when the property is present otherwise will default to 0.

Change-Id: I88076ea95bccd4130202c055e5c148d817dd302e
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-12-12 12:20:59 -08:00