drm/i915: constify fdi link training vtable
Put the vtable into ro memory. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ec4687956f9b98024fea55b2f0ed1e192e244ff1.1632869550.git.jani.nikula@intel.com
This commit is contained in:
parent
903f3806f3
commit
1c55b1e063
@ -15,7 +15,7 @@ void intel_fdi_link_train(struct intel_crtc *crtc,
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
|
||||
dev_priv->fdi_funcs.fdi_link_train(crtc, crtc_state);
|
||||
dev_priv->fdi_funcs->fdi_link_train(crtc, crtc_state);
|
||||
}
|
||||
|
||||
/* units of 100MHz */
|
||||
@ -1013,15 +1013,27 @@ void lpt_fdi_program_mphy(struct drm_i915_private *dev_priv)
|
||||
intel_sbi_write(dev_priv, 0x21EC, tmp, SBI_MPHY);
|
||||
}
|
||||
|
||||
static const struct intel_fdi_funcs ilk_funcs = {
|
||||
.fdi_link_train = ilk_fdi_link_train,
|
||||
};
|
||||
|
||||
static const struct intel_fdi_funcs gen6_funcs = {
|
||||
.fdi_link_train = gen6_fdi_link_train,
|
||||
};
|
||||
|
||||
static const struct intel_fdi_funcs ivb_funcs = {
|
||||
.fdi_link_train = ivb_manual_fdi_link_train,
|
||||
};
|
||||
|
||||
void
|
||||
intel_fdi_init_hook(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
if (IS_IRONLAKE(dev_priv)) {
|
||||
dev_priv->fdi_funcs.fdi_link_train = ilk_fdi_link_train;
|
||||
dev_priv->fdi_funcs = &ilk_funcs;
|
||||
} else if (IS_SANDYBRIDGE(dev_priv)) {
|
||||
dev_priv->fdi_funcs.fdi_link_train = gen6_fdi_link_train;
|
||||
dev_priv->fdi_funcs = &gen6_funcs;
|
||||
} else if (IS_IVYBRIDGE(dev_priv)) {
|
||||
/* FIXME: detect B0+ stepping and use auto training */
|
||||
dev_priv->fdi_funcs.fdi_link_train = ivb_manual_fdi_link_train;
|
||||
dev_priv->fdi_funcs = &ivb_funcs;
|
||||
}
|
||||
}
|
||||
|
@ -991,7 +991,7 @@ struct drm_i915_private {
|
||||
struct intel_hotplug_funcs hotplug_funcs;
|
||||
|
||||
/* fdi display functions */
|
||||
struct intel_fdi_funcs fdi_funcs;
|
||||
const struct intel_fdi_funcs *fdi_funcs;
|
||||
|
||||
/* display pll funcs */
|
||||
struct intel_dpll_funcs dpll_funcs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user