Commit Graph

666 Commits

Author SHA1 Message Date
qctecmdr
7a9bf3b45c Merge "video: driver: modify FW i/p o/p buffers starve condition" 2021-10-06 11:34:52 -07:00
qctecmdr
0dfacae794 Merge "video: driver: add error handling in print_vidc_buffer api" 2021-10-06 11:34:52 -07:00
qctecmdr
3fd62947ac Merge "video: driver: enable lossless encoding via debuf fs property" 2021-10-06 09:20:20 -07:00
Gaviraju Doddabettahalli Bettegowda
10990e39f9 video: driver: add error handling in print_vidc_buffer api
Possiblity of invalid ptr dereference in release_buffer_done
sequence. So added changes to handle this scenario.

Change-Id: I0f45e07d709d0fd300a172b564031e40eb07ff00
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-10-06 21:27:21 +05:30
Akshata Sahukar
f6a9744ff2 video: driver: modify FW i/p o/p buffers starve condition
Host needs to ensure FW atleast have 2 buffers available always,
one for HW processing and another for fw processing in parallel
to avoid FW starving for buffers.

Change-Id: I244e0170944b0b7ec342aa9b1b141b30af5bf606
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-10-05 13:14:01 -07:00
Manikanta Kanamarlapudi
1763bbebca video: driver: Error handling for HW overload scenarios
- send error '-EAGAIN' when there are no inactive sessions,
  HAL will retry with low priority.
- send error '-ENOMEM' when there are inactive sessions,
  Frameworks will close the inactive sessions

Change-Id: Id28a6f3c5f9d537a2789ef1522505b6ebedccc0b
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2021-10-04 13:18:08 -07:00
Akshata Sahukar
6df2a1bfcd video: driver: enable lossless encoding via debuf fs property
enable lossless encoding via debuf fs property "lossless_encoding".

Change-Id: Ic7f7341ecf3ad07e55434339a0c5789334bf7929
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-10-01 11:54:06 -07:00
qctecmdr
4d51b2ba26 Merge "video: driver: bump clockrate and bandwidth for 960FPS" 2021-09-30 18:43:44 -07:00
qctecmdr
0d2b06cc98 Merge "video: driver: fix null pointer dereference issues" 2021-09-30 11:01:34 -07:00
qctecmdr
812db715a2 Merge "video: driver: debugfs update for clockrate,bandwidth setting" 2021-09-30 11:01:34 -07:00
Gaviraju Doddabettahalli Bettegowda
11c3efeb47 video: driver: Power collapse Log level change
Currently, the below info printing as a error.
"msm_vidc: err : ffffffff: codec: power collapse already scheduled"

When multiple session is running, the above log will print multiple times &
this is not an error, so added change to print above log as info.

Change-Id: Iad961c29212579ee46a4cea47f7762f714c5e7ba
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-09-30 13:39:42 +05:30
Darshana Patil
535dba47c0 video: driver: debugfs update for clockrate,bandwidth setting
/d/msm_vidc/core_clock_voting will modify only clock rate
and not ddr and llc bandwidth.
example usage:
adb shell "echo 444000000 > /d/msm_vidc/core_clock_voting".

introduction of /d/msm_vidc/ddr_bw and /d/msm_vidc/llcc_bw
which will modify ddr and llc bandwidth respectively.
example usage:
adb shell "echo 5000000 > /d/msm_vidc/ddr_bw_kbps".
adb shell "echo 7000000 > /d/msm_vidc/llc_bw_kbps".

Change-Id: If4aca728cae212630928dda69a38310d8268b5e1
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-09-29 16:16:15 -07:00
Darshana Patil
9f22d1b8bc video: driver: bump clockrate and bandwidth for 960FPS
increase clockrate and bandwidth by 25percent for
960fps decode session and disable dcvs.

Change-Id: I40aef0a9b8f0950b559ee301549869e20e881a40
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-09-29 15:00:20 -07:00
Akshata Sahukar
ffc21eaaf0 video: driver: fix null pointer dereference issues
fix null pointer dereference issues causing KW issues.

Change-Id: I7d9bb05d77d632b3ff479940ecb2163e6e68fd56
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-09-29 14:29:34 -07:00
Govindaraj Rajagopal
caeaca6ccd video: driver: disable and unprepare clock source to update MMRM count
[1] Currently enable/disable clock(video_cc_mvs0_clk_src) not called. So
updating clock reset value to MMRM is getting skipped. So MMRM has high
projection
[2] __scale_clocks() api is not considering scaling factor, while
setting clock rate.

Added change to address above 2 issues.

Change-Id: I4e96556f9b9d659c436e77d03f8d0dd471a50226
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-09-28 19:06:14 +05:30
qctecmdr
68c66ecacf Merge "video: driver: Enable msm_vidc_events trace" 2021-09-27 14:17:33 -07:00
Akshata Sahukar
7e75edbeeb video: driver: Avoid setting same GOP size to fw dynamically
Avoid setting same GOP size to fw dynamically to avoid unnecessary
generation of IDR frame from firmware.

