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>
Update the clk table to support TURBO and
LOWSVS_D1 clocks
Change-Id: I69f710ae45df47f0e5190ec1be217b69f35abcf7
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@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>
msm_vidc_dt functionalities were distributed to
other files and most of the dt parsing code was
removed already. So added change to cleanup
unused files.
Change-Id: I3362c6cfa3f493b965167b9aeb0f5cf3ac8c2711
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@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>
1. Update core power down sequence.
2. Update hw power up sequence.
Change-Id: I428869ac92154b23cdbe3f51c7b299fe8a6cc71b
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
Update pineapple database on par with kalama database
Change-Id: If7eb4046abea0c23c703355c3054e8b7d60d1089
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
While parsing dpb_list_property packet, memcpy happens from
hfi_packet to inst->dpb_list_payload which is being allocated
with max size of 256 Bytes. If dpb_list_prop packet size is
greater than 256Bytes, then driver will change the state to
ERROR state but still memcpy will happen shich will read
and write memory greater than allocated hence corrupting
the memory. Added fix by returning error.
Change-Id: I81617c88c68194fbd442059c63fa702d1e839478
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
Fix compilation issues due to wrong format specifiers being
used for printing device address.
Change-Id: Ic8ee8e9cdb563ea3efea9fa2e713befad74447cb
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
This reverts commit fbd52e8f19.
DMA_ATTR_DELAYED_UNMAP attribute is required to have dma driver
maintain one map reference if we have client recycling more than
VIDEO_MAX_FRAME(32) buffers.
Change-Id: I7005f874e387ce111082821c2af2226417766622
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
when a buffer is asked for release and if the same buffer
is queued again before release done is received, then
second time the FTB should be queued without RO flag
Change-Id: I11c4494471129c5bb3ff4401ccfbd25c702c699d
Signed-off-by: Darshana Patil <quic_darshana@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>
When client queued a buffer, v4l2 framework
compares the client Dmabuf with the existing
dmabuf in the bufs array at the same index.
If the dmabuf is different then v4l2 framework
would call unmap_dmabuf, detach_dmabuf callbacks
for the old buffer and then calls attach_dmabuf,
map_dmabuf callbacks for the new buffer before
qbuf callback is made to driver. If the dmabuf
is same then qbuf callback will be made directly.
V4l2 framework expects that clients recycles the
same buffers in the same indices so that when
v4l2 framework compares dmabuf it won't unmap
or map buffers.
If client recycle the buffers in different indices
still usecase works but there will be unnecessary
unmap, map overhead will be incurred.
If client does not recycle the buffers at all,
meaning every time client queues new buffers
then special handling is required for decoder
output buffers which are used for reference by
video hardware.If any buffers are used by video
hardware as reference buffers then firmware returns
those buffers with READ_ONLY flag and they are kept
in read_only list and when read_only grows beyond
some limit then driver would ask firmware to release
those READ_ONLY buffers and when firmware responds
driver would delete these READ_ONLY buffers.
Change-Id: I8a0b11c986dd0b9464895498efd8c1831a754198
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Always set COMV bufcount to FW, even if COMV buffer can be
reused. Otherwise, there may be a mismatch in COM bufcount
between host and firmware.
Change-Id: I10d54818a4478e8b0a9e9577c6c8684ad52f5de8
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
Use platform_get_irq api instead of platform_get_resource for Lanai
Change-Id: Ia06e7d5c890f6c7344b53a9f15c0b68b26bcc53e
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
Flushed out buffers by driver retain filled length field same
as it was while queued to driver. This is incorrect as it
gives an impression to the client that some data has been
written by driver/firmware. Hence, reset this to 0 while
dequeuing to fix the issue.
Change-Id: Ia2bb86a3462255991d45a1f77cab39a4a0eafd23
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Introduce SUPPORTS_REQUESTS cap to have different caps support
for upstream and downstream driver.
Change-Id: Ib8bae21ba3fa6d65236954e0728fa30e20d7b375
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Update definition of slice delivery control in v4l2_vidc_extensions.h
to make it a boolean control instead of menu control and use it
accordingly.
Change-Id: I8ad5f5b7088bc01b78560cb40eae7c7d677ce7ce
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Earlier Kernel Version were using struct dma_buf_map
and latest Kernel using struct iosys_map and
MODULE_IMPORT_NS(DMA_BUF) to import dma buf namespace
Change-Id: Ida6535fb2e3426b10264efe01e3a343fd3a1e127
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
Introduce DEVICE_CAPS capability to have different caps support
for upstream and downstream driver.
Change-Id: Ife73ab8c3b6ef9b47ef844883d9fa18e469d9188
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Add support for standard compressed formats in upstream.
remove usage of not supported codecs HEIC and AV1 from
upstream database file.
Change-Id: I11b29990f439dc2b43d5dcdb70a4e7d47bbf3970
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Introduce CAP_FLAG_META flag to differentiate metadata caps
from non metadata caps.
Change-Id: I7a3d2c5fb952e5d829002a04d11fa7b05b2c9297
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Move __lut, __compression_ratio and __dump functions
form venus_hfi.c to msm_vidc_power.c where they belongs.
Change-Id: Iafabf1c61a9602ea9b2c067663e46e12b88266b8
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
The file msm_vidc_bus.h is not used, delete it.
Change-Id: I21503a1cfb35bf6e93fe92a5c6a9286d29135e12
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>