Commit Graph

347 Commits

Author SHA1 Message Date
qctecmdr
f251ef996d Merge "video: platform: taro: add default frame/operating rate" 2023-02-08 11:51:54 -08:00
Dikshita Agarwal
5cd85bc93c video: platform: taro: add default frame/operating rate
Add default values for frame rate and operating rate for
decoder.

Change-Id: I0c9ed12fafd4655043bc408d7cee976278412a8f
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-02-08 16:54:23 +05:30
Darshana Patil
ed80204a9e video: driver: add support to configure colorinfo via control
- introduce control to set colorspace. client will use this
  to set private color info.

Change-Id: I0099ef1525f4562d3be3a6e518d046fe5b9ef894
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-02-06 13:09:17 -08:00
Dikshita Agarwal
a4d2b2d178 video: driver: remove dynamic layers and bitrates support for taro
Remove support for dynamic layers and bitrates for taro similar
to other platforms.

Change-Id: Ic316d9d566507ae924cff7a1ded10bcdd1f115e4
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-02-06 17:37:01 +05:30
qctecmdr
0884f5a04a Merge "video: driver: restructure video state machine" 2023-01-28 00:56:41 -08:00
qctecmdr
54c8d7570d Merge "video: driver: add power domain and opp table support for video" 2023-01-28 00:56:41 -08:00
qctecmdr
f71e472d68 Merge "video: driver:remove support for dynamic layers and bitrates" 2023-01-27 11:25:17 -08:00
Govindaraj Rajagopal
7c365bdb94 video: driver: restructure video state machine
Re-structure video driver statemachine to use
event handler. Added event handler support for
event states.

Added change to handle event depending on the
underlying state implementation.

Change-Id: Ib55c12c6cadc4d780797a5aee75d5ea61e95c94f
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-01-27 16:31:23 +05:30
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
Ashish Patil
bf33925fa3 video: driver:remove support for dynamic layers and bitrates
- remove support of dynamic layer change for CBR
 - remove support of layerwise bitrate
 - any dynamic layer change request ignored without error for CBR_*FR cases
 - layerwise bitrate is mapped to cumulative bitrate

Change-Id: I96c70fabd3c2bf94ce989b9e94620c166892b8e6
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-01-19 09:07:22 -08:00
qctecmdr
954b0ff6f5 Merge "video: driver: add support for pineapple V2 devices" 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
Deepa Guthyappa Madivalara
d8f253e2c0 video: driver: add support for pineapple V2 devices
Adding support for pineapple V2 devices

Change-Id: I9088895ff92ca34ee3b46bd99e0d068b478e083d
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-01-13 16:40:26 -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
qctecmdr
a83f8b5c38 Merge "video: driver: Enable power collapse" 2023-01-12 09:50:35 -08:00
Mihir Ganu
88612676b6 video: driver: Enable power collapse
Enable software power collapse.

Change-Id: Ie542587465a1688e7bd0a7669b93b64620b2e356
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-01-05 10:39:34 -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
Megha Byahatti
1ce3863b21 video: driver: add database file for upstream taro
Add database file for taro prepared based on upstream.
This file won't be compiled for Android builds.

Change-Id: I6804654b0574f4cc42d90278e4a022482c27ce99
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-01-04 00:07:33 +05:30
Ankush Mitra
9e8ced68f3 video: driver: Pineapple CAP Database fix
Fix the issue in pineapple CAP Database for
SLICE_DECODE.

Change-Id: I1b4dc51bbb23634aa372eba35b18ca9b6caada2d
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-12-21 12:57:04 +05:30
Ankush Mitra
da842a9f2f video: driver: Prepare dependency list without parent
Resolve upstream compilation issue.

Change-Id: Id0b08d0fc66291a415c966c90b804f9017790ef8
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-12-13 19:11:49 +05:30
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
Ankush Mitra
2c39d5b91b video: driver: prepare dependency list without parent
Prepare dependency list only using children.

Change-Id: Id79487825fed1f121821126589594b64820c85d3
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-12-13 18:50:13 +05:30
qctecmdr
fdb319f335 Merge "video: driver: Move adjust/set control functions to common/platform.c" 2022-12-07 14:54:07 -08:00
qctecmdr
e82f7eb958 Merge "video: driver: add dma mask attribute to context banks" 2022-12-07 14:54:06 -08:00
Manikanta Kanamarlapudi
92a44da54b video: update the set function for BASELAYER_PRIORITY
update the set function for BASELAYER_PRIORITY control.
with out this change, configuration is not set to firmware.

Change-Id: I57f01a8e02462ee9e8c221581043a8a70adbfcc5
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2022-12-02 11:55:27 +05:30
Deepa Guthyappa Madivalara
bce7898377 video: driver: disable power collapse for video on pineapple
Disable video power collapse on pineapple chipset until
power collapse sequence is successful.

