Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Move FBC init and cleanup calls to modeset functions

Although FBC helps save power it do not belongs to power management
also the cleanup was placed in i915_driver_unload() also not a good
place. intel_modeset_init()/intel_modeset_cleanup() are better places
also this will help make easy disable features that depends in
display being enabled in driver.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181108001647.11276-2-jose.souza@intel.com

+4 -3
-1
drivers/gpu/drm/i915/i915_drv.c
··· 1778 1778 i915_reset_error_state(dev_priv); 1779 1779 1780 1780 i915_gem_fini(dev_priv); 1781 - intel_fbc_cleanup_cfb(dev_priv); 1782 1781 1783 1782 intel_power_domains_fini_hw(dev_priv); 1784 1783
+4
drivers/gpu/drm/i915/intel_display.c
··· 15016 15016 15017 15017 intel_init_quirks(dev_priv); 15018 15018 15019 + intel_fbc_init(dev_priv); 15020 + 15019 15021 intel_init_pm(dev_priv); 15020 15022 15021 15023 /* ··· 15831 15829 intel_teardown_gmbus(dev_priv); 15832 15830 15833 15831 destroy_workqueue(dev_priv->modeset_wq); 15832 + 15833 + intel_fbc_cleanup_cfb(dev_priv); 15834 15834 } 15835 15835 15836 15836 /*
-2
drivers/gpu/drm/i915/intel_pm.c
··· 9435 9435 /* Set up chip specific power management-related functions */ 9436 9436 void intel_init_pm(struct drm_i915_private *dev_priv) 9437 9437 { 9438 - intel_fbc_init(dev_priv); 9439 - 9440 9438 /* For cxsr */ 9441 9439 if (IS_PINEVIEW(dev_priv)) 9442 9440 i915_pineview_get_mem_freq(dev_priv);