summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-08-29 12:23:35 -0400
committerRobert Noland <rnoland@2hip.net>2008-08-29 15:46:05 -0400
commitf8a14b1f9556919617208a8eb88ff88d6c77f08d (patch)
treedcf8aa30a4f32777807ee55e6d5ad3eee7ea5b7c
parentb460aeec3ea817540e43c8215f2cdf432c957289 (diff)
[FreeBSD] Increase debugging output for vblank code.
Doing my part to make DRM_DEBUG more chatty...
-rw-r--r--bsd-core/drm_irq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bsd-core/drm_irq.c b/bsd-core/drm_irq.c
index 0f0d0fc8..79e1c643 100644
--- a/bsd-core/drm_irq.c
+++ b/bsd-core/drm_irq.c
@@ -81,6 +81,7 @@ static void vblank_disable_fn(void *arg)
}
callout_deactivate(&dev->vblank_disable_timer);
+ DRM_DEBUG("vblank_disable_allowed=%d\n", dev->vblank_disable_allowed);
if (!dev->vblank_disable_allowed)
return;
@@ -131,6 +132,8 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
if (!dev->vblank)
goto err;
+ DRM_DEBUG("\n");
+
/* Zero per-crtc vblank stuff */
for (i = 0; i < num_crtcs; i++) {
DRM_INIT_WAITQUEUE(&dev->vblank[i].queue);
@@ -361,11 +364,13 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
unsigned long irqflags;
int crtc, ret = 0;
+ DRM_DEBUG("num_crtcs=%d\n", dev->num_crtcs);
/* If drm_vblank_init() hasn't been called yet, just no-op */
if (!dev->num_crtcs)
goto out;
crtc = modeset->crtc;
+ DRM_DEBUG("crtc=%d\n", crtc);
if (crtc >= dev->num_crtcs) {
ret = EINVAL;
goto out;
@@ -380,12 +385,14 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
*/
switch (modeset->cmd) {
case _DRM_PRE_MODESET:
+ DRM_DEBUG("pre-modeset\n");
if (!dev->vblank[crtc].inmodeset) {
dev->vblank[crtc].inmodeset = 1;
drm_vblank_get(dev, crtc);
}
break;
case _DRM_POST_MODESET:
+ DRM_DEBUG("post-modeset\n");
if (dev->vblank[crtc].inmodeset) {
DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags);
dev->vblank_disable_allowed = 1;