Skip to content

Commit 20a34e7

Browse files
committed
drm/i915: Update color management during vblank evasion.
Without this a vblank may occur between updating color management and planes, which should be prevented. intel_color_set_csc was called in update pipe config because the handover from hardware may not have any csc set, which resulted in a black screen. Because of this also update color management during fastset. Signed-off-by: Maarten Lankhorst <[email protected]> Tested-by: Lionel Landwerlin <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1459350996-4957-4-git-send-email-maarten.lankhorst@linux.intel.com [mlankhorst: Remove comment in response to review feedback.]
1 parent e872ef6 commit 20a34e7

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,9 +3222,6 @@ static void intel_update_pipe_config(struct intel_crtc *crtc,
32223222
old_crtc_state->pipe_src_w, old_crtc_state->pipe_src_h,
32233223
pipe_config->pipe_src_w, pipe_config->pipe_src_h);
32243224

3225-
if (HAS_DDI(dev))
3226-
intel_color_set_csc(&pipe_config->base);
3227-
32283225
/*
32293226
* Update pipe size and adjust fitter if needed: the reason for this is
32303227
* that in compute_mode_changes we check the native mode (not the pfit
@@ -13591,18 +13588,6 @@ static int intel_atomic_commit(struct drm_device *dev,
1359113588
dev_priv->display.crtc_enable(crtc);
1359213589
}
1359313590

13594-
if (!modeset &&
13595-
crtc->state->active &&
13596-
crtc->state->color_mgmt_changed) {
13597-
/*
13598-
* Only update color management when not doing
13599-
* a modeset as this will be done by
13600-
* crtc_enable already.
13601-
*/
13602-
intel_color_set_csc(crtc->state);
13603-
intel_color_load_luts(crtc->state);
13604-
}
13605-
1360613591
if (!modeset)
1360713592
intel_pre_plane_update(to_intel_crtc_state(old_crtc_state));
1360813593

@@ -13921,6 +13906,11 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
1392113906
if (modeset)
1392213907
return;
1392313908

13909+
if (crtc->state->color_mgmt_changed || to_intel_crtc_state(crtc->state)->update_pipe) {
13910+
intel_color_set_csc(crtc->state);
13911+
intel_color_load_luts(crtc->state);
13912+
}
13913+
1392413914
if (to_intel_crtc_state(crtc->state)->update_pipe)
1392513915
intel_update_pipe_config(intel_crtc, old_intel_state);
1392613916
else if (INTEL_INFO(dev)->gen >= 9)

0 commit comments

Comments
 (0)