Message ID | 1445349004-16409-12-git-send-email-paulo.r.zanoni@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 20, 2015 at 11:49:57AM -0200, Paulo Zanoni wrote: > Make sure we deactivate FBC at intel_fbc_init(), so we can remove the > call from intel_display.c. Though you should keep the comment as to why we want to sanitize incoming register state as a reminder. Does this function document it needs rpm-active (or take a rpm ref itself)? -Chris
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index fcaf865..7acdc77 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14839,9 +14839,6 @@ void intel_modeset_init(struct drm_device *dev) i915_disable_vga(dev); intel_setup_outputs(dev); - /* Just in case the BIOS is doing something questionable. */ - intel_fbc_disable(dev_priv); - drm_modeset_lock_all(dev); intel_modeset_setup_hw_state(dev); drm_modeset_unlock_all(dev); diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 29becf7..15f74e2 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -1103,9 +1103,9 @@ void intel_fbc_init(struct drm_i915_private *dev_priv) enum pipe pipe; mutex_init(&dev_priv->fbc.lock); + dev_priv->fbc.active = false; if (!HAS_FBC(dev_priv)) { - dev_priv->fbc.active = false; dev_priv->fbc.no_fbc_reason = "unsupported by this chipset"; return; } @@ -1146,5 +1146,6 @@ void intel_fbc_init(struct drm_i915_private *dev_priv) I915_WRITE(FBC_CONTROL, 500 << FBC_CTL_INTERVAL_SHIFT); } - dev_priv->fbc.active = dev_priv->fbc.is_active(dev_priv); + if (dev_priv->fbc.is_active(dev_priv)) + dev_priv->fbc.deactivate(dev_priv); }
Make sure we deactivate FBC at intel_fbc_init(), so we can remove the call from intel_display.c. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> --- drivers/gpu/drm/i915/intel_display.c | 3 --- drivers/gpu/drm/i915/intel_fbc.c | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-)