hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/gpu/host1x/hw/debug_hw_1x06.c
....@@ -1,18 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2010 Google, Inc.
34 * Author: Erik Gilling <konkers@android.com>
45 *
56 * Copyright (C) 2011-2017 NVIDIA Corporation
6
- *
7
- * This software is licensed under the terms of the GNU General Public
8
- * License version 2, as published by the Free Software Foundation, and
9
- * may be copied, distributed, and modified under those terms.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
167 */
178
189 #include "../dev.h"
....@@ -62,9 +53,12 @@
6253 struct host1x_channel *ch,
6354 struct output *o)
6455 {
65
- u32 val, rd_ptr, wr_ptr, start, end;
56
+#if HOST1X_HW <= 6
57
+ u32 rd_ptr, wr_ptr, start, end;
6658 u32 payload = INVALID_PAYLOAD;
6759 unsigned int data_count = 0;
60
+#endif
61
+ u32 val;
6862
6963 host1x_debug_output(o, "%u: fifo:\n", ch->id);
7064
....@@ -78,6 +72,7 @@
7872 val = host1x_ch_readl(ch, HOST1X_CHANNEL_CMDFIFO_RDATA);
7973 host1x_debug_output(o, "CMDFIFO_RDATA %08x\n", val);
8074
75
+#if HOST1X_HW <= 6
8176 /* Peek pointer values are invalid during SLCG, so disable it */
8277 host1x_hypervisor_writel(host, 0x1, HOST1X_HV_ICG_EN_OVERRIDE);
8378
....@@ -127,6 +122,7 @@
127122
128123 host1x_hypervisor_writel(host, 0x0, HOST1X_HV_CMDFIFO_PEEK_CTRL);
129124 host1x_hypervisor_writel(host, 0x0, HOST1X_HV_ICG_EN_OVERRIDE);
125
+#endif
130126 }
131127
132128 static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)