Lines Matching refs:dev_priv
46 void gma_enable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask) in gma_enable_pipestat() argument
48 if ((dev_priv->pipestat[pipe] & mask) != mask) { in gma_enable_pipestat()
50 dev_priv->pipestat[pipe] |= mask; in gma_enable_pipestat()
52 if (gma_power_begin(&dev_priv->dev, false)) { in gma_enable_pipestat()
57 gma_power_end(&dev_priv->dev); in gma_enable_pipestat()
62 void gma_disable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask) in gma_disable_pipestat() argument
64 if ((dev_priv->pipestat[pipe] & mask) != 0) { in gma_disable_pipestat()
66 dev_priv->pipestat[pipe] &= ~mask; in gma_disable_pipestat()
67 if (gma_power_begin(&dev_priv->dev, false)) { in gma_disable_pipestat()
72 gma_power_end(&dev_priv->dev); in gma_disable_pipestat()
82 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_pipe_event_handler() local
86 uint32_t pipe_enable = dev_priv->pipestat[pipe]; in gma_pipe_event_handler()
87 uint32_t pipe_status = dev_priv->pipestat[pipe] >> 16; in gma_pipe_event_handler()
91 spin_lock(&dev_priv->irqmask_lock); in gma_pipe_event_handler()
97 spin_unlock(&dev_priv->irqmask_lock); in gma_pipe_event_handler()
152 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_sgx_interrupt() local
200 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_irq_handler() local
205 spin_lock(&dev_priv->irqmask_lock); in gma_irq_handler()
217 vdc_stat &= dev_priv->vdc_irq_mask; in gma_irq_handler()
218 spin_unlock(&dev_priv->irqmask_lock); in gma_irq_handler()
234 if (hotplug_int && dev_priv->ops->hotplug) { in gma_irq_handler()
235 handled = dev_priv->ops->hotplug(dev); in gma_irq_handler()
251 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_irq_preinstall() local
254 spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags); in gma_irq_preinstall()
263 dev_priv->vdc_irq_mask |= _PSB_VSYNC_PIPEA_FLAG; in gma_irq_preinstall()
265 dev_priv->vdc_irq_mask |= _PSB_VSYNC_PIPEB_FLAG; in gma_irq_preinstall()
268 if (dev_priv->ops->hotplug) in gma_irq_preinstall()
269 dev_priv->vdc_irq_mask |= _PSB_IRQ_DISP_HOTSYNC; in gma_irq_preinstall()
270 dev_priv->vdc_irq_mask |= _PSB_IRQ_ASLE | _PSB_IRQ_SGX_FLAG; in gma_irq_preinstall()
273 PSB_WVDC32(~dev_priv->vdc_irq_mask, PSB_INT_MASK_R); in gma_irq_preinstall()
274 spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags); in gma_irq_preinstall()
279 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_irq_postinstall() local
283 spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags); in gma_irq_postinstall()
291 PSB_WVDC32(dev_priv->vdc_irq_mask, PSB_INT_ENABLE_R); in gma_irq_postinstall()
296 gma_enable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE); in gma_irq_postinstall()
298 gma_disable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE); in gma_irq_postinstall()
301 if (dev_priv->ops->hotplug_enable) in gma_irq_postinstall()
302 dev_priv->ops->hotplug_enable(dev, true); in gma_irq_postinstall()
304 spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags); in gma_irq_postinstall()
309 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_irq_install() local
313 if (dev_priv->use_msi && pci_enable_msi(pdev)) { in gma_irq_install()
315 dev_priv->use_msi = false; in gma_irq_install()
330 dev_priv->irq_enabled = true; in gma_irq_install()
337 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_irq_uninstall() local
342 if (!dev_priv->irq_enabled) in gma_irq_uninstall()
345 spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags); in gma_irq_uninstall()
347 if (dev_priv->ops->hotplug_enable) in gma_irq_uninstall()
348 dev_priv->ops->hotplug_enable(dev, false); in gma_irq_uninstall()
354 gma_disable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE); in gma_irq_uninstall()
357 dev_priv->vdc_irq_mask &= _PSB_IRQ_SGX_FLAG | in gma_irq_uninstall()
362 PSB_WVDC32(~dev_priv->vdc_irq_mask, PSB_INT_MASK_R); in gma_irq_uninstall()
363 PSB_WVDC32(dev_priv->vdc_irq_mask, PSB_INT_ENABLE_R); in gma_irq_uninstall()
369 spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags); in gma_irq_uninstall()
372 if (dev_priv->use_msi) in gma_irq_uninstall()
380 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_crtc_enable_vblank() local
393 spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags); in gma_crtc_enable_vblank()
396 dev_priv->vdc_irq_mask |= _PSB_VSYNC_PIPEA_FLAG; in gma_crtc_enable_vblank()
398 dev_priv->vdc_irq_mask |= _PSB_VSYNC_PIPEB_FLAG; in gma_crtc_enable_vblank()
400 PSB_WVDC32(~dev_priv->vdc_irq_mask, PSB_INT_MASK_R); in gma_crtc_enable_vblank()
401 PSB_WVDC32(dev_priv->vdc_irq_mask, PSB_INT_ENABLE_R); in gma_crtc_enable_vblank()
402 gma_enable_pipestat(dev_priv, pipe, PIPE_VBLANK_INTERRUPT_ENABLE); in gma_crtc_enable_vblank()
404 spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags); in gma_crtc_enable_vblank()
413 struct drm_psb_private *dev_priv = to_drm_psb_private(dev); in gma_crtc_disable_vblank() local
416 spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags); in gma_crtc_disable_vblank()
419 dev_priv->vdc_irq_mask &= ~_PSB_VSYNC_PIPEA_FLAG; in gma_crtc_disable_vblank()
421 dev_priv->vdc_irq_mask &= ~_PSB_VSYNC_PIPEB_FLAG; in gma_crtc_disable_vblank()
423 PSB_WVDC32(~dev_priv->vdc_irq_mask, PSB_INT_MASK_R); in gma_crtc_disable_vblank()
424 PSB_WVDC32(dev_priv->vdc_irq_mask, PSB_INT_ENABLE_R); in gma_crtc_disable_vblank()
425 gma_disable_pipestat(dev_priv, pipe, PIPE_VBLANK_INTERRUPT_ENABLE); in gma_crtc_disable_vblank()
427 spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags); in gma_crtc_disable_vblank()