diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 2089482a..73de3607 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1701,6 +1701,7 @@ static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | |||
1701 | struct channel_gk20a *ch = NULL; | 1701 | struct channel_gk20a *ch = NULL; |
1702 | struct tsg_gk20a *tsg = NULL; | 1702 | struct tsg_gk20a *tsg = NULL; |
1703 | u32 count = 0; | 1703 | u32 count = 0; |
1704 | u32 count_channels_in_tsg; | ||
1704 | runlist = &f->runlist_info[runlist_id]; | 1705 | runlist = &f->runlist_info[runlist_id]; |
1705 | 1706 | ||
1706 | /* valid channel, add/remove it from active list. | 1707 | /* valid channel, add/remove it from active list. |
@@ -1784,6 +1785,7 @@ static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | |||
1784 | count++; | 1785 | count++; |
1785 | 1786 | ||
1786 | /* add runnable channels bound to this TSG */ | 1787 | /* add runnable channels bound to this TSG */ |
1788 | count_channels_in_tsg = 0; | ||
1787 | mutex_lock(&tsg->ch_list_lock); | 1789 | mutex_lock(&tsg->ch_list_lock); |
1788 | list_for_each_entry(ch, &tsg->ch_list, ch_entry) { | 1790 | list_for_each_entry(ch, &tsg->ch_list, ch_entry) { |
1789 | if (!test_bit(ch->hw_chid, | 1791 | if (!test_bit(ch->hw_chid, |
@@ -1796,8 +1798,12 @@ static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | |||
1796 | runlist_entry[1] = 0; | 1798 | runlist_entry[1] = 0; |
1797 | runlist_entry += 2; | 1799 | runlist_entry += 2; |
1798 | count++; | 1800 | count++; |
1801 | count_channels_in_tsg++; | ||
1799 | } | 1802 | } |
1800 | mutex_unlock(&tsg->ch_list_lock); | 1803 | mutex_unlock(&tsg->ch_list_lock); |
1804 | |||
1805 | WARN_ON(tsg->num_active_channels != | ||
1806 | count_channels_in_tsg); | ||
1801 | } | 1807 | } |
1802 | mutex_unlock(&f->tsg_inuse_mutex); | 1808 | mutex_unlock(&f->tsg_inuse_mutex); |
1803 | } else /* suspend to remove all channels */ | 1809 | } else /* suspend to remove all channels */ |