msm: vidc: Initialize an uninitialized variable
Initializing layer_id before sending the command
to firmware. This variable is urrently being ignored
by firmware but in future it might case issues.
Change-Id: I1dc3a766e12de4806efe091f32e6f75778588aa5
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
diff --git a/drivers/media/video/msm_vidc/hfi_packetization.c b/drivers/media/video/msm_vidc/hfi_packetization.c
index 0605acf..4d3d07d 100644
--- a/drivers/media/video/msm_vidc/hfi_packetization.c
+++ b/drivers/media/video/msm_vidc/hfi_packetization.c
@@ -794,6 +794,7 @@
HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE;
hfi = (struct hfi_bitrate *) &pkt->rg_property_data[1];
hfi->bit_rate = ((struct hal_bitrate *)pdata)->bit_rate;
+ hfi->layer_id = ((struct hal_bitrate *)pdata)->layer_id;
pkt->size += sizeof(u32) * 2;
break;
}
@@ -951,6 +952,7 @@
hfi->qp_i = hal_quant->qpi;
hfi->qp_p = hal_quant->qpp;
hfi->qp_b = hal_quant->qpb;
+ hfi->layer_id = hal_quant->layer_id;
pkt->size += sizeof(u32) + sizeof(struct hfi_quantization);
break;
}
diff --git a/drivers/media/video/msm_vidc/msm_venc.c b/drivers/media/video/msm_vidc/msm_venc.c
index 080f4c4..0326c79 100644
--- a/drivers/media/video/msm_vidc/msm_venc.c
+++ b/drivers/media/video/msm_vidc/msm_venc.c
@@ -1119,6 +1119,7 @@
property_id =
HAL_CONFIG_VENC_TARGET_BITRATE;
bitrate.bit_rate = ctrl->val;
+ bitrate.layer_id = 0;
pdata = &bitrate;
break;
case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:
@@ -1233,6 +1234,7 @@
quantization.qpi = ctrl->val;
quantization.qpp = qpp->val;
quantization.qpb = qpb->val;
+ quantization.layer_id = 0;
pdata = &quantization;
break;
@@ -1248,6 +1250,7 @@
quantization.qpp = ctrl->val;
quantization.qpi = qpi->val;
quantization.qpb = qpb->val;
+ quantization.layer_id = 0;
pdata = &quantization;
break;
@@ -1263,6 +1266,7 @@
quantization.qpb = ctrl->val;
quantization.qpi = qpi->val;
quantization.qpp = qpp->val;
+ quantization.layer_id = 0;
pdata = &quantization;
break;
diff --git a/drivers/media/video/msm_vidc/vidc_hfi_api.h b/drivers/media/video/msm_vidc/vidc_hfi_api.h
index 9366e0a..370785c 100644
--- a/drivers/media/video/msm_vidc/vidc_hfi_api.h
+++ b/drivers/media/video/msm_vidc/vidc_hfi_api.h
@@ -515,6 +515,7 @@
struct hal_bitrate {
u32 bit_rate;
+ u32 layer_id;
};
struct hal_profile_level {
@@ -589,6 +590,7 @@
u32 qpi;
u32 qpp;
u32 qpb;
+ u32 layer_id;
};
struct hal_intra_period {