Rev 1963 | Rev 3480 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1963 | Rev 3031 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
31 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
32 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
32 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
33 | * OTHER DEALINGS IN THE SOFTWARE. |
33 | * OTHER DEALINGS IN THE SOFTWARE. |
34 | */ |
34 | */ |
Line 35... | Line 35... | ||
35 | 35 | ||
36 | #include "drmP.h" |
36 | #include |
37 | #include |
37 | #include |
Line 38... | Line 38... | ||
38 | //#include "drm_trace.h" |
38 | //#include "drm_trace.h" |
39 | 39 | ||
Line 40... | Line 40... | ||
40 | //#include |
40 | //#include |
- | 41 | #include |
|
Line 41... | Line 42... | ||
41 | #include |
42 | |
42 | 43 | //#include |
|
43 | //#include |
44 | #include |
44 | 45 | ||
Line 132... | Line 133... | ||
132 | DRM_DEBUG("crtc %d: clock %d kHz framedur %d linedur %d, pixeldur %d\n", |
133 | DRM_DEBUG("crtc %d: clock %d kHz framedur %d linedur %d, pixeldur %d\n", |
133 | crtc->base.id, (int) dotclock/1000, (int) framedur_ns, |
134 | crtc->base.id, (int) dotclock/1000, (int) framedur_ns, |
134 | (int) linedur_ns, (int) pixeldur_ns); |
135 | (int) linedur_ns, (int) pixeldur_ns); |
135 | } |
136 | } |
Line -... | Line 137... | ||
- | 137 | ||
- | 138 | ||
- | 139 | /** |
|
- | 140 | * drm_vblank_pre_modeset - account for vblanks across mode sets |
|
- | 141 | * @dev: DRM device |
|
- | 142 | * @crtc: CRTC in question |
|
- | 143 | * |
|
- | 144 | * Account for vblank events across mode setting events, which will likely |
|
- | 145 | * reset the hardware frame counter. |
|
- | 146 | */ |
|
- | 147 | void drm_vblank_pre_modeset(struct drm_device *dev, int crtc) |
|
- | 148 | { |
|
- | 149 | #if 0 |
|
- | 150 | /* vblank is not initialized (IRQ not installed ?) */ |
|
- | 151 | if (!dev->num_crtcs) |
|
- | 152 | return; |
|
- | 153 | /* |
|
- | 154 | * To avoid all the problems that might happen if interrupts |
|
- | 155 | * were enabled/disabled around or between these calls, we just |
|
- | 156 | * have the kernel take a reference on the CRTC (just once though |
|
- | 157 | * to avoid corrupting the count if multiple, mismatch calls occur), |
|
- | 158 | * so that interrupts remain enabled in the interim. |
|
- | 159 | */ |
|
- | 160 | if (!dev->vblank_inmodeset[crtc]) { |
|
- | 161 | dev->vblank_inmodeset[crtc] = 0x1; |
|
- | 162 | if (drm_vblank_get(dev, crtc) == 0) |
|
- | 163 | dev->vblank_inmodeset[crtc] |= 0x2; |
|
- | 164 | } |
|
- | 165 | #endif |
|
- | 166 | } |
|
- | 167 | EXPORT_SYMBOL(drm_vblank_pre_modeset); |
|
- | 168 | ||
- | 169 | void drm_vblank_post_modeset(struct drm_device *dev, int crtc) |
|
- | 170 | { |
|
- | 171 | #if 0 |
|
- | 172 | unsigned long irqflags; |
|
- | 173 | ||
- | 174 | if (dev->vblank_inmodeset[crtc]) { |
|
- | 175 | spin_lock_irqsave(&dev->vbl_lock, irqflags); |
|
- | 176 | dev->vblank_disable_allowed = 1; |
|
- | 177 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
|
- | 178 | ||
- | 179 | if (dev->vblank_inmodeset[crtc] & 0x2) |
|
- | 180 | drm_vblank_put(dev, crtc); |
|
- | 181 | ||
- | 182 | dev->vblank_inmodeset[crtc] = 0; |
|
- | 183 | } |
|
- | 184 | #endif |
|
- | 185 | } |