diff options
author | Matt Pedro <mapedro@nvidia.com> | 2014-05-11 22:57:48 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:48 -0400 |
commit | 6c6936858af4902ca0e170da03ddf92e32b74ae1 (patch) | |
tree | afc541fd72773aa4676188684b9c92a67af60a09 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | a82f92e318005f1e42f803aec054ee3714f780f9 (diff) |
Revert "gpu: nvgpu: Keep host1x on when GPU on"
This reverts commit 20d48a759b032116e3092e1df76518065da59879.
Change-Id: I93718a314b70ee9284a83ca69964883e670ad78d
Signed-off-by: Matt Pedro <mapedro@nvidia.com>
Reviewed-on: http://git-master/r/407969
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 344223ae..60f7d4e3 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -697,14 +697,14 @@ int gk20a_channel_release(struct inode *inode, struct file *filp) | |||
697 | 697 | ||
698 | trace_gk20a_channel_release(dev_name(&g->dev->dev)); | 698 | trace_gk20a_channel_release(dev_name(&g->dev->dev)); |
699 | 699 | ||
700 | err = gk20a_busy(ch->g->dev); | 700 | err = gk20a_channel_busy(ch->g->dev); |
701 | if (err) { | 701 | if (err) { |
702 | gk20a_err(dev_from_gk20a(g), "failed to release channel %d", | 702 | gk20a_err(dev_from_gk20a(g), "failed to release channel %d", |
703 | ch->hw_chid); | 703 | ch->hw_chid); |
704 | return err; | 704 | return err; |
705 | } | 705 | } |
706 | gk20a_free_channel(ch, true); | 706 | gk20a_free_channel(ch, true); |
707 | gk20a_idle(ch->g->dev); | 707 | gk20a_channel_idle(ch->g->dev); |
708 | 708 | ||
709 | gk20a_put_client(g); | 709 | gk20a_put_client(g); |
710 | filp->private_data = NULL; | 710 | filp->private_data = NULL; |
@@ -767,14 +767,14 @@ static int __gk20a_channel_open(struct gk20a *g, struct file *filp) | |||
767 | return err; | 767 | return err; |
768 | } | 768 | } |
769 | 769 | ||
770 | err = gk20a_busy(g->dev); | 770 | err = gk20a_channel_busy(g->dev); |
771 | if (err) { | 771 | if (err) { |
772 | gk20a_put_client(g); | 772 | gk20a_put_client(g); |
773 | gk20a_err(dev_from_gk20a(g), "failed to power on, %d", err); | 773 | gk20a_err(dev_from_gk20a(g), "failed to power on, %d", err); |
774 | return err; | 774 | return err; |
775 | } | 775 | } |
776 | ch = gk20a_open_new_channel(g); | 776 | ch = gk20a_open_new_channel(g); |
777 | gk20a_idle(g->dev); | 777 | gk20a_channel_idle(g->dev); |
778 | if (!ch) { | 778 | if (!ch) { |
779 | gk20a_put_client(g); | 779 | gk20a_put_client(g); |
780 | gk20a_err(dev_from_gk20a(g), | 780 | gk20a_err(dev_from_gk20a(g), |
@@ -1417,7 +1417,7 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed) | |||
1417 | 1417 | ||
1418 | list_del_init(&job->list); | 1418 | list_del_init(&job->list); |
1419 | kfree(job); | 1419 | kfree(job); |
1420 | gk20a_idle(g->dev); | 1420 | gk20a_channel_idle(g->dev); |
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | /* | 1423 | /* |
@@ -1436,7 +1436,7 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed) | |||
1436 | mutex_unlock(&c->submit_lock); | 1436 | mutex_unlock(&c->submit_lock); |
1437 | 1437 | ||
1438 | for (i = 0; i < nr_completed; i++) | 1438 | for (i = 0; i < nr_completed; i++) |
1439 | gk20a_idle(c->g->dev); | 1439 | gk20a_channel_idle(c->g->dev); |
1440 | } | 1440 | } |
1441 | 1441 | ||
1442 | void add_wait_cmd(u32 *ptr, u32 id, u32 thresh) | 1442 | void add_wait_cmd(u32 *ptr, u32 id, u32 thresh) |
@@ -1484,7 +1484,7 @@ static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
1484 | gk20a_dbg_info("channel %d", c->hw_chid); | 1484 | gk20a_dbg_info("channel %d", c->hw_chid); |
1485 | 1485 | ||
1486 | /* gk20a_channel_update releases this ref. */ | 1486 | /* gk20a_channel_update releases this ref. */ |
1487 | err = gk20a_busy(g->dev); | 1487 | err = gk20a_channel_busy(g->dev); |
1488 | if (err) { | 1488 | if (err) { |
1489 | gk20a_err(d, "failed to host gk20a to submit gpfifo"); | 1489 | gk20a_err(d, "failed to host gk20a to submit gpfifo"); |
1490 | return err; | 1490 | return err; |
@@ -1645,7 +1645,7 @@ clean_up: | |||
1645 | gk20a_err(d, "fail"); | 1645 | gk20a_err(d, "fail"); |
1646 | free_priv_cmdbuf(c, wait_cmd); | 1646 | free_priv_cmdbuf(c, wait_cmd); |
1647 | free_priv_cmdbuf(c, incr_cmd); | 1647 | free_priv_cmdbuf(c, incr_cmd); |
1648 | gk20a_idle(g->dev); | 1648 | gk20a_channel_idle(g->dev); |
1649 | return err; | 1649 | return err; |
1650 | } | 1650 | } |
1651 | 1651 | ||
@@ -2079,7 +2079,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2079 | case NVHOST_IOCTL_CHANNEL_SET_NVMAP_FD: | 2079 | case NVHOST_IOCTL_CHANNEL_SET_NVMAP_FD: |
2080 | break; | 2080 | break; |
2081 | case NVHOST_IOCTL_CHANNEL_ALLOC_OBJ_CTX: | 2081 | case NVHOST_IOCTL_CHANNEL_ALLOC_OBJ_CTX: |
2082 | err = gk20a_busy(dev); | 2082 | err = gk20a_channel_busy(dev); |
2083 | if (err) { | 2083 | if (err) { |
2084 | dev_err(&dev->dev, | 2084 | dev_err(&dev->dev, |
2085 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2085 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2088,10 +2088,10 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2088 | } | 2088 | } |
2089 | err = gk20a_alloc_obj_ctx(ch, | 2089 | err = gk20a_alloc_obj_ctx(ch, |
2090 | (struct nvhost_alloc_obj_ctx_args *)buf); | 2090 | (struct nvhost_alloc_obj_ctx_args *)buf); |
2091 | gk20a_idle(dev); | 2091 | gk20a_channel_idle(dev); |
2092 | break; | 2092 | break; |
2093 | case NVHOST_IOCTL_CHANNEL_FREE_OBJ_CTX: | 2093 | case NVHOST_IOCTL_CHANNEL_FREE_OBJ_CTX: |
2094 | err = gk20a_busy(dev); | 2094 | err = gk20a_channel_busy(dev); |
2095 | if (err) { | 2095 | if (err) { |
2096 | dev_err(&dev->dev, | 2096 | dev_err(&dev->dev, |
2097 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2097 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2100,10 +2100,10 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2100 | } | 2100 | } |
2101 | err = gk20a_free_obj_ctx(ch, | 2101 | err = gk20a_free_obj_ctx(ch, |
2102 | (struct nvhost_free_obj_ctx_args *)buf); | 2102 | (struct nvhost_free_obj_ctx_args *)buf); |
2103 | gk20a_idle(dev); | 2103 | gk20a_channel_idle(dev); |
2104 | break; | 2104 | break; |
2105 | case NVHOST_IOCTL_CHANNEL_ALLOC_GPFIFO: | 2105 | case NVHOST_IOCTL_CHANNEL_ALLOC_GPFIFO: |
2106 | err = gk20a_busy(dev); | 2106 | err = gk20a_channel_busy(dev); |
2107 | if (err) { | 2107 | if (err) { |
2108 | dev_err(&dev->dev, | 2108 | dev_err(&dev->dev, |
2109 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2109 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2112,14 +2112,14 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2112 | } | 2112 | } |
2113 | err = gk20a_alloc_channel_gpfifo(ch, | 2113 | err = gk20a_alloc_channel_gpfifo(ch, |
2114 | (struct nvhost_alloc_gpfifo_args *)buf); | 2114 | (struct nvhost_alloc_gpfifo_args *)buf); |
2115 | gk20a_idle(dev); | 2115 | gk20a_channel_idle(dev); |
2116 | break; | 2116 | break; |
2117 | case NVHOST_IOCTL_CHANNEL_SUBMIT_GPFIFO: | 2117 | case NVHOST_IOCTL_CHANNEL_SUBMIT_GPFIFO: |
2118 | err = gk20a_ioctl_channel_submit_gpfifo(ch, | 2118 | err = gk20a_ioctl_channel_submit_gpfifo(ch, |
2119 | (struct nvhost_submit_gpfifo_args *)buf); | 2119 | (struct nvhost_submit_gpfifo_args *)buf); |
2120 | break; | 2120 | break; |
2121 | case NVHOST_IOCTL_CHANNEL_WAIT: | 2121 | case NVHOST_IOCTL_CHANNEL_WAIT: |
2122 | err = gk20a_busy(dev); | 2122 | err = gk20a_channel_busy(dev); |
2123 | if (err) { | 2123 | if (err) { |
2124 | dev_err(&dev->dev, | 2124 | dev_err(&dev->dev, |
2125 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2125 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2128,10 +2128,10 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2128 | } | 2128 | } |
2129 | err = gk20a_channel_wait(ch, | 2129 | err = gk20a_channel_wait(ch, |
2130 | (struct nvhost_wait_args *)buf); | 2130 | (struct nvhost_wait_args *)buf); |
2131 | gk20a_idle(dev); | 2131 | gk20a_channel_idle(dev); |
2132 | break; | 2132 | break; |
2133 | case NVHOST_IOCTL_CHANNEL_ZCULL_BIND: | 2133 | case NVHOST_IOCTL_CHANNEL_ZCULL_BIND: |
2134 | err = gk20a_busy(dev); | 2134 | err = gk20a_channel_busy(dev); |
2135 | if (err) { | 2135 | if (err) { |
2136 | dev_err(&dev->dev, | 2136 | dev_err(&dev->dev, |
2137 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2137 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2140,10 +2140,10 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2140 | } | 2140 | } |
2141 | err = gk20a_channel_zcull_bind(ch, | 2141 | err = gk20a_channel_zcull_bind(ch, |
2142 | (struct nvhost_zcull_bind_args *)buf); | 2142 | (struct nvhost_zcull_bind_args *)buf); |
2143 | gk20a_idle(dev); | 2143 | gk20a_channel_idle(dev); |
2144 | break; | 2144 | break; |
2145 | case NVHOST_IOCTL_CHANNEL_SET_ERROR_NOTIFIER: | 2145 | case NVHOST_IOCTL_CHANNEL_SET_ERROR_NOTIFIER: |
2146 | err = gk20a_busy(dev); | 2146 | err = gk20a_channel_busy(dev); |
2147 | if (err) { | 2147 | if (err) { |
2148 | dev_err(&dev->dev, | 2148 | dev_err(&dev->dev, |
2149 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2149 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2152,11 +2152,11 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2152 | } | 2152 | } |
2153 | err = gk20a_init_error_notifier(ch, | 2153 | err = gk20a_init_error_notifier(ch, |
2154 | (struct nvhost_set_error_notifier *)buf); | 2154 | (struct nvhost_set_error_notifier *)buf); |
2155 | gk20a_idle(dev); | 2155 | gk20a_channel_idle(dev); |
2156 | break; | 2156 | break; |
2157 | #ifdef CONFIG_GK20A_CYCLE_STATS | 2157 | #ifdef CONFIG_GK20A_CYCLE_STATS |
2158 | case NVHOST_IOCTL_CHANNEL_CYCLE_STATS: | 2158 | case NVHOST_IOCTL_CHANNEL_CYCLE_STATS: |
2159 | err = gk20a_busy(dev); | 2159 | err = gk20a_channel_busy(dev); |
2160 | if (err) { | 2160 | if (err) { |
2161 | dev_err(&dev->dev, | 2161 | dev_err(&dev->dev, |
2162 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2162 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2165,7 +2165,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2165 | } | 2165 | } |
2166 | err = gk20a_channel_cycle_stats(ch, | 2166 | err = gk20a_channel_cycle_stats(ch, |
2167 | (struct nvhost_cycle_stats_args *)buf); | 2167 | (struct nvhost_cycle_stats_args *)buf); |
2168 | gk20a_idle(dev); | 2168 | gk20a_channel_idle(dev); |
2169 | break; | 2169 | break; |
2170 | #endif | 2170 | #endif |
2171 | case NVHOST_IOCTL_CHANNEL_SET_TIMEOUT: | 2171 | case NVHOST_IOCTL_CHANNEL_SET_TIMEOUT: |
@@ -2195,7 +2195,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2195 | ch->has_timedout; | 2195 | ch->has_timedout; |
2196 | break; | 2196 | break; |
2197 | case NVHOST_IOCTL_CHANNEL_SET_PRIORITY: | 2197 | case NVHOST_IOCTL_CHANNEL_SET_PRIORITY: |
2198 | err = gk20a_busy(dev); | 2198 | err = gk20a_channel_busy(dev); |
2199 | if (err) { | 2199 | if (err) { |
2200 | dev_err(&dev->dev, | 2200 | dev_err(&dev->dev, |
2201 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | 2201 | "%s: failed to host gk20a for ioctl cmd: 0x%x", |
@@ -2204,7 +2204,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2204 | } | 2204 | } |
2205 | gk20a_channel_set_priority(ch, | 2205 | gk20a_channel_set_priority(ch, |
2206 | ((struct nvhost_set_priority_args *)buf)->priority); | 2206 | ((struct nvhost_set_priority_args *)buf)->priority); |
2207 | gk20a_idle(dev); | 2207 | gk20a_channel_idle(dev); |
2208 | break; | 2208 | break; |
2209 | default: | 2209 | default: |
2210 | dev_err(&dev->dev, "unrecognized ioctl cmd: 0x%x", cmd); | 2210 | dev_err(&dev->dev, "unrecognized ioctl cmd: 0x%x", cmd); |