Commit Graph

20 Commits

Author SHA1 Message Date
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
fdb319f335 Merge "video: driver: Move adjust/set control functions to common/platform.c" 2022-12-07 14:54:07 -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
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
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
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
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
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
qctecmdr
8b501d3034 Merge "video: driver: remove non-standard header file of_common.h" 2022-10-10 23:01:41 -07:00
Dikshita Agarwal
d7e32537a7 video: driver: remove non-standard header file of_common.h
Remove inclusion of non standard header file of_common.h and
related APIs from upstream database and common file.
Include it only in downstream databse file.

Change-Id: I22140c54de38afca8058198c49d9fecdceaad67a
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-09-30 14:10:01 +05:30
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
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
Sachu George
a709f30d05 video-driver: Add driver support for anorak
Adding driver support for anorak(Halliday).

Change-Id: I65239264758a1cc462ef6c458cb0a12f1fcdaf53
Signed-off-by: Sachu George <quic_sachgeor@quicinc.com>
2022-07-02 18:01:19 -07:00
Govindaraj Rajagopal
e433d223a6 video: driver: fix faulty msm_vidc_vmem_alloc() failures
Sometimes uninitialized local pointer variables were passed to
msm_vidc_vmem_alloc() call for allocating memory. Uninitialized
variables might garbage value, so msm_vidc_vmem_alloc() is
treating that double alloc request and returning error. So i.e
leading to undefined behaviour.

For e.x, msm_vidc_update_input_cr() call will never add any
entries into &inst->enc_input_crs(due to above mentioned issue),
So i.e leading to populate invalid input compression ratio in
encoder usecase.

Change-Id: I4507b343bee8eec7252cf946ad8d3120efd7bacb
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-06-21 19:29:12 +05:30
Deepa Guthyappa Madivalara
13d203ba7f video: driver: Use vzalloc instead of kzalloc
kzalloc might fail to allocate physically contiguous
memory which may not be available always and hence use
vzalloc to allocate virtually contiguous memory

Change-Id: I8ad89ef107da301217f3d1ec307b9b27b4edd2de
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-05-26 15:25:26 -07:00
Govindaraj Rajagopal
f47f897e4a video: driver: split platform database entries into 2 parts
Divided database entries into 2 parts

[1] struct msm_platform_inst_capability -> it tracks cap_id,
domain, codec, min, max, step, default, v4l2_id, hfi_id, flags.
[2] struct msm_platform_inst_cap_dependency -> this will track
cap_id, domain, codec, parents, childrens, adjust and set
callbacks.

It will help to reduce number of database entries.

Change-Id: I692968b0f6804b45371e8cf4af6407e57df54bb9
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-04-12 15:25:59 +05:30
Darshana Patil
2d69ee17ae video: driver: remove support of s_parm/g_parm for decoder
remove support of s_parm/g_parm for decoder

Change-Id: I5b35b33610eb96bbfc26181c8c249316ee65b31b
2022-04-07 15:27:43 -07:00
Deepa Guthyappa Madivalara
fdef18ef50 video driver: remove session priority handling
1. Removes depenceny of priority from frame rate
    and operating rate.
2. Removes changing priority from s_param

Change-Id: Iec51173eab5a3d59b841315549d1420df422d37f
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-04-06 09:22:38 -07:00
Ankush Mitra
6d48bb4854 video: driver: keep all platform common api in a single file
update msm_vidc_platform.c to keep all common API's
and macro's in a single file to avoid redundancy.

Change-Id: I43869f54514ab8c531b6e27b84ce0a6c1f1806ce
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-04-01 01:29:40 -07:00