]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: Use long for timeout in semaphores
authorTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 7 Nov 2014 09:50:49 +0000 (11:50 +0200)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 14 Nov 2014 05:54:55 +0000 (21:54 -0800)
Semaphore fences use int for timeout. It should be long instead.

Bug 1567274

Change-Id: Ia2b2c5ceeb03b4d09c1d8933ce33310356dd7e01
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/595980
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

drivers/gpu/nvgpu/gk20a/fence_gk20a.c

index 32c6603740b2a31199d05d1ae0da506c0d34f6cc..1c34d8035bbd26f4fa8808520c864242c148066c 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 struct gk20a_fence_ops {
-       int (*wait)(struct gk20a_fence *, int timeout);
+       int (*wait)(struct gk20a_fence *, long timeout);
        bool (*is_expired)(struct gk20a_fence *);
        void *(*free)(struct kref *);
 };
@@ -108,9 +108,9 @@ static struct gk20a_fence *alloc_fence(const struct gk20a_fence_ops *ops,
 
 /* Fences that are backed by GPU semaphores: */
 
-static int gk20a_semaphore_fence_wait(struct gk20a_fence *f, int timeout)
+static int gk20a_semaphore_fence_wait(struct gk20a_fence *f, long timeout)
 {
-       int remain;
+       long remain;
 
        if (!gk20a_semaphore_is_acquired(f->semaphore))
                return 0;
@@ -170,11 +170,11 @@ struct gk20a_fence *gk20a_fence_from_semaphore(
 #ifdef CONFIG_TEGRA_GK20A
 /* Fences that are backed by host1x syncpoints: */
 
-static int gk20a_syncpt_fence_wait(struct gk20a_fence *f, int timeout)
+static int gk20a_syncpt_fence_wait(struct gk20a_fence *f, long timeout)
 {
        return nvhost_syncpt_wait_timeout_ext(
                        f->host1x_pdev, f->syncpt_id, f->syncpt_value,
-                       timeout, NULL, NULL);
+                       (u32)timeout, NULL, NULL);
 }
 
 static bool gk20a_syncpt_fence_is_expired(struct gk20a_fence *f)