diff options
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index 6ecfd29b7d98..7cdddd55d65d 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c | |||
@@ -718,6 +718,7 @@ static int coda_start_encoding(struct coda_ctx *ctx) | |||
718 | struct vb2_buffer *buf; | 718 | struct vb2_buffer *buf; |
719 | int gamma, ret, value; | 719 | int gamma, ret, value; |
720 | u32 dst_fourcc; | 720 | u32 dst_fourcc; |
721 | int num_fb; | ||
721 | u32 stride; | 722 | u32 stride; |
722 | 723 | ||
723 | q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | 724 | q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); |
@@ -983,12 +984,14 @@ static int coda_start_encoding(struct coda_ctx *ctx) | |||
983 | v4l2_err(v4l2_dev, "failed to allocate framebuffers\n"); | 984 | v4l2_err(v4l2_dev, "failed to allocate framebuffers\n"); |
984 | goto out; | 985 | goto out; |
985 | } | 986 | } |
987 | num_fb = 2; | ||
986 | stride = q_data_src->bytesperline; | 988 | stride = q_data_src->bytesperline; |
987 | } else { | 989 | } else { |
988 | ctx->num_internal_frames = 0; | 990 | ctx->num_internal_frames = 0; |
991 | num_fb = 0; | ||
989 | stride = 0; | 992 | stride = 0; |
990 | } | 993 | } |
991 | coda_write(dev, ctx->num_internal_frames, CODA_CMD_SET_FRAME_BUF_NUM); | 994 | coda_write(dev, num_fb, CODA_CMD_SET_FRAME_BUF_NUM); |
992 | coda_write(dev, stride, CODA_CMD_SET_FRAME_BUF_STRIDE); | 995 | coda_write(dev, stride, CODA_CMD_SET_FRAME_BUF_STRIDE); |
993 | 996 | ||
994 | if (dev->devtype->product == CODA_7541) { | 997 | if (dev->devtype->product == CODA_7541) { |