نمودار کامیت

237 کامیت‌ها

مولف SHA1 پیام تاریخ
Chinmay Sawarkar
ed46ad9aec video: driver: Add new hfi buffer flags
New hfi buffer flags to send memory region information to firmware.

Change-Id: I3a320622d0ed01a5e583dbeceb2648a57f618a66
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2023-02-23 12:01:25 -08:00
qctecmdr
f0b5f5dd65 Merge "video: driver: disable 5 LTR support" 2023-02-11 12:13:30 -08:00
Darshana Patil
ed80204a9e video: driver: add support to configure colorinfo via control
- introduce control to set colorspace. client will use this
  to set private color info.

Change-Id: I0099ef1525f4562d3be3a6e518d046fe5b9ef894
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-02-06 13:09:17 -08:00
Akshata Sahukar
654e6bb55d video: driver: Add support to allow 5 LTR count
Add support to allow 5 LTR count as per new
requirement.

Change-Id: Ic839ea61ae8dfe21bd8891f0f0dbaf26506d84ec
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-01-30 13:08:35 -08:00
Govindaraj Rajagopal
7c365bdb94 video: driver: restructure video state machine
Re-structure video driver statemachine to use
event handler. Added event handler support for
event states.

Added change to handle event depending on the
underlying state implementation.

Change-Id: Ib55c12c6cadc4d780797a5aee75d5ea61e95c94f
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-01-27 16:31:23 +05:30
Darshana Patil
68df0645ec video: driver: add support to send aon region via HFI_MMAP_ADDR
- add support to intialise device region by reading data from
  platform to resources.
- add support for iommu_map and iommu_unmap apis.
- allocate a 4K page and send this address through
  HFI_MMAP_ADDR register.
- map AON region, send virtual address and size as payload.

Change-Id: I5aa26593309a220c5de62836e432c1bd5a63ba1d
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-20 10:49:32 -08:00
qctecmdr
db62f9374a Merge "video: driver: Modify buffer_stats logic" 2023-01-18 13:36:08 -08:00
Darshana Patil
ea34534af0 video: driver: update copyright markings to 2023
update copyright markings to 2023 in all files.

Change-Id: I6842d56c4a8fff6a7a93d0c1d4bc049041297b02
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-13 14:58:17 -08:00
qctecmdr
4f297753f7 Merge "video: driver: implement memory_ops for upstream" 2022-12-27 10:58:45 -08:00
Dikshita Agarwal
d7e518a85c video: driver: implement memory_ops for upstream
- Implement upstream specific memory_alloc/map and
  memory_unmap/free API based on standard dma_alloc_attr()
  and dma_free_attr() APIs which allocates and map dma buffer.
- Combine alloc and map, unmap and free.

Change-Id: Ie85914beb72c3976febdc9e6a11c9199f2ea4192
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-12-15 11:23:20 +05:30
Govindaraj Rajagopal
c4982fbf1a video: driver: refine core state machine
introduced core error state and added changes
to refine core state machine.

Change-Id: Ib3b94fd3798e902b7a6cfc5de45820558c89806e
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-12-15 07:59:45 +05:30
Vedang Nagar
b3f107df87 video: driver: Modify buffer_stats logic
For super buffer usecase, All the ETB's gets queued with updated
timestamp in hfi_buffer, therefore all the fbd's being recieved
are of different timestamp. And only the last EBD is considered
for dequeued flag and hence for remove_buffer_stat.

Therefore when first FBD arrives which has the matched TS to
the stat's TS will get skipped since last EBD in the batch has
not arrived yet and rest all FBDs are with updated TS, hence
the buffer stat doesn't get's removed from the list.

Modified the logic to add stats during hfi_buffer queue and
add stats for all sub-frames in super buffer usecase.
Modified the logic for Multi-In single-Out usecase as well.

Change-Id: I0643e6f64bdfc3cbfa67baeb1cf9157de92ce569
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2022-12-14 23:10:54 +05:30
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
Ankush Mitra
2c39d5b91b video: driver: prepare dependency list without parent
Prepare dependency list only using children.

Change-Id: Id79487825fed1f121821126589594b64820c85d3
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-12-13 18:50:13 +05:30
Govindaraj Rajagopal
9b0140cf03 video: driver: add core sub_state support
Introduce core->sub_state similar to inst->sub_state.

[1] pm_suspended - moved to this substate in case of PM suspend
[2] handoff - moved to this state after successful
    handoff_regulator call.
[3] fw_power_control - moved to this state in case of IFPC.
[4] power_enable - will track core power_on/power_off status.
[5] page_fault - used to rate_limit fault logs.
[6] cpu_wd - indicates hw fired wd interrupt.
[7] video_unresponsive - moved to this state if sync cmd fails.

Change-Id: Iceb65cf404fd93aff7846860b0276307e4eab570
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-11-23 10:53:11 +05:30
Govindaraj Rajagopal
2eda86592a video: driver: use macros to prepare enums & string arrays
video driver is maintaining multiple tables based on enum
name pair. So this mapping might go wrong if new entry is
inserted in different position.

