drm/i915/pps: refactor init abstractions
authorJani Nikula <jani.nikula@intel.com>
Wed, 20 Jan 2021 10:18:31 +0000 (12:18 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 21 Jan 2021 11:26:13 +0000 (13:26 +0200)
commit97b70144b2502a86ba536924b3b937ba4928f6c4
treea38e951c502a0f1f93e8b7efea1216aa5d15098d
parent7c553f8b5a7dcf45f7a06da23b45e431aafbbdba
drm/i915/pps: refactor init abstractions

Once you realize there is no need to hold the pps mutex when calling
pps_init_timestamps() in intel_pps_init(), we can reuse
intel_pps_encoder_reset() which has the same code.

Since intel_dp_pps_init() is only called from one place now, move it
inline to remove one "init" function altogether.

Finally, remove some initialization from
vlv_initial_power_sequencer_setup() and do it in the caller to highlight
the similarity, not the difference, in the platforms.

v2: Fix comment (Anshuman)

Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210120101834.19813-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_pps.c