Графік комітів

11 Коміти

Автор SHA1 Повідомлення Дата
Deepa Guthyappa Madivalara
13d203ba7f video: driver: Use vzalloc instead of kzalloc
kzalloc might fail to allocate physically contiguous
memory which may not be available always and hence use
vzalloc to allocate virtually contiguous memory

Change-Id: I8ad89ef107da301217f3d1ec307b9b27b4edd2de
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-05-26 15:25:26 -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
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
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
1d8d7ac788 video: driver: optimize buffer pool design
Added change to avoid unnecessary list iteration during
msm_memory_free also added logic to catch double free
request.

Change-Id: Ie3fb8019fd039e95ea75ba8f3fbd266af515e5cd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-06-25 10:04:13 +05:30
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
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
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
Darshana Patil
481a6117d8 video: driver: update license year
update license year to 2020-2021

Change-Id: I5a67bf49c386e86337bc7449ded08d186fc9a280
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-03-01 18:07:35 -08:00
Maheshwar Ajja
6f107f7e35 techpack: video: add video driver
Add initial video driver files.

Change-Id: Icd48bbf31e435cf36f149d6c3267cf3a4d7913b3
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2020-09-24 23:56:26 -07:00