Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5d346e7 authored by Maheshwar Ajja's avatar Maheshwar Ajja Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Fix macro blocks number issue for intra refresh property



The number macro blocks need to be set based on the intra refresh mode
else video hardware might see different values which leads to improper
output. Fix the issue by properly assigning the number of macro blocks
based on Intra Refresh mode.

Change-Id: I4830fd3af4cdeb6fcef5f34d5d8dd41d44a73b24
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent fdabe34a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2213,21 +2213,26 @@ static int create_3x_pkt_cmd_session_set_property(
		pkt->rg_property_data[0] =
			HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH;
		hfi = (struct hfi_3x_intra_refresh *) &pkt->rg_property_data[1];
		hfi->mbs = 0;
		switch (prop->mode) {
		case HAL_INTRA_REFRESH_NONE:
			hfi->mode = HFI_INTRA_REFRESH_NONE;
			break;
		case HAL_INTRA_REFRESH_ADAPTIVE:
			hfi->mode = HFI_INTRA_REFRESH_ADAPTIVE;
			hfi->mbs = prop->air_mbs;
			break;
		case HAL_INTRA_REFRESH_CYCLIC:
			hfi->mode = HFI_INTRA_REFRESH_CYCLIC;
			hfi->mbs = prop->cir_mbs;
			break;
		case HAL_INTRA_REFRESH_CYCLIC_ADAPTIVE:
			hfi->mode = HFI_INTRA_REFRESH_CYCLIC_ADAPTIVE;
			hfi->mbs = prop->air_mbs;
			break;
		case HAL_INTRA_REFRESH_RANDOM:
			hfi->mode = HFI_INTRA_REFRESH_RANDOM;
			hfi->mbs = prop->air_mbs;
			break;
		default:
			dprintk(VIDC_ERR,
@@ -2235,7 +2240,6 @@ static int create_3x_pkt_cmd_session_set_property(
				prop->mode);
			break;
		}
		hfi->mbs = prop->cir_mbs;
		pkt->size += sizeof(u32) + sizeof(struct hfi_3x_intra_refresh);
		break;
	}