Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307184
b: refs/heads/master
c: 0f91128
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Apr 18, 2012
1 parent 0145ca6 commit 936b7a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46f0f8d120c4afae53a5670bf3ac80a928340ff3
refs/heads/master: 0f91128d88bbb8b0a8e7bb93df2c40680871d45a
27 changes: 4 additions & 23 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -3014,16 +3014,14 @@ static void intel_clear_scanline_wait(struct drm_device *dev)

static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
{
struct drm_i915_gem_object *obj;
struct drm_i915_private *dev_priv;
struct drm_device *dev = crtc->dev;

if (crtc->fb == NULL)
return;

obj = to_intel_framebuffer(crtc->fb)->obj;
dev_priv = crtc->dev->dev_private;
wait_event(dev_priv->pending_flip_queue,
atomic_read(&obj->pending_flip) == 0);
mutex_lock(&dev->struct_mutex);
intel_finish_fb(crtc->fb);
mutex_unlock(&dev->struct_mutex);
}

static bool intel_crtc_driving_pch(struct drm_crtc *crtc)
Expand Down Expand Up @@ -3485,23 +3483,6 @@ static void intel_crtc_disable(struct drm_crtc *crtc)
struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
struct drm_device *dev = crtc->dev;

/* Flush any pending WAITs before we disable the pipe. Note that
* we need to drop the struct_mutex in order to acquire it again
* during the lowlevel dpms routines around a couple of the
* operations. It does not look trivial nor desirable to move
* that locking higher. So instead we leave a window for the
* submission of further commands on the fb before we can actually
* disable it. This race with userspace exists anyway, and we can
* only rely on the pipe being disabled by userspace after it
* receives the hotplug notification and has flushed any pending
* batches.
*/
if (crtc->fb) {
mutex_lock(&dev->struct_mutex);
intel_finish_fb(crtc->fb);
mutex_unlock(&dev->struct_mutex);
}

crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
assert_plane_disabled(dev->dev_private, to_intel_crtc(crtc)->plane);
assert_pipe_disabled(dev->dev_private, to_intel_crtc(crtc)->pipe);
Expand Down

0 comments on commit 936b7a8

Please sign in to comment.