summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-13 14:19:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-13 14:32:18 +0100
commitf7abfe8b281991c66406c42c1a6c6c9ee0daa0ff (patch)
tree22ac64e9f3e5e7ec7044abafefa23e1b0ae14f63 /drivers/gpu/drm/i915/intel_overlay.c
parent6b383a7f6378f193c30200435d8170f95916b5f0 (diff)
downloadblackbird-op-linux-f7abfe8b281991c66406c42c1a6c6c9ee0daa0ff.tar.gz
blackbird-op-linux-f7abfe8b281991c66406c42c1a6c6c9ee0daa0ff.zip
drm/i915: Fix an overlay regression from 7e7d76c
When separating out the prepare/commit into its own separate functions we overlooked that the intel_crtc->dpms_mode was being used elsewhere to check on the actual status of the pipe. Track that bit of logic separately from the actual dpms mode, so there is no confusion should we be able to handle multiple dpms modes, nor any semantic conflict between prepare/commit and dpms. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index 3dff16118ee5..c4699c916698 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -875,15 +875,13 @@ static int check_overlay_possible_on_crtc(struct intel_overlay *overlay,
struct intel_crtc *crtc)
{
drm_i915_private_t *dev_priv = overlay->dev->dev_private;
- u32 pipeconf;
- if (!crtc->base.enabled || crtc->dpms_mode != DRM_MODE_DPMS_ON)
+ if (!crtc->active)
return -EINVAL;
- pipeconf = I915_READ(PIPECONF(crtc->pipe));
-
/* can't use the overlay with double wide pipe */
- if (!IS_I965G(overlay->dev) && pipeconf & PIPECONF_DOUBLE_WIDE)
+ if (!IS_I965G(overlay->dev) &&
+ (I915_READ(PIPECONF(crtc->pipe)) & (PIPECONF_DOUBLE_WIDE | PIPECONF_ENABLE)) != PIPECONF_ENABLE)
return -EINVAL;
return 0;
OpenPOWER on IntegriCloud