]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: gk20a: Add global header
authorArto Merilainen <amerilainen@nvidia.com>
Mon, 3 Mar 2014 13:20:49 +0000 (15:20 +0200)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 7 Mar 2014 09:27:38 +0000 (01:27 -0800)
This patch adds a global header for gk20a.

Change-Id: I1bfc8f4715bf5ec4bda63453bd815ff2101cea87
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/376648
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/gk20a/channel_gk20a.c
drivers/video/tegra/host/gk20a/channel_gk20a.h
drivers/video/tegra/host/nvhost_intr.c
include/linux/gk20a.h [new file with mode: 0644]

index dc98a6cd0779c5805b8f6c8979327971f4f2dee5..2b682445c17ef922f58874d2e23f299707f1cc7a 100644 (file)
@@ -1385,6 +1385,8 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
        struct channel_gk20a_job *job, *n;
        int i;
 
+       wake_up(&c->submit_wq);
+
        mutex_lock(&c->jobs_lock);
        list_for_each_entry_safe(job, n, &c->jobs, list) {
                bool completed = WARN_ON(!c->sync) ||
@@ -1407,6 +1409,7 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
        for (i = 0; i < nr_completed; i++)
                gk20a_channel_idle(c->g->dev);
 }
+EXPORT_SYMBOL(gk20a_channel_update);
 
 static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
                                struct nvhost_gpfifo *gpfifo,
index 3d6e0aff6883edab14eab563f2f0f7ab55148dcd..e2bac4e74b07258be68dccb7b75bf31e1230eca3 100644 (file)
@@ -141,8 +141,6 @@ static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch)
        return !!ch->vm;
 }
 int channel_gk20a_commit_va(struct channel_gk20a *c);
-
-void gk20a_channel_update(struct channel_gk20a *c, int nr_completed);
 int gk20a_init_channel_support(struct gk20a *, u32 chid);
 void gk20a_free_channel(struct channel_gk20a *ch, bool finish);
 bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch,
index 860fd7c15f237391a7093556dccda9a944f4ae09..aa2a4aa4a22bfa8bba92301df45ccc4e6ba27b9e 100644 (file)
 #include <linux/slab.h>
 #include <linux/irq.h>
 #include <trace/events/nvhost.h>
+#include <linux/gk20a.h>
+
 #include "nvhost_channel.h"
 #include "nvhost_hwctx.h"
 #include "chip_support.h"
-#include "gk20a/channel_gk20a.h"
 
 /*** Wait list management ***/
 
@@ -176,12 +177,7 @@ static void action_submit_complete(struct nvhost_waitlist *waiter)
 static void action_gpfifo_submit_complete(struct nvhost_waitlist *waiter)
 {
        struct channel_gk20a *ch20a = waiter->data;
-
-       wake_up(&ch20a->submit_wq);
-
-#if defined(CONFIG_TEGRA_GK20A)
        gk20a_channel_update(ch20a, waiter->count);
-#endif
 }
 
 static void action_wakeup(struct nvhost_waitlist *waiter)
diff --git a/include/linux/gk20a.h b/include/linux/gk20a.h
new file mode 100644 (file)
index 0000000..a07acbf
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * gk20a GPU driver
+ *
+ * Copyright (c) 2014, NVIDIA Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GK20A_H
+#define __GK20A_H
+
+struct channel_gk20a;
+
+#ifdef CONFIG_GK20A
+void gk20a_channel_update(struct channel_gk20a *c, int nr_completed);
+#else
+static inline void gk20a_channel_update(struct channel_gk20a *c,
+                                       int nr_completed)
+{
+}
+#endif
+#endif