Commit Graph

645 Commits

Author SHA1 Message Date
Qiwei Liu
f9a35e6304 msm: vidc: remove redundant freq calculations
Remove freq list, which is unused in current dcvs design.
Remove unused dcvs load, load_low, load_norm, load_high,
as current dcvs design only use min_freq and dcvs_flags.

Change-Id: Ifbf251a9506286f2f34eca6eeb1af79bd07c0f43
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-08-28 06:01:30 -07:00
qctecmdr
75c4f9c1ef Merge "msm: vidc: Update CVP skip pattern logic" 2019-08-27 20:17:31 -07:00
qctecmdr
e554b07b4a Merge "msm: vidc: fix vp8 frame rate capabilities" 2019-08-27 13:09:18 -07:00
Darshana Patil
736bca1b48 msm: vidc: fix vp8 frame rate capabilities
Corrected VP8 frame rate capabilities for encoder
and decoder as per PRD.Added bframe ctrl capability
for VP8.Moved LTR count null check.

Signed-off-by: Darshana Patil <darshana@codeaurora.org>

Change-Id: I2111719e711d6bc67c2279d4c4fc6ef63215a5cb
2019-08-27 10:18:08 -07:00
qctecmdr
bbca9aa4f6 Merge "msm: vidc: Update video-CVP interaction call flow" 2019-08-26 22:07:04 -07:00
Akshata Sahukar
17ed11c5ea msm: vidc: Update CVP skip pattern logic
Update CVP metadata skip logic to send a frame for CVP
processing every time frame rate or operatimg rate changes
dynamically. This helps in handling skipping of CVP metadata
processing for a random number of frames whenever frame rate
or operating rate changes dynamically, and avoid sending
CVP metadata to video firmware for an unpredictable frame.

Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>

Change-Id: I049f0c0ade1700816203713cd82382c2a614f20a
2019-08-26 16:47:04 -07:00
Vikash Garodia
d168b1dab5 msm: vidc: Invalidate encoder output buffer cache
For encode usecase, video driver operates cache always on
the encoded data length rather than the buffer length.
This is an optimization and saves cache operation on unused
memory region.
VB index is used to identify a buffer given to client and fed
again to encoder. Based on that, the filled length of that
buffer is then operated for cache operations.
For certain usecases, it is difficult to identify the buffer
based on VB index. Hence keep a counter to track the max filled
length during the usecase and operate cache on that length

Change-Id: I62cfe876077786ec9d14f541a0080cd2fc124b01
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-08-23 14:42:49 +05:30
qctecmdr
185da22f03 Merge "msm_vidc: vdec: add codec check for reconfig event" 2019-08-22 20:06:58 -07:00
qctecmdr
8c35bce4a2 Merge "msm_vidc: Skip mbpf check for image sessions" 2019-08-22 13:53:46 -07:00
qctecmdr
191e3fd62e Merge "msm: vidc: Set ETB extradata address to NULL during EOS" 2019-08-22 13:00:08 -07:00
qctecmdr
8dde95e9eb Merge "msm: vidc: Remove cluster controls" 2019-08-22 12:03:29 -07:00
Vikash Garodia
65106f1bc6 msm: vidc: Remove cluster controls
V4L controls are made to be part of a cluster when they
are interdependent. If any one control in that cluster
is updated, all the remaining controls get updated as well
with the current control value.
Existing video usecase does not require any v4l controls
to be clustered. Hence removing the cluster controls.

Change-Id: I98dfc4af5291837054a8a28b00942fea6866f0a9
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-08-21 20:20:52 +05:30
Shi Zhongbo
040e0b96c7 msm_vidc: vdec: add codec check for reconfig event
Add codec check for bit depth or color space only reconfig
event. VP9 and HEVC have bit depth reconfig event while only
HEVC has color space reconfig event.

