diff options
Diffstat (limited to 'Documentation/DocBook/drm.tmpl')
-rw-r--r-- | Documentation/DocBook/drm.tmpl | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index b0300529ab13..c9cbb3fe0e6a 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -1141,23 +1141,13 @@ int max_width, max_height;</synopsis> | |||
1141 | the <methodname>page_flip</methodname> operation will be called with a | 1141 | the <methodname>page_flip</methodname> operation will be called with a |
1142 | non-NULL <parameter>event</parameter> argument pointing to a | 1142 | non-NULL <parameter>event</parameter> argument pointing to a |
1143 | <structname>drm_pending_vblank_event</structname> instance. Upon page | 1143 | <structname>drm_pending_vblank_event</structname> instance. Upon page |
1144 | flip completion the driver must fill the | 1144 | flip completion the driver must call <methodname>drm_send_vblank_event</methodname> |
1145 | <parameter>event</parameter>::<structfield>event</structfield> | 1145 | to fill in the event and send to wake up any waiting processes. |
1146 | <structfield>sequence</structfield>, <structfield>tv_sec</structfield> | 1146 | This can be performed with |
1147 | and <structfield>tv_usec</structfield> fields with the associated | ||
1148 | vertical blanking count and timestamp, add the event to the | ||
1149 | <parameter>drm_file</parameter> list of events to be signaled, and wake | ||
1150 | up any waiting process. This can be performed with | ||
1151 | <programlisting><![CDATA[ | 1147 | <programlisting><![CDATA[ |
1152 | struct timeval now; | ||
1153 | |||
1154 | event->event.sequence = drm_vblank_count_and_time(..., &now); | ||
1155 | event->event.tv_sec = now.tv_sec; | ||
1156 | event->event.tv_usec = now.tv_usec; | ||
1157 | |||
1158 | spin_lock_irqsave(&dev->event_lock, flags); | 1148 | spin_lock_irqsave(&dev->event_lock, flags); |
1159 | list_add_tail(&event->base.link, &event->base.file_priv->event_list); | 1149 | ... |
1160 | wake_up_interruptible(&event->base.file_priv->event_wait); | 1150 | drm_send_vblank_event(dev, pipe, event); |
1161 | spin_unlock_irqrestore(&dev->event_lock, flags); | 1151 | spin_unlock_irqrestore(&dev->event_lock, flags); |
1162 | ]]></programlisting> | 1152 | ]]></programlisting> |
1163 | </para> | 1153 | </para> |