Commit Graph

645 Commits

Author SHA1 Message Date
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