1
0
Gráfico de cometimentos

194 Cometimentos

Autor(a) SHA1 Mensagem Data
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
Chinmay Sawarkar
7ea481092e video: driver: Update non_comv_h265e buffer size
HFI_BUFFER_NON_COMV_H265E updated to incorporate
multi-tile single slice change.

Change-Id: Ia1f48cc1680a411b107c1ee95377d493cb682739
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2023-01-13 16:25:44 -08:00
Darshana Patil
ea34534af0 video: driver: update copyright markings to 2023
update copyright markings to 2023 in all files.

Change-Id: I6842d56c4a8fff6a7a93d0c1d4bc049041297b02
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-13 14:58:17 -08:00
Darshana Patil
cfe3869048 video: driver: introduce macros from hfi_registers.h
Introduce macros defined in hfi_registers.h interface file
and cleanup unused macros.

Change-Id: Icf05f2ca2fb69556a1c8d076c87af687fd98ed87
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-12 11:28:44 -08:00
Darshana Patil
a0082a4c81 video: driver: amend xo reset clock as shared resource
Use devm_reset_control_get_exclusive_released() instead of
devm_reset_control_get() to get the reset control of video_xo_reset
clock as it is shared reset clock between eva and video drivers.
Use reset_control_acquire() before assert and reset_control_release()
after de-assert video_xo_reset clock to avoid eva driver operating on
it in parallel.

Change-Id: I4936ed7a4556bb56d4b28546084fc877080308ef
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-05 09:58:30 -08:00
qctecmdr
9b51939152 Merge "video: driver: set force mem and pheripheral on flags" 2022-12-22 11:18:57 -08:00
qctecmdr
2d442bba69 Merge "video: iris33: ensure AON spare register to become zero" 2022-12-22 11:18:56 -08:00
Maheshwar Ajja
4716d7bc72 video: driver: set force mem and pheripheral on flags
Set mvs0c clock flags (force mem and pheripheral on).

Change-Id: I52380a30a4c74d9658f989377b5c77209cd8a33e
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-12-19 14:58:23 -08:00
Govindaraj Rajagopal
c4982fbf1a video: driver: refine core state machine
introduced core error state and added changes
to refine core state machine.

Change-Id: Ib3b94fd3798e902b7a6cfc5de45820558c89806e
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-12-15 07:59:45 +05:30
Maheshwar Ajja
520a2893df video: iris33: ensure AON spare register to become zero
Poll for AON spare register BIT(0) to become zero before
asserting XO reset from video driver to ensure CVP/EVA driver
is not asserting XO reset around the same time. Asserting
XO reset by both driver at the same time may result in
unpredictable behavior.

Change-Id: I71a0bd0175ef7701c9a855abbf3c2e741d937dfb
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-12-14 11:09:32 -08:00
Ankush Mitra
bd1cd4368b video: driver: Prepare dependency list without parent
This is change 2 of the Prepare dependency list without
parent change.
In this change we remove all parent information from
the CAP database.

Change-Id: Ie0b878050ae2d24e3c1a41cbd579ef0f19d42250
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-12-13 19:10:18 +05:30
qctecmdr
36346afa9d Merge "video: driver: remove extra mvs0c clock reset" 2022-12-07 14:54:07 -08:00
qctecmdr
fdb319f335 Merge "video: driver: Move adjust/set control functions to common/platform.c" 2022-12-07 14:54:07 -08:00
Deepa Guthyappa Madivalara
832e9aefa8 video: driver: remove extra mvs0c clock reset
Remove addtional mvs0c clock reset which is not
required from power off sequence

Change-Id: I2077cb0ceee6451cd2d2af067ac8a7be3335dd16
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-12-06 11:44:31 -08:00
Govindaraj Rajagopal
9b0140cf03 video: driver: add core sub_state support
Introduce core->sub_state similar to inst->sub_state.

[1] pm_suspended - moved to this substate in case of PM suspend
[2] handoff - moved to this state after successful
    handoff_regulator call.
[3] fw_power_control - moved to this state in case of IFPC.
[4] power_enable - will track core power_on/power_off status.
[5] page_fault - used to rate_limit fault logs.
[6] cpu_wd - indicates hw fired wd interrupt.
[7] video_unresponsive - moved to this state if sync cmd fails.

Change-Id: Iceb65cf404fd93aff7846860b0276307e4eab570
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-11-23 10:53:11 +05:30
Ankush Mitra
1df215f203 video: driver: Move adjust/set control functions to common/platform.c
Move adjust/set control functions to common/platform.c as part of
upstream effort.
This is part 1 of the change.

Change-Id: I8c440740fe785b5b052c4d44963ea34c21419fa4
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-22 23:01:17 +05:30
Maheshwar Ajja
d934279ad4 video: driver: add resets in power off sequence
Add assert and deassert axi and mvs0c resets to
avoid video hardware unresponsive issues due to
multiple power collapse sequence execution.

