summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/hsw_ips.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2022-10-21 19:24:39 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2022-10-22 12:38:49 +0300
commit52a90349f2edb6bd7e56462a8c3416e15b8ded60 (patch)
tree10251e575945bda90b036704b0982e95746f7f1b /drivers/gpu/drm/i915/display/hsw_ips.c
parent4c35e5d1190058be31236876ae1f12681ddba137 (diff)
downloadlinux-52a90349f2edb6bd7e56462a8c3416e15b8ded60.tar.gz
linux-52a90349f2edb6bd7e56462a8c3416e15b8ded60.tar.bz2
linux-52a90349f2edb6bd7e56462a8c3416e15b8ded60.zip
drm/i915: Introduce intel_crtc_needs_fastset()
Replace the somewhat obscure crtc_state.update_pipe checks with a more descriptive thing. Also nicely matches the intel_crtc_needs_modeset() counterpart for full modesets. v2: Handle one more case in the fbc code Reviewed-by: Jani Nikula <jani.nikula@intel.com> #v1 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-2-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/hsw_ips.c')
-rw-r--r--drivers/gpu/drm/i915/display/hsw_ips.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/hsw_ips.c b/drivers/gpu/drm/i915/display/hsw_ips.c
index a5be4af792cb..c23fabb76fda 100644
--- a/drivers/gpu/drm/i915/display/hsw_ips.c
+++ b/drivers/gpu/drm/i915/display/hsw_ips.c
@@ -105,7 +105,7 @@ static bool hsw_ips_need_disable(struct intel_atomic_state *state,
*/
if (IS_HASWELL(i915) &&
(new_crtc_state->uapi.color_mgmt_changed ||
- new_crtc_state->update_pipe) &&
+ intel_crtc_needs_fastset(new_crtc_state)) &&
new_crtc_state->gamma_mode == GAMMA_MODE_MODE_SPLIT)
return true;
@@ -147,7 +147,7 @@ static bool hsw_ips_need_enable(struct intel_atomic_state *state,
*/
if (IS_HASWELL(i915) &&
(new_crtc_state->uapi.color_mgmt_changed ||
- new_crtc_state->update_pipe) &&
+ intel_crtc_needs_fastset(new_crtc_state)) &&
new_crtc_state->gamma_mode == GAMMA_MODE_MODE_SPLIT)
return true;
@@ -155,7 +155,7 @@ static bool hsw_ips_need_enable(struct intel_atomic_state *state,
* We can't read out IPS on broadwell, assume the worst and
* forcibly enable IPS on the first fastset.
*/
- if (new_crtc_state->update_pipe && old_crtc_state->inherited)
+ if (intel_crtc_needs_fastset(new_crtc_state) && old_crtc_state->inherited)
return true;
return !old_crtc_state->ips_enabled;