Граф коммитов

75 Коммитов

Автор SHA1 Сообщение Дата
qctecmdr
2c5cd81fe8 Merge "video: driver: cleanup driver remove sequence" 2023-06-15 09:01:57 -07:00
Darshana Patil
dd06676471 video: driver: adjust opb buffers min count
Incase of split mode(either for linear color format
or AV1 film grain usecases), dpb and opb(output)
buffers are allocated in same context bank. In high
memory consumption usecases like 8k, it can lead to
OOM issues. To avoid this, for split mode, when both
dpb and opb buffers are used, honor fw min count for
dpb buffers, whereas for opb buffers choose an optimal
min count to ensure performance.

Change-Id: I287aff862d2fe36a690c1393d64f8095578baf34
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-06-14 12:54:10 -07:00
Govindaraj Rajagopal
29d10ac07b video: driver: cleanup driver remove sequence
Remove deinit sequence calls and register devm
managed callbacks, so that kernel can invoke
then, when dev scope ends and cleansup all
associated resources.

Change-Id: I729fd21fe32d9f39240d0b743f910409d93a00c5
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-06-13 13:17:23 +05:30
Akshata Sahukar
b6fba340c3 video: driver: fix hfi_buffer_iris3.h premerge failures
remove macro brackets in hfi_buffer_iris3.h to
fix premerge failures

Change-Id: I30f2cb656376cefc632cc3fd64dc979a903bfdc0
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-06-09 19:19:26 -07:00
Anshul Agarwal
950306d1aa video: driver: fix some checker err
Fix some checker err

Change-Id: I357059999dd43b58d6c414868a8b4060b6b691da
Signed-off-by: Anshul Agarwal <quic_anshagar@quicinc.com>
2023-06-09 15:31:01 +05:30
Anshul Agarwal
65d28b3cab video: driver: fix some checker err
Fix some checker err.

Change-Id: I6704727abf49c8c55ac9c213dec180c93928961f
Signed-off-by: Anshul Agarwal <quic_anshagar@quicinc.com>
2023-06-08 12:00:19 +05:30
Ankush Mitra
e1cb32c5de video: driver: resolve some checker err
Resolve some static checker err.

Change-Id: I0aa1d8c905ac7fd1defa16dd28d4386465f09ff3
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-06-06 11:57:20 +05:30
Ankush Mitra
400a782851 video: driver: add space and move "{" to previous line
This change will fix some checker err.

Change-Id: I93da24e9b54bb1d5f6145b438858a977b06ca09c
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-06-04 21:08:33 +05:30
Ankush Mitra
542b9f9736 video: driver: enclosed macros with complex values within bracket
This is resolve some of this kind of checker err.

Change-Id: Ief665e17045c3b6a6ff636ab6404c6e0c93e9460
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-06-01 12:32:01 +05:30
Ankush Mitra
a04f985cda video: driver: move "{" to the previous line
This will fix some static code checker err.

Change-Id: I664e96dd2d65f694c3f2523e1f4aeb08a40f660a
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-30 22:21:18 +05:30
Ankush Mitra
e3415ddbef video: driver: changing "foo* bar" to "foo *bar"
This change will resolve some of the static code
checker err.

Change-Id: I62edcbc8740dd932f5662b0bad1548374a0c9188
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-30 22:14:30 +05:30
Vedang Nagar
e2663ce820 video: driver: Remove inst check in video driver
Remove inst check from all the functions in video driver.
Inst check is present in most of the functions in video
driver which is not required.
Keep check only at root level functions and remove
from rest all of the functions.

Change-Id: Ib310cd3df5e8612a9fc3a5aa654dff4203a12906
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-25 21:04:49 +05:30
Deepa Guthyappa Madivalara
def6b6328b video: driver: ring buffer enhancements
1. use max of operating and frame rate for fps
2. vpp_cycles is considered close to frequency
   corner if vpp_min_freq is greater than max
   required frequency