Change-Id: I25ec99eab6b50111161ec9486ea1155bee63f7fc
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-11-11 18:59:14 -08:00
qctecmdr
b1bf3f1148 Merge "Video Driver: fix frame freeze for HEVC 10bit all intra decoding" 2022-11-11 13:15:32 -08:00
Deepa Guthyappa Madivalara
9db29e4eda video: driver: add assert and deassert reset functions
- Add assert and deassert reset control functions to
  update power off sequence in pineapple chipset
- Rename clock names to match with clock macros

Change-Id: Ic6dc0daac8110597bfcb02cceba94d2b97548723
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-11-07 18:31:55 -08:00
Ankush Mitra
b35fde25c4 Video Driver: fix frame freeze for HEVC 10bit all intra decoding
1. Allow turbo for HEVC 10bit all intra decoding;
2. Add 25 percent extra to VSP cycle for HEVC
   10bit all intra decoding;

Change-Id: I794b2a896f7e9444c8979abdb15b8e673a5270ee
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-07 09:01:17 -08:00
Ankush Mitra
dc39a04e6e video: driver: follow vcodec power collapse seq for PC failure case
if PC fails for 10 times then video driver is treating that situation
as fatal and doing force core_deinit(), in this case firmware will not
follow vcodec power_collapse sequence and if there any pending
transaction from any session it will cause smmu_fault during next
firmware_boot sequence. Added change to perform vcodec power_collapse
from power_off_iris3_hardware() incase of core_deinit due to PC failure.

Change-Id: I45e32985d87b5cc882c4f96f77d1cabc796e6ba0
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-07 07:59:33 -08:00
qctecmdr
3fd4e7f225 Merge "video: driver: fix VCODEC_VIDEO_CC_BASE address" 2022-10-21 10:31:53 -07:00
Deepa Guthyappa Madivalara
fc19b28231 video: driver: fix VCODEC_VIDEO_CC_BASE address
Fix VCODEC_VIDEO_CC_BASE from 0x00F00000 to 0x000F0000

Change-Id: Icda45653be646647ee563322651333cf6c9c4582
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-10-20 11:42:38 -07:00
Govindaraj Rajagopal
3560442234 video: driver: add resource ops macro support
Added call_res_op() macro and used at all possible
places to avoid invalid pointer dereference issue.

Also added changes to cleanup unused functions.

Change-Id: Id77711ad9eaf7b407208567b0fde1f2693588641
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-10-20 12:18:25 +05:30
Govindaraj Rajagopal
ca9cc59d28 video: driver: add additional platform_data support
Add additional platform_data support for waipio,
pineapple, kalama, anorak targets.

Change-Id: I2def953c88eb4ba41de270bf208da112d4e547bf
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-10-18 00:13:22 +05:30
Govindaraj Rajagopal
21eb38981e video: driver: reduce device_tree dependency for video
Only keep minimal entries in dtsi, which is essential for
other drivers usage. Move remaining all data into platform
resource file.

Remove device_tree dependency and maintain platform_data
to initialize resources like regulators, interconnects,
clocks, reset_clocks, subcaches and context_banks.

Read static data like freq_table, firmware_name, pas_id
also from platform_data instead of from dtsi.

Change-Id: I73a1df10b92c55e55b23e538aea62598a7250ab4
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-10-18 00:10:19 +05:30
Chinmay Sawarkar
b0f6be067e video: driver: Update lanai power sequence
1. Update core power down sequence.
2. Update hw power up sequence.

Change-Id: I428869ac92154b23cdbe3f51c7b299fe8a6cc71b
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2022-10-14 15:23:32 -07:00
Deepa Guthyappa Madivalara
3d9c6f17f9 video: driver: Add support for lanai/iris3.3 platform
Add the required config and platform files to enable
lanai platform with iris3.3 VPU.

Change-Id: I441d631b9876705342e34097feff3e5d355d6b71
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-09-28 14:36:08 -07:00
Stanimir Varbanov
21974f4a60 video-driver: Move register manipulation functions
Move register manipulation functions in a common variant
file (msm_vidc_variant).

Change-Id: Ic92a264b47b4d90efcfb4389e30d2749a23f792b
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-26 09:42:41 -07:00
Stanimir Varbanov
8b003fb153 video-driver: Abstract platform resources
Move clocks, gdsc, bandwidth resources out of venus_hfi and
use the ops in variant and venus_hfi code.

Change-Id: I1be77c9d384f4eef2cb8085b75c39dc3fd3eeb86
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-25 19:26:32 -07:00
Stanimir Varbanov
a558b04808 video-driver: Delete not used clock_config_on_enable op
The operation is not used anywhere, delete it.

Change-Id: I4fe7cd41d63ea1b1e0792de6b3e98757860629d8
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-25 14:06:52 -07:00
Stanimir Varbanov
b52b9fd3c1 video-driver: Drop init_interrupt op
The init_interrupt op is not used out of variant, lets
remove the op and used the functions directly.

Change-Id: I8f97cf503503b7f30e824843a5bd9d93c702241a
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-25 14:06:31 -07:00
Stanimir Varbanov
cca051abf4 video-driver: Setup ucregion from boot_firmware op
On all places ucregion setup is done just before calling
boot_firmware, move setup in boot_firmware op and remove
ucregion_setup op.

