mirror of
https://github.com/Fishwaldo/build.git
synced 2025-04-29 01:11:27 +00:00
AR-1 - Adding support category for distributions AR-4 - Remove Allwinner legacy AR-5 - Drop Udoo family and move Udoo board into newly created imx6 family AR-9 - Rename sunxi-next to sunxi-legacy AR-10 - Rename sunxi-dev to sunxi-current AR-11 - Adding Radxa Rockpi S support AR-13 - Rename rockchip64-default to rockchip64-legacy AR-14 - Add rockchip64-current as mainline source AR-15 - Drop Rockchip 4.19.y NEXT, current become 5.3.y AR-16 - Rename RK3399 default to legacy AR-17 - Rename Odroid XU4 next and default to legacy 4.14.y, add DEV 5.4.y AR-18 - Add Odroid N2 current mainline AR-19 - Move Odroid C1 to meson family AR-20 - Rename mvebu64-default to mvebu64-legacy AR-21 - Rename mvebu-default to mvebu-legacy AR-22 - Rename mvebu-next to mvebu-current AR-23 - Drop meson64 default and next, current becomes former DEV 5.3.y AR-24 - Drop cubox family and move Cubox/Hummingboard boards under imx6 AR-26 - Adjust motd AR-27 - Enabling distribution release status AR-28 - Added new GCC compilers AR-29 - Implementing Ubuntu Eoan AR-30 - Add desktop packages per board or family AR-31 - Remove (Ubuntu/Debian) distribution name from image filename AR-32 - Move arch configs from configuration.sh to separate arm64 and armhf config files AR-33 - Revision numbers for beta builds changed to day_in_the_year AR-34 - Patches support linked patches AR-35 - Break meson64 family into gxbb and gxl AR-36 - Add Nanopineo2 Black AR-38 - Upgrade option from old branches to new one via armbian-config AR-41 - Show full timezone info AR-43 - Merge Odroid N2 to meson64 AR-44 - Enable FORCE_BOOTSCRIPT_UPDATE for all builds
131 lines
4.5 KiB
Diff
131 lines
4.5 KiB
Diff
From 7fe721b0e0c72de29b4cfe9b3d6aa80a64f1603d Mon Sep 17 00:00:00 2001
|
|
From: Qiang Yu <yuq825@gmail.com>
|
|
Date: Mon, 14 May 2018 22:17:43 +0800
|
|
Subject: [PATCH 051/146] drm/lima: add BCAST related function
|
|
|
|
BCAST is a hardware module to broadcast register
|
|
read/write for PPs. It can also merge IRQs from
|
|
different PPs into one IRQ.
|
|
|
|
Signed-off-by: Qiang Yu <yuq825@gmail.com>
|
|
---
|
|
drivers/gpu/drm/lima/lima_bcast.c | 65 +++++++++++++++++++++++++++++++
|
|
drivers/gpu/drm/lima/lima_bcast.h | 34 ++++++++++++++++
|
|
2 files changed, 99 insertions(+)
|
|
create mode 100644 drivers/gpu/drm/lima/lima_bcast.c
|
|
create mode 100644 drivers/gpu/drm/lima/lima_bcast.h
|
|
|
|
diff --git a/drivers/gpu/drm/lima/lima_bcast.c b/drivers/gpu/drm/lima/lima_bcast.c
|
|
new file mode 100644
|
|
index 000000000000..32012a61ea6a
|
|
--- /dev/null
|
|
+++ b/drivers/gpu/drm/lima/lima_bcast.c
|
|
@@ -0,0 +1,65 @@
|
|
+/*
|
|
+ * Copyright (C) 2017-2018 Lima Project
|
|
+ *
|
|
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
|
+ * copy of this software and associated documentation files (the "Software"),
|
|
+ * to deal in the Software without restriction, including without limitation
|
|
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
+ * and/or sell copies of the Software, and to permit persons to whom the
|
|
+ * Software is furnished to do so, subject to the following conditions:
|
|
+ *
|
|
+ * The above copyright notice and this permission notice shall be included in
|
|
+ * all copies or substantial portions of the Software.
|
|
+ *
|
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
+ */
|
|
+
|
|
+#include <linux/io.h>
|
|
+#include <linux/device.h>
|
|
+
|
|
+#include "lima_device.h"
|
|
+#include "lima_bcast.h"
|
|
+#include "lima_regs.h"
|
|
+
|
|
+#define bcast_write(reg, data) writel(data, ip->iomem + LIMA_BCAST_##reg)
|
|
+#define bcast_read(reg) readl(ip->iomem + LIMA_BCAST_##reg)
|
|
+
|
|
+void lima_bcast_enable(struct lima_device *dev)
|
|
+{
|
|
+ struct lima_sched_pipe *pipe = dev->pipe + lima_pipe_pp;
|
|
+ struct lima_ip *ip = dev->ip + lima_ip_bcast;
|
|
+ int i, mask = 0;
|
|
+
|
|
+ for (i = 0; i < pipe->num_processor; i++) {
|
|
+ struct lima_ip *pp = pipe->processor[i];
|
|
+ mask |= 1 << (pp->id - lima_ip_pp0);
|
|
+ }
|
|
+
|
|
+ bcast_write(BROADCAST_MASK, (mask << 16) | mask);
|
|
+ bcast_write(INTERRUPT_MASK, mask);
|
|
+}
|
|
+
|
|
+void lima_bcast_disable(struct lima_device *dev)
|
|
+{
|
|
+ struct lima_ip *ip = dev->ip + lima_ip_bcast;
|
|
+
|
|
+ bcast_write(BROADCAST_MASK, 0);
|
|
+ bcast_write(INTERRUPT_MASK, 0);
|
|
+}
|
|
+
|
|
+int lima_bcast_init(struct lima_ip *ip)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+void lima_bcast_fini(struct lima_ip *ip)
|
|
+{
|
|
+
|
|
+}
|
|
+
|
|
diff --git a/drivers/gpu/drm/lima/lima_bcast.h b/drivers/gpu/drm/lima/lima_bcast.h
|
|
new file mode 100644
|
|
index 000000000000..abafd4f613c7
|
|
--- /dev/null
|
|
+++ b/drivers/gpu/drm/lima/lima_bcast.h
|
|
@@ -0,0 +1,34 @@
|
|
+/*
|
|
+ * Copyright (C) 2017-2018 Lima Project
|
|
+ *
|
|
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
|
+ * copy of this software and associated documentation files (the "Software"),
|
|
+ * to deal in the Software without restriction, including without limitation
|
|
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
+ * and/or sell copies of the Software, and to permit persons to whom the
|
|
+ * Software is furnished to do so, subject to the following conditions:
|
|
+ *
|
|
+ * The above copyright notice and this permission notice shall be included in
|
|
+ * all copies or substantial portions of the Software.
|
|
+ *
|
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
+ */
|
|
+
|
|
+#ifndef __LIMA_BCAST_H__
|
|
+#define __LIMA_BCAST_H__
|
|
+
|
|
+struct lima_ip;
|
|
+
|
|
+int lima_bcast_init(struct lima_ip *ip);
|
|
+void lima_bcast_fini(struct lima_ip *ip);
|
|
+
|
|
+void lima_bcast_enable(struct lima_device *dev);
|
|
+void lima_bcast_disable(struct lima_device *dev);
|
|
+
|
|
+#endif
|
|
--
|
|
2.17.1
|
|
|