Change-Id: I9dc995ca16e4eeae18497a8648dfef64e16dfbc2
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-19 15:22:26 -07:00
Deepa Guthyappa Madivalara
2ba0f6e1e7 video: driver: operating rate changes for latency improvements
1. allow any client set operating rate (less than 2^15)
2. remove operating rate dependency for admission control
3. allow turbo for low latency case as well

Change-Id: I4b0f29c3756a592a9baedec8996653e5cb5292d5
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-15 16:54:49 -07:00
Akshata Sahukar
dbc5f268c9 video: driver: Align dec dpb buffer size calculation with HFI
Align decoder dpb buffer size calculated via HFI macro
HFI_NV12_UBWC_IL_CALC_BUF_SIZE_V2 with HFI file

Change-Id: I431bbee8bca07d87713bc7706259f679ab0734bd
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-05-12 13:11:32 -07:00
qctecmdr
85729d0bd6 Merge "video: driver: execute NOC reset sequence always in power off" 2023-05-11 22:04:49 -07:00
Deepa Guthyappa Madivalara
c971548bee video: driver: execute NOC reset sequence always in power off
- always execute noc reset sequnce in power off
 - try to disable hw power always before power down

Change-Id: I76757cccea06a398d1a79310edb688608607a413
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-11 13:01:02 -07:00
Deepa Guthyappa Madivalara
a9547c3239 video: driver: Clear NOC_ErrCLr_low only in power on
- In noc error handler do not clear
   NOC_ERL_ErrorLogger_main_ErrorLogger_ErrClr_Low, to
   avoid sending any pending transactions, move clearing
   to power on

Change-Id: Ib620f3dcb93b92f2c03eb2126c47d5b97526556d
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-10 16:52:50 -07:00
Deepa Guthyappa Madivalara
c2bbf33511 video: driver: move NOC registers programming from Firmware to Software
- program required NOC registers in power on
 - update NOC error handling when fw raises HFI_SYS_ERROR_NOC
 - skip reading NOC error log registers from smmu fault handler
   as they are updated only when sys error from firmware is
   processed and fault handling is completed

Change-Id: If396995d8bd6c77e6a92c0c2a8a7fb245be48854
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-05 15:18:54 -07:00
DEEPA GUTHYAPPA MADIVALARA
3365847f8f Revert "video: driver: move NOC registers programming from Firmware to Software"
This reverts commit 862bae6da8.

Change-Id: Ida18c4ba7cc352240f5cc8596d9ac8caa45e6e04
2023-05-04 12:36:58 -07:00
Deepa Guthyappa Madivalara
862bae6da8 video: driver: move NOC registers programming from Firmware to Software
- program required NOC registers in power on
 - update NOC error handling when fw raises HFI_SYS_ERROR_NOC
 - skip reading NOC error log registers from smmu fault handler
   as they are updated only when sys error from firmware is
   processed and fault handling is completed

Change-Id: I0195515ff1640aabe8e6db85803b49fde645808f
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-04-21 10:03:58 -07:00
Ashish Patil
0b7870402e video: driver: Add info for uniform AV1 tile handling
read the av1 uniform tile handling propert from fw
and display it. Required in debugging av1 usecases for
power calculation

Change-Id: I443e5afd591a8131c667c64cebb417fc022693ac
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-12 14:18:20 -07:00
qctecmdr
7b095f2b85 Merge "msm: vidc: allow TURBO for specific sessions" 2023-04-08 19:56:42 -07:00
qctecmdr
005d5f44ef Merge "video: driver: remove core capability pointer" 2023-04-07 09:22:36 -07:00
qctecmdr
9c1c73f705 Merge "video: driver: set QOS registers" 2023-04-07 09:22:36 -07:00
Jiajia Cong
b995df9490 msm: vidc: allow TURBO for specific sessions
1. AV1 decoding session.
2. 10-bit I-Frame decoding session.
3. NRT decoding/encoding session.

