summary refs log tree commit diff
path: root/drivers/gpu/drm/drm_ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-10-11 17:20:13 +0200
committerDave Airlie <airlied@redhat.com>2017-10-13 08:34:50 +1000
commit25e1a79874eb3821d93310c908cc0a81b47af060 (patch)
tree3081b7fc5f68805e9ff376ad8cb6976c8fda1216 /drivers/gpu/drm/drm_ioctl.c
parent67680d3c046450b3901aa4e5a9cf2f8fbd7ed9a2 (diff)
downloadlinux-25e1a79874eb3821d93310c908cc0a81b47af060.tar.gz
drm: vblank: remove drm_timestamp_monotonic parameter
There is a risk of overflowing vblank timestamps in 2038 or 2106 if
someone sets the drm_timestamp_monotonic module parameter to zero.

I found no indication of anyone ever setting the parameter, or
complaining about the default being wrong, after it was introduced
as a way to handle backwards-compatibility with linux prior to
c61eef726a78 ("drm: add support for monotonic vblank timestamps"),
so it's probably safer to just remove the parameter completely
and only allowing the default behavior.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r--drivers/gpu/drm/drm_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index a9ae6dd2d593..a78f03155466 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -235,7 +235,7 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 	/* Only some caps make sense with UMS/render-only drivers. */
 	switch (req->capability) {
 	case DRM_CAP_TIMESTAMP_MONOTONIC:
-		req->value = drm_timestamp_monotonic;
+		req->value = 1;
 		return 0;
 	case DRM_CAP_PRIME:
 		req->value |= dev->driver->prime_fd_to_handle ? DRM_PRIME_CAP_IMPORT : 0;