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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Adding driver support for anorak(Halliday).
Change-Id: I65239264758a1cc462ef6c458cb0a12f1fcdaf53
Signed-off-by: Sachu George <quic_sachgeor@quicinc.com>
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>
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>
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>
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>