Change-Id: I2e7d0085e6d810fb79c2b1070c4bd498f443cfc8
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-11-23 11:02:06 -08:00
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
qctecmdr
bc62a68248 Merge "video: driver: check for regulator support before initializing" 2022-11-21 18:35:21 -08:00
Dikshita Agarwal
8030903f1e video: driver: add dma mask attribute to context banks
Upstream driver doesn't support context bank address ranges,
so add dma mask attribute to context bank to specify address
range for upstream driver.

Change-Id: I09191b500006d6c7abf364fbfa22377b480a4b4d
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-11-21 10:52:41 +05:30
Deepa Guthyappa Madivalara
2113a7a8c5 video: driver: add support for vidvsp cache
Adding support for vidvsp cache

Change-Id: I0ef58106a9a5eab55ab01e4eaaf77d19d9b3a984
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-11-18 16:22:09 -08:00
qctecmdr
ce13ce72cc Merge "video: driver: enable xo reset clock" 2022-11-18 14:45:37 -08:00
qctecmdr
b8fd5b594f Merge "video: driver: Remove slice interface capability" 2022-11-17 23:45:10 -08:00
Darshana Patil
2638c201a8 video: driver: enable xo reset clock
Enable xo reset clock since it is enabled
from clock driver.

Change-Id: Ica38616f514c9f2288a60fbfb3e0a3683c154b15
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-11-16 18:07:44 -08:00
Darshana Patil
54f71aa5ab Revert "video: driver: disable SW power collapse temporarily"
Re-enable sw power collapse.
This reverts commit 2dd5543fed.

Change-Id: If6cd275551fcb1d3de1fa75b9cace9aa6649c7fa
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-11-16 18:05:43 -08:00
qctecmdr
b9bfdbe7b8 Merge "video: driver: Enable MMRM support in pineapple" 2022-11-16 08:10:28 -08:00
Deepa Guthyappa Madivalara
2dd5543fed video: driver: disable SW power collapse temporarily
Disable SW_PC temporarily

Change-Id: Ief82b9b273d6a4c7383e0aab73c2a5da428c203a
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-11-15 14:45:16 -08:00
Anshul Agarwal
a51bbd6445 video: driver: Remove slice interface capability
Removed slice interface capability for Kalama and taro.

Change-Id: Id7e90eff7457d004d70ba885af81a33e1feb7bb3
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
2022-11-15 10:00:09 -08:00
qctecmdr
b1bf3f1148 Merge "Video Driver: fix frame freeze for HEVC 10bit all intra decoding" 2022-11-11 13:15:32 -08:00
qctecmdr
c8709784bb Merge "video: driver: Add TURBO and LOWSVS_D1 clocks" 2022-11-10 16:38:38 -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
e552b19ce8 video: driver: support upto level 6.2 for HEVC enc
allow support upto level 6.2 for HEVC encoder.

Change-Id: I21e958ecab30bf97bc10627b17e18cfa3070e4ef
Signed-off-by: Jiajia Cong <quic_jcong@quicinc.com>
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-07 07:47:44 -08:00
Ankush Mitra
c1bb733a6b video: driver: Remove unused capabilities
Cleanup of unused capabilities from
platform caps list.

Change-Id: I98f4beb96f41d2b8a3b4342f7d453a6abc046e55
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-07 21:08:52 +05:30
Dikshita Agarwal
1ac85a3237 video: driver: check for regulator support before initializing
Upstream doesn't support regulators, while downstream kernel does.
So add a condition to check for regulator support before init.

Change-Id: Icab8aec20796546a33ac571963f871d146970002
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-11-07 16:51:12 +05:30
Mihir Ganu
fd5ef8da76 video: driver: Enable MMRM support in pineapple
Enable MMRM support in pineapple database.

Change-Id: I896005510383145535f9e4b2800991f386dfcd73
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-11-03 20:45:34 -07:00
Ankush Mitra
6b0dcb4a4f video: driver: code re-structure memory ops support
Re-structure the memory_ops code so that
upstream driver use mem_ops defined on
msm_vidc_memory.c and downstream driver
use mem_ops defined on msm_vidc_memory_ext.c.
It helps to modularize the code even further.

Change-Id: Id00b0872d7a902a8540500df5efb5f546a9dbe41
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-10-28 00:06:28 +05:30
Deepa Guthyappa Madivalara
23e5f249d6 video: driver: Add TURBO and LOWSVS_D1 clocks
Update the clk table to support TURBO and
LOWSVS_D1 clocks

Change-Id: I69f710ae45df47f0e5190ec1be217b69f35abcf7
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-10-26 12:13:50 -07:00
Darshana Patil
4250372925 video: driver: add memory ops support
add memory ops support so that different
implementations can exist for memory_alloc,
memory_free, memory_map and memory_unmap,
dma buf attach, detach, map, unmap and
get buffer region in upstream and downstream
drivers.

Change-Id: Ifabc34e7a8b0284579c1bc4a8f477fe558d068f4
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-10-21 16:35:22 -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