summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-06-23 20:19:02 +0000
committerrnoland <rnoland@FreeBSD.org>2009-06-23 20:19:02 +0000
commitf75c2385c686d82292982283b5f0a9c9988beda8 (patch)
tree82b48fcae56e26ae40871760db186d1543886972 /sys
parent5010737b3950e699f96198f5c1692ef230a7f86d (diff)
downloadFreeBSD-src-f75c2385c686d82292982283b5f0a9c9988beda8.zip
FreeBSD-src-f75c2385c686d82292982283b5f0a9c9988beda8.tar.gz
Add some sysctl info so that we can see what is going on with vblanks.
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/drm/drm_sysctl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/drm/drm_sysctl.c b/sys/dev/drm/drm_sysctl.c
index afe8888..0d59d48 100644
--- a/sys/dev/drm/drm_sysctl.c
+++ b/sys/dev/drm/drm_sysctl.c
@@ -38,6 +38,7 @@ static int drm_name_info DRM_SYSCTL_HANDLER_ARGS;
static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS;
static int drm_clients_info DRM_SYSCTL_HANDLER_ARGS;
static int drm_bufs_info DRM_SYSCTL_HANDLER_ARGS;
+static int drm_vblank_info DRM_SYSCTL_HANDLER_ARGS;
struct drm_sysctl_list {
const char *name;
@@ -47,6 +48,7 @@ struct drm_sysctl_list {
{"vm", drm_vm_info},
{"clients", drm_clients_info},
{"bufs", drm_bufs_info},
+ {"vblank", drm_vblank_info},
};
#define DRM_SYSCTL_ENTRIES (sizeof(drm_sysctl_list)/sizeof(drm_sysctl_list[0]))
@@ -313,3 +315,25 @@ done:
free(tempprivs, DRM_MEM_DRIVER);
return retcode;
}
+
+static int drm_vblank_info DRM_SYSCTL_HANDLER_ARGS
+{
+ struct drm_device *dev = arg1;
+ char buf[128];
+ int retcode;
+ int i;
+
+ DRM_SYSCTL_PRINT("\ncrtc ref count last enabled inmodeset\n");
+ for(i = 0 ; i < dev->num_crtcs ; i++) {
+ DRM_SYSCTL_PRINT(" %02d %02d %08d %08d %02d %02d\n",
+ i, atomic_load_acq_32(&dev->vblank[i].refcount),
+ atomic_load_acq_32(&dev->vblank[i].count),
+ atomic_load_acq_32(&dev->vblank[i].last),
+ atomic_load_acq_int(&dev->vblank[i].enabled),
+ atomic_load_acq_int(&dev->vblank[i].inmodeset));
+ }
+
+ SYSCTL_OUT(req, "", -1);
+done:
+ return retcode;
+}
OpenPOWER on IntegriCloud