Quellcode durchsuchen

qcacld-3.0: Add ini param to support power collapse of phy registers

Add a new ini param to enable power collapse of physical registers.
ini values can be:
 0-Disable Phy register retention
 1-Statically enable Phy register retention
 2-Dynamically enable/disable Phy register retention
by default ini value is set to zero.

Change-Id: Ia922c4c25a47b3251c765fda5d4189c69d1a1d14
CRs-Fixed: 1100324
Ravi Kumar Bokka vor 8 Jahren
Ursprung
Commit
990edccddb
3 geänderte Dateien mit 38 neuen und 1 gelöschten Zeilen
  1. 22 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 11 1
      core/hdd/src/wlan_hdd_cfg.c
  3. 5 0
      core/hdd/src/wlan_hdd_main.c

+ 22 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -12284,6 +12284,27 @@ enum hdd_external_acs_freq_band {
  * Usage: External
  *
  * </ini>
+ * gEnableFastPwrTransition - Configuration for fast power transition
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini supported values:
+ * 0x0: Phy register retention disabled (Higher timeline, Good for power)
+ * 0x1: Phy register retention statically enabled
+ * 0x2: Phy register retention enabled/disabled dynamically
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_PHY_REG  "gEnableFastPwrTransition"
+#define CFG_PHY_REG_DEFAULT (0x0)
+#define CFG_PHY_REG_MIN     (0x0)
+#define CFG_PHY_REG_MAX     (0x2)
+
+/*
+ * Type declarations
  */
 #define CFG_CHAN_BAND_WEIGHTAGE_NAME    "chan_band_weightage"
 #define CFG_CHAN_BAND_WEIGHTAGE_DEFAULT (2)
@@ -14038,6 +14059,7 @@ struct hdd_config {
 	int8_t mbo_current_rssi_mcc_thres;
 	int8_t mbo_candidate_rssi_btc_thres;
 	uint8_t packet_filters_bitmap;
+	uint8_t enable_phy_reg_retention;
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

+ 11 - 1
core/hdd/src/wlan_hdd_cfg.c

@@ -4338,6 +4338,14 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_SIFS_BURST_DURATION_DEFAULT,
 		     CFG_SIFS_BURST_DURATION_MIN,
 		     CFG_SIFS_BURST_DURATION_MAX),
+
+	REG_VARIABLE(CFG_ENABLE_PHY_REG, WLAN_PARAM_HexInteger,
+		     struct hdd_config, enable_phy_reg_retention,
+		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		     CFG_PHY_REG_DEFAULT,
+		     CFG_PHY_REG_MIN,
+		     CFG_PHY_REG_MAX),
+
 	REG_VARIABLE(CFG_OPTIMIZE_CA_EVENT_NAME, WLAN_PARAM_Integer,
 			struct hdd_config, goptimize_chan_avoid_event,
 			VAR_FLAGS_OPTIONAL |
@@ -6958,6 +6966,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->oce_wan_score_slots15_to_12);
 	hdd_debug("Name = [%s] value = [0x%x]", CFG_VC_MODE_BITMAP,
 		hdd_ctx->config->vc_mode_cfg_bitmap);
+	hdd_debug("Name = [%s] Value = [%u]",
+		CFG_ENABLE_PHY_REG,
+		hdd_ctx->config->enable_phy_reg_retention);
 }
 
 
@@ -9068,6 +9079,5 @@ QDF_STATUS hdd_update_nss(struct hdd_context *hdd_ctx, uint8_t nss)
 		status = false;
 
 	hdd_set_policy_mgr_user_cfg(hdd_ctx);
-
 	return (status == false) ? QDF_STATUS_E_FAILURE : QDF_STATUS_SUCCESS;
 }

+ 5 - 0
core/hdd/src/wlan_hdd_main.c

@@ -9411,6 +9411,11 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter)
 	sme_cli_set_command(0, WMI_PDEV_AUTO_DETECT_POWER_FAILURE,
 			    hdd_ctx->config->auto_pwr_save_fail_mode, PDEV_CMD);
 
+
+	if (hdd_ctx->config->enable_phy_reg_retention)
+		wma_cli_set_command(0, WMI_PDEV_PARAM_FAST_PWR_TRANSITION,
+			hdd_ctx->config->enable_phy_reg_retention, PDEV_CMD);
+
 	return 0;
 
 cds_disable: