video: driver: update device_addr for comparison
Compare buffer with release list only after updating buffer device_addr field. Change-Id: Ie1c21fd9496fb4deb735938efeff61b90b96362f Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
@@ -2205,16 +2205,6 @@ 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)
|
||||
@@ -2222,6 +2212,16 @@ 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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user