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

Commit 71a6aa0a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: remove fw version condition for core capabilities"

parents 2fe065be d5fe0a1f
Loading
Loading
Loading
Loading
+5 −35
Original line number Diff line number Diff line
@@ -3977,37 +3977,7 @@ int venus_hfi_get_stride_scanline(int color_fmt,

int venus_hfi_get_core_capabilities(void)
{
	int i = 0, rc = 0, j = 0, venus_version_length = 0;
	u32 smem_block_size = 0;
	u8 *smem_table_ptr;
	char version[256];
	char venus_version[] = "VIDEO.VE.1.4";
	u8 version_info[256];
	const u32 smem_image_index_venus = 14 * 128;

	smem_table_ptr = smem_get_entry(SMEM_IMAGE_VERSION_TABLE,
			&smem_block_size, 0, SMEM_ANY_HOST_FLAG);
	if (smem_table_ptr &&
			((smem_image_index_venus + 128) <= smem_block_size)) {
		memcpy(version_info, smem_table_ptr + smem_image_index_venus,
				128);
	} else {
		dprintk(VIDC_ERR,
			"%s: failed to read version info from smem table\n",
			__func__);
		return -EINVAL;
	}

	while (version_info[i++] != 'V' && i < 128)
		;

	venus_version_length = strlen(venus_version);
	for (i--, j = 0; i < 128 && j < venus_version_length; i++)
		version[j++] = version_info[i];
	version[venus_version_length] = '\0';
	dprintk(VIDC_DBG, "F/W version retrieved : %s\n", version);

	if (strcmp((const char *)version, (const char *)venus_version) == 0)
	int rc = 0;
	rc = HAL_VIDEO_ENCODER_ROTATION_CAPABILITY |
		HAL_VIDEO_ENCODER_SCALING_CAPABILITY |
		HAL_VIDEO_ENCODER_DEINTERLACE_CAPABILITY |