提交線圖

86 次程式碼提交

作者 SHA1 備註 日期
Ankush Mitra
7d25fa161b video: driver: changing "foo* bar" to "foo *bar"
This change will resolve this
checker err from all directory.

Change-Id: I7b7b3af554c97fef9d81210fdf8984d2a53facbc
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-31 19:47:02 +05:30
Vedang Nagar
b4a1aefdd1 msm: vidc: Fix race condition between s_fmt & query_ctrl
- In s_fmt, there might be a codec change and here we are
  free the ctrl handler, at the same time client may call
  query ctrl and this will lead to null pointer access.
- To resolve null pointer access, do not free ctrl handler
  and add new codec controls to the same ctrl handler.

Change-Id: Iee87d5cb4d65e31d405cb1fc9f82bebab696d027
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-04-28 17:27:27 +05:30
Darshana Patil
3e0952dacc video: driver: fix release issue for superbuffer
In VP9 superframe usecase one ETB has multiple FBDs,
and the EBD is after the first FBD.When driver receives
first FBD that is not in DPB_LIST, it releases this buffer.
Later on when the EBD arrives with dpb list property and
it turns out that first FBD for which release was sent is
actually in DPB_LIST, causing FW assertion.

To fix this issue, in the reverse path, when handling
dpb list property, mark those read only buffers which
are not in dpb list as release eligible. Later, in the
qbuf path for output buffers, send release for all those
buffers which were earlier marked as release eligible.

Change-Id: I5d6035b808653478311f41ebe53f60e728c7dd2a
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-04-24 14:06:35 -07:00
Ankush Mitra
e450d8eaa3 video: driver: remove capability pointer
Remove capability pointer and allocate
memory with max cap size.

Change-Id: I7f53e3b35439f91b72f057695b6e63f71bfecc0a
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-05 11:58:48 +05:30
Darshana Patil
7affdd1031 video: driver: adjust properties during reqbufs
- Adjust v4l2 properties during reqbufs of
  master port. Set properties to firmware
  during streamon of master port.
- Calculate buffer size and buffer counts
  during reqbufs call of each port.
- This is done to recalculate buffer sizes
  and counts after client has configured
  all the controls and updated size and
  count can be returned to client before
  streamon.

Change-Id: Ifc7ee36456d5d4e1c862952de581af3d7ae126b0
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-04-03 10:09:31 -07:00
Akshata Sahukar
9a5fea8ef3 video: driver: Add support to enable enc ring buffer
Add support to enable ring buffer for enc intermediate
bin buffer to improve encoding performance.

Change-Id: Ifbf50cb48278c62c09a20bc7626a3b6288813830
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-07 17:14:30 -08:00
Govindaraj Rajagopal
db80783d41 video: driver: handle uninitialized variables in open
In msm_vidc_open() create_singlethread_workqueue() is failing,
so msm_vidc_close() is called and i.e attempting to de-initialize
some uninitialized structures and resulting into stability issues.

So handle msm_vidc_open() failure with in same api, instead of
calling msm_vidc_close() and re-organize deinit sequence.

Change-Id: I843cf07eaf18f4ea764842fd1c87b78d115580d3
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-03-03 16:47:01 +05:30
Govindaraj Rajagopal
c175e36454 video: driver: state handling code movement
state handling changes were spread across multiple files.
So re-arrange all state related handling changes into
msm_vidc_state.h/.c file.

Change-Id: I3826daa678d1e2b5ce7e74380d465e70b1b824c6
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-01-30 10:57:22 +05:30
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
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
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
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
b35fde25c4 Video Driver: fix frame freeze for HEVC 10bit all intra decoding
1. Allow turbo for HEVC 10bit all intra decoding;
2. Add 25 percent extra to VSP cycle for HEVC
   10bit all intra decoding;

Change-Id: I794b2a896f7e9444c8979abdb15b8e673a5270ee
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2022-11-07 09:01:17 -08:00
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
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
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
Darshana Patil
2a687b2750 video: driver: introduce client lock
Acquire client lock for every entry point
in driver. This is needed especially for
streamoff and close calls where inst lock
is released while driver is waiting for
stop_done and close_done responses from fw.
When inst lock is released, client can send
a new ioctl call and driver state machine
can get updated leading to unexpected behaviour.

Change-Id: Ibb62c3431c88e2f1d9088d54fe7c9e53b1c284fd
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-05-26 14:34:36 -07:00
Deepa Guthyappa Madivalara
59b8019b9d video: driver: amend priorities to allow more sessions
1. adjust client set non-realtime priroty with NRT_PRIORITY_OFFSET (2)
2. if total mbps is more than max_mbps
    a. allow encode session by reducing decoder sessions priority by 1
    b. allow decode session by moving it to non-realtime session
        in order to not disturb the ongoing sessions

