diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-10-21 19:24:42 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-10-22 12:39:39 +0300 |
commit | f5e674e92e9526430e01ef996bef5b50723f59bc (patch) | |
tree | fdab975174832cdfcf4318b2ed1e45ad255967be /drivers/gpu/drm/i915/display/hsw_ips.c | |
parent | 7de5b6b54630c670af6822bebe70ff7b4281dc23 (diff) | |
download | linux-f5e674e92e9526430e01ef996bef5b50723f59bc.tar.gz linux-f5e674e92e9526430e01ef996bef5b50723f59bc.tar.bz2 linux-f5e674e92e9526430e01ef996bef5b50723f59bc.zip |
drm/i915: Introduce intel_crtc_needs_color_update()
Add a common helper to answer the question "do we need
to update color management stuff?".
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-5-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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/hsw_ips.c b/drivers/gpu/drm/i915/display/hsw_ips.c index c23fabb76fda..83aa3800245f 100644 --- a/drivers/gpu/drm/i915/display/hsw_ips.c +++ b/drivers/gpu/drm/i915/display/hsw_ips.c @@ -104,8 +104,7 @@ static bool hsw_ips_need_disable(struct intel_atomic_state *state, * Disable IPS before we program the LUT. */ if (IS_HASWELL(i915) && - (new_crtc_state->uapi.color_mgmt_changed || - intel_crtc_needs_fastset(new_crtc_state)) && + intel_crtc_needs_color_update(new_crtc_state) && new_crtc_state->gamma_mode == GAMMA_MODE_MODE_SPLIT) return true; @@ -146,8 +145,7 @@ static bool hsw_ips_need_enable(struct intel_atomic_state *state, * Re-enable IPS after the LUT has been programmed. */ if (IS_HASWELL(i915) && - (new_crtc_state->uapi.color_mgmt_changed || - intel_crtc_needs_fastset(new_crtc_state)) && + intel_crtc_needs_color_update(new_crtc_state) && new_crtc_state->gamma_mode == GAMMA_MODE_MODE_SPLIT) return true; |