Gráfico de commits

625 Commits

Autor SHA1 Mensagem Data
qctecmdr
f07dfda71d Merge "video: driver: Correct max mbps calc for slicing" 2021-11-18 08:32:39 -08:00
Priyanka Gujjula
6eacf50e78 video-driver: Fix compilation errors for parrot
Fix compilation errors on parrot which has a
different lunch combo other than taro/diwali.

Change-Id: I35aee69bc8e18d50395a01b97d282c21e75da193
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-17 17:45:12 +05:30
qctecmdr
55da89b96e Merge "video: driver: diwali: read efuse from sw_range4" 2021-11-12 13:32:02 -08:00
qctecmdr
ab6e36ed88 Merge "video: driver: reject any unknown buffer received from fw" 2021-11-10 13:22:35 -08:00
qctecmdr
7c3520c2b0 Merge "video-driver: check max mbpf" 2021-11-10 13:22:35 -08:00
Priyanka Gujjula
4b9c19e5e5 video: driver: diwali: read efuse from sw_range4
HLOS doesnot have access to raw region. Instead,
read from sw_range4 region which are sense
registers for raw region.

Change-Id: I662266b6557756d9bf6ef687f81b7869a792e7f7
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-10 14:24:28 +05:30
Priyanka Gujjula
cf52dc1e6c video: driver: Correct max mbps calc for slicing
Max mbps has to be calculated using max fps.

Change-Id: Ic0e3b337c7327e9a9bd4ada6b2008ccb6fa1be04
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-10 12:06:08 +05:30
Akshata Sahukar
721d946ded video: driver: reject any unknown buffer received from fw
Reject any unknown buffer received from fw.

Change-Id: Icfc639cce364566a5479f5c12e13f7cb4fc06b00
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-11-05 13:15:06 -07:00
Manikanta Kanamarlapudi
f84053a13b video-driver: check max mbpf
check max mbpf as well while allowing
the real time session.

Change-Id: I1091582a02e01a4daa9c58ec5b50400b7d856610
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2021-11-04 21:46:37 -07:00
Priyanka Gujjula
043ab4c9f7 video: driver: diwali: Add SKU clock data
Add clock corners for diwali v1 and v2
variants.

Change-Id: I1322dada7dafed10cb17b9ab4bcef45f102d371c
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 15:50:32 +05:30
Priyanka Gujjula
f352311f44 video: driver: Add diwali SKU's
Add support for diwali AA/AB(v1) & AC(v2) SKU.

Change-Id: I8afdf0529016e9cdbe72da8e57d7f35194cf9026
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 15:47:21 +05:30
Priyanka Gujjula
e710c6f974 video: driver: diwali: Configure hbb value
Configure hbb value as '14' for lp4
ddr variant.

Change-Id: Id3fa3028f38dabb81d1b1fc5b117c6d10e4d45b5
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 15:44:48 +05:30
Priyanka Gujjula
c3440c6ade video: driver: Add support for diwali variant
Add support for diwali variants.

Change-Id: Idf322e674818642a9c886fe8707e5ff8f64c4db5
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 07:39:48 +05:30
qctecmdr
7ac58c383b Merge "video: driver: Use max fps from inst caps" 2021-10-31 10:34:02 -07:00
qctecmdr
07ede771b0 Merge "video: driver: update decoder load calculation" 2021-10-25 09:48:15 -07:00
Priyanka Gujjula
e786da48eb video: driver: Use max fps from inst caps
Use maximum framerate from published
instance caps to make it platform
agnostic.

Change-Id: I319768e722774969287abb9e782ddbece7593ff9
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-10-25 21:38:58 +05:30
qctecmdr
4f953651a9 Merge "video-driver: add mmrm query support" 2021-10-22 14:37:00 -07:00
qctecmdr
1dafcfd11a Merge "video: driver: fix enable_bugon debugfs property for WD timeout" 2021-10-22 14:37:00 -07:00
Maheshwar Ajja
5ec009352f video: driver: update decoder load calculation
Calculate video decoder load based on max of crop and
input port resolution as few clients might not set
resolution on input port in which case load is not
proper before streaming started.

Change-Id: Id95d42e4cb3d992f759ce3388a8aeb55fadf16d7
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-10-22 12:45:32 -07:00
qctecmdr
ae93550604 Merge "video: driver: add dpb buffer handling for b2b ipsc cases" 2021-10-22 12:42:52 -07:00
qctecmdr
554cadb057 Merge "video: driver: Cancel batch work in case of pm_suspend" 2021-10-21 17:23:51 -07:00
Darshana Patil
f257df52e0 video: driver: update resolution check for max session support
Treat resolutions above (4K + half 4k) as 8k session instead of
simply treating above 4k resolutions as 8k sessions. Similar update
for 1080p and 720p resolutions as well.Based on above conditions,
support or reject a session.