So added logic to prepare enums & static const char* arrays
using macros. So compiler will take care of creation and
maintaining order.

Change-Id: Id3669cf3ce150b3ababb84dce18326220f41d88d
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-11-17 21:35:27 +05:30
Ankush Mitra
c1bb733a6b video: driver: Remove unused capabilities
Cleanup of unused capabilities from
platform caps list.

Change-Id: I98f4beb96f41d2b8a3b4342f7d453a6abc046e55
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-07 21:08:52 +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
Darshana Patil
3362c70642 video: driver: remove skip delayed unmap functionality
Change-Id: Ibc3e8d565010aa5ac608aa648c533057c51f4bf4
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-10-20 12:08:03 -07:00
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
Darshana Patil
1ef323df29 video: driver: buffer flow changes
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>
2022-09-26 17:24:30 -07:00
Akshata Sahukar
85d79a7a23 video: driver: remove input meta via request support
remove input meta via request support

Change-Id: If2a504455e1899c4cefb2a9142f7a92db02a45f2
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-09-20 11:07:39 -07:00
qctecmdr
b48e799508 Merge "video: driver: Introduce SUPPORTS_REQUESTS cap" 2022-09-16 10:47:04 -07:00
Akshata Sahukar
b1dfbad4a4 video: driver: Introduce SUPPORTS_REQUESTS cap
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>
2022-09-13 14:29:18 -07:00
Ashish Patil
03606a7c77 video-driver: dma_buf_vmap() usage changes
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>
2022-09-09 15:52:12 -07:00
qctecmdr
e072a88b28 Merge "video: driver: Introduce CAP_FLAG_META flag for metadata caps" 2022-09-08 18:36:14 -07:00
Akshata Sahukar
6b5c62db0c video: driver: Introduce DEVICE_CAPS cap in core database
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>
2022-09-08 16:02:13 -07:00
Akshata Sahukar
f37cc5fe6c video: driver: Introduce CAP_FLAG_META flag for metadata caps
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>
2022-09-06 13:42:20 -07:00
Stanimir Varbanov
1020319ca4 video-driver: Move HFI queue functions out of venus_hfi
Split HFI queue functions in separate file. This will
unload venus_hfi and also will make possible to reuse/shared
with other drivers.

Change-Id: I16155e649f216afc6f26db76b565aad28b114cc7
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-25 14:04:51 -07:00
qctecmdr
e77d578972 Merge "video: driver: fix encoder output buffer size requirement" 2022-08-23 21:07:43 -07:00
Darshana Patil
c4beadb5d2 video: driver: fixes for upstream/downstream driver compilation
- do not use vidc_v4l2_extensions.h for upstream driver compilation.
- resolve compilation issues in upstream and downstream driver due
  to above change.
- add volatile flag in the database.

Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Change-Id: I1985cae29a459af2250f7044d85c5cd22cdd68f7
2022-08-22 16:51:31 -07:00
Akshata Sahukar
ec161663ce video: driver: fix hevc codec layer count support
Support only 4 total layers for hevc non vbr rc type session
as per PRD.

Change-Id: Ifc425de75804552717919e6be71788dd59fb086b
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-08-22 15:53:08 -07:00
qctecmdr
1ee1d9c8e5 Merge "video: driver: define slice delivery as boolean control." 2022-08-03 10:39:31 -07:00
Govindaraj Rajagopal
473e46f0cc video: driver: add buffer statistics logic
Added change to print etb, ebd, ftb, fbd,
(ebd-etb), (fbd - etb), (etb-ftb) wallclock
time in ms.

It will help to debug perf issues.

Change-Id: Ideaecb2d51763711d6628729aa0f9056d05f0d51
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-08-01 17:55:39 -07:00
Gaviraju Doddabettahalli Bettegowda
9789b56a49 video: driver: add change to support slice mode decode
Added new capabilty changes to support slice based decoding.

This feature basically enables to decode the given input in terms of
slices and deliver single output to the higher layers when all slices
decoded in a frame.
When HW receives the slices then it will start decoding the slices,
instead of waiting for all the slices belongs to same frame.
So this will help to achieve lower decode latency.

Change-Id: Id107b34baba6d7b4a88238e232e8bf4a0fd6e58e
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
2022-08-01 17:53:54 -07:00
Manikanta Kanamarlapudi
2e52eecb78 video: driver: add vui timing info control
Add vui timing info control with default
value as disabled in driver.

Change-Id: Ibaa45303fe389a0120d487fe3b6ff336e721f359
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2022-08-01 17:21:57 -07:00
Akshata Sahukar
50a00f8265 video: driver: Avoid device crash after fence usecase execution
Since spin lock for fence is per session based and stored in instance
memory, by the time fence consumer released the fence, driver close
might be called and instance memory might be cleared. So, when fence
consumer released the fence, at the time of fence release callback,
this spin lock might nt be available. This race condition is resulting
into device crash after fence playback session ends. Avoid this by
using per fence based spin lock, which decouples it from instance
memory.

