.. | .. |
---|
21 | 21 | */ |
---|
22 | 22 | #include <nvif/user.h> |
---|
23 | 23 | |
---|
| 24 | +static u64 |
---|
| 25 | +nvif_userc361_time(struct nvif_user *user) |
---|
| 26 | +{ |
---|
| 27 | + u32 hi, lo; |
---|
| 28 | + |
---|
| 29 | + do { |
---|
| 30 | + hi = nvif_rd32(&user->object, 0x084); |
---|
| 31 | + lo = nvif_rd32(&user->object, 0x080); |
---|
| 32 | + } while (hi != nvif_rd32(&user->object, 0x084)); |
---|
| 33 | + |
---|
| 34 | + return ((u64)hi << 32 | lo); |
---|
| 35 | +} |
---|
| 36 | + |
---|
24 | 37 | static void |
---|
25 | 38 | nvif_userc361_doorbell(struct nvif_user *user, u32 token) |
---|
26 | 39 | { |
---|
.. | .. |
---|
30 | 43 | const struct nvif_user_func |
---|
31 | 44 | nvif_userc361 = { |
---|
32 | 45 | .doorbell = nvif_userc361_doorbell, |
---|
| 46 | + .time = nvif_userc361_time, |
---|
33 | 47 | }; |
---|