summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-06 13:34:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-06 13:39:32 +0100
commit694ff54aca16ccf39e94d505942eb857b3101d7d (patch)
tree90c06734d9b082c81d818dcc8b266e62b6b3179b /src/sna/sna_driver.c
parent0ebcef4f2ebe82e9b90589aa4266a9228e2b5fdb (diff)
sna: Report KMS driver version
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index b9232360..3810090e 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -1276,9 +1276,31 @@ static void sna_leave_vt__hosted(VT_FUNC_ARGS_DECL)
{
}
-Bool sna_init_scrn(ScrnInfoPtr scrn, int entity_num)
+static void describe_kms(ScrnInfoPtr scrn)
+{
+ int fd = __intel_peek_fd(scrn);
+ drm_version_t version;
+ char name[128] = "";
+ char date[128] = "";
+
+ memset(&version, 0, sizeof(version));
+ version.name_len = sizeof(name) - 1;
+ version.name = name;
+ version.date_len = sizeof(date) - 1;
+ version.date = date;
+
+ if (drmIoctl(fd, DRM_IOCTL_VERSION, &version))
+ return;
+
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "Using Kernel Mode Setting driver: %s, version %d.%d.%d %s\n",
+ version.name,
+ version.version_major, version.version_minor, version.version_patchlevel,
+ version.date);
+}
+
+static void describe_sna(ScrnInfoPtr scrn)
{
- DBG(("%s: entity_num=%d\n", __FUNCTION__, entity_num));
#if defined(USE_GIT_DESCRIBE)
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"SNA compiled from %s\n", git_version);
@@ -1303,6 +1325,13 @@ Bool sna_init_scrn(ScrnInfoPtr scrn, int entity_num)
"SNA compiled with extra pixmap/damage validation\n");
#endif
DBG(("pixman version: %s\n", pixman_version_string()));
+}
+
+Bool sna_init_scrn(ScrnInfoPtr scrn, int entity_num)
+{
+ DBG(("%s: entity_num=%d\n", __FUNCTION__, entity_num));
+ describe_kms(scrn);
+ describe_sna(scrn);
scrn->PreInit = sna_pre_init;
scrn->ScreenInit = sna_screen_init;