Commit Graph

305 Commits

Author SHA1 Message Date
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
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
Chinmay Sawarkar
41d01ed113 msm: vidc: Update ddr type macro values
Add new DDR type 5X and deprecate DDR type 4Y.
Macro values also changed.

CRs-Fixed: 2534324
Change-Id: I0412b4e624df9c377db18b635d2cde321fccf8d0
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-12-12 12:19:56 -08:00
Govindaraj Rajagopal
b6bf411cd0 msm: vidc: venc: set signal_info to firmware always
Currently setting signal_info, only if colorspace info
is set properly. But sometimes client can set only range.
So need to send signal_info always to firmware.

Change-Id: I5282ec01b473485ec39f39abbf7160b9c5cc0256
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-12-10 11:18:27 -08:00
Govindaraj Rajagopal
1fc52e7df4 msm: vidc: enhance eos buffer handling
Eos buffer is queued to firmware and its ref is maintained
using eosbufs.list. Sometimes EOS request client sent even
before port_reconfig. In that case requeing same buffer
which is already with firmware at start_streaming. So during
handle_ebd of 2nd eos buffer, it can't find the entry at
eosbufs.list. So client closes the session.

Always check, if buffer is already queued, then do not queue
the same buffer again, during start_streaming after reconfig.

Change-Id: If934d8ce357226dee78db15ccb7b3c57103d2f12
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-12-09 14:01:35 -08:00
Qiwei Liu
bd3fc9ca56 msm: vidc: fix memory leak when set color format
When set color format constraints, one buffer is not
correctly freed, fix it.

Change-Id: Iad497f03981653a7f28524f1d9e4218f706dcca1
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2019-12-05 03:48:40 -08:00
Mihir Ganu
fc82551de5 msm: vidc: Migrate SCM calls
Migrate secure world calls to upstream qcom_scm driver.

Change-Id: I97fe0376bca265db9e2b851294c83f52e61c9544
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-12-02 12:00:46 -08:00
qctecmdr
9fc266c742 Merge "msm: vidc: update internal buffers size" 2019-11-26 17:08:19 -08:00
Rakshitha Shakamuri
d3f9e09c39 msm: vidc: update internal buffers size
h264d level 6 support needs update in internal buffer size.
updated below buffers size

- h264 decoder colocated motion vector buffer.
- h264 decoder VPP command buffer.
- h265 decoder VPP command buffer.

Change-Id: I696e1046d585e209bd45fd4fa3f3e3e9d7527b03
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
2019-11-26 14:54:59 -08:00
Mihir Ganu
17ad9b8a4d msm: vidc: Fix bus BW range parsing
Parse both low and high ranges for each bus.

Change-Id: I01fb35976cf128cfebe390bd0fc780422cfe91d5
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-11-25 20:10:15 -08:00
qctecmdr
55faba7c9b Merge "msm: vidc: Initialize port format type" 2019-11-20 12:39:03 -08:00
Linux Build Service Account
216025e5a7 Merge "msm: vidc: disable compilation for gki" into video-kernel.lahaina.lnx.1.0 2019-11-19 18:50:19 -08:00
Maheshwar Ajja
ea8b192b84 msm: vidc: disable compilation for gki
gki needs video driver as module and hence compile
video driver for qgki variant only.

Change-Id: I6e25c5c7651e02df35c40ac1b27a8a61e3110530
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-11-19 16:20:36 -08:00
Mihir Ganu
36e018e3ab msm: vidc: Initialize port format type
Initialize port format type to avoid failure
when g_fmt is called before s_fmt.

Change-Id: I37758f6d8be766c75cc8bc97147312b3b0bb0915
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-11-18 15:18:35 -08:00
qctecmdr
0c392a3e53 Merge "msm: vidc: ar50 and iris1 no longer needed" 2019-11-15 11:07:34 -08:00
qctecmdr
d0c84884b7 Merge "msm: vidc: Update Lahaina platform data" 2019-11-15 10:11:23 -08:00
Maheshwar Ajja
50eabf78ef msm: vidc: change user include header files directory
Current location is cleaning up all the existing header files
in usr/include/media directory before installing video specific
header files and hence change video specific header files location.
Kbuild files are not required anymore so remove Kbuild files.

