aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/include/subdev/timer.h
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@labri.fr>2013-08-11 22:48:51 -0400
committerBen Skeggs <bskeggs@redhat.com>2013-09-04 13:46:46 +1000
commitb925a75d6729cec8debd0c378b354d8c228b36aa (patch)
tree8a0050246254e8c07aca6658a6abae4453c32cf8 /drivers/gpu/drm/nouveau/core/include/subdev/timer.h
parentdrm/nouveau/timer: restore the time on resume (diff)
downloadlinux-dev-b925a75d6729cec8debd0c378b354d8c228b36aa.tar.xz
linux-dev-b925a75d6729cec8debd0c378b354d8c228b36aa.zip
drm/nouveau/timer: add a way to cancel alarms
Since alarms don't play well with suspend, it is important every alarm user cancels his tasks before suspending. The task should be rescheduled on resume. Signed-off-by: Martin Peres <martin.peres@labri.fr> Tested-by: Martin Peres <martin.peres@labri.fr> Tested-by: Dash Four <mr.dash.four@googlemail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include/subdev/timer.h')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/timer.h b/drivers/gpu/drm/nouveau/core/include/subdev/timer.h
index e465d158d352..9ab70dfe5b02 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/timer.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/timer.h
@@ -22,6 +22,7 @@ bool nouveau_timer_wait_eq(void *, u64 nsec, u32 addr, u32 mask, u32 data);
bool nouveau_timer_wait_ne(void *, u64 nsec, u32 addr, u32 mask, u32 data);
bool nouveau_timer_wait_cb(void *, u64 nsec, bool (*func)(void *), void *data);
void nouveau_timer_alarm(void *, u32 nsec, struct nouveau_alarm *);
+void nouveau_timer_alarm_cancel(void *, struct nouveau_alarm *);
#define NV_WAIT_DEFAULT 2000000000ULL
#define nv_wait(o,a,m,v) \
@@ -35,6 +36,7 @@ struct nouveau_timer {
struct nouveau_subdev base;
u64 (*read)(struct nouveau_timer *);
void (*alarm)(struct nouveau_timer *, u64 time, struct nouveau_alarm *);
+ void (*alarm_cancel)(struct nouveau_timer *, struct nouveau_alarm *);
};
static inline struct nouveau_timer *