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

Commit 6e59a194 authored by Chinmay Sawarkar's avatar Chinmay Sawarkar
Browse files

msm: vidc: Set the preset registers before loading FW



These registers need to be set everytime ARM9 is powered up.
Some may need to be set before ARM9 begins execution.
Hence setting these, before the FW is loaded by PIL.

CRs-Fixed: 1048319
Change-Id: I1d207635b0dd516bbff2007b1a45f5cc038d350e
Signed-off-by: default avatarChinmay Sawarkar <chinmays@codeaurora.org>
parent ab08f3f9
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -2199,8 +2199,6 @@ static int venus_hfi_core_init(void *device)

	INIT_LIST_HEAD(&dev->sess_head);

	__set_registers(dev);

	if (!dev->hal_client) {
		dev->hal_client = msm_smem_new_client(
				SMEM_ION, dev->res, MSM_VIDC_UNKNOWN);
@@ -4185,6 +4183,13 @@ static int __venus_power_on(struct venus_hfi_device *device)
				"Failed to scale clocks, performance might be affected\n");
		rc = 0;
	}

	/*
	 * Re-program all of the registers that get reset as a result of
	 * regulator_disable() and _enable()
	 */
	__set_registers(device);

	__write_register(device, VIDC_WRAPPER_INTR_MASK,
			VIDC_WRAPPER_INTR_MASK_A2HVCODEC_BMSK);
	device->intr_status = 0;
@@ -4299,11 +4304,6 @@ static inline int __resume(struct venus_hfi_device *device)
		goto err_set_video_state;
	}

	/*
	 * Re-program all of the registers that get reset as a result of
	 * regulator_disable() and _enable()
	 */
	__set_registers(device);
	__setup_ucregion_memory_map(device);
	/* Wait for boot completion */
	rc = __boot_firmware(device);