diff options
| author | Jani Nikula <[email protected]> | 2023-02-13 19:59:59 +0000 |
|---|---|---|
| committer | Jani Nikula <[email protected]> | 2023-02-15 10:00:50 +0000 |
| commit | 0e7a16f9ddde61d7d65bae9c7ddda2e4a22cbc12 (patch) | |
| tree | 909fd4594df53870ccfb7570754b7ddf64cf5af6 /drivers/gpu/drm/i915/display/intel_wm.c | |
| parent | drm/i915/wm: move functions to call watermark hooks to intel_wm.[ch] (diff) | |
| download | kernel-0e7a16f9ddde61d7d65bae9c7ddda2e4a22cbc12.tar.gz kernel-0e7a16f9ddde61d7d65bae9c7ddda2e4a22cbc12.zip | |
drm/i915/wm: add .get_hw_state to watermark funcs
Get rid of the if ladder in intel_modeset_setup_hw_state() and hide a
number of functions by adding a .get_hw_state() hook to watermark
functions. At least for now, combine the platform specific sanitization
to the hw state readouts on the relevant platforms instead of adding a
separate hook for that.
There's a functional change on PCH split platforms: If i9xx_wm_init()
fails to read plane latency and chooses the nop functions,
ilk_wm_get_hw_state() won't get called for readout. Add the
ilk_init_lp_watermarks() call on that path which now won't be called in
.get_hw_state(), as it looks like the only thing that could make a
difference.
v2:
- Add missing static (kernel test robot)
Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/6da32831e40606cc8b90491b83196917f2ce36ab.1676317696.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_wm.c')
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_wm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_wm.c b/drivers/gpu/drm/i915/display/intel_wm.c index bb146124a9ca..c4d14a51869b 100644 --- a/drivers/gpu/drm/i915/display/intel_wm.c +++ b/drivers/gpu/drm/i915/display/intel_wm.c @@ -114,6 +114,12 @@ int intel_compute_global_watermarks(struct intel_atomic_state *state) return 0; } +void intel_wm_get_hw_state(struct drm_i915_private *i915) +{ + if (i915->display.funcs.wm->get_hw_state) + return i915->display.funcs.wm->get_hw_state(i915); +} + bool intel_wm_plane_visible(const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state) { |
