summaryrefslogtreecommitdiff
path: root/drm/nouveau/nouveau_drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drm/nouveau/nouveau_drm.c')
-rw-r--r--drm/nouveau/nouveau_drm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c
index f16495956..c2d542105 100644
--- a/drm/nouveau/nouveau_drm.c
+++ b/drm/nouveau/nouveau_drm.c
@@ -28,6 +28,7 @@
#include <linux/pci.h>
#include <linux/pm_runtime.h>
#include <linux/vga_switcheroo.h>
+#include <linux/version.h>
#include "drmP.h"
#include "drm_crtc_helper.h"
@@ -920,6 +921,10 @@ nouveau_driver_fops = {
.llseek = noop_llseek,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
+#define DRIVER_KMS_LEGACY_CONTEXT 0
+#endif
+
static struct drm_driver
driver_stub = {
.driver_features =
@@ -938,10 +943,14 @@ driver_stub = {
.debugfs_cleanup = nouveau_drm_debugfs_cleanup,
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
.get_vblank_counter = drm_vblank_no_hw_counter,
+#endif
.enable_vblank = nouveau_display_vblank_enable,
.disable_vblank = nouveau_display_vblank_disable,
+#ifndef CONFIG_ARCH_TEGRA
.get_scanout_position = nouveau_display_scanoutpos,
+#endif
.get_vblank_timestamp = nouveau_display_vblstamp,
.ioctls = nouveau_ioctls,