Change-Id: I217d0652be9b2811ef1c6df64bf4143c9bcd1bd3
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-11-13 18:21:20 -08:00
Mihir Ganu
2ee4d803f6 msm: vidc: Update Lahaina platform data
Add Lahaina-specific platform data needed for driver probe
and remove data for older platforms.

Change-Id: I35e7711fd024467f0b6ce40aabdaf71f0c523e9a
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-11-08 14:46:03 -08:00
qctecmdr
2b03e2e748 Merge "msm: vidc: Migrate to icc API to set bus bandwidth" 2019-11-07 17:14:53 -08:00
Mihir Ganu
0a49ec7e24 msm: vidc: Initialize device_caps before device registration
Initialize device_caps with device capabilities before video
devices are registered, as required by V4L2 framework.

Change-Id: I9fc037ae65d352b15d78eee979df30a24137dea8
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-11-01 14:59:41 -07:00
Karthikeyan Periasamy
1ab80e3c13 msm: vidc: ar50 and iris1 no longer needed
ar50 and iris1 are no longer used.
Deleting the unused code pieces and files.

Change-Id: I01fab64b5e3682338fc0ffab986e7807a74c37b5
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2019-10-30 15:59:27 -07:00
Mihir Ganu
3ef057136a msm: vidc: Migrate to icc API to set bus bandwidth
- msm-bus API is deprecated in favor of upstream interconnect API
- Migrate all msm-bus functions to interconnect (icc) API
- Remove msm-bus sub-device probing and parse interconnect fields from
  msm-vidc device tree

Change-Id: Ibf08c52e001c5fde7e30d2aedbd3456a270f5b6c
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-10-30 10:55:45 -07:00
Karthikeyan Periasamy
2c2d48f5b6 msm: vidc: fix the compilation in lahaina
- Made the changes in video module to compile successfully.
 - Removed cvp and v4l2 private files.

Change-Id: Iaf5f29d6042a87d5b96b1fa4abb985ee3e592f0e
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2019-10-25 12:35:37 -07:00
Maheshwar Ajja
17ff6ba65a msm: vidc: add userspace interface header files
Add userspace interface header files for userspace
to access video driver functionalities.

Change-Id: I1919f9025e87f15da06a0428d95077372aec603e
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2019-10-25 12:33:40 -07:00
Karthikeyan Periasamy
09e8935f10 msm: vidc: Lahaina bringup - Stage I
Bring all the missing changes from Kona
aa56c67 msm: vidc: Set fps to 1 for image encode sessions
bc60bd6 msm: vidc: Add support of level 6.1 to VP9 decoder
349732b msm: vidc: update LTRUse maximum limit
9d3a015 msm-vidc: calculate buffer size based on 512x512 for heic
46e2095 msm: vidc: Update Kona Profile Level Capabilities
ad8cd1c msm: vidc: delete v4l2 controls after queue release
ea1efd0 msm: vidc: Initialize core ops for bengal VPU version
533aa1c msm: vidc: don't skip set ctrl for the same value
e52cd53 msm: vidc: use macro to get/set fields
92344f3 msm: vidc:  Add new hfi file for AR50 lite
1931ba3 msm: vidc: Update bitrate constraint check
733ea29 msm: vidc: Add bengal specific functions
81b07d4 msm: vidc: Update control capabilities at SESSION_INIT stage
f3e9363 msm: vidc: deprecate firmware buffer requirement property
557ca13 msm: vidc: Update VSP cycle count calculation
7ff089a msm: vidc: fix kw issues
b9733c7 msm: vidc: Add config files for bengal
1b0c12b msm: vidc: Allow all-intra encoding in CBR_CFR
3ca1cf0 msm: vidc: Add platform specific data
a16c617 msm_vidc: venc: update HEIF output buffer count
622514e msm: vidc: fix extradata none parsing issue
1f61e2c msm: vidc: Update mb/frame resolution to 4096x2304
16ffe6b msm: vidc: add dynamic support of frame quality
46f2efd msm-vidc: return unknown ctrl for internal cvp client
043315f msm: vidc: add support for dpb_buffer_count payload