Change-Id: Ia6732e31a15957dc7116535131203a69fe19c987
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-08-21 10:24:37 +08:00
Akshay Chandrashekhar Kalghatgi
5becaa4682 msm: vidc: Update video-CVP interaction call flow
Update video-CVP interaction with new call flow sequence. Add session create
and session delete commands (reference gerrit#2756413). Remove CVP persist
buffer release command.

Change-Id: Ia3a9ad10e93e19a26f59d9abb7dcccd1605e1ff9
2019-08-20 19:22:36 -07:00
Amit Shekhar
b6d2a31088 msm_vidc: Skip mbpf check for image sessions
MBs per frame for HEIF encode can be pretty large for high resolution
images. Skip mbpf check for image sessions.

Change-Id: I993115743f4792377a3a008b341d4c8256b102b9
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2019-08-20 18:22:31 -07:00
Govindaraj Rajagopal
4b98f5a1ae msm: vidc: optimize buffer tag allocation
- Possiblilty of performance hit due to memory
  alloc/free at frame level.
- Reuse same buffer_tag instead of reallocating.

Change-Id: Ifb8efc43907feea4d6da5e8a0bf0aeaa47c8e1d7
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-08-20 10:08:52 +05:30
Mihir Ganu
1dd6b69b53 msm: vidc: Set ETB extradata address to NULL during EOS
Firmware needs to access extradata buffer to find the size of extradata.
In secure sessions, assigning input buffer address to extradata address
causes fault since firmware does not have access to input adderss.
Extradata address and size in ETB must be set to zero for EOS cases
so that firmware skips accessing the extradata buffer.

CRs-Fixed: 2444064
Change-Id: Ia916d2f5f0500c85426fee3274f88fcf36103068
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-08-19 13:53:42 -07:00
qctecmdr
c8be54f0a9 Merge "msm: vidc: Add support to disable CVP usage" 2019-08-16 19:09:52 -07:00
qctecmdr
c2a859472e Merge "msm: vidc: Force venus to max if operating rate is INT_MAX" 2019-08-16 18:16:42 -07:00
Chinmay Sawarkar
8f3af55bc5 msm: vidc: Force venus to max if operating rate is INT_MAX
If client sets operating rate as INT_MAX, vote the highest
Venus clock and BW. This will allow operating the video session
at highest possible performance. DCVS & Batching is disabled.

CRs-Fixed: 2502809
Change-Id: I33e952f501a3ba6c1c8588ee319e10a586941d05
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-08-16 17:53:07 -07:00
Akshata Sahukar
408a8050fb msm: vidc: Add support to disable CVP usage
Add support to disable overall CVP usage.

Change-Id: I82e7a3e6533008b29f0beafba61fa7b6906aab53
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-08-16 15:55:45 -07:00
Akshay Chandrashekhar Kalghatgi
b1e18454d0 msm: vidc: Check NAL stream format for secure session
In case of secure encoding, NAL length based NAL header not supported.
Only startcode based NAL header is supported.

Change-Id: I119ffa47a003006e5b0d3bf7fbb5eb547de00830
2019-08-16 11:17:45 -07:00
qctecmdr
305725a1a9 Merge "msm: vidc: optimize buffer alloc in bitrate check" 2019-08-16 00:02:33 -07:00
qctecmdr
f69cf0392b Merge "Revert "msm: vidc: Fix work mode for rate control CQ"" 2019-08-15 23:16:18 -07:00
qctecmdr
992618a0c1 Merge "msm: vidc: make venus_hfi_device as a static variable" 2019-08-15 22:07:32 -07:00
Qiwei Liu
d27e0f6115 msm: vidc: optimize buffer alloc in bitrate check
Avoid alloc/free buffer at frame level in window based
bitrate check, re-use existing nodes to reduce
CPU workload, especially for HFR video.

Change-Id: I8bbbbef5229af7e608d7da1dfa4f75aab3903649
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-08-15 21:55:34 +08:00
qctecmdr
953fe222c3 Merge "msm: vidc: update current value while updating the v4l controls" 2019-08-14 12:57:59 -07:00
Qiwei Liu
1ec1845dab msm: vidc: refine bus bw voting
- Avoid redundant memory alloc/free at frame level.
- Only calculate bus bw for current session.
- Skip bus bw voting if change is less than 50MBps.

Change-Id: I944670c6ac0bf663cb43f47a06b8e828ccdb28cc
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-08-13 05:13:27 -07:00
Akshata Sahukar
1b9472cc6f msm: vidc: Add support for V4L2_FLAG_CVPMETADATA_SKIP flag
Introduced CVP skip flag as part of qbuf to indicate buffer is
skipped CVP processing. This is required in order to re-use CVP metadata
from previous frame when it is not an error case. Video firmware will look
at this flag and reuse CVP metadata from earlier frame to encode current frame.

Change-Id: Icf89daa2d5f19790a04f0467a15165870b283ee4
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-08-13 00:19:59 -07:00
qctecmdr
e13d370e88 Merge "msm: vidc: Update DCVS thresholds" 2019-08-12 21:06:42 -07:00
qctecmdr
3ee419949e Merge "msm: vidc: add support for input_tag, input_tag2 and sub-frame info" 2019-08-12 19:21:13 -07:00
qctecmdr
a81cba00ec Merge "msm: vidc: do not allow qbuf during flush" 2019-08-12 17:32:50 -07:00
qctecmdr
2fe86880cd Merge "msm: vidc: Set VBR as default rate control mode" 2019-08-12 16:49:51 -07:00
Chinmay Sawarkar
9c6de09cc9 msm: vidc: Update DCVS thresholds
DCVS Min Threshold should be FW Min count. Switch to Load_Norm
only when buffers are equally distributed between FW and Client.
This reduces clock transitions and increases residency in
Load_Low and Load_High.

CRs-Fixed: 2502809
Change-Id: I4896fd8fdffb44b546c6df3321e0155ee4a18dcb
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-08-12 15:58:22 -07:00
Vikash Garodia
2b881c253b msm: vidc: update current value while updating the v4l controls
A v4l control has current and new value. Current value indicates the
permanent value and any change in the control should be reflected to
current value. V4l client should ensure that while updating the
new value, current value is updated as well. If current value is
updated by v4l framework, its good, otherwise, the v4l driver should
update it.

Change-Id: Id0730465487dc4175516f4ef460758bee0b76308
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-08-12 21:54:19 +05:30
Govindaraj Rajagopal
4a3506cb7d msm: vidc: make venus_hfi_device as a static variable
1. Mostly venus_hfi_device ptr is derived from hal_session
   (session->device). During session close hal_session is
   freed in forward path and at the same time RBR arrives
   at feed_back path leads to race condition.
2. If forward threads acquires device->lock first then
   reverse thread may have stale device ptr(which is already
   freed), accessing that ptr leads to device crash
3. To avoid refrencing device from hal_session, made
   venus_hfi_device as a static variable within hfi_common

Change-Id: Ic5db6d4f6da6da08e16f4f00a06a3c4fec4f9c6e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-08-09 20:19:35 +05:30
Govindaraj Rajagopal
09a93f806b msm: vidc: add support for input_tag, input_tag2 and sub-frame info
1. Client needs input etb to output fbd association. Introducing
   input_tag and input_tag2 fields for this. Client will send
   input_tag via etb reserved fields and client will get back
   those as part of fbd reserved fields.
2. Convey sub-frame information to client from firmware.

CRs-Fixed: 2494945

Change-Id: Ic64131c7f8f3e3035cd6ff3997fe483171d71fc4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-08-09 17:06:26 +05:30
Govindaraj Rajagopal
d4e94261b5 msm: vidc: do not allow qbuf during flush
1. Don't allow qbuf (etb & ftb), if flush is issued to
   (encoder & decoder) input port.
2. Don't allow qbuf (etb & ftb), if flush is issued to encoder
   output port
3. Don't qbuf (ftb), if flush is issued to decoder output port
4. Allow qbuf (etb), if flush is issued to decoder output port
   to handle decoder reconfig.

Change-Id: I08a6a10612cc1a14ad164c55c5c8e54550c84845
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-08-09 16:57:19 +05:30
Mihir Ganu
226261607b msm: vidc: Set VBR as default rate control mode
Set VBR as default rate control instead of RC_OFF.

Change-Id: Ie89f0109a9fe38a6c18b4713e8e8e905beb40b70
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-08-08 14:50:01 -07:00
qctecmdr
0f6ff6216f Merge "msm: vidc: fix kw issues" 2019-08-08 10:31:19 -07:00
qctecmdr
1a997fa744 Merge "msm: vidc: recalculate buffer counts based on frame rate" 2019-08-08 09:47:46 -07:00
qctecmdr
2283a494c7 Merge "msm: vidc: Update cvp extradata control settings" 2019-08-08 09:01:29 -07:00
qctecmdr
75f5271221 Merge "msm: venc: add dynamic flip" 2019-08-08 08:17:59 -07:00
Shi Zhongbo
6854e171a5 msm: vidc: fix kw issues
Fix two kw issues on uninitialized pointer
and possible NULL dereference.

Change-Id: Ic87335d435ee84bef1c264d99e0d857d2932cbdc
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-08-08 14:21:59 +08:00
qctecmdr
cd68fa556e Merge "msm: vidc: increase decode input buffer count" 2019-08-07 21:40:53 -07:00
qctecmdr
b1b780431d Merge "msm: vidc: Do not vote bw on ftb" 2019-08-07 21:40:53 -07:00
qctecmdr
400d1130c6 Merge "msm: vidc: avoid repeatedly set the same freq" 2019-08-07 21:40:53 -07:00
qctecmdr
d10a4f3a23 Merge "msm: vidc: add check to ensure buffer size is 4K aligned" 2019-08-07 21:40:53 -07:00
Maheshwar Ajja
34d3f0fe99 msm: vidc: recalculate buffer counts based on frame rate
Encoder buffer requirement changes based on frame rate or
operating rate (HFR/HSR usecase) and hence recalculate
buffer counts when client set frame rate or operating rate.

Change-Id: I7b421524f319a4fde8b153dcd5c3bde123c5ccf9
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-08-07 14:03:20 -07:00
Akshata Sahukar
b273402361 msm: vidc: Update cvp extradata control settings
If kernel to kernel CVP is enabled, initially driver disables
CVP extradata to firmware and then later, re-enables it.
Introduced a new flag to usage of CVP kernel to kernel metadata
to save the usage. As part of start streaming, driver will send
out CVP extradata enabled once based on overall usage.

Also, disabled kernel to kernel CVP usage for superframe.

Change-Id: I5590bd2274e27243da99f207d61fb00fc6fc82e0
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-08-06 17:40:30 -07:00
Darshana Patil
efed87ec8d msm: vidc: increase decode input buffer count
Increase input buffers count for first four elgible
sessions to avoid high memory usage. Also made changes
to extra buffer calculations.

Change-Id: Id50791f6800390ad27abc6f361e54dcc7b61a8c8
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-08-06 15:06:47 -07:00
Shi Zhongbo
f72fe0767d msm: venc: add dynamic flip
Add to support dynamic flip command.

Change-Id: Ide3aba6185241214eb955861bf251efd51662f03
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-08-06 10:22:29 +08:00
Darshana Patil
af0e01c383 msm: vidc: make realtime as default
By default, a session is realtime. Client can
overwrite as non-realtime.Fixed realtime value
for decoder.Deprecated VIDC_REALTIME flag usage.

Change-Id: I5a1d1c9bdab18d3dfb73f3b21a23054de07d77a1
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-08-05 11:45:40 -07:00
Govindaraj Rajagopal
d1161f93dc msm: vidc: increase msm_vidc_hw_rsp_timeout to 1500
Increase msm_vidc_hw_rsp_timeout to 1500, if kerenl or firmware
log_mask is set.

Change-Id: Id12e05e78ac4b004e4ccef7ff48be4f8eca1242a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-08-05 11:27:07 +05:30
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
Qiwei Liu
37de0e68d4 msm: vidc: avoid repeatedly set the same freq
If requested clk_freq is not changed, don't call
clk driver to the same value repeatedly.

Change-Id: I7ff1d7faedb10b06c0371f66b4a6cf6592d165fe
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-08-02 22:34:15 +08:00
qctecmdr
b098e7cf4e Merge "msm: vidc: handle dynamic framerate or operating rate changes" 2019-07-31 23:28:48 -07:00
Govindaraj Rajagopal
a6e8541864 msm: vidc: add check to ensure buffer size is 4K aligned
Input and output buffer size must be 4K aligned for both
encoder and decoder session. So reject the session during
msm_vidc_qbuf, if alloc_len is not 4K aligned.

Change-Id: If555f26f1658ce50e12a8533cb9d59134da0aa81
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-08-01 11:05:13 +05:30
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
Amit Shekhar
6d95875992 Revert "msm: vidc: Fix work mode for rate control CQ"
Set default double stage work-mode for HEIC sessions.

This reverts commit 10eb14941d.

Change-Id: I347e3af101ef236ba18687a5672f3bca6b49d257
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2019-07-29 16:12:39 -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
Darshana Patil
154af16cfc msm: venc: enable encoder deblocking by default
Enable encoder deblocking by default.

Change-Id: I27af7bb60ed3baac061d481ba6181eb7c2e10a7c
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-07-05 16:33:36 -07:00
qctecmdr
31f1acd9e2 Merge "msm: vidc: Add check to avoid NULL ptr dereference" 2019-07-04 12:47:46 -07:00
qctecmdr
550bffc032 Merge "msm: vidc: Add trace for every buffer transaction" 2019-07-04 10:34:47 -07:00
qctecmdr
a07a236782 Merge "msm-vidc: restrict interlace clip resolution" 2019-07-04 08:41:43 -07:00
Maheshwar Ajja
86aaa65234 msm: vidc: add cvp session priority
Set CVP session priority and colorformat.

Change-Id: Ifba0734fa0d38ec47c2aa947bee815ae7c377589
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-07-03 15:23:15 -07:00
Priyanka Gujjula
9ce9c42bbb msm: vidc: Avoid information leak while accessing the packet
Use trusted packet size on the received packet and check for
the size of the data received against the expected size before
accessing the packet.

Change-Id: I1bd6008249a0bf4edeec711ec8d23cf7b8dac1f1
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2019-07-03 21:17:07 +05:30
Govindaraj Rajagopal
a57153a3f9 msm: vidc: Add check to avoid NULL ptr dereference
v4l2_ctrl_get_name may return NULL that leads to NULL
ptr dereference. So added necessay check to avoid ptr
dereferencing if it is NULL.

Change-Id: If1a4ee8fe22e240b278f31888637d22b81b334e1
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-07-03 18:26:37 +05:30
Dikshita Agarwal
9734cff1ca msm-vidc: update decoder scaling capability
Update scaling capability for decoder to reject the 
usecase where o/p resolution is less than i/p resolution.

Change-Id: I7cf85db78d51f8dd43da8d4312c92ea982054cb1
2019-07-03 12:09:05 +05:30
Darshana Patil
a705e592b9 msm: vidc: update encoder scratch1 size
Updated encoder scratch1 buffer size macro to
match HFICCB changes. This fixes mismatch in
driver and HFI macro scratch1 buffer sizes.

Change-Id: Ie61058f243dc1895e0af00b78118bbe9dbc54a98
2019-06-28 11:39:07 -07:00
qctecmdr
050df56dae Merge "msm: vidc: do not allow queue buffer in flush" 2019-06-27 21:20:51 -07:00
qctecmdr
6dcafba524 Merge "msm: vidc: add lossless encoding capability" 2019-06-27 20:42:45 -07:00
qctecmdr
2999a5c62e Merge "msm: vidc: refinements for lossless encoding" 2019-06-27 19:54:47 -07:00
Maheshwar Ajja
d5074f0078 msm: vidc: do not allow queue buffer in flush
Client is not supposed to queue buffer while driver
is in flush. Return error if client queue buffer
in flush to avoid possible deadlock issues in driver
due to release buffer reference event processing.

Change-Id: Ica2ff40e428f82b9f6d3aa1314f7bf7d322375bd
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-27 09:41:25 -07:00
Shi Zhongbo
d9ceba876f msm: vidc: refinements for lossless encoding
1. Refine work mode to 2 and disable low latency by default;
2. Refine output buffer size to (width * height) * 9 / 4;
3. Double scratch buffer size for lossless encoding;

Change-Id: If298b9fc63fc2329f02dcfcef5e4fd0667d3e8e6
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-06-27 16:29:47 +08:00
Shi Zhongbo
1332222345 msm: vidc: add lossless encoding capability
1. Define lossless capability upto 4096x2304@60fps;
2. Check capability when starting the streaming;

Change-Id: Iaa737aca6132b27a22a4e80a7d8eddfd83360b23
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-06-27 12:50:17 +08:00
qctecmdr
bebfa4a42b Merge "msm: vidc: Increase min input buffer count by 2" 2019-06-26 21:22:50 -07:00
Chinmay Sawarkar
14f8f69554 msm: vidc: Increase min input buffer count by 2
This smoothens the buffer flow and takes care of random
frame drops due to jitter.

CRs-Fixed: 2478892
Change-Id: I27ecb686e3982152b18f3a2fc207ecf59f928dff
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-06-26 16:32:18 -07:00
Darshana Patil
8bfbae799d msm: vidc: fix slice command buffer sizes
Fix HEVC slice command buffer sizes.

Change-Id: I8db40a80561eebb15fba9345d37b51bd42380c4f
2019-06-26 13:25:23 -07:00
qctecmdr
c0141cd493 Merge "msm: vidc: fix encoder internal buffer size" 2019-06-25 23:52:57 -07:00
Chinmay Sawarkar
04f6c63d2d msm: vidc: Add trace for every buffer transaction
Tracing all the buffer transactions give clear picture of
session behaviour and is helpful in performance analysis.

CRs-Fixed: 2478892
Change-Id: Ibab23a187af77434e20ce0b1c51de29b9d1731f9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-06-25 15:54:47 -07:00
Darshana Patil
7a43aa6b18 msm: vidc: fix encoder internal buffer size
Fixed all encoder internal buffer size
calculation based on bitstream buffer size.

Change-Id: Ib4bdf89f356877acd151d2d0a5a7ca8901421a84
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-06-25 11:32:01 -07:00
Qiwei Liu
254903a695 msm: vidc: fix slice mbs setting
When MB_MODE slice is enabled, should use output
width/height to calculate the allowed slice size.
Fix warning log for NV21 format.

Change-Id: I97441cef36484ac6e82ba78b816f96d4b5bf2ab4
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-06-25 18:02:21 +08:00
qctecmdr
ab390d0f2d Merge "msm: vidc: fix slice command buffer sizes" 2019-06-24 18:45:00 -07:00
qctecmdr
930efbd82f Merge "msm: vidc: enable cvp usage" 2019-06-24 17:48:09 -07:00
qctecmdr
71b6c517d3 Merge "msm: vidc: cvp session clock rate and bus bandwidth" 2019-06-24 11:21:21 -07:00
qctecmdr
8aba0e8837 Merge "msm: vidc: add check to avoid out-of-buffer write" 2019-06-24 11:21:20 -07:00
qctecmdr
a108e35d45 Merge "msm: vidc: add superframe encode support" 2019-06-24 11:21:20 -07:00
Govindaraj Rajagopal
9fed96ca68 msm: vidc: add check to avoid out-of-buffer write
Possibility of dereferencing userspace ptr in kernel for
invalid cmd. So added check to return error if unsupported
cmd is given as input to ioctl.

Change-Id: I3466fbd06e5b600f748824b9e16bcfdb4438bdef
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-23 13:15:14 +05:30
Darshana Patil
836b73ab5f msm: vidc: fix slice command buffer sizes
Fix HEVC slice command buffer sizes.

Change-Id: I87138c75e7476e6da6c16cefed00d9a3f405b90e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-06-21 18:31:58 -07:00
qctecmdr
8daa6110c7 Merge "msm-vidc: Update capabilities for VP8 codec" 2019-06-20 10:49:53 -07:00
Maheshwar Ajja
935b2ecc22 msm: vidc: cvp session clock rate and bus bandwidth
Based on session configuration parameters estimate
required cycles and set clock rate and bus bandwidth
to cvp session.

Change-Id: Iba07b304b4258e817d2404e272eb2b52891f9994
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-19 23:21:38 -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
Govindaraj Rajagopal
aeee6b18df msm-vidc: restrict interlace clip resolution
[1] Some unsupported clip resolution like 1600x1200, firmware rejects
the session during load resources.
[2] Allow interlaced clip playback only if below conditions were met
    - resolution <= 1920x1920
    - max_mbs_per_frame <= (1920x1088)/256

Change-Id: I67fd5377603c9c9ca577369c18ca6133190dc386
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-20 10:27:42 +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
Maheshwar Ajja
5e31da536d msm: vidc: add superframe encode support
In HFR (High Frame Rate) encoding usecases client
sends superframe (single input multiple frames).
So add support for encoding superframes.

Change-Id: I6f726d0ccf5b4b831e517efd3587d822da7eaae5
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-06-19 16:09:52 -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
Akshata Sahukar
f1863f28aa msm: vidc: Update in VP9 decoder height alignment
Updated SIZE_VPXD_LB_RECON_DMA_METADATA_WR macro to
align height to 16 from 8.

Change-Id: Icf8dd8494df49251979557af890d91f6aaf5b5d0
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-06 17:37:53 -07:00
qctecmdr
a0fbf77bc3 Merge "msm: vidc: Reject read only OPB buffer in split mode" 2019-06-06 12:42:41 -07:00
qctecmdr
9c21486992 Merge "msm: vidc: Update VP9 minimum buffer count" 2019-06-06 12:42:41 -07:00
Amit Shekhar
6c943a0584 msm: vidc: Reject read only OPB buffer in split mode
Requirement stipulates OPB to be writable buffer in split mode.
Erring out in case of read only buffer will help debugging quickly.

Change-Id: I529a97b3d0aa5f82e7cf7d024475338a9d24d1dd
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2019-06-06 11:22:21 -07:00
Akshata Sahukar
a7517a214f msm: vidc: Add support to BRS feature
Include BRS control id in msm_venc_s_ctrl to add
support to BRS feature.

Change-Id: I05b23e7960128a7b19c582caa5123849ba0cb2b0
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-06 10:46:29 -07:00
Akshata Sahukar
046ec851a6 msm: vidc: Update VP9 minimum buffer count
Update VP9 output_min_count to 9.

Change-Id: I920e534882846ec5e9a5b287e95c2290222fc40f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-06-06 10:23:24 -07:00
Govindaraj Rajagopal
4fc4b562fb msm-vidc: reduce max_tries count to 1000
Cleaning up the debug change - reset max_tries count
from 10000 to 1000.

Change-Id: Id0b142f92b8f45eaa73ab256b7b07bb10f382b80
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-06-03 15:11:36 -07:00
Maheshwar Ajja
e8ea759822 msm: vidc: amend cvp module structures
Align strctures as expected by CVP firmware.

Change-Id: Ib0a379d8dbcf0c65a8eef1561778f2fa972b517c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-31 13:00:11 -07:00
Dikshita Agarwal
0c95602a7b msm-vidc: update supported resolution for VP8 decoder/encoder.
Update max supported height to 1920 for Vp8.

Change-Id: Ic8013967b73ea538045bdb89dabe34bdc6559359
2019-05-30 13:09:00 -07:00
Shi Zhongbo
2f4c502bab msm: vidc: revise debug levels
Clean up debug log levels as:
    1. Revise VIDC_WARN to VIDC_ERR;
    2. Revise VIDC_PROF as VIDC_PERF;
    3. Mark some one-time logs, e.g most of logs
       in initialization and deinitialization as VIDC_HIGH;
    4. Keep VIDC_PKT;
    5. All other logs change to VIDC_LOW;

Change-Id: I8fc30f97dc3424da8418aab00e8af074ec8d4ef9
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-05-27 13:37:45 +08:00
Chinmay Sawarkar
31bb5f19a0 msm: vidc: Disable batching for concurrent usecase
Disable decode batching for concurrent decode session.

CRs-Fixed: 2457122
Change-Id: I776e9d057ae0f1a9dc0fd565b061ae48b88435e1
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-05-25 11:54:38 -07:00
Vikash Garodia
967b2f6bcb msm: vidc: Decide DCVS after session configuration
DCVS feature depends on multiple client configurations.
Low latency, thumbnail mode, etc are few among them.
DCVS is now decided before the session starts streaming
i.e after all configuration are inplace.

CRs-Fixed: 2457035
Change-Id: I4a42ae6bafdc852e81794b69d117f5821af4841f
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-05-25 09:47:32 -07:00
qctecmdr
7c7796087e Merge "msm: vidc: Revert of 2735098" 2019-05-25 08:49:36 -07:00
qctecmdr
ed12e2847b Merge "msm: vidc: reject sessions based on max mbpf" 2019-05-25 08:04:35 -07:00
Shivendra Kakrania
d783a8038b msm: vidc: Revert of 2735098
Reverting 2735098 "update video dimensions during port reconfiguration".

Change-Id: I2343cf77d23a564c3346d71dae9cd6377ae9d4e2
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
2019-05-24 22:18:31 -07:00
qctecmdr
a7df19432e Merge "msm: vidc: do not enable CVP usage for secure session" 2019-05-24 18:46:46 -07:00
qctecmdr
d12358a8ff Merge "msm: vidc: fix f/w logging route" 2019-05-24 18:46:46 -07:00
qctecmdr
18125ce4d2 Merge "msm: vidc: update video dimensions during port reconfiguration" 2019-05-24 18:46:46 -07:00
Vikash Garodia
05d88704e8 msm: vidc: update video dimensions during port reconfiguration
During a decode session, video output port can go through
reconfiguration. As a result, update the reconfig dimension
when client calls for g_fmt on output port.

Change-Id: Ib5f5866acbdfe107ba4693b8b94498d42f74b312
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2019-05-24 16:29:03 +05:30
Maheshwar Ajja
60c3671f50 msm: vidc: do not enable CVP usage for secure session
CVP usage is not supported for secure session so do not
enable CVP usage for secure session.

Change-Id: Ifed6daaf706895ebbc56b246134d9775787c7b9d
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-23 14:55:14 -07:00
Shi Zhongbo
cc5f9c5409 msm: vidc: fix f/w logging route
Fix to independently control f/w logging route.

Change-Id: I81b57995cb9619d2dee9c43547e86cc3f08d3778
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-05-23 11:45:32 +08:00
Maheshwar Ajja
71ce4cbe76 msm: vidc: reject sessions based on max mbpf
Driver need not support sessions if cumulative
mbpf (macroblocks per frame) is more than platform
specified value. So reject such sessions.

Change-Id: Id12eedfb97783b746c771066d6a556692be84c9f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-22 16:27:31 -07:00
Shivendra Kakrania
74650362eb msm: vidc: Updating H264 decoder internal buffer size calculation
For H264 decoder, resolutions with non-multiple of 16 were
calculating less internal buffer size. Updated calculation
to handle such scenarios.

Change-Id: I3c07b843cc898a584aba4c9f26627898a7427fe8
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
2019-05-22 12:00:49 -07:00
Dikshita Agarwal
52ed35827a msm-vidc: decide num of extradata planes based on chipset
Have a chipset specific check to decide the default value of
num of extradata planes. Make num of planes as 2  if
extradata is enabled.

Change-Id: Ie61cac744b4277c024f36bebe795bea2eeced6ae
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2019-05-18 19:07:19 -07:00
qctecmdr
225d4355de Merge "msm: vidc: amend video driver and firmware logging" 2019-05-18 18:42:51 -07:00
qctecmdr
d111782c9f Merge "msm: vidc: New hfi macro for hdr10 histogram extradata" 2019-05-18 15:06:43 -07:00
qctecmdr
0eeafb9f0d Merge "msm: vidc: support dynamic blur info config" 2019-05-18 14:42:48 -07:00
Chinmay Sawarkar
8400f650f8 msm: vidc: New hfi macro for hdr10 histogram extradata
HDR10 histogram extradata is applicable only for decode.
Hence reclassifying the macro value.

CRs-Fixed: 2453471
Change-Id: I0e3784ca4b2646838ab5a002c3263a66a1c60204
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-05-17 16:35:15 -07:00
Shi Zhongbo
4eab7c9c7f msm: vidc: amend video driver and firmware logging
Route all firmware logs to custom tracer by default
custom tracer logs can be enabled using
    "echo msm_vidc_events:* >> /d/tracing/set_event"
custom tracer logs can be collected using
    cat /d/tracing/trace_pipe > trace.txt
New log masks:
    VIDC_ERR        = 0x00000001,
    VIDC_WARN       = 0x00000002,
    VIDC_INFO       = 0x00000004,
    VIDC_DBG        = 0x00000008,
    VIDC_PROF       = 0x00000010,
    VIDC_PKT        = 0x00000020,
    VIDC_PRINTK     = 0x00001000,
    VIDC_FTRACE     = 0x00002000,
    FW_LOW          = 0x00010000,
    FW_MEDIUM       = 0x00020000,
    FW_HIGH         = 0x00040000,
    FW_ERROR        = 0x00080000,
    FW_FATAL        = 0x00100000,
    FW_PERF         = 0x00200000,
    FW_PRINTK       = 0x10000000,
    FW_FTRACE       = 0x20000000,
12 bits [0 .. 11]  are driver log level mask,
4 bits  [12 .. 15] are driver log route,
12 bits [16 .. 27] are firmware log level,
4 bits  [28 .. 31] are firmware log route.

Change-Id: Ib65ac3bdd6ad535775aaed4adf1df3c7b03681a8
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-05-17 15:01:06 -07:00
qctecmdr
cf503c86ae Merge "msm: vidc: Remove Picture Type Decode Driver Support" 2019-05-17 13:20:18 -07:00
qctecmdr
bb2927861d Merge "msm: vidc: send queues virtual addr to video firmware" 2019-05-17 13:20:18 -07:00
qctecmdr
224aec9638 Merge "msm_vidc: Add support for Cx ipeak limitation" 2019-05-17 13:20:18 -07:00
qctecmdr
92e101e0e4 Merge "msm: vidc: add platform specific capabilities for lito" 2019-05-17 13:20:18 -07:00
Qiwei Liu
a4d013e724 msm: vidc: support dynamic blur info config
Support dynamically config blur resolution to firmware.
Remove unused code for encoder aspect_ratio extradata.

Change-Id: Id2896ab943de4b676338b42bd4993d4057e960ac
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-05-17 08:19:26 -07:00
Maheshwar Ajja
2922c259e1 msm: vidc: enable cvp usage
Enable CVP usage to improve encoded video quality.

Change-Id: Ice0b6590435c094fa52bedb89f65150ab0c9a378
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-15 17:17:56 -07:00
Maheshwar Ajja
218c9b688b msm: vidc: send queues virtual addr to video firmware
Write queues virtual address to video firmware to use it
for debug purpose to get more information.

Change-Id: I9bf347c3ea279196e7ae40c936f6b3608c94b09b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-15 16:47:53 -07:00
Aniket Masule
1a50269424 msm: vidc: Add state check to allow flush command
Entry field from clock data structure gets initialized with
codec data during state transition from MSM_VIDC_CORE_INIT_DONE
to MSM_VIDC_OPEN. When flush is called before this transaction,
it calls msm_clock_data_reset where mentioned field is getting
accessed, which results in uninitialized data access. Add state
check to ensure the command is handled in right sequence.

Change-Id: Ic98221cbfe465415d89a0e2891f8af65f584f1dc
Signed-off-by: Aniket Masule <amasule@codeaurora.org>
2019-05-15 12:57:58 -07:00
Dikshita Agarwal
884bf7ef21 msm: vidc: add platform specific capabilities for lito
Add platform specific capabilities for lito and use them
in place of firmware capabilities.

Change-Id: I4aca463604444b7ec161f794aac5ddd334c14368
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2019-05-15 05:40:17 -07:00
Dikshita Agarwal
9aeda12e52 msm: vidc: update fuse map for lito
read bit 21 of register FEATURE_CONFIG1(0x00786008)
to check if fuse is blown to enable lower SKU spec.

Change-Id: I63c5d764aed13c60c0d213aa0fc29dec9edfef3f
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2019-05-15 16:42:09 +05:30
Manikanta Kanamarlapudi
16e94fc70e msm_vidc: Add support for Cx ipeak limitation
Make a vote call whenever the clock frequency driver computes
crosses a threshold mark. This vote call handles the situation
when many subsystems are in turbo and where a need arises to
throttle the CDSP current.

CRs-Fixed: 2330072
Change-Id: Id10c02749b00fd5a1b1980923c5034648bd35985
Signed-off-by: shubham gupta <shubgupt@codeaurora.org>
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2019-05-15 02:06:24 -07:00
Shi Zhongbo
37915f1982 msm: vidc: enable CSC for HEVC
Allow to use CSC for HEVC encodings.

Change-Id: I059db52215de56cc1dc38c13df5e0d188b4df5d0
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2019-05-14 22:57:23 -07:00
Akshata Sahukar
706c47da77 msm: vidc: Remove Picture Type Decode Driver Support
Remove support for V4L2_CID_MPEG_VIDC_VIDEO_PICTYPE_DEC_MODE.
Cleared related code.

Change-Id: I3b7100dfd08ee68a5033d8f6ec2cfdcfbbfbbe14
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-05-14 14:28:26 -07:00
Chinmay Sawarkar
d64baed296 msm: vidc: Use input bitrate to calculate decoder bus vote
By calculating bitrate at each frame, we get a better estimate
of the BW requirements of the decode session. Thus improving
performance and power usage.

CRs-Fixed: 2451137
Change-Id: I22f0029bbb7d501340469a317e89de7eb34717c4
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-05-14 13:50:07 -07:00
Qiwei Liu
05f2237d39 techpack: video: fix integer overflow issue for blur resolution
Use S32_MAX instead of U32_MAX for maximum ctrl val for
blur resolution, as ctrl val is s32.

Change-Id: Ie92f6ba831ffead2d56c9eee24917b8a42cdd564
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-05-13 20:28:49 -07:00
Darshana Patil
70e7d6b0ba msm: vidc: move cbr plus variable to legacy cbr
Move cbr plus variable to legacy cbr variable as
it is interfering with CVP usage.

Change-Id: If31f49858486e4295e7dfd9f47175e23c4078200
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-13 10:34:23 -07:00
qctecmdr
95c67930db Merge "msm: vidc: Handoff regulators after firmware loading is complete" 2019-05-11 10:55:17 -07:00
qctecmdr
4d559a875a Merge "msm: vidc: remove structure vidc_hal_session_init_done" 2019-05-10 21:59:53 -07:00
qctecmdr
345a89500d Merge "msm: vidc: fix in UBWC LP5 Configuration" 2019-05-10 21:59:53 -07:00
Chinmay Sawarkar
1277141e60 msm: vidc: Handoff regulators after firmware loading is complete
Regulator handoff causes the GDSC to turn off momentarily and resets
internal registers. As a result, TZ is unable to program secure
registers during Secure PIL load fails. Moving the handoff after
PIL load allows proper secure register programming and enables
secure sessions.

CRs-Fixed: 2450296
Change-Id: I32c7bf8726b51fdfa73b40819e8fdccdbbc0abe3
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-05-10 14:39:59 -07:00
Maheshwar Ajja
8a68da653d msm: vidc: remove structure vidc_hal_session_init_done
The structure vidc_hal_session_init_done is not being used,
so remove it.

Change-Id: Id4a577db117f98b18439245907765be5c9badc83
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-09 11:11:59 -07:00
Akshata Sahukar
a571bf18b7 msm: vidc: fix in UBWC LP5 Configuration
Default UBWC configuration for LPDDR5 is corrected.
Highest Bank Bit is set to 16.

Change-Id: I0fb18279ae32d34a7f3bada6d05a72c5935430dd
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-05-09 00:12:33 -07:00
Maheshwar Ajja
da72739ed0 msm: vidc: remove TME format from supported formats list
video driver does not support TME format, so remove it.

Change-Id: Ica7656fc1758a007f0d20d0351a4cedb82b9a0ee
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-08 15:19:34 -07:00
Darshana Patil
954a066aac msm: vidc: Fixed LTR count capability
Kona target supports two LTR frames encoding.
Fixing this capability in kona driver.
Handle resolution check correctly while setting
slice mode.

Change-Id: Iea6a041ecafb24da014832ecf2146088d4569a6f
CRs-Fixed: 2444064
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2019-05-08 09:17:12 -07:00
Maheshwar Ajja
35da0d64cf msm: vidc: enhance CVP usage functionality
Amend below CVP functionalities

- enable logic
- start sequence
- frame skip logic
- downscale resolution logic
- debugfs support.

Change-Id: I21ad934526c338916d130aaf3401bd89b574b4c1
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-05-07 15:26:43 -07:00
Shivendra Kakrania
ae78fd954b techpack: video: Updating video kernel snapshot
Video kernel snapshot before disabling msm/vidc compilation
from base kernel.

Change-Id: Id1178c3aca00706ad4822537f7f9a28141478771
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
2019-05-02 23:10:10 -07:00
Shivendra Kakrania
4ae4cb1749 techpack: video: Video driver kernel project initial snapshot
This change brings msm vidc driver from base 4.19 kernel project.
It is the first source code snapshot from base kernel project.

Change-Id: I1d600c4e9459b9013f4b607890c52644f6d94f0c
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
2019-05-02 22:31:44 -07:00