Change-Id: I91a9a72d3b88eef91e82e19b9d8629e9731211f5
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-25 14:06:03 -07:00
Mahesh Kumar Sharma
7d00efc5dc video: driver: fix encoder output buffer size requirement
For some resolutions memory requirement was coming as 4 * yuv_size
and for CQ/RC_OFF it was 8 * yuv_size. With this fix it will be 
max 2 * yuv_size (+ 25% for 10 bit). Fix typo in 720P resolution check.

Change-Id: Ib5908f1eef8dca92dac46c5c195cd47ba28a4df4
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-08-22 16:00:50 -07:00
qctecmdr
1ee1d9c8e5 Merge "video: driver: define slice delivery as boolean control." 2022-08-03 10:39:31 -07:00
Dikshita Agarwal
f1a32f5a86 video: driver: define slice delivery as boolean control.
Make slice delivery a boolean control instead of menu.

Change-Id: Iedf8e0df882d61e82661c7f557473d3f7b49215a
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-02 12:28:44 +05:30
Mihir Ganu
ce4198e97f video: driver: Update IRIS3 DDR line buffer BW calculation
Remove the temporary 2-pipe condition for DDR line buffer
write calculation for BW.

Change-Id: I75dba3106f0af9f7a6eb43036f86209202e22d5d
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:55:20 -07:00
Mihir Ganu
525f1f5071 video: driver: Adjust bandwidth calculations for AV1
Consider AV1 LCU sizes and add AV1 considerations
while calculating bandwidth votes.

Change-Id: I0a6bff1bb142fb0eed44d4c3c458a916d11d6f57
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:55:12 -07:00
Akshata Sahukar
c5d589a044 Revert "video: driver: 5 percent increase for vsp and vpp cycles"
This reverts commit 4fa2fc8142ee7aa9da4bf2da7bb6ab52d634ab17.

Change-Id: Iaa0156c0442fdbf928ba03aa2b833340601ff395
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-08-01 17:54:43 -07:00
Vikash Garodia
9f34254da3 video: iris3: Fix the issue in power collapsing video hardware
During power collapse, video driver would power collapse video
hardware followed by video controller.
While power collapsing video hardware, it may happen that video
firmware has already power collapsed the video hardware, since
it is hardware controlled. For certain cases, like XS WD, it
may happen that video hardware may not be power collapsed by
video firmware. In such scenario, skipping power collapse sequence
of video hardware would lead to unhandled transactions from video
hardware.
There is a power status register which can clearly suggest if the
video hardware is power down or not. Added a check to confirm the
power status of video hardware before skipping or executing the
power collapse sequence for video hardware.

Change-Id: Ibd9cd708a259897262fcc6cab27b26aaf37f1b13
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2022-08-01 17:22:18 -07:00
Akshata Sahukar
089b0f125b video: driver: 5 percent increase for vsp and vpp cycles
8k@30 fps encode has a very low margin for sw/fw at 338MHz.
Hence, increase core clock little bit(5%) to move to the next
corner i.e., 366MHz.

Change-Id: Idebde3c726086ec49d1fb0ca4525953dd3a30ba9
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-08-01 17:20:33 -07:00
Mihir Ganu
1e87ceec2b video: driver: Introduce a property to set COMV bufcount
Certain codecs/use cases require larger COMV buffer sizes to achieve
performance. Introduce a property to set COMV bufcount and calculate
COMV buffer size based on the bufcount.

Change-Id: Ib0ed8afe77708dc453cbcc121bcd8606db637152
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:19:20 -07:00
Sachu George
b79ec844f2 video-driver: Updating H264 Decoder CMD_BUF size calculation.
Internal Buffer(CMD_BUF) size calculation is changed from (3 * 4) to 48
in firmware for H264 decoder. Aligning with same calculation in driver.

Change-Id: I974bca7d2e128cee24bf237b6f9ea606f386031d
2022-08-01 16:23:49 -07:00
Dikshita Agarwal
7d1fbd07cf video: driver: redefine private v4l2 macros in common file
Define vidc macros corresponding to private v4l2 macros
defined in v4l2_vidc_extensions.h file in msm_vidc_internal.h
and use the same wherever applicable for successful
compilation of upstream driver.

Change-Id: I2c7b3741d29996beb35b08b9c6dbd88876bb6ca6
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-01 17:59:08 +05:30
Dikshita Agarwal
88dc4a0593 video: driver: handle private codecs defines
Move the usage of v4l2 macros in helper functions to
avoid compilation issues on upstream kernel with private
codec defines.
Use vidc macros defines in code instead of v4l2 defines
wherever applicable.

Change-Id: I43d7deb4f84c502689ceaec3273803444f30f379
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-07-29 12:37:03 +05:30
Dikshita Agarwal
c5c78e3ba2 video: driver: move v4l2 to vidc mappings to target specific file
Move mapping of v4l2 to vidc macros for codec, color format,
color primaries etc to target specific file to restirct the
usage of private v4l2 defines to target specific file.

Change-Id: Ie83968cb944c756e55b6514c496c0b23c5d16413
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-07-29 12:30:10 +05:30