diff options
author | Imre Deak <imre.deak@intel.com> | 2022-02-22 19:51:35 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2022-02-28 18:03:33 +0300 |
commit | 90cf356bb4eb46a9f71248a28b2a5f1983a78a10 (patch) | |
tree | 328cd25d0a56fa73b66cd5cc82d57c90e7960f73 /drivers/gpu/drm/i915/display/intel_display_power_well.c | |
parent | ef1e170891904f0339af8fffbaad990243c7125b (diff) | |
download | linux-90cf356bb4eb46a9f71248a28b2a5f1983a78a10.tar.xz |
drm/i915: Add function to call a power well's sync_hw() hook
Add a function to call a power well's sync_hw() hook, instead of
open-coding the same, as a step towards making the low-level
power well internals (i915_power_well_ops/desc structs) hidden.
The cached-enable state should be always up-to-date, so update it
whenever sync_hw() is called.
No functional change.
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220222165137.1004194-7-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_display_power_well.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_power_well.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c b/drivers/gpu/drm/i915/display/intel_display_power_well.c index e21190854fa0..63b97bcc64bc 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c @@ -22,6 +22,14 @@ void intel_power_well_disable(struct drm_i915_private *i915, power_well->desc->ops->disable(i915, power_well); } +void intel_power_well_sync_hw(struct drm_i915_private *i915, + struct i915_power_well *power_well) +{ + power_well->desc->ops->sync_hw(i915, power_well); + power_well->hw_enabled = + power_well->desc->ops->is_enabled(i915, power_well); +} + void intel_power_well_get(struct drm_i915_private *i915, struct i915_power_well *power_well) { |