diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f8fa57dc231a..d56336a30241 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14991,10 +14991,8 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc, if (modeset) goto out; - if (crtc->state->color_mgmt_changed || to_intel_crtc_state(crtc->state)->update_pipe) { - intel_color_set_csc(crtc->state); - intel_color_load_luts(crtc->state); - } + if (intel_cstate->base.color_mgmt_changed || intel_cstate->update_pipe) + intel_color_set_csc(&intel_cstate->base); if (intel_cstate->update_pipe) intel_update_pipe_config(intel_crtc, old_intel_cstate); @@ -15011,8 +15009,19 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state) { struct intel_crtc *intel_crtc = to_intel_crtc(crtc); + struct intel_crtc_state *intel_cstate = + to_intel_crtc_state(crtc->state); intel_pipe_update_end(intel_crtc, NULL); + + /* + * Loading LUT can require programming a lot of registers, which can + * take a long time and shouldn't be done during vblank evasion. + * + * It's not even double buffered, so vblank evasion doesn't make any sense. + */ + if (intel_cstate->base.color_mgmt_changed || intel_cstate->update_pipe) + intel_color_load_luts(&intel_cstate->base); } /**