diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index c6b55bf8..e896eb88 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -893,9 +893,11 @@ static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s) | |||
893 | static struct gk20a_channel_sync * | 893 | static struct gk20a_channel_sync * |
894 | gk20a_channel_semaphore_create(struct channel_gk20a *c, bool user_managed) | 894 | gk20a_channel_semaphore_create(struct channel_gk20a *c, bool user_managed) |
895 | { | 895 | { |
896 | int asid = -1; | ||
897 | struct gk20a_channel_semaphore *sema; | 896 | struct gk20a_channel_semaphore *sema; |
898 | char pool_name[20]; | 897 | char pool_name[20]; |
898 | #ifdef CONFIG_SYNC | ||
899 | int asid = -1; | ||
900 | #endif | ||
899 | 901 | ||
900 | if (WARN_ON(!c->vm)) | 902 | if (WARN_ON(!c->vm)) |
901 | return NULL; | 903 | return NULL; |
@@ -905,13 +907,13 @@ gk20a_channel_semaphore_create(struct channel_gk20a *c, bool user_managed) | |||
905 | return NULL; | 907 | return NULL; |
906 | sema->c = c; | 908 | sema->c = c; |
907 | 909 | ||
908 | if (c->vm->as_share) | ||
909 | asid = c->vm->as_share->id; | ||
910 | |||
911 | sprintf(pool_name, "semaphore_pool-%d", c->chid); | 910 | sprintf(pool_name, "semaphore_pool-%d", c->chid); |
912 | sema->pool = c->vm->sema_pool; | 911 | sema->pool = c->vm->sema_pool; |
913 | 912 | ||
914 | #ifdef CONFIG_SYNC | 913 | #ifdef CONFIG_SYNC |
914 | if (c->vm->as_share) | ||
915 | asid = c->vm->as_share->id; | ||
916 | |||
915 | sema->timeline = gk20a_sync_timeline_create( | 917 | sema->timeline = gk20a_sync_timeline_create( |
916 | "gk20a_ch%d_as%d", c->chid, asid); | 918 | "gk20a_ch%d_as%d", c->chid, asid); |
917 | if (!sema->timeline) { | 919 | if (!sema->timeline) { |