diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-26 22:22:47 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-26 22:22:47 -0700 |
| commit | 12c49e3e082bd702b686ec6cdbe7442c14c8a099 (patch) | |
| tree | 83147a26213572f8026144b6f232b8a402fb3d77 | |
| parent | 10e99580c4ebe879230f150eab3ba528dd039fa8 (diff) | |
| parent | 8ce53cecf0f9036312b8b538dd1897e2e7b98db3 (diff) | |
Merge "msm: vidc: Use internal size for extradata plane"
| -rw-r--r-- | drivers/media/platform/msm/vidc/msm_vdec.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vdec.c b/drivers/media/platform/msm/vidc/msm_vdec.c index 8fcf2e3a1a3f..ec693d3274d6 100644 --- a/drivers/media/platform/msm/vidc/msm_vdec.c +++ b/drivers/media/platform/msm/vidc/msm_vdec.c @@ -1077,7 +1077,6 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) struct hfi_device *hdev; int rc = 0, i = 0, stride = 0, scanlines = 0, color_format = 0; unsigned int *plane_sizes = NULL, extra_idx = 0; - struct hal_buffer_requirements *bufreq; if (!inst || !f || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, @@ -1168,10 +1167,10 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) extra_idx = EXTRADATA_IDX(fmt->num_planes); if (extra_idx && extra_idx < VIDEO_MAX_PLANES) { - bufreq = get_buff_req_buffer(inst, - HAL_BUFFER_EXTRADATA_OUTPUT); f->fmt.pix_mp.plane_fmt[extra_idx].sizeimage = - bufreq ? bufreq->buffer_size : 0; + VENUS_EXTRADATA_SIZE( + inst->prop.height[CAPTURE_PORT], + inst->prop.width[CAPTURE_PORT]); } for (i = 0; i < fmt->num_planes; ++i) @@ -1249,7 +1248,6 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) int ret = 0; int i; int max_input_size = 0; - struct hal_buffer_requirements *bufreq; if (!inst || !f) { dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); @@ -1294,16 +1292,12 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) extra_idx = EXTRADATA_IDX(fmt->num_planes); if (extra_idx && extra_idx < VIDEO_MAX_PLANES) { - bufreq = get_buff_req_buffer(inst, - HAL_BUFFER_EXTRADATA_OUTPUT); f->fmt.pix_mp.plane_fmt[extra_idx].sizeimage = - bufreq ? bufreq->buffer_size : 0; + VENUS_EXTRADATA_SIZE( + inst->prop.height[CAPTURE_PORT], + inst->prop.width[CAPTURE_PORT]); } - for (i = 0; i < fmt->num_planes; ++i) - inst->bufq[CAPTURE_PORT].vb2_bufq.plane_sizes[i] = - f->fmt.pix_mp.plane_fmt[i].sizeimage; - f->fmt.pix_mp.num_planes = fmt->num_planes; for (i = 0; i < fmt->num_planes; ++i) { inst->bufq[CAPTURE_PORT].vb2_bufq.plane_sizes[i] = @@ -1590,12 +1584,10 @@ static int msm_vdec_queue_setup(struct vb2_queue *q, extra_idx = EXTRADATA_IDX(inst->fmts[CAPTURE_PORT]->num_planes); if (extra_idx && extra_idx < VIDEO_MAX_PLANES) { - bufreq = get_buff_req_buffer(inst, - HAL_BUFFER_EXTRADATA_OUTPUT); - if (bufreq) - sizes[extra_idx] = bufreq->buffer_size; - else - sizes[extra_idx] = 0; + sizes[extra_idx] = + VENUS_EXTRADATA_SIZE( + inst->prop.height[CAPTURE_PORT], + inst->prop.width[CAPTURE_PORT]); } break; default: |
