Lines Matching refs:pipe
48 * Since pipe events are edge-triggered from the PIPESTAT register to IIR,
138 i915_pipestat(int pipe)
140 if (pipe == 0)
142 if (pipe == 1)
148 i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, uint32_t mask)
150 if ((dev_priv->pipestat[pipe] & mask) != mask) {
151 u32 reg = i915_pipestat(pipe);
153 dev_priv->pipestat[pipe] |= mask;
155 I915_WRITE(reg, dev_priv->pipestat[pipe] | (mask >> 16));
161 i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask)
163 if ((dev_priv->pipestat[pipe] & mask) != 0) {
164 u32 reg = i915_pipestat(pipe);
166 dev_priv->pipestat[pipe] &= ~mask;
167 I915_WRITE(reg, dev_priv->pipestat[pipe]);
173 * i915_pipe_enabled - check if a pipe is enabled
175 * @pipe: pipe to check
177 * Reading certain registers when the pipe is disabled can hang the chip.
178 * Use this routine to make sure the PLL is running and the pipe is active
182 i915_pipe_enabled(struct drm_device *dev, int pipe)
185 unsigned long pipeconf = pipe ? PIPEBCONF : PIPEACONF;
193 u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
200 high_frame = pipe ? PIPEBFRAMEHIGH : PIPEAFRAMEHIGH;
201 low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL;
203 if (!i915_pipe_enabled(dev, pipe)) {
204 DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe);
416 u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
419 int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45;
421 if (!i915_pipe_enabled(dev, pipe)) {
422 DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe);
755 static void igdng_enable_vblank(struct drm_device *dev, int pipe)
760 if (pipe == 0)
773 static void igdng_disable_vblank(struct drm_device *dev, int pipe)
778 if (pipe == 0)
791 int i915_enable_vblank(struct drm_device *dev, int pipe)
794 int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF;
803 igdng_enable_vblank(dev, pipe);
805 i915_enable_pipestat(dev_priv, pipe,
808 i915_enable_pipestat(dev_priv, pipe,
815 void i915_disable_vblank(struct drm_device *dev, int pipe)
821 igdng_disable_vblank(dev, pipe);
823 i915_disable_pipestat(dev_priv, pipe,
829 /* Set the vblank monitor pipe
850 drm_i915_vblank_pipe_t pipe;
857 DRM_COPYFROM_WITH_RETURN(&pipe, (drm_i915_vblank_pipe_t __user *)data, sizeof (pipe));
859 pipe.pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B;
1009 /* Disable pipe interrupt enables, clear pending pipe status */