Change-Id: Ia308d71d03d303213029d4125204065dc1ff9509
Signed-off-by: Jiajia Cong <quic_jcong@quicinc.com>
2023-04-07 03:17:31 -07:00
Ashish Patil
cb18a42fa6 video: driver: added support for av1 uniform tile handling for power calculations
If the av1 tile rows and columns are greater than recommended decoder
av1 settings,vote for higher frequency.

Change-Id: Iea9f542e0b925a9ecb063c11b1827f31164f5a7b
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-06 14:17:21 -07:00
Ankush Mitra
6bdbae50f2 video: driver: remove core capability pointer
Remove core capability pointer.

Change-Id: I42f4c5cb7f8a0791b8c5f84d5f0d953be3bf80d6
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-06 10:56:57 +05:30
Ankush Mitra
e450d8eaa3 video: driver: remove capability pointer
Remove capability pointer and allocate
memory with max cap size.

Change-Id: I7f53e3b35439f91b72f057695b6e63f71bfecc0a
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-05 11:58:48 +05:30
Maheshwar Ajja
78c90f4173 video: driver: set QOS registers
Move Qos register programming to driver. Use reset_control_acquire
api to ensure xo clk is on before programming

Change-Id: I52bf416da42675d206e1124368f75f627b8b2e9f
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-04-04 15:07:31 -07:00
qctecmdr
b12f5ec06e Merge "video: driver: adding encoder GOP awareness settings in the power calculation" 2023-04-02 09:18:12 -07:00
Ashish Patil
dabd91e62e video: driver: adding encoder GOP awareness settings in the power calculation
power calculation is optimized by using encoder reference handling
and GOP details.

Change-Id: I29707fcd152f89e213532afc9c4b6191d23b4d6c
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-03-31 13:11:45 -07:00
Akshata Sahukar
be793d6501 video: driver: misc synx fence changes
- Make synx fence debugfs support as module parameter
- Update sync fence related register device addresses to
  eliminate memory holes
- Enable hw fence config parameter to enable compilation
  of hw fence definitions in display driver
- Handle synx fence queue memory error in control status
  register.
- Fix msm_vidc_debug and msm_vidc_fw_dump module params
  ro accept values during module instantiation.

Change-Id: Ib3ab7e80cfc4e440c0b3170292e1943888298875
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-29 09:57:57 -07:00
Ashish Patil
dde3e01a63 video: driver: enabling new power calculation changes
Change-Id: I9ea52a2f766921f8012a951f5e07a2d18d5d7e55
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-03-08 11:52:02 -08:00
Ashish Patil
dd0e6d5f70 video: driver: update power calculations
Update power calculation to avoid low framerate or
frame drop issues

Change-Id: Ice306a44d4ea8242d965c0e5d03edffc0f5e0f8b
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-03-08 11:15:05 -08:00
Akshata Sahukar
9a5fea8ef3 video: driver: Add support to enable enc ring buffer
Add support to enable ring buffer for enc intermediate
bin buffer to improve encoding performance.

Change-Id: Ifbf50cb48278c62c09a20bc7626a3b6288813830
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-07 17:14:30 -08:00
Akshata Sahukar
fb2e2c5715 video: driver: Align hfi files to pick ring buffer changes
Align hfi property and memory file to pick interface changes
for encoder ring buffer support

Change-Id: Icde4cdffe5275d416c51c36e562bb832027b0fa1
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-07 17:13:09 -08:00
Akshata Sahukar
2b974f7ad0 video: driver: Align hfi files to pick synx fence changes
Align hfi property and registers file with to pick synx fence
related interface changes

Change-Id: I19e5cce4d67f2f1eeacf917f9e688d2bb20f6585
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-03 16:59:49 -08:00
Vedang Nagar
17bc01b78f video: driver: Move clk/qcom.h to external reseource file
Move qcom.h header file from resources.h to resources_ext file.

Change-Id: I81735461f093fe724a51d66538be1cc562fc0e24
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-02-26 22:26:16 +05:30
Ashish Patil
e28d357256 video: driver: lanai power calculations
New bandwidth and frequency calculation functions
for lanai.

