summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-01-02 04:48:52 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-02 04:48:51 -0800
commit1537b3e7ea26ff8a6c292d88131872cde4e061b1 (patch)
tree69dc71a309afc761960527216c3d5733eb78a7ee
parentd6dc904e2195b4b7271c9322dd979eb1ce662085 (diff)
parent6f732e040d70404fb4044310740e31b8870dbc3a (diff)
Merge "msm: vidc: Cache invalidate performance fix"
-rw-r--r--drivers/media/platform/msm/vidc/msm_smem.c6
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc.c8
-rw-r--r--include/media/msm_vidc.h3
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_smem.c b/drivers/media/platform/msm/vidc/msm_smem.c
index 90047a608984..44c5c08f074c 100644
--- a/drivers/media/platform/msm/vidc/msm_smem.c
+++ b/drivers/media/platform/msm/vidc/msm_smem.c
@@ -513,10 +513,10 @@ static int ion_cache_operations(struct smem_client *client,
rc = -EINVAL;
goto cache_op_failed;
}
- rc = msm_ion_do_cache_op(client->clnt,
+ rc = msm_ion_do_cache_offset_op(client->clnt,
(struct ion_handle *)mem->smem_priv,
- 0, (unsigned long)mem->size,
- msm_cache_ops);
+ 0, mem->offset,
+ (unsigned long)mem->size, msm_cache_ops);
if (rc) {
dprintk(VIDC_ERR,
"cache operation failed %d\n", rc);
diff --git a/drivers/media/platform/msm/vidc/msm_vidc.c b/drivers/media/platform/msm/vidc/msm_vidc.c
index 8b1329db1742..babea6824c51 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc.c
@@ -333,7 +333,7 @@ static inline void populate_buf_info(struct buffer_info *binfo,
binfo->timestamp.tv_sec = b->timestamp.tv_sec;
binfo->timestamp.tv_usec = b->timestamp.tv_usec;
dprintk(VIDC_DBG, "%s: fd[%d] = %d b->index = %d",
- __func__, i, binfo->fd[0], b->index);
+ __func__, i, binfo->fd[i], b->index);
}
static inline void repopulate_v4l2_buffer(struct v4l2_buffer *b,
@@ -658,8 +658,12 @@ int output_buffer_cache_invalidate(struct msm_vidc_inst *inst,
for (i = 0; i < binfo->num_planes; i++) {
if (binfo->handle[i]) {
+ struct msm_smem smem = *binfo->handle[i];
+
+ smem.offset = (unsigned int)(binfo->buff_off[i]);
+ smem.size = binfo->size[i];
rc = msm_comm_smem_cache_operations(inst,
- binfo->handle[i], SMEM_CACHE_INVALIDATE);
+ &smem, SMEM_CACHE_INVALIDATE);
if (rc) {
dprintk(VIDC_ERR,
"%s: Failed to clean caches: %d\n",
diff --git a/include/media/msm_vidc.h b/include/media/msm_vidc.h
index 0a089c4faee1..003adc38eb14 100644
--- a/include/media/msm_vidc.h
+++ b/include/media/msm_vidc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -68,6 +68,7 @@ struct msm_smem {
void *smem_priv;
enum hal_buffer buffer_type;
struct dma_mapping_info mapping_info;
+ unsigned int offset;
};
enum smem_cache_ops {