Change-Id: I96fd2ac75c123d681982fb9a2c06ac51d15bd59a
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-04-22 11:55:29 -07:00
Deepa Guthyappa Madivalara
fdef18ef50 video driver: remove session priority handling
1. Removes depenceny of priority from frame rate
    and operating rate.
2. Removes changing priority from s_param

Change-Id: Iec51173eab5a3d59b841315549d1420df422d37f
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-04-06 09:22:38 -07:00
Dikshita Agarwal
8f0e12cc93 video: driver: add support for cyclic intra refresh
Currently driver supports only random intra refresh, extend
it to support cyclic intra refresh too.
Cyclic intra refresh is supported dynamically as well.
- If intra refresh type is set and num of LCU’s to be refreshed
  are non-zero before session start, intra refresh will be enabled
  throughout the session.
  Any further dynamic settings in the number of LCU’s including 0
  will be honored accordingly.
- If intra refresh type is set and num of LCU’s to be refreshed are zero
  before session start, intra refresh will be disabled.
  When client sets it to non-zero value dynamically, driver will set
  HFI_PROP_REQUEST_SYNC_FRAME with
  HFI_SYNC_FRAME_REQUEST_WITH_PREFIX_SEQ_HDR.
  Driver needs to send HFI_PROP_REQUEST_SYNC_FRAME only at time of
  CIR Enable, no need to send at time of disable/enable again.

Change-Id: I10a2fb22d131353721ee658213ed807ce0794009
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-04-01 11:08:19 +05:30
Deepa Guthyappa Madivalara
ab684e15f6 video driver: calculate power based on max rate
1. Remove load based admission control for decoder.
2. For decoder, use max of frame rate, operating rate,
    timestamp rate and input rate for power calculations.
3. For encoder, use max of frame rate and operating rate
    for power calculations.

Change-Id: Ibdb2d4b29438d7f656a27771953d10e0a0e72edd
2022-03-30 13:03:24 -07:00
qctecmdr
2e1a127d25 Merge "video driver: calculate power based on input queuing rate" 2022-03-22 19:08:47 -07:00
Deepa Guthyappa Madivalara
dc38176276 video driver: calculate power based on input queuing rate
Use client input buffer queuing rate for power
calculations for non-realtime sessions

Change-Id: I498422ba1ae9ae96b782a2096dc0cd0aa7b05798
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-03-22 14:21:35 -07:00
Mihir Ganu
96358cee7d video: driver: Add support for AV1D IBC feature
Add support for AV1D Intra-Block Copy (IBC) feature. This requires a
dedicated internal buffer (HFI_BUFFER_IBC_AV1D), which was previously
part of LINE buffer. A new internal buffer type called
HFI_BUFFER_PARTIAL_DATA is introduced, and this buffer type holds
HFI_BUFFER_IBC_AV1D for AV1D. HFI_BUFFER_PARTIAL_DATA is mapped to
NON_SECURE_PIXEL context bank for non-secure and to SECURE_PIXEL
context bank for secure use case.

Change-Id: If7ae22495f9981f275d54acc342c25ccdfc0c7b9
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-03-16 16:48:08 -07:00
Akshata Sahukar
f9a844d745 video: driver: fix in header details
fix in header comment details.

Change-Id: I698b1ee9076a908a2b8f7b9c588c733567f9d8c9
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-23 18:08:48 -08:00
Govindaraj Rajagopal
93b88b9d69 video: driver: re-organize enums and add comments
Re-organized enums(msm_vidc_inst_capability_type) in below
order.

[1] Root(no parents) enums,
[2] Intermittent(having both parents & children) enums,
[3] Leaf(no children) enums.

Also added proper comments in header file.

Change-Id: I2bda51b54b6fa6e190098f16dd60090004cfbecf
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-17 10:33:11 -08:00
Akshata Sahukar
0a5549a6a9 video: driver: decouple fence structure from video buffer
Decouple fence structure from video buffer. Also add some
misc fence flow setup support.

Change-Id: Ia4e223a3a288f0dae3238850685f3a73d4b9400a
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-14 09:46:11 -08:00
qctecmdr
fe6594bcce Merge "video: driver: add support to send input meta buffer via request" 2022-02-07 20:52:22 -08:00
Darshana Patil
7c4952934b video: driver: packetize dynamic controls with buffer
packetize dynamic controls set via request api along
with corresponding input buffer under the same hfi header
and queue to FW.

Change-Id: I8bf82f7ccb1ab16c42ce02189a208f5f7cb8dc70
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-02-03 15:08:02 -08:00
qctecmdr
dc71b3eaf1 Merge "video: driver: misc video changes" 2022-02-03 14:48:53 -08:00
Maheshwar Ajja
ef829ce44f video: driver: add fence support
Add fence support for decoder output buffers for
the consumer to use it to improve latency.

