diff options
Diffstat (limited to 'drivers/gpu/host1x/hw/syncpt_hw.c')
-rw-r--r-- | drivers/gpu/host1x/hw/syncpt_hw.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/host1x/hw/syncpt_hw.c b/drivers/gpu/host1x/hw/syncpt_hw.c index 56e85395ac24..c93f74fcce72 100644 --- a/drivers/gpu/host1x/hw/syncpt_hw.c +++ b/drivers/gpu/host1x/hw/syncpt_hw.c | |||
@@ -26,8 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | static void syncpt_restore(struct host1x_syncpt *sp) | 27 | static void syncpt_restore(struct host1x_syncpt *sp) |
28 | { | 28 | { |
29 | u32 min = host1x_syncpt_read_min(sp); | ||
29 | struct host1x *host = sp->host; | 30 | struct host1x *host = sp->host; |
30 | int min = host1x_syncpt_read_min(sp); | 31 | |
31 | host1x_sync_writel(host, min, HOST1X_SYNC_SYNCPT(sp->id)); | 32 | host1x_sync_writel(host, min, HOST1X_SYNC_SYNCPT(sp->id)); |
32 | } | 33 | } |
33 | 34 | ||
@@ -37,6 +38,7 @@ static void syncpt_restore(struct host1x_syncpt *sp) | |||
37 | static void syncpt_restore_wait_base(struct host1x_syncpt *sp) | 38 | static void syncpt_restore_wait_base(struct host1x_syncpt *sp) |
38 | { | 39 | { |
39 | struct host1x *host = sp->host; | 40 | struct host1x *host = sp->host; |
41 | |||
40 | host1x_sync_writel(host, sp->base_val, | 42 | host1x_sync_writel(host, sp->base_val, |
41 | HOST1X_SYNC_SYNCPT_BASE(sp->id)); | 43 | HOST1X_SYNC_SYNCPT_BASE(sp->id)); |
42 | } | 44 | } |
@@ -47,6 +49,7 @@ static void syncpt_restore_wait_base(struct host1x_syncpt *sp) | |||
47 | static void syncpt_read_wait_base(struct host1x_syncpt *sp) | 49 | static void syncpt_read_wait_base(struct host1x_syncpt *sp) |
48 | { | 50 | { |
49 | struct host1x *host = sp->host; | 51 | struct host1x *host = sp->host; |
52 | |||
50 | sp->base_val = | 53 | sp->base_val = |
51 | host1x_sync_readl(host, HOST1X_SYNC_SYNCPT_BASE(sp->id)); | 54 | host1x_sync_readl(host, HOST1X_SYNC_SYNCPT_BASE(sp->id)); |
52 | } | 55 | } |
@@ -85,6 +88,7 @@ static int syncpt_cpu_incr(struct host1x_syncpt *sp) | |||
85 | if (!host1x_syncpt_client_managed(sp) && | 88 | if (!host1x_syncpt_client_managed(sp) && |
86 | host1x_syncpt_idle(sp)) | 89 | host1x_syncpt_idle(sp)) |
87 | return -EINVAL; | 90 | return -EINVAL; |
91 | |||
88 | host1x_sync_writel(host, BIT_MASK(sp->id), | 92 | host1x_sync_writel(host, BIT_MASK(sp->id), |
89 | HOST1X_SYNC_SYNCPT_CPU_INCR(reg_offset)); | 93 | HOST1X_SYNC_SYNCPT_CPU_INCR(reg_offset)); |
90 | wmb(); | 94 | wmb(); |
@@ -95,10 +99,10 @@ static int syncpt_cpu_incr(struct host1x_syncpt *sp) | |||
95 | /* remove a wait pointed to by patch_addr */ | 99 | /* remove a wait pointed to by patch_addr */ |
96 | static int syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr) | 100 | static int syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr) |
97 | { | 101 | { |
98 | u32 override = host1x_class_host_wait_syncpt( | 102 | u32 override = host1x_class_host_wait_syncpt(HOST1X_SYNCPT_RESERVED, 0); |
99 | HOST1X_SYNCPT_RESERVED, 0); | ||
100 | 103 | ||
101 | *((u32 *)patch_addr) = override; | 104 | *((u32 *)patch_addr) = override; |
105 | |||
102 | return 0; | 106 | return 0; |
103 | } | 107 | } |
104 | 108 | ||