mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
drm/i915/dpll: add intel_dpll_crtc_compute_clock()
Avoid referencing the function pointer directly to be able to abstract the call better. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/12ac40c1ef9915fe680c6657b603b08be022626b.1643896905.git.jani.nikula@intel.com
This commit is contained in:
parent
91cb1e1178
commit
11a1d09c97
3 changed files with 10 additions and 1 deletions
|
@ -5266,7 +5266,7 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
|
|||
|
||||
if (mode_changed && crtc_state->hw.enable &&
|
||||
!drm_WARN_ON(&dev_priv->drm, crtc_state->shared_dpll)) {
|
||||
ret = dev_priv->dpll_funcs->crtc_compute_clock(crtc_state);
|
||||
ret = intel_dpll_crtc_compute_clock(crtc_state);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1400,6 +1400,14 @@ static const struct intel_dpll_funcs i8xx_dpll_funcs = {
|
|||
.crtc_compute_clock = i8xx_crtc_compute_clock,
|
||||
};
|
||||
|
||||
int intel_dpll_crtc_compute_clock(struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
|
||||
|
||||
return i915->dpll_funcs->crtc_compute_clock(crtc_state);
|
||||
}
|
||||
|
||||
void
|
||||
intel_dpll_init_clock_hook(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@ struct intel_crtc_state;
|
|||
enum pipe;
|
||||
|
||||
void intel_dpll_init_clock_hook(struct drm_i915_private *dev_priv);
|
||||
int intel_dpll_crtc_compute_clock(struct intel_crtc_state *crtc_state);
|
||||
int vlv_calc_dpll_params(int refclk, struct dpll *clock);
|
||||
int pnv_calc_dpll_params(int refclk, struct dpll *clock);
|
||||
int i9xx_calc_dpll_params(int refclk, struct dpll *clock);
|
||||
|
|
Loading…
Reference in a new issue