B-frame enablement decision logic has been moved to HAL interface.
Hence, removing from kernel space.
Change-Id: I24943f7facf172f5b9f30fbc67692fd866d490cd
CRs-Fixed: 2615700
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Currently, both bitrate and frame-quality can be set for a CQ rc-mode
session. Adding additional check in driver to set only one of these.
Change-Id: I1ea7b08cf8c7fe90e35aa57f570703e8cdf854e9
CRs-Fixed: 2615700
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Set the allocated encoder persist buffer to firmware.
Change-Id: I83fdf2dace76848e4a5ad4d8f3a85c9605b56cd0
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Video driver extending few standard controls value and
hence mark those controls as custom controls.
Change-Id: I373ed21482bb577c4fc5c28fd011098963608f53
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Use correct types in callback functions to avoid kernel
control flow integrity (kCFI) warnings.
Change-Id: Ia84a3d10ebb83407b4ac2c6140daec35e0698bd5
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Check if the non-pix and pix prefetched memory is sufficient
Change-Id: I71561959a3ed1e9acdb654650144f35656230345
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>
Perform cache operations on all planes including buffer extradata
planes, since userspace may set cache flag on all planes.
Change-Id: I9cc6060ec7fb2626b4885c7df7592abae99fb955
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
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>
Get Video FW ELF image name from driver's DT entry.
Change-Id: I95320f2b1bdf9ba9e8bb6264babc33c162da60e0
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>