Change-Id: I7384b4a9793248988a2d2d546a535f26636d5bb3
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-02-02 21:43:52 -08:00
Govindaraj Rajagopal
0ba80e3956 video: driver: misc video changes
[1] Remove CAP_FLAG_ROOT flag. Root willbe identified
    with has_parents() api.
[2] Replace field(struct msm_vidc_inst_cap) cap -> cap_id.
[3] Rename below pool apis.
    msm_memory_alloc    -> msm_memory_pool_alloc
	msm_memory_free     -> msm_memory_pool_free
[4] Remove struct msm_vidc_inst_cap_entry usage in inst.
	inst->firmware.list -> inst->firmware_list
	inst->children.list -> inst->children_list
[5] Organize msm_vidc_inst_capability_type enums in such
    a way that all parents placed first then children. It
	will save CPU cycles while preparing caps_list.

Change-Id: I376f4e6ddec37ce326c393fba133e19ba70bab09
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-03 09:58:19 +05:30
Govindaraj Rajagopal
d9debeed9e video-driver: prepare conflict free dependency list
Convert multi-parent, multi-child based dependency tree
into flattened list. It is organized in such a way that
all parents willbe present before self or any child node.

For some caps, adjust sequence is called without preparing
parent nodes. So that is leading to undefined behaviour.

Added change to address these problems.

Change-Id: Ib28cae8a4ed7e019c80ecfc06519ef78ffa4dc08
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-02 14:59:48 +05:30
Darshana Patil
acc83ca211 video: driver: request api changes for dynamic controls
- Request api allows to synchronize controls along
  with buffers.
- Client allocates a request fd. This request fd is
  associated with control and set using s_ext_ctrls.
  Such controls are stored by the framework and not
  applied immediately.
- Request fd is also associated with input qbuf and
  queued to driver. Following this actual request is
  queued. Buffers do not enter the queue untill the
  request is queued.
- As part of qbuf, driver call request_setup() which
  inturn sets the control to driver.

Change-Id: I316c4dc2a0091b21059230be5ee5fd6379259456
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-01-27 15:02:27 -08:00
Govindaraj Rajagopal
1e55de3d4a video: driver: add support for timestamp reorder
Added support for timestamp reorder. It is default
disabled.

Change-Id: I51a6fc785860081b651fc67f443132cb2675b9fd
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-01-13 17:29:22 +05:30
Govindaraj Rajagopal
60c04ed08d video: driver: enable session stability testing
Enable session stability test support.

Clients can trigger session stability through debugfs as follows:
echo <trigger_val> > /d/msm_vidc/core/trigger_stability
u64 trigger_val provides:
    <payload><sub_client_id><stability_type>
    stability_type : 0-3 bits(one of the HFI_STABILITY_TYPE_*)
    sub_client_id  : 4-7 bits(1 - CCE, 2 - VSP, 3 - VPP, 4 - CPUSS)
    reserved       : 8-31 bits(Not used)
    payload        : 32-63 bits(depends on stability_type)

For e.x, to VCODEC_HUNG on CCE hardware module for 5 consequtive frames.
adb shell "echo 0x500000011 > /d/msm_vidc/core/trigger_stability".

Change-Id: I604f0430e3ab905504c4f0b7c84b157a5d464958
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-01-13 17:29:22 +05:30
Govindaraj Rajagopal
5c297b7d26 video: driver: print buffer statistics once at every sec
- Added change to print buffer statistics like total and avg
etb, ebd, ftb, fbd counts, client set fps, actual fps,
bitrate values in 1 sec window and these stats currently
configured to print at every 1sec boundary.
- Convert meta buffer prints to low level logs.

Change-Id: I1c93eea90fbd5460eb51bbf133c513157003d51e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-07-22 19:13:19 +05:30
Darshana Patil
c80c5b8bbb video: driver: update cycle count requirement of B frames
Decoder base cycle requirement of B frames has increased to 80.
Also, updated cycle count requirement for Encoder HIER B usecase.

Pulled from CL: 3302650.

Change-Id: I0f56166b7261e161630feeb8793473491dacccd7
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-06-29 13:51:26 -07:00
Govindaraj Rajagopal
7f0c2442c5 video: driver: track dma buffer leak
Track dmabuf refcount during dma_buf_get() and dma_buf_put().
So if any dmabuf present with non-zero refcount during close,
then i.e a dmabuf leak. So during session close print error
and call dma_buf_put_refcount_completely() api to recursively
reduce the count to zero and will call dma_buf_put() to avoid
dmabuf leak from video driver side.

