Use the existing port-to-id helper function, to refactor
hence making it scalable.
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Madhav Chauhan <madhav.chauhan@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181003072203.12848-4-mahesh1.kumar@intel.com
return;
break;
case PORT_C:
- id = DPLL_ID_ICL_MGPLL1;
- break;
case PORT_D:
- id = DPLL_ID_ICL_MGPLL2;
- break;
case PORT_E:
- id = DPLL_ID_ICL_MGPLL3;
- break;
case PORT_F:
- id = DPLL_ID_ICL_MGPLL4;
+ id = icl_port_to_mg_pll_id(port);
break;
default:
MISSING_CASE(port);
return id - DPLL_ID_ICL_MGPLL1 + PORT_C;
}
-static enum intel_dpll_id icl_port_to_mg_pll_id(enum port port)
+enum intel_dpll_id icl_port_to_mg_pll_id(enum port port)
{
return port - PORT_C + DPLL_ID_ICL_MGPLL1;
}
int icl_calc_dp_combo_pll_link(struct drm_i915_private *dev_priv,
uint32_t pll_id);
int cnl_hdmi_pll_ref_clock(struct drm_i915_private *dev_priv);
+enum intel_dpll_id icl_port_to_mg_pll_id(enum port port);
#endif /* _INTEL_DPLL_MGR_H_ */