2013/9/12 Daniel Vetter <daniel.vetter@xxxxxxxx>: > Sprinkling random special functions all over the place always > has the risk that we miss it somewhere. Furthermore in this > case the ordering wrt gem_init_hw was actually different between > the driver load sequence and the resume sequence. > > So just call this at the beginning of modeset_init_hw. Looks correct, but our init/resume code is too confusing! Reviewed-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx> > > Cc: Paulo Zanoni <przanoni@xxxxxxxxx> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > --- > drivers/gpu/drm/i915/i915_drv.c | 2 -- > drivers/gpu/drm/i915/i915_drv.h | 1 - > drivers/gpu/drm/i915/intel_display.c | 6 +++--- > 3 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index ec690ca..4ed63cc 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -586,8 +586,6 @@ static int __i915_drm_thaw(struct drm_device *dev) > > /* KMS EnterVT equivalent */ > if (drm_core_check_feature(dev, DRIVER_MODESET)) { > - intel_init_pch_refclk(dev); > - > mutex_lock(&dev->struct_mutex); > > error = i915_gem_init_hw(dev); > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index 7caf71d..5208419 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -2247,7 +2247,6 @@ extern void i915_redisable_vga(struct drm_device *dev); > extern bool intel_fbc_enabled(struct drm_device *dev); > extern void intel_disable_fbc(struct drm_device *dev); > extern bool ironlake_set_drps(struct drm_device *dev, u8 val); > -extern void intel_init_pch_refclk(struct drm_device *dev); > extern void gen6_set_rps(struct drm_device *dev, u8 val); > extern void valleyview_set_rps(struct drm_device *dev, u8 val); > extern int valleyview_rps_max_freq(struct drm_i915_private *dev_priv); > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 378174f..7959640 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -5376,7 +5376,7 @@ static void lpt_init_pch_refclk(struct drm_device *dev) > /* > * Initialize reference clocks when the driver loads > */ > -void intel_init_pch_refclk(struct drm_device *dev) > +static void intel_init_pch_refclk(struct drm_device *dev) > { > if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) > ironlake_init_pch_refclk(dev); > @@ -9614,8 +9614,6 @@ static void intel_setup_outputs(struct drm_device *dev) > intel_encoder_clones(encoder); > } > > - intel_init_pch_refclk(dev); > - > drm_helper_move_panel_connectors_to_head(dev); > } > > @@ -10086,6 +10084,8 @@ static void i915_enable_vga(struct drm_device *dev) > > void intel_modeset_init_hw(struct drm_device *dev) > { > + intel_init_pch_refclk(dev); > + > intel_init_power_well(dev); > > intel_prepare_ddi(dev); > -- > 1.8.4.rc3 > -- Paulo Zanoni _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx