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

Commit dfd06cdf authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan
Browse files

scsi: ufs: reduce auto hibern8 timeout to save power



The PA_Hibern8Time and PA_TActivate time in most devices are well
under 1ms combined thereby the overall hibern8 enter/exit latencies
are under 1ms as well. Entering hibern8 as soon as possible saves
power consumption, hence reduce the auto hibern8 timeout to 1ms.

Change-Id: If58590fc397ec8eb88906c103247bb48710805db
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent e9239e3f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1948,6 +1948,7 @@ static void ufshcd_init_hibern8_on_idle(struct ufs_hba *hba)
		return;

	if (ufshcd_is_auto_hibern8_supported(hba)) {
		hba->hibern8_on_idle.delay_ms = 1;
		hba->hibern8_on_idle.state = AUTO_HIBERN8;
		/*
		 * Disable SW hibern8 enter on idle in case
@@ -1955,13 +1956,13 @@ static void ufshcd_init_hibern8_on_idle(struct ufs_hba *hba)
		 */
		hba->caps &= ~UFSHCD_CAP_HIBERN8_ENTER_ON_IDLE;
	} else {
		hba->hibern8_on_idle.delay_ms = 10;
		INIT_DELAYED_WORK(&hba->hibern8_on_idle.enter_work,
				  ufshcd_hibern8_enter_work);
		INIT_WORK(&hba->hibern8_on_idle.exit_work,
			  ufshcd_hibern8_exit_work);
	}

	hba->hibern8_on_idle.delay_ms = 10;
	hba->hibern8_on_idle.is_enabled = true;

	hba->hibern8_on_idle.delay_attr.show =