Change-Id: I50c61e9f86ebc9c8a3834fbceb525666b7b194bb
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-09-27 11:53:44 -07:00
Gaviraju Doddabettahalli Bettegowda
91c6dccf94 video: driver: Enable msm_vidc_events trace
Enable tracing by adding trace function definitions.

Commands for collecting msm_vidc_events traces:
- adb shell "echo 10240 > /sys/kernel/tracing/buffer_size_kb"
- adb shell "echo 0 > /sys/kernel/tracing/tracing_on"
- adb shell "echo nop > /sys/kernel/tracing/current_tracer"
- adb shell "echo > /sys/kernel/tracing/set_event"
- adb shell "echo 1 > /sys/kernel/tracing/events/msm_vidc_events/enable"
- adb shell "echo 1 > /sys/kernel/tracing/tracing_on"
- adb shell "cat /sys/kernel/tracing/trace_pipe > /data/trace_log.txt"
- adb pull /data/trace_log.txt

Events:
- msm_v4l2_vidc_fw_load
- msm_v4l2_vidc_open
- msm_v4l2_vidc_close
- msm_vidc_dma_buffer
- msm_v4l2_vidc_buffer_event_log
- msm_vidc_perf_power_scale
- msm_vidc_common_state_change
- venus_hfi_var_done

These are the events registered.

Change-Id: Iab6952bb84df102f36a2776fdf9ef5133034c5a0
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-09-26 22:18:42 -07:00
Karthikeyan Periasamy
23796052b7 Kalama-BU: add DLKM compliance to video dlkms
Change-Id: I833edaa05b48f2493ae9c228a8e8ca3bde7844bc
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2021-09-23 23:34:37 -07:00
Akshata Sahukar
98dfab8584 video: driver: prioritize MIN_QUALITY adjustment over BLUR_TYPES
MIN_QUALITY is parent of BLUR_TYPES, hence prioritize MIN_QUALITY
control adjustment over BLUR_TYPES.

Change-Id: I8498760d7b3ecd1546c2be43d2ae945781d4a84d
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-09-17 14:57:57 -07:00
Akshata Sahukar
e2ec45b2e0 video: driver: reject 7th VP9 decoder session
reject 7th VP9 decoder session.

Change-Id: I2b739be0aff5492bd10d00c3068aa44e0895ee09
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-09-16 16:06:59 -07:00
qctecmdr
7b01c24a8d Merge "video: driver: print frame-number for each ETB, EBD, FTB, FBD" 2021-09-16 13:23:11 -07:00
qctecmdr
52c70e1fa4 Merge "Kalama-BU: add QMAA compliance to video dlkms" 2021-09-16 09:43:00 -07:00
Gaviraju Doddabettahalli Bettegowda
566791bd82 video: driver: print frame-number for each ETB, EBD, FTB, FBD
- Added changes to print frame-number for each ETB, EBD, FTB, FBD.
- framenumber will be helpful to detect logdrop in perf analysis.

Change-Id: I1b6c8fdbeb2f2003e69d02cd5d871535e8e73c42
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-09-16 21:15:15 +05:30
Akshata Sahukar
9d5ba49ad0 video: driver: reject opening 17th video instance
Reject opening 17th video instance.

Change-Id: Iebc6f8c915c2594e218acbabf4f8e6b70a5ce11d
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-09-15 16:52:20 -07:00
Karthikeyan Periasamy
d9f26e4dfe Kalama-BU: add QMAA compliance to video dlkms
CRs-Fixed: 2836558
Change-Id: Ife5e89d8921bf9bb5abc3fdc73581c9c24f62e86
Signed-off-by: Mulugeta Engdaw <mengdaw@codeaurora.org>
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2021-09-15 15:39:06 -07:00
Gaviraju Doddabettahalli Bettegowda
9110a87846 video: driver: Update msm_vidc statistics delay from command-line
Currently, statistics is printing for every 2 second
And these delay is hardcoded.
So changes added to update the statistics delay from the command-line.

- adb shell "echo 200 > /d/msm_vidc/core/stats_delay_ms"
- adb shell cat /d/msm_vidc/core/stats_delay_ms

Use above command to update & read statistics delay.

Change-Id: I523a870203ee460d1dba8208b798f28253407e73
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-09-09 11:24:23 +05:30
Govindaraj Rajagopal
03471f2f11 video: driver: set clk_rate to zero before clk_disable
Video driver clk scaling is through mmrm. So without informing
to mmrm if we disable_clk, then mmrm will hold stale peak_current
values and that will lead to incorrect calculations at mmrm side.
So always request to set lowest clk corner to mmrm before calling
clk_disable_unprepare() api.