Change-Id: I2028c18ca067977eac3cdf0ce7d6cc4200739408
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-06-24 17:15:30 +05:30
qctecmdr
0df7a874b9 Merge "video: driver: Add support for enc auto framerate" 2021-06-18 10:32:00 -07:00
Priyanka Gujjula
e61b55879b video: driver: Add support for enc auto framerate
1. Calculate framerate based on buffer timestamp
2. If framerate changed and stable for 2 frames,
   update it to firmware and in driver internally.

Change-Id: I7feda86dec8fcfc1dff6defac8c15a97c1b8393e
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2021-06-17 22:54:34 +05:30
Govindaraj Rajagopal
3e4248dfb0 video: driver: optimize buffer pool implementation
- Maintain free & busy pool to track buffers separately
- track double-free cases during msm_memory_free()
- track memory leak, by checking busy pool buffer count.
  it is expected to be zero at the end of a session.
- maintain common api's to init, alloc, free, destroy
  for all below buffer types.
    - struct msm_vidc_buffer
    - struct msm_vidc_alloc
    - struct msm_vidc_map
    - struct msm_vidc_timestamp.

Change-Id: Ib8655047c3883ea6601344661058d7a629ffd5bd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-06-17 17:22:06 +05:30
Vikash Garodia
e923948da6 msm: vidc: Fix priority level determination
Priority level was not determined at few sequences.
Determine the priority level and set to firmware, if
there is a change in driver and firmware priority.

Change-Id: I97861fd4ce8cfb7cf828a8da9a5ce8ba900280ef
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-06-04 21:04:58 +05:30
Govindaraj Rajagopal
7cf3193b10 video: driver: check for session_error at ioctl entry point
Currently session_error check is scattered at multiple places,
So check for session error at ioctl entry point itself(for set
type controls only).

Cleanup &inst->response_works.list as part of session close to
avoid leaks and remove unused variables from inst struct.

Change-Id: I349ec845cc71814b33a94ac07c7628304ddae564
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-06-03 15:08:31 +05:30
Darshana Patil
e5ec6843e8 video: driver: modify max mapped output count
adjust MAX_MAP_OUTPUT_COUNT based on resolution
to enhance performance and reduce memory pressure.
- For 8K session: count = 20
- For 4K session: count = 32
- For 1080p session: count = 48
- For all remaining sessions: count = 64

reduce MAX_DPB_COUNT to 32.
reduce DEFAULT_MAX_HOST_BUF_COUNT to 64.

Change-Id: I0e6d25121947524b843e9cce96b75871aba174af
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-05-24 16:58:19 -07:00
Govindaraj Rajagopal
003d8a79fa msm: vidc: Add support of timestamps based frame rate
Add timestamp based frame rate detection.

Change-Id: Id0c522e01769ea6cf214c7b84c11faae6049e2ef
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-12 21:50:05 +05:30
Darshana Patil
23605ffffb video: driver: handle dpb list property
- subscribe for dpb list property in combined
 mode on output port.
- copy dpb list property payload from fw to
 static array.
- using this array, mark read_only list buffers
 as non-reference if not part of array. if count
 of such buffers is greater than output min count,
 send to fw for release.
- once fw returns them, destroy these buffers.
- unmap stale output mappings due to lazy unmap feature.
- unify release internal functions into common function.

Change-Id: Id32f04efb19eecaff453cc4383ee8296a0246263
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-04-09 18:21:34 -07:00
Govindaraj Rajagopal
a13f0e1416 video: driver: enable buffer pool for mostly used structures
Enabled recycling for below structure types.

- struct msm_vidc_buffer
- struct msm_vidc_alloc
- struct msm_vidc_map.

Change-Id: I062abef85db24385745119b821f87e5b72a4e835
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-05 19:04:55 +05:30
Darshana Patil
19cdce1711 video: driver: skip lazy unmap for dec output buffers
- add support to skip lazy unmapping for decoder
  output buffers only. Map twice for these buffers.
- v4l2 client owned RO SMMU mapped buffers are
  maintained separately in read_only list.
- For FBD with RO flag from fw, add buffer to read_only
  list. Else remove from this list.
- During FTB, if buffer present in read_only list,
  add RO flag to hfi buffer and queue to fw.
- During streamoff output, unmap all buffers except
  those present in read_only list.
- During close, unmap completely and clean up read_only
  list, output list.

Change-Id: Iacee7d298dfbff0b9cb6f17dff27ad98574b489b
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-04-01 12:03:21 -07:00
Maheshwar Ajja
e1af4fd098 video: driver: access buffers list under lock only
Do not access buffers list of an instance without
acquiring its instance lock in msm_vidc_set_clocks()
and msm_vidc_set_buses().

Change-Id: Ic7e8e15eaddca3b77bd4eccc6b728de20d3bcc78
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-03-30 16:44:03 -07:00