video: driver: amend delayed unmap feature

Due to delayed unmap feature on decoder output buffers,
refcount will become one when no one uses the buffer
in driver. In release done functonality, remove the
buffer from maps list only if refcount equal to one.
If refcount is more than one indicates the buffer is
being used, so do not remove from maps list. There are
chances that same decoder output buffer might be queued
by the client in which case we are not supposed to
unmap it from maps list in release done.

Change-Id: I69250c3efa89d77055e89770fd441af1fb50b755
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Tento commit je obsažen v:
Maheshwar Ajja
2021-04-19 18:03:32 -07:00
odevzdal Gerrit - the friendly Code Review server
rodič da6943c26a
revize 09356ed279
6 změnil soubory, kde provedl 83 přidání a 12 odebrání

Zobrazit soubor

@@ -314,6 +314,10 @@ int msm_vidc_map_driver_buf(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buf);
int msm_vidc_put_driver_buf(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buf);
int msm_vidc_get_delayed_unmap(struct msm_vidc_inst *inst,
struct msm_vidc_map *map);
int msm_vidc_put_delayed_unmap(struct msm_vidc_inst *inst,
struct msm_vidc_map *map);
int msm_vidc_queue_buffer_single(struct msm_vidc_inst *inst, struct vb2_buffer *vb2);
int msm_vidc_destroy_internal_buffer(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buffer);

Zobrazit soubor

@@ -123,7 +123,7 @@
/*
* MAX_MAPPED_OUTPUT_COUNT: maximum mappings which can
* be present in output map list with refcount 1. These
* mappings exist due to lazy unmap feature. Current
* mappings exist due to delayed unmap feature. Current
* threshold is kept as 50 to handle vpp usecases
* which might have many output buffers.
*/