Change-Id: I3e54249430ec4e886afb42f5af6863c7e40686c4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-09-06 18:10:01 +05:30
qctecmdr
00630500c4 Merge "video: driver: remove unsupported ioctls from ioctls ops" 2021-09-03 18:00:54 -07:00
qctecmdr
5735f81874 Merge "video: driver: discard ipsc after stop input port" 2021-08-27 14:50:24 -07:00
Maheshwar Ajja
7af8e29f9e video: driver: discard ipsc after stop input port
Driver is discarding input port settings change (ipsc) event
before sending stop input to firmware and also in case of
input port is still in streamoff state while processing
pending events. There is a chance that driver may not discard
ipsc event if firmware raised ipsc after sending stop input and
also driver may not discard the pending ipsc if client quickly
streamon the input port before pending events processing scheduled.
So discard pending ipsc in the streamoff input port after stop input
to firmware and wait for stop done is successful.

Change-Id: I518cebe1142235463b1ccd851ac151ad80036f95
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-08-27 10:21:04 -07:00
Akshata Sahukar
4a0e4b65c2 video: driver: fix CTS V2 media DecoderColorAspectsTest color mismatch issue
Since ycbcr_enc is u8 member varible, 302 value exceeds its memory range
resulting in storage of incorrect matrix coefficents, and passing the same
to HAL. As a result, incorrect color space info is propagated to client
resulting into color mismatch issue and failing the CTS testcase.
Fixed this.

Change-Id: I66424c033bb4c4ad7d7528974a45a6a4b2740327
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-08-27 10:20:17 -07:00
qctecmdr
404bc1d0cb Merge "video: driver: allow two 8k sessions support" 2021-08-27 10:01:26 -07:00
Darshana Patil
e17abd45c1 video: driver: limit max number of sessions based on resolution
add checks to limit max number of sessions supported based on
resolution.
max number of 720P sessions: 16
max number of 1080P sessions: 8
max number of 4K sessions: 4
max number of 8K sessions: 2

Change-Id: I2a784a0d28ba050923bdc7f42a21ee9801d01d86
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-26 15:51:34 -07:00
Darshana Patil
b965b9307f video: driver: allow two 8k sessions support
Allow one 8k + one 4k realtime sessions.
Maximum allow two 8K sessions which includes RT and NRT sessions.

Change-Id: I68acfc4942c5c930bed7d9584cd82f2667010136
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-26 15:51:23 -07:00
Darshana Patil
8e1ba950f0 video: driver: fix bus vote data with correct color format
Fill correct opb color format for bus voting.

Change-Id: I219172492563d10582233c54578115ab48b9b1ff
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-20 11:42:20 -07:00
qctecmdr
304f637541 Merge "video: driver: fix to allow 16 concurrent video instances" 2021-08-19 20:40:54 -07:00
qctecmdr
e902db01fa Merge "video: driver: improve error handling on read_register" 2021-08-19 18:32:27 -07:00
Akshata Sahukar
871b8812ef video: driver: fix to allow 16 concurrent video instances
Currently allowing 15 concurrent video instances instead of 16.
Fix this to allow 16 instances.

Change-Id: I515625e47e324cd1c7ba5a83c1363705bca64721
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-08-19 18:08:16 -07:00
qctecmdr
c2a7ce2e7a Merge "msm: vidc: update capabilities as per PRD" 2021-08-18 17:49:35 -07:00
qctecmdr
0850cf241d Merge "video: driver: return bootup timeout error" 2021-08-18 17:49:35 -07:00
Darshana Patil
ec7093a322 video: driver: return bootup timeout error
return bootup timeout error

Change-Id: I0123bdd8c9f23b4d680085c1bb8dd2620312c60f
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-18 11:03:58 -07:00
qctecmdr
19350d3c07 Merge "video: driver: Limit secure sessions allowed by max supported" 2021-08-18 09:11:50 -07:00
qctecmdr
e9e693892f Merge "video: driver: Add changes to calculate auto framerate" 2021-08-18 09:11:50 -07:00
Govindaraj Rajagopal
3d9556402b video: driver: improve error handling on read_register
Currently video driver ignoring error value returned by
__read_register() api. So added changes to improve error
handling.

Change-Id: Ia3968f0f900915b46b96c5e790af9be02389e841
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-08-18 08:38:32 +05:30
Akshata Sahukar
3b246bd0bd video: driver: Limit secure sessions allowed by max supported
Check for max supported secure sessions before allowing
any new secure session to limit secure sessions count by
max supported value.

Change-Id: I72d22c5e592eeb662d18018f6d880104992d570b
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-08-17 18:01:54 -07:00
qctecmdr
bd7240d139 Merge "video: driver: add interlace with non-ubwc condition" 2021-08-17 10:38:49 -07:00
Gaviraju Doddabettahalli Bettegowda
d14a7087e2 video: driver: Add changes to calculate auto framerate
Currently, there is a precision loss while calculating framerate,
this will result in updating framerate multiple times to firmware.
So added change to avoid precision loss in framerate calculation.

Change-Id: I9748e7ad6913eb4790e24468b60f39823857f5c4
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-08-17 17:23:45 +05:30
qctecmdr
45a111ee0e Merge "video: driver: include error session load in admission control" 2021-08-16 11:31:23 -07:00
qctecmdr
2fbecac25d Merge "video: driver: Add checks for fw configured session params" 2021-08-16 11:31:23 -07:00