diff options
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 15 |
3 files changed, 14 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3f60cf4fe6fd..d38ceb039de6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -11142,11 +11142,10 @@ static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc) | |||
11142 | static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) | 11142 | static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) |
11143 | { | 11143 | { |
11144 | struct drm_device *dev = intel_crtc->base.dev; | 11144 | struct drm_device *dev = intel_crtc->base.dev; |
11145 | u32 start_vbl_count; | ||
11146 | 11145 | ||
11147 | intel_mark_page_flip_active(intel_crtc); | 11146 | intel_mark_page_flip_active(intel_crtc); |
11148 | 11147 | ||
11149 | intel_pipe_update_start(intel_crtc, &start_vbl_count); | 11148 | intel_pipe_update_start(intel_crtc); |
11150 | 11149 | ||
11151 | if (INTEL_INFO(dev)->gen >= 9) | 11150 | if (INTEL_INFO(dev)->gen >= 9) |
11152 | skl_do_mmio_flip(intel_crtc); | 11151 | skl_do_mmio_flip(intel_crtc); |
@@ -11154,7 +11153,7 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) | |||
11154 | /* use_mmio_flip() retricts MMIO flips to ilk+ */ | 11153 | /* use_mmio_flip() retricts MMIO flips to ilk+ */ |
11155 | ilk_do_mmio_flip(intel_crtc); | 11154 | ilk_do_mmio_flip(intel_crtc); |
11156 | 11155 | ||
11157 | intel_pipe_update_end(intel_crtc, start_vbl_count); | 11156 | intel_pipe_update_end(intel_crtc); |
11158 | } | 11157 | } |
11159 | 11158 | ||
11160 | static void intel_mmio_flip_work_func(struct work_struct *work) | 11159 | static void intel_mmio_flip_work_func(struct work_struct *work) |
@@ -13463,7 +13462,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc, | |||
13463 | 13462 | ||
13464 | /* Perform vblank evasion around commit operation */ | 13463 | /* Perform vblank evasion around commit operation */ |
13465 | if (crtc->state->active) | 13464 | if (crtc->state->active) |
13466 | intel_pipe_update_start(intel_crtc, &intel_crtc->start_vbl_count); | 13465 | intel_pipe_update_start(intel_crtc); |
13467 | 13466 | ||
13468 | if (!needs_modeset(crtc->state) && INTEL_INFO(dev)->gen >= 9) | 13467 | if (!needs_modeset(crtc->state) && INTEL_INFO(dev)->gen >= 9) |
13469 | skl_detach_scalers(intel_crtc); | 13468 | skl_detach_scalers(intel_crtc); |
@@ -13475,7 +13474,7 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc, | |||
13475 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 13474 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
13476 | 13475 | ||
13477 | if (crtc->state->active) | 13476 | if (crtc->state->active) |
13478 | intel_pipe_update_end(intel_crtc, intel_crtc->start_vbl_count); | 13477 | intel_pipe_update_end(intel_crtc); |
13479 | } | 13478 | } |
13480 | 13479 | ||
13481 | /** | 13480 | /** |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 30012c8ea42f..8f8d320486ff 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -1414,9 +1414,8 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob); | |||
1414 | int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane); | 1414 | int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane); |
1415 | int intel_sprite_set_colorkey(struct drm_device *dev, void *data, | 1415 | int intel_sprite_set_colorkey(struct drm_device *dev, void *data, |
1416 | struct drm_file *file_priv); | 1416 | struct drm_file *file_priv); |
1417 | void intel_pipe_update_start(struct intel_crtc *crtc, | 1417 | void intel_pipe_update_start(struct intel_crtc *crtc); |
1418 | uint32_t *start_vbl_count); | 1418 | void intel_pipe_update_end(struct intel_crtc *crtc); |
1419 | void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count); | ||
1420 | 1419 | ||
1421 | /* intel_tv.c */ | 1420 | /* intel_tv.c */ |
1422 | void intel_tv_init(struct drm_device *dev); | 1421 | void intel_tv_init(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 9d8af2f8a875..c35c2339f472 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -76,7 +76,7 @@ static int usecs_to_scanlines(const struct drm_display_mode *mode, int usecs) | |||
76 | * avoid random delays. The value written to @start_vbl_count should be | 76 | * avoid random delays. The value written to @start_vbl_count should be |
77 | * supplied to intel_pipe_update_end() for error checking. | 77 | * supplied to intel_pipe_update_end() for error checking. |
78 | */ | 78 | */ |
79 | void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count) | 79 | void intel_pipe_update_start(struct intel_crtc *crtc) |
80 | { | 80 | { |
81 | struct drm_device *dev = crtc->base.dev; | 81 | struct drm_device *dev = crtc->base.dev; |
82 | const struct drm_display_mode *mode = &crtc->config->base.adjusted_mode; | 82 | const struct drm_display_mode *mode = &crtc->config->base.adjusted_mode; |
@@ -95,7 +95,7 @@ void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count) | |||
95 | max = vblank_start - 1; | 95 | max = vblank_start - 1; |
96 | 96 | ||
97 | local_irq_disable(); | 97 | local_irq_disable(); |
98 | *start_vbl_count = 0; | 98 | crtc->start_vbl_count = 0; |
99 | 99 | ||
100 | if (min <= 0 || max <= 0) | 100 | if (min <= 0 || max <= 0) |
101 | return; | 101 | return; |
@@ -134,9 +134,10 @@ void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count) | |||
134 | 134 | ||
135 | drm_crtc_vblank_put(&crtc->base); | 135 | drm_crtc_vblank_put(&crtc->base); |
136 | 136 | ||
137 | *start_vbl_count = dev->driver->get_vblank_counter(dev, pipe); | 137 | crtc->start_vbl_count = dev->driver->get_vblank_counter(dev, pipe); |
138 | 138 | ||
139 | trace_i915_pipe_update_vblank_evaded(crtc, min, max, *start_vbl_count); | 139 | trace_i915_pipe_update_vblank_evaded(crtc, min, max, |
140 | crtc->start_vbl_count); | ||
140 | } | 141 | } |
141 | 142 | ||
142 | /** | 143 | /** |
@@ -148,7 +149,7 @@ void intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count) | |||
148 | * re-enables interrupts and verifies the update was actually completed | 149 | * re-enables interrupts and verifies the update was actually completed |
149 | * before a vblank using the value of @start_vbl_count. | 150 | * before a vblank using the value of @start_vbl_count. |
150 | */ | 151 | */ |
151 | void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count) | 152 | void intel_pipe_update_end(struct intel_crtc *crtc) |
152 | { | 153 | { |
153 | struct drm_device *dev = crtc->base.dev; | 154 | struct drm_device *dev = crtc->base.dev; |
154 | enum pipe pipe = crtc->pipe; | 155 | enum pipe pipe = crtc->pipe; |
@@ -158,9 +159,9 @@ void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count) | |||
158 | 159 | ||
159 | local_irq_enable(); | 160 | local_irq_enable(); |
160 | 161 | ||
161 | if (start_vbl_count && start_vbl_count != end_vbl_count) | 162 | if (crtc->start_vbl_count && crtc->start_vbl_count != end_vbl_count) |
162 | DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u)\n", | 163 | DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u)\n", |
163 | pipe_name(pipe), start_vbl_count, end_vbl_count); | 164 | pipe_name(pipe), crtc->start_vbl_count, end_vbl_count); |
164 | } | 165 | } |
165 | 166 | ||
166 | static void | 167 | static void |