Change-Id: I0ec4a74bc24598628fe94a6ebbe9df5e3cb71a9c
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-02-23 18:29:45 -08:00
qctecmdr
8df204443f Merge "video: driver: remove config dependencies" 2023-02-23 08:10:06 -08:00
Maheshwar Ajja
e044c01ccc video-driver: resolve retry assert xo reset issue
In assert xo reset failure case, count increment and
usleep are skipped resulting in indefinite while loop.
Correct the conditions to avoid looping indefinitely.

Change-Id: I38fae272f0c7c676e1454e1fb0a8bfee860ea2f0
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-02-21 13:26:14 -08:00
Govindaraj Rajagopal
c3c85e9653 video: driver: remove config dependencies
remove all conditional compilation in video driver.
With this change, all files willbe always compiled
and will be available in final kernel object file.

Change-Id: I9843c246e23bd1ee4fb8918e5cfa840e2defd432
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-02-21 14:33:41 +05:30
Vedang Nagar
8765409333 video: driver: Fix unbalanced irq warning in interrupt handling
In case of watchdog interrupt, power off sequence will
get called which will make intr_status to 0 due to which
enable_irq gets called from isr_handler irrespective of
watchdog interrupt. Now during power up sequence again
when the enable_irq gets called, it will through
"Unbalanced enable for irq" error.
Added a fix for the same.

Call trace ->
enable_irq+0x9c/0xf8
__power_on_ar50lt+0x2d4/0x320 [msm_video]
__load_fw+0x92c/0x1368 [msm_video]
venus_hfi_core_init+0x64/0x468 [msm_video]
msm_vidc_core_init+0x158/0x4bc [msm_video]
msm_vidc_open+0x90/0x804 [msm_video]

Change-Id: Ic675d7540ef029e530a8cd5b87fb97f72e72057f
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-02-14 12:38:20 +05:30
Manikanta Kanamarlapudi
06d84f081f msm: vidc: update dpb buffer size only for film grain content
update buffer size only for film grain content.

Change-Id: Ia9230d36ef0c917723fdb1eea82adfb8df3b3413
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2023-02-09 06:42:34 -08:00
qctecmdr
54c8d7570d Merge "video: driver: add power domain and opp table support for video" 2023-01-28 00:56:41 -08:00
Darshana Patil
68df0645ec video: driver: add support to send aon region via HFI_MMAP_ADDR
- add support to intialise device region by reading data from
  platform to resources.
- add support for iommu_map and iommu_unmap apis.
- allocate a 4K page and send this address through
  HFI_MMAP_ADDR register.
- map AON region, send virtual address and size as payload.

Change-Id: I5aa26593309a220c5de62836e432c1bd5a63ba1d
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-20 10:49:32 -08:00
qctecmdr
576e231f23 Merge "video: driver: Update non_comv_h265e buffer size" 2023-01-18 13:36:09 -08:00
qctecmdr
9f3da9e6d4 Merge "video: driver: introduce macros from hfi_registers.h" 2023-01-18 13:36:08 -08:00
Govindaraj Rajagopal
ab9b1a112b video: driver: add power domain and opp table support for video
Added changes to support generic power domain and opp table.
This is an alternative for downstream regulator framework.

power domain can be enabled using below dtsi entries.

power-domains =
    <&videocc MVS0C_GDSC>,
	<&videocc MVS0_GDSC>,
	<&rpmhpd SM8450_MXC>,
	<&rpmhpd SM8450_MMCX>
power-domain-names =
    "iris-ctl", "vcodec", "mx", "mmcx";

Power domain handles willbe parsed at driver side using below api's.
   - dev_pm_domain_attach_by_name()
   - devm_pm_opp_attach_genpd()

devm_pm_opp_attach_genpd() provides consumer virtual device handles
and i.e linked to core->dev using device_link_add().

MXC, MMCX rails wilbe powered up by scaling desired rate using
dev_pm_opp_set_rate().

Change-Id: I3d73434cb772078f031aec7cadc2d42ab930edd0
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-01-18 16:44:23 +05:30