int plane = intel_crtc->plane;
u32 reg, temp;
+ if (intel_crtc->active)
+ return;
+
+ intel_crtc->active = true;
intel_update_watermarks(dev);
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
int plane = intel_crtc->plane;
u32 reg, temp;
+ if (!intel_crtc->active)
+ return;
+
drm_vblank_off(dev, pipe);
intel_crtc_update_cursor(crtc, false);
POSTING_READ(reg);
udelay(100);
+ intel_crtc->active = false;
intel_update_watermarks(dev);
intel_update_fbc(dev);
intel_clear_scanline_wait(dev);
int plane = intel_crtc->plane;
u32 reg, temp;
+ if (intel_crtc->active)
+ return;
+
+ intel_crtc->active = true;
intel_update_watermarks(dev);
/* Enable the DPLL */
int plane = intel_crtc->plane;
u32 reg, temp;
+ if (!intel_crtc->active)
+ return;
+
/* Give the overlay scaler a chance to disable if it's on this pipe */
intel_crtc_dpms_overlay(intel_crtc, false);
intel_crtc_update_cursor(crtc, false);
}
done:
+ intel_crtc->active = false;
intel_update_fbc(dev);
intel_update_watermarks(dev);
intel_clear_scanline_wait(dev);
/* Get the clock config from both planes */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
- if (intel_crtc->dpms_mode == DRM_MODE_DPMS_ON) {
+ if (intel_crtc->active) {
enabled++;
if (intel_crtc->plane == 0) {
DRM_DEBUG_KMS("plane A (pipe %d) clock: %d\n",
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;