diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-17 10:08:19 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-18 06:01:46 -0400 |
commit | 6b8e6ed02a5b06435a6b1c7ddff08c11f3e2d5d1 (patch) | |
tree | f042145eeee03846b93359ff36ea4f5f848b7925 /drivers/gpu/drm/i915/intel_display.c | |
parent | 83d4092b0381e5dd6f312b2ec57121dcf0fcbade (diff) |
drm/i915: intel_update_fbc() requires struct_mutex, so no longer atomic
As we need to manipulate our device structure and allocate queue a task,
it is no longer a simple atomic operation and cannot be performed along
the atomic modeset paths. Instead make sure that we disable FBC (which
must be therefore kept as a set of simple register writes) when
performing the atomic modeset and leave the heavy-weight
intel_update_fbc() for the normal modeset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
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 | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 16930c5cc249..a1a808047f12 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2331,16 +2331,12 @@ intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
2331 | { | 2331 | { |
2332 | struct drm_device *dev = crtc->dev; | 2332 | struct drm_device *dev = crtc->dev; |
2333 | struct drm_i915_private *dev_priv = dev->dev_private; | 2333 | struct drm_i915_private *dev_priv = dev->dev_private; |
2334 | int ret; | ||
2335 | |||
2336 | ret = dev_priv->display.update_plane(crtc, fb, x, y); | ||
2337 | if (ret) | ||
2338 | return ret; | ||
2339 | 2334 | ||
2340 | intel_update_fbc(dev); | 2335 | if (dev_priv->display.disable_fbc) |
2336 | dev_priv->display.disable_fbc(dev); | ||
2341 | intel_increase_pllclock(crtc); | 2337 | intel_increase_pllclock(crtc); |
2342 | 2338 | ||
2343 | return 0; | 2339 | return dev_priv->display.update_plane(crtc, fb, x, y); |
2344 | } | 2340 | } |
2345 | 2341 | ||
2346 | static int | 2342 | static int |
@@ -2375,6 +2371,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
2375 | struct drm_framebuffer *old_fb) | 2371 | struct drm_framebuffer *old_fb) |
2376 | { | 2372 | { |
2377 | struct drm_device *dev = crtc->dev; | 2373 | struct drm_device *dev = crtc->dev; |
2374 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
2378 | struct drm_i915_master_private *master_priv; | 2375 | struct drm_i915_master_private *master_priv; |
2379 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 2376 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
2380 | int ret; | 2377 | int ret; |
@@ -2411,8 +2408,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
2411 | if (old_fb) | 2408 | if (old_fb) |
2412 | intel_finish_fb(old_fb); | 2409 | intel_finish_fb(old_fb); |
2413 | 2410 | ||
2414 | ret = intel_pipe_set_base_atomic(crtc, crtc->fb, x, y, | 2411 | ret = dev_priv->display.update_plane(crtc, crtc->fb, x, y); |
2415 | LEAVE_ATOMIC_MODE_SET); | ||
2416 | if (ret) { | 2412 | if (ret) { |
2417 | intel_unpin_fb_obj(to_intel_framebuffer(crtc->fb)->obj); | 2413 | intel_unpin_fb_obj(to_intel_framebuffer(crtc->fb)->obj); |
2418 | mutex_unlock(&dev->struct_mutex); | 2414 | mutex_unlock(&dev->struct_mutex); |
@@ -2425,6 +2421,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
2425 | intel_unpin_fb_obj(to_intel_framebuffer(old_fb)->obj); | 2421 | intel_unpin_fb_obj(to_intel_framebuffer(old_fb)->obj); |
2426 | } | 2422 | } |
2427 | 2423 | ||
2424 | intel_update_fbc(dev); | ||
2428 | mutex_unlock(&dev->struct_mutex); | 2425 | mutex_unlock(&dev->struct_mutex); |
2429 | 2426 | ||
2430 | if (!dev->primary->master) | 2427 | if (!dev->primary->master) |