Change-Id: I7be70b4c2b6e96ced6da2443f85e440c45fb616c
Signed-off-by: Darshana Patil <darshana@quicinc.com>
2021-10-21 10:59:18 -07:00
Priyanka Gujjula
4970193ad1 video-driver: add mmrm query support
[1] Disable MMRM if platform feature
    does not support.
[2] Query for scaling support from
    mmrm driver and enable/disable
    based on queried support
    accordingly.

Change-Id: I34cf9a9e150b0823828507e3f5d680aae6eb14d4
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-10-21 23:16:13 +05:30
Govindaraj Rajagopal
1de4ced523 video: driver: fix enable_bugon debugfs property for WD timeout
Currently enable_bugon debugfs feature not working for WD timeout
cases. So added change to support that usecase.

Change-Id: I0cb3e6ed34d58c7969c727dea77f4fa695923c25
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-10-21 19:05:32 +05:30
Priyanka Gujjula
0a135fec38 video: driver: Cancel batch work in case of pm_suspend
Cancel batch work when core is suspended due to
pm suspend.

Change-Id: I5c6e4f0eb0883a9c3cd2711f65e0d74a6cced310
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-10-21 14:37:00 +05:30
Govindaraj Rajagopal
839a329864 video: driver: add dpb buffer handling for b2b ipsc cases
Currently MSM_VIDC_BUF_DPB buffer allocated and queued to firmware
as part of output port streamon. Sometimes firmware raises b2b ipsc
with only change in fw_min_count. So client will not follow port
reconfig sequence and calls directly HFI_CMD_RESUME on output port.
So firmware holds only prev set of DPB buffers, which is not sufficient
and it continues to wait for further DPB buffers and that is leading
to stall and testcase fails. So added change to requeue new set of
DPB buffers, incase of b2b ipsc(with only change in count).

Change-Id: I213c752be4ca9dc16f838ab2990c996c4d78e95f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-10-21 14:16:57 +05:30
qctecmdr
376bf106de Merge "video: driver: acquire and release wakelock during fw_load" 2021-10-19 15:11:41 -07:00
Darshana Patil
784a4c9280 video: driver: add power suspend and resume
add power suspend and resume implementations.

Change-Id: I785b5b05f37ed5ed656d2cbc04f5d429ff543260
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-10-18 12:27:48 -07:00
qctecmdr
2f0f48f55e Merge "video: driver: fix race issues with msm_vidc_stats_handler api" 2021-10-17 23:23:27 -07:00
Govindaraj Rajagopal
38da39c7ee video: driver: acquire and release wakelock during fw_load
Acquire wakelock to prevent system suspend during firmware load
sequence to avoid firmware load request failure.

Change-Id: I320db4a02b310acf5b5d9dd9a4f304b94e1c2f5b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-10-14 11:00:20 +05:30
Govindaraj Rajagopal
d11e238157 video: driver: alter stage, pipe setting sequence to avoid vcodec hung
Currently stage and pipe is configured from output port start/resume
sequence. During VSP processing FW has no clue about stage, so default
it picked 2 stage. Later host sets 1(due to < 720p) stage at output
port. VSP is already started operating on input frames. So this
mismatch in stage settings was leading to vcodec HW hung issues.

Setting STAGE, PIPE settings at input port start/resume to avoid
above mentioned issues.

Change-Id: I7febe46d45c8e30a29b58d725d5298220fdbd8b2
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-10-12 18:54:36 +05:30
Govindaraj Rajagopal
2eb5672463 video: driver: fix race issues with msm_vidc_stats_handler api
There are 2 possible race issues with msm_vidc_stats_handler.

[1] msm_vidc_close acquired inst->lock and called cancel_delayed_work,
by that time stats_handler already fired and incremented inst->kref
via get_inst_ref. Close sequence releases the lock and called
put_inst().
So now inst strong ref is held by stats_handler, which will acquire
inst->lock and schedules new stats_work and does put_inst. inst->kref
count reaches zero and it will free inst struct(using close_helper).
So that will lead to use-after-free crash at core kernel side.

[2] msm_vidc_close acquired inst->lock and called cancel_delayed_work,
by that time stats_handler is scheduled. So process_one_work() from
workqueue is ready to call stats_handler api. But before it invokes
stats handler(context switch), msm_vidc_close sequence continued to
run and completed the close sequence and called put_inst. So inst
struct got freed up(because inst->kref count reached to zero). Now if
core kernel(workqueue) attempts to invoke stats_handler by calling
worker->current_func(work), will lead to again use-after-free crash.

Added changes to avoid above mentioned issues.

Change-Id: I55bc33a753f4dbae4a8cdc6373b5465d183da3bc
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-10-12 17:31:39 +05:30
qctecmdr
b1c38f2133 Merge "video: driver: add all intra encoding support" 2021-10-06 13:26:49 -07:00
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
Darshana Patil
fc6c35e8de video: driver: add all intra encoding support
add ALL_INTRA database entry and its dependencies.
implement adjust functions.

Change-Id: Ib4522666b6c2ef7dcb5adf9110a2fd5d2daf4654
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-10-04 10:40:32 -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