hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/gpu/host1x/hw/syncpt_hw.c
....@@ -1,19 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Tegra host1x Syncpoints
34 *
45 * Copyright (c) 2010-2013, NVIDIA Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #include <linux/io.h>
....@@ -37,10 +26,12 @@
3726 */
3827 static void syncpt_restore_wait_base(struct host1x_syncpt *sp)
3928 {
29
+#if HOST1X_HW < 7
4030 struct host1x *host = sp->host;
4131
4232 host1x_sync_writel(host, sp->base_val,
4333 HOST1X_SYNC_SYNCPT_BASE(sp->id));
34
+#endif
4435 }
4536
4637 /*
....@@ -48,10 +39,12 @@
4839 */
4940 static void syncpt_read_wait_base(struct host1x_syncpt *sp)
5041 {
42
+#if HOST1X_HW < 7
5143 struct host1x *host = sp->host;
5244
5345 sp->base_val =
5446 host1x_sync_readl(host, HOST1X_SYNC_SYNCPT_BASE(sp->id));
47
+#endif
5548 }
5649
5750 /*
....@@ -112,9 +105,6 @@
112105 {
113106 #if HOST1X_HW >= 6
114107 struct host1x *host = sp->host;
115
-
116
- if (!host->hv_regs)
117
- return;
118108
119109 host1x_sync_writel(host,
120110 HOST1X_SYNC_SYNCPT_CH_APP_CH(ch ? ch->id : 0xff),