|
@@ -2207,6 +2207,16 @@ int msm_vidc_map_driver_buf(struct msm_vidc_inst *inst,
|
|
|
}
|
|
|
}
|
|
|
list_add_tail(&map->list, &mappings->list);
|
|
|
+ } else {
|
|
|
+ /* increment map ref_count, if buf already present in release list */
|
|
|
+ list_for_each_entry(rel_buf, &inst->buffers.release.list, list) {
|
|
|
+ if (rel_buf->device_addr == buf->device_addr) {
|
|
|
+ rc = msm_vidc_memory_map(inst->core, map);
|
|
|
+ if (rc)
|
|
|
+ return rc;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
rc = msm_vidc_memory_map(inst->core, map);
|
|
|
if (rc)
|
|
@@ -2214,16 +2224,6 @@ int msm_vidc_map_driver_buf(struct msm_vidc_inst *inst,
|
|
|
|
|
|
buf->device_addr = map->device_addr;
|
|
|
|
|
|
- /* increment map ref_count, if buf already present in release list */
|
|
|
- list_for_each_entry(rel_buf, &inst->buffers.release.list, list) {
|
|
|
- if (rel_buf->device_addr == buf->device_addr) {
|
|
|
- rc = msm_vidc_memory_map(inst->core, map);
|
|
|
- if (rc)
|
|
|
- return rc;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|