summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-05-31 12:22:53 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-06-01 09:02:14 +0300
commit16584b204573ece64de80f20eb6202495aeb35c2 (patch)
tree655ffd124df38ea5883e146ece397bb270bcffdc /include/drm
parent3ed4351a83ca05d3cd886ade6900be1067aa7903 (diff)
downloadlinux-16584b204573ece64de80f20eb6202495aeb35c2.tar.xz
drm/doc: Polish irq helper documentation
Pull a (much shorter) overview into drm_irq.c, and instead put the callback documentation into in-line comments in drm_drv.h. v2: Move the include stanzas back to the split-up patch (Stefan). Cc: Stefan Agner <stefan@agner.ch> Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170531092253.12833-1-daniel.vetter@ffwll.ch
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h9
-rw-r--r--include/drm/drm_drv.h33
2 files changed, 38 insertions, 4 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 2e0b76cceb97..39df16af7a4a 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -377,8 +377,13 @@ struct drm_device {
int last_context; /**< Last current context */
/*@} */
- /** \name VBLANK IRQ support */
- /*@{ */
+ /**
+ * @irq_enabled:
+ *
+ * Indicates that interrupt handling is enabled, specifically vblank
+ * handling. Drivers which don't use drm_irq_install() need to set this
+ * to true manually.
+ */
bool irq_enabled;
int irq;
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index e64e33b9dd26..18f3181674e8 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -327,11 +327,40 @@ struct drm_driver {
struct timeval *vblank_time,
bool in_vblank_irq);
- /* these have to be filled in */
-
+ /**
+ * @irq_handler:
+ *
+ * Interrupt handler called when using drm_irq_install(). Not used by
+ * drivers which implement their own interrupt handling.
+ */
irqreturn_t(*irq_handler) (int irq, void *arg);
+
+ /**
+ * @irq_preinstall:
+ *
+ * Optional callback used by drm_irq_install() which is called before
+ * the interrupt handler is registered. This should be used to clear out
+ * any pending interrupts (from e.g. firmware based drives) and reset
+ * the interrupt handling registers.
+ */
void (*irq_preinstall) (struct drm_device *dev);
+
+ /**
+ * @irq_postinstall:
+ *
+ * Optional callback used by drm_irq_install() which is called after
+ * the interrupt handler is registered. This should be used to enable
+ * interrupt generation in the hardware.
+ */
int (*irq_postinstall) (struct drm_device *dev);
+
+ /**
+ * @irq_uninstall:
+ *
+ * Optional callback used by drm_irq_uninstall() which is called before
+ * the interrupt handler is unregistered. This should be used to disable
+ * interrupt generation in the hardware.
+ */
void (*irq_uninstall) (struct drm_device *dev);
/**