diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-12-23 13:41:50 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-12 17:58:47 -0500 |
commit | c34c9ee4828f251a4f4200211d40d3cb79761ef0 (patch) | |
tree | 7fbcc84593e0e397a53802ec0da4b09f9f01e6ca /drivers/gpu/drm/i915/intel_display.c | |
parent | 32b7eeec4d1e861230b09d437e95d76c86ff4a68 (diff) |
drm/i915: Move vblank evasion to commit (v4)
Move the vblank evasion up from the low-level, hw-specific
update_plane() handlers to the general plane commit operation.
Everything inside commit should now be non-sleeping, so this brings us
closer to how vblank evasion will behave once we move over to atomic.
v2:
- Restore lost intel_crtc->active check on vblank evasion
v3:
- Replace assert_pipe_enabled() in intel_disable_primary_hw_plane()
with an intel_crtc->active test; it turns out assert_pipe_enabled()
grabs some mutexes and can sleep, which we can't do with interrupts
disabled.
v4:
- Equivalent to v2; v3 change is now squashed into an earlier patch
of the series. (Ander).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 260b91c4cbbf..b7c59d56c3a6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -11864,6 +11864,12 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc) | |||
11864 | intel_update_watermarks(crtc); | 11864 | intel_update_watermarks(crtc); |
11865 | 11865 | ||
11866 | intel_runtime_pm_get(dev_priv); | 11866 | intel_runtime_pm_get(dev_priv); |
11867 | |||
11868 | /* Perform vblank evasion around commit operation */ | ||
11869 | if (intel_crtc->active) | ||
11870 | intel_crtc->atomic.evade = | ||
11871 | intel_pipe_update_start(intel_crtc, | ||
11872 | &intel_crtc->atomic.start_vbl_count); | ||
11867 | } | 11873 | } |
11868 | 11874 | ||
11869 | static void intel_finish_crtc_commit(struct drm_crtc *crtc) | 11875 | static void intel_finish_crtc_commit(struct drm_crtc *crtc) |
@@ -11873,6 +11879,10 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc) | |||
11873 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 11879 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
11874 | struct drm_plane *p; | 11880 | struct drm_plane *p; |
11875 | 11881 | ||
11882 | if (intel_crtc->atomic.evade) | ||
11883 | intel_pipe_update_end(intel_crtc, | ||
11884 | intel_crtc->atomic.start_vbl_count); | ||
11885 | |||
11876 | intel_runtime_pm_put(dev_priv); | 11886 | intel_runtime_pm_put(dev_priv); |
11877 | 11887 | ||
11878 | if (intel_crtc->atomic.wait_vblank) | 11888 | if (intel_crtc->atomic.wait_vblank) |