Secure memory allocations take a long time. Use memory prefetch and
drain operations to reduce allocation times.
Change-Id: Iaa86a97d7a8b1d6eb1683d273ddb27ffe8d891ae
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>
Calculate decoder framerate based on input buffer
timestamps and maintain a sorted order list for
timestamps and framerate in a sliding window of
size 32. Send calculated framerate to client in
every dqbuf output buffer. Use the maximum framerate
available in the list for bandwidth and clockrate
calculations.
Change-Id: I5fa357645cb806bf97ccd30ed68bd784d526e233
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
In qbuf (input) store input_tag to etb_data list and send it to
firmware in etb. Firmware will return input_tag in ftb_done,
store it in fbd_data list and return the same when client does
dqbuf (output).
Change-Id: I3589e5a3017cac49000fc64191f9f756bc4011f4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Currently, instance pointer value is used to create an instance debugfs
name. Using instance pointer causes multiple instances to have the same
debugfs name when kptr restriction is applied. Use instance sid instead
of pointer value to create a unique debugfs name during concurrencies.
Also, use %pK instead of %p in other places.
Change-Id: I098f641e9a548bcb8bf6d939422607cdc194adb3
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Updated the HFI_IRIS2_ENC_PERSIST_SIZE parameter to use double
the existing buffer size instead of calculating on
HFI_VENUS_VPPSG_MAX_REGISTERS.
Change-Id: I434e084db95082906638a4a288ed848f3bab89d3
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
Usecase like UHD encode is configured by driver in
high quality mode. But video firmware overwrites the
mode to performance mode.
Update the quality configuration to make them inline
with video firmware configuration.
Change-Id: I6f432bbf889c01d0a9b1f91bfb3d2dd2b9351b5b
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
INT_MAX is an interface provided to client to configure
video session in TURBO mode. When client configures the
operating rate as INT_MAX, the rate at which the frames
arrive at video driver does not change, so there is no
need to update the operating rate.
If the operating rate is updated, macroblocks/s for the
session goes high. As a result, the session gets rejected
as the clock is not sufficient for high mbs/s.
Change-Id: Iaa48073a486ce6435664a6afb8a4c6ddd7b7f87d
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
Updated the HFI_IRIS2_ENC_PERSIST_SIZE parameter to be allocated
by encoder ARP buffer.
Change-Id: I09fa92d1f04348266f1fae71479c9b1c077556ae
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
Buffer size calculators are dependent on pipe configuration
of the chipset. Ex: Kona has 4 pipes and lagoon has 1 pipe.
Hence aligning the buffer size calculators based on chipset
specific usage of pipes.
Change-Id: I8bb19efc4a80c7e17d9db3cf7d5f1151191b502e
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
Client should take care of buffer allocations for
advanced use cases like HFR and HEIF. Driver will
handle extra buffers only in bare minimum usecases
like DCVS and decode batching.
Change-Id: Id5ec012ba2620b47578173e8306f1700644f0b8c
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
1. is_batching_allowed api is not considering platform
check(core->resources.decode_batching).
2. increase both input & output buffers count if
current session supports batching.
Change-Id: Iabe7479b4664a78b637ee981d67c604f7d0d5d56
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
For sub-frame encode sessions, input buffer done is received only after
all sub-frames have been received. In these sub-frame encode cases,
input tags are not fetched for sub-frame outputs for first input and
buffers are dropped in HAL in absence of apt input tags. Limit buffer
counter check from input tag fetch condition for decode sessions only.
Change-Id: I8c584834369be921d8699da49cfa1fec65fb993d
CRs-Fixed: 2547055
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
buffer addr and size were not updated in "UNMAP" tracing.
So added entries.
Change-Id: I4ae5715263a3e1d21de88e4ff69baf8d74d75560
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Low power flag is updated after calling msm_print_core_status.
So it is printing "HQ" even for "LP" session. So changed api
calling sequence.
Change-Id: I1f88f3f3e1ca43f11c00359dbfaec5d2ff99ae89
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Configure CVP_VPU_WRAPPER_CORE_CLOCK_CONFIG register to unhalt AXI & VPU
core clocks but not unhalt CVP core clock. Add a function to write a
masked value to register.
Change-Id: I8cb80b1823d091ac4eb705fd207afbd35bde86de
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>
Add support for vidioc_querymenu for userspace to
query menu type controls.
Change-Id: Idffb7e978e7f6eba9bf2744bcf87bafcd919decf
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Currently max_packets is configured as 1000, but max outstanding
packets will not exceed more than 480(16 clients x 30 pkts/client).
Change-Id: I8c074e08c959473c20450bc7d62486362ba81b47
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Scaling check is not required for decoder as clients may not
set both input and output resolutions for decoder
in which case input and output resolution will be different
and scaling check fails if enabled.
Change-Id: Iccdbad63bd8f975df4f57cad0250557119cf788d
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
During subsystem failure, the cause for failure is updated
in a specific video buffer by the video firmware. Video
firmware can even update the size of that specific buffer.
To ensure the validity of that buffer access, check if
the access is within the allocated size.
CRs-Fixed: 2585811
Change-Id: I30b8bf2e9ba3699d229f4acc104f46566fcb60fa
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Based on the ddr rank info, sku version is set.
Change-Id: I1823585553bad65462e047a5bebc6d93716c7703
Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Update clock cycles of vsp and vpp
required for per MB in bengal target.
CRs-Fixed: 2558188
Change-Id: Ifa39458123dfe2b687b0865e119e23aaf5613713
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Exclude 4 bytes which holds the size of the buffer while calculating
the actual buffer size to avoid OOB write.
Change-Id: I965e78097a3680065aaf7609d35af1a42fc44824
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
possibility of OOB access on device->response_pkt in
__response_handler. for e.x if msg queue contains 1000
messages and all 1000 were read and queue is empty.
So __get_q_size api will return zero and _iface_msgq_read
will go in an infinite loop, even if packet_count
== max_packets.
Change-Id: I3c0fb095feff0ba5d4d6dab65ed9d5111f1b6f05
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Add definition for decide_core_and_power_mode
to fix the core id issue. Wrong core id
results in incorrect clock values.
CRs-Fixed: 2572953
Change-Id: I2219df71f555fb34a69146821997bab5fa8971a9
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Update core ops to invoke calc_bw_ar50lt API to
calculate bus bw requirement for ar50lt.
Change-Id: I1c8e1766d9aa2f8ad44498587b171c2827759ddb
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
VPx cycle requirement is not same as CABAC.
Hence update required as per system recommendation.
CRs-Fixed: 2560714
Change-Id: If600bc9c4abb364dba5f807c944976be992567c9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
The commit adds the following
1 Keep DMA mask aligned with api definition.
2 Replace the various division operations with 32 bit compatible modules.
Change-Id: I7bc931ffd124ef2b0be8d2bec44fbebf29d4cfb3
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Fix to set 7 instead of 1 to firmware to
enable all custom bias, matrix and limit.
Change-Id: Idd8bf0f6036ef2919855f379fffa51d5339eba1d
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Set operating rate to 1 by force for HEIC, so as
to avoid overloads.
Change-Id: If3f980e096c7e30368b9c6a280e78bbe1625e87a
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Driver is not polling for the PC Ready to be
set and truning of the regulators/clocks. Fix the
same.
H2X Interrupt has to be enabled for every boot.
CRs-Fixed: 2572953
Change-Id: Ib24b35dcebedf464bcd461718a18e732531ea4ce
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Fix to use correct CSC coefficients for
BT601 to BT709 CSC.
Change-Id: I8365603fed10151db0efbea0058bb896c419c3f4
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Fix to use output port resolution to determine
vbv delay.
Change-Id: Id6dc80f1349d0f5b10be2fa6343fb98816156f58
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
10 bit support is available only for hevc codec type.
So increase encoder output buffer size(factor - 1.25)
only for hevc.
Change-Id: I49f6bccc074814d8c737f47fd82907a018ac169a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>