Change-Id: Iee095078d8cd558ea030e65e8d1895b4c7d78948
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2019-10-15 11:53:10 -07:00
qctecmdr
05586cb2b8 Merge "msm: vidc: Enable error recovery by default" 2019-09-05 18:22:38 -07:00
Shivendra Kakrania
530762b1be msm: vidc: Enable error recovery by default
Error recovery is enabled by default & it will get triggered
for all sys error reported by video firmware.

For debugging purpose it can be disabled as:
    1. disable error recovery for noc error:
       echo 1 > /d/msm_vidc/disable_err_recovery
    2. disable error recovery for non-noc error:
       echo 2 > /d/msm_vidc/disable_err_recovery
    3. disable error recovery for all cases
       echo 3 > /d/msm_vidc/disable_err_recovery

Change-Id: Ie260485842704d3e278ded8c6d1722bc19c80f6f
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
2019-09-05 15:02:50 -07:00
Govindaraj Rajagopal
bba6fe37af msm: vidc: print session specific logs based on logmask
print logs based on logmask set on debugfs entry
	(/d/msm_vidc/debug_level)
[1] 0xx -> print logs for all session type
[2] 1xx -> print only encoder logs
[3] 2xx -> print only decoder logs
[4] 4xx -> print only cvp logs

Change-Id: I8e01ee9c8b80a50b178ea87bf25d7ef25401f67a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-09-05 11:39:30 +05:30
qctecmdr
cb5bcb74ad Merge "msm: vidc: Enable secure CVP" 2019-09-04 20:10:40 -07:00
qctecmdr
0ee36d3ba7 Merge "msm: vidc: Add support to CVP skip ratio" 2019-09-04 16:07:41 -07:00
Akshay Chandrashekhar Kalghatgi
f74ea0c9ef msm: vidc: Enable secure CVP
Enable external CVP processing on secure encoder.
Correct vidc-CVP external function names according to naming conventions.

Change-Id: I1b177ca28838f63faee474a82ba76e7655554989
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>
2019-09-04 15:44:45 -07:00
Akshata Sahukar
6f422178aa msm: vidc: Add support to CVP skip ratio
Introduced CVP skip ratio property to indicate the number of
buffers skipped for CVP processing. This serves as a hint to Video
firmware to know the number of frames for which CVP metadata has to be
reused from earlier frame to which CVP metadata was sent

Change-Id: I58ad5daf9a9c6ae7a0aa48e3bd1d60e7dc9229e6
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2019-09-04 15:25:05 -07:00
qctecmdr
7103c35359 Merge "msm: vidc: Raise insufficient event for interlacing change" 2019-09-04 14:41:37 -07:00
Mihir Ganu
7960c3b3a9 msm: vidc: Raise insufficient event for interlacing change
Raise an insufficient event whenever there is a change reported
from interlace to progressive and vice versa so that driver can
set appropriate work/route mode.

CRs-Fixed: 2444064
Change-Id: Ic78867a2b51aa22de5dfeeb4b806014e2f0f23e6
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2019-09-04 11:23:08 -07:00
Govindaraj Rajagopal
2548b43adb msm: vidc: print session and codec type in dprintk
[1] Maintain log_ctxt cookie to track debug information.
[2] Print codec type and session type by default in logs.

Change-Id: I6c01f3238ba868fdc525f5c60f58545a07bdef3a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-09-04 20:52:25 +05:30
Govindaraj Rajagopal
c705bf58ef msm: vidc: print session_id in logs
Print session_id details in all possible call flow paths.

Change-Id: I0c583dc99d4ebee7fbcb4e36d917ba9120fa670e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2019-09-04 18:32:46 +05:30
qctecmdr
19cea22246 Merge "msm-vidc: add image encode capabilities for lito" 2019-09-03 01:27:31 -07:00