Change-Id: I12d6976c0bac3f0211bb16e24009603b37471ef3
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-08-01 17:19:38 -07:00
Mihir Ganu
1e87ceec2b video: driver: Introduce a property to set COMV bufcount
Certain codecs/use cases require larger COMV buffer sizes to achieve
performance. Introduce a property to set COMV bufcount and calculate
COMV buffer size based on the bufcount.

Change-Id: Ib0ed8afe77708dc453cbcc121bcd8606db637152
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:19:20 -07:00
Dikshita Agarwal
7d1fbd07cf video: driver: redefine private v4l2 macros in common file
Define vidc macros corresponding to private v4l2 macros
defined in v4l2_vidc_extensions.h file in msm_vidc_internal.h
and use the same wherever applicable for successful
compilation of upstream driver.

Change-Id: I2c7b3741d29996beb35b08b9c6dbd88876bb6ca6
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-01 17:59:08 +05:30
Dikshita Agarwal
704a316370 video: driver: replace V4L2_MPEG_MSM_VIDC_DISABLE/ENABLE
Replace V4L2_MPEG_MSM_VIDC_DISABLE/ENABLE macros with
0 & 1 to comply with v4l2 standard.

Change-Id: I5f27bfb8416b5be8caee29fb487916ccba020116
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-01 16:00:39 +05:30
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
Darshana Patil
10794c2968 video: driver: initial state machine changes
- hierarchical state model which comprises of
  top level states and sub states
- top level states include OPEN, CLOSE, ERROR,
  INPUT_STREAMING, OUTPUT_STREAMING, STREAMING.
- sub states include DRAIN, DRC, DRAIN_LAST_BUFFER,
  DRC_LAST_BUFFER, INPUT_PAUSE, OUTPUT_PAUSE.
- follows deterministic approach for key sequences
  like DRC, DRAIN and last flag handling i.e none
  of these events are ignored or discarded.
- removal of auto start of firmware input port as
  part of ipsc handling.
- introduction of hfi commands for host controlled
  PAUSE and RESUME of firmware ports.
- introduction of information last flag packets
  for DRC and DRAIN when FW has insufficient
  output buffers.

Change-Id: Ie8c8f44af464d06f5a7bb76822f749c9874f869a
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-06-29 10:47:54 -07:00
qctecmdr
c7360bccc3 Merge "video: driver: Modify Min QP in CAP_TO_8BIT_QP macro" 2022-06-26 01:20:54 -07:00
qctecmdr
be6dd00dcf Merge "video: driver: buffer tracing changes" 2022-06-23 17:00:03 -07:00
Vedang Nagar
2eacac6058 video: driver: Modify Min QP in CAP_TO_8BIT_QP macro
For HEVC 8 bit usecase, QP values are being capped
from [-11,51] to [1,51]. Modifying the same in
CAP_TO_8BIT_QP macro.

Change-Id: Id17fab4c62770140131f0f8454fc480090732d0b
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2022-06-24 00:38:18 +05:30
Govindaraj Rajagopal
cd4ea5b043 video: driver: fix possible memory corruption issue
__flush_debug_queue() currently uses core->response_packet
or core->packet for flushing debug queue. So these were
allocated only 4096 bytes, but in read_queue(), boundaries
were checked against VIDC_IFACEQ_VAR_HUGE_PKT_SIZE macro
which is of size 1024 * 12 bytes.

So if FW log packet size is in between 4 KB to 12 KB then
read_queue() allows memcpy() into core->response_packet
or core->packet that will lead to redzone corruption issue
with adjacent alive/valid allocations i.e futher lead to
kernel panic at kfree() sequence(during object validation).

Uploaded change to use same sizes during allocation and
read_queue() validation.

Change-Id: If82766c1479d7589605386f3e314ff2ccd97f6d0
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-06-23 19:45:09 +05:30
Akshata Sahukar
1e7edf5b98 video: driver: buffer tracing changes
1. Introduce new v4l2 control to get HAL session id and
   print the same in driver to have unqiue session id
   between HAL and driver
2. Copy input buffer timestamp into input meta buffer
   to track input meta buffer done at HAL side. Required
   specially for fence use case.

Change-Id: I146b153fa0baea3b684a482de5da19e736df3736
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-06-22 16:41:08 -07:00
qctecmdr
12c5ef4768 Merge "video-driver: add to support DolbyVision metadata" 2022-06-01 23:48:24 -07:00
qctecmdr
395e8686ec Merge "video: driver: Use max bitrate depending upon session" 2022-06-01 21:40:44 -07:00
Deepa Guthyappa Madivalara
0160053f46 video: driver: Use max bitrate depending upon session
1. Host will use HQ quality mode for all INTRA encoding case
2. Cap bitarate and bit rate boost to max bitrate of current
   session config

Change-Id: I8e8d19998ebeff992c290fbd18c072b2b93ffef2
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-06-01 11:36:14 -07:00