Host1x and VIC support for Tegra186
Subsystems (5)
Mikko Perttunen
maintainerv2 cover Host1x and VIC support for Tegra186
Hi,
not many changes in v2:
Changed address-cells and size-cells for the Host1x device tree node to have value 1, since all subdevices fit in the lower 4G. Also dropped the incorrect change about this from the dt-bindings patch. Thanks to Rob for pointing this out.
Mikko
Notes for v1:
Hi everyone,
this series adds basic support for the Host1x channel engine and the VIC 2d compositor unit on Tegra186. The first three patches do the required device tree changes, the fourth patch updates the device tree binding documentation, and the two remaining patches add the actual implementation, almost all of which is in Host1x itself.
The Tegra186 Host1x is a relatively large update over previous generations, which can be seen in the diffstat. The biggest change is that Host1x is now contains separate hypervisor and vm register apertures to support virtualization at the hardware level. This driver, however, currently assumes that this instance of Linux is the sole operating system having access to the hardware.
This combined with increased numbers of supported channels and syncpoints have caused a number of register space changes that are responsible for most of the updated code.
The series has been tested on the Jetson TX1 (T210) and TX2 (T186) using the host1x_test test suite available at
http://github.com/cyndis/host1x_test
The series itself is available at
http://github.com/cyndis/linux, branch host1x-t186-1
Cheers,
Mikko
Mikko Perttunen (6):
arm64: tegra: Add #power-domain-cells for BPMP
arm64: tegra: Add host1x on Tegra186
arm64: tegra: Add VIC on Tegra186
dt-bindings: host1x: Add Tegra186 information
gpu: host1x: Add Tegra186 support
drm/tegra: Add Tegra186 support for VIC
.../display/tegra/nvidia,tegra20-host1x.txt | 4 + arch/arm64/boot/dts/nvidia/tegra186.dtsi | 31 ++++ drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/vic.c | 10 ++ drivers/gpu/host1x/Makefile | 3 +- drivers/gpu/host1x/dev.c | 60 ++++++- drivers/gpu/host1x/dev.h | 4 + drivers/gpu/host1x/hw/cdma_hw.c | 49 +++--- drivers/gpu/host1x/hw/debug_hw.c | 137 +--------------- drivers/gpu/host1x/hw/debug_hw_1x01.c | 154 ++++++++++++++++++ drivers/gpu/host1x/hw/debug_hw_1x06.c | 133 +++++++++++++++ drivers/gpu/host1x/hw/host1x01.c | 2 + drivers/gpu/host1x/hw/host1x02.c | 2 + drivers/gpu/host1x/hw/host1x04.c | 2 + drivers/gpu/host1x/hw/host1x05.c | 2 + drivers/gpu/host1x/hw/host1x06.c | 44 +++++ drivers/gpu/host1x/hw/host1x06.h | 26 +++ drivers/gpu/host1x/hw/host1x06_hardware.h | 142 ++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h | 32 ++++ drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 181 +++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_vm.h | 47 ++++++ drivers/gpu/host1x/hw/intr_hw.c | 29 ++-- 22 files changed, 926 insertions(+), 169 deletions(-) create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x01.c create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.h create mode 100644 drivers/gpu/host1x/hw/host1x06_hardware.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_uclass.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_vm.h
Signature · 1 line
2.14.1
Mikko Perttunen
maintainerPATCH v2 1/6 arm64: tegra: Add #power-domain-cells for BPMP
Add #power-domain-cells for the BPMP node on Tegra186 so that the power domain provider may be used.
--- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/nvidia/tegra186.dtsi +1 -0
@@ -443,6 +443,7 @@ shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>; #clock-cells = <1>; #reset-cells = <1>; + #power-domain-cells = <1>; bpmp_i2c: i2c { compatible = "nvidia,tegra186-bpmp-i2c";
Signature · 6 lines
2.14.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Thierry Reding
AppliedRe: [PATCH v2 1/6] arm64: tegra: Add #power-domain-cells for BPMP
Quoted 7 lines · Mikko Perttunen
Add #power-domain-cells for the BPMP node on Tegra186 so that the power domain provider may be used.
Signed-off-by Mikko Perttunen <[email protected]>--- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + 1 file changed, 1 insertion(+)
Applied, thanks.
Thierry
Mikko Perttunen
maintainerPATCH v2 2/6 arm64: tegra: Add host1x on Tegra186
In reply to Mikko PerttunenAdd the node for Host1x on the Tegra186, without any subdevices for now.
---
v2:
- Changed address-cells and size-cells to 1 and fixed the ranges property correspondingly.
arch/arm64/boot/dts/nvidia/tegra186.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/nvidia/tegra186.dtsi +18 -0
@@ -355,6 +355,24 @@ nvidia,bpmp = <&bpmp>; }; + host1x at 13e00000 { + compatible = "nvidia,tegra186-host1x", "simple-bus"; + reg = <0x0 0x13e00000 0x0 0x10000>, + <0x0 0x13e10000 0x0 0x10000>; + reg-names = "hypervisor", "vm"; + interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA186_CLK_HOST1X>; + clock-names = "host1x"; + resets = <&bpmp TEGRA186_RESET_HOST1X>; + reset-names = "host1x"; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0x15000000 0x0 0x15000000 0x01000000>; + }; + gpu at 17000000 { compatible = "nvidia,gp10b"; reg = <0x0 0x17000000 0x0 0x1000000>,
Signature · 1 line
2.14.1
Thierry Reding
AppliedRe: [PATCH v2 2/6] arm64: tegra: Add host1x on Tegra186
Quoted 11 lines · Mikko Perttunen
Add the node for Host1x on the Tegra186, without any subdevices for now.
Signed-off-by Mikko Perttunen <[email protected]>---
v2:
- Changed address-cells and size-cells to 1 and fixed the ranges property correspondingly.arch/arm64/boot/dts/nvidia/tegra186.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171019/dc8120c3/attachment.sig>
Mikko Perttunen
maintainerPATCH v2 3/6 arm64: tegra: Add VIC on Tegra186
In reply to Mikko PerttunenAdd a node for the Video Image Compositor on the Tegra186.
---
v2:
- Fixed reg property in accordance with changed parent cells.
arch/arm64/boot/dts/nvidia/tegra186.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/nvidia/tegra186.dtsi +12 -0
@@ -371,6 +371,18 @@ #size-cells = <1>; ranges = <0x15000000 0x0 0x15000000 0x01000000>; + + vic at 15340000 { + compatible = "nvidia,tegra186-vic"; + reg = <0x15340000 0x40000>; + interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&bpmp TEGRA186_CLK_VIC>; + clock-names = "vic"; + resets = <&bpmp TEGRA186_RESET_VIC>; + reset-names = "vic"; + + power-domains = <&bpmp TEGRA186_POWER_DOMAIN_VIC>; + }; }; gpu at 17000000 {
Signature · 1 line
2.14.1
Thierry Reding
AppliedRe: [PATCH v2 3/6] arm64: tegra: Add VIC on Tegra186
Quoted 9 lines · Mikko Perttunen
Add a node for the Video Image Compositor on the Tegra186.
Signed-off-by Mikko Perttunen <[email protected]>---
v2:
- Fixed reg property in accordance with changed parent cells.arch/arm64/boot/dts/nvidia/tegra186.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Applied, thanks.
Thierry
Mikko Perttunen
maintainerPATCH v2 4/6 dt-bindings: host1x: Add Tegra186 information
In reply to Mikko PerttunenAdd the Tegra186-specific hypervisor-related register range properties.
---
v2:
- Dropped incorrect note about cells properties.
.../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt +4 -0
@@ -3,6 +3,10 @@ NVIDIA Tegra host1x Required properties: - compatible: "nvidia,tegra<chip>-host1x" - reg: Physical base address and length of the controller's registers. + For pre-Tegra186, one entry describing the whole register area. + For Tegra186, one entry for each entry in reg-names: + "vm" - VM region assigned to Linux + "hypervisor" - Hypervisor region (only if Linux acts as hypervisor) - interrupts: The interrupt outputs from the controller. - #address-cells: The number of cells used to represent physical base addresses in the host1x address space. Should be 1.
Signature · 1 line
2.14.1
Re: [PATCH v2 4/6] dt-bindings: host1x: Add Tegra186 information
Quoted 10 lines · Mikko Perttunen
Add the Tegra186-specific hypervisor-related register range properties.
Signed-off-by Mikko Perttunen <[email protected]>---
v2:
- Dropped incorrect note about cells properties..../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | 4 ++++ 1 file changed, 4 insertions(+)
Thierry Reding
AppliedRe: [PATCH v2 4/6] dt-bindings: host1x: Add Tegra186 information
In reply to Mikko PerttunenQuoted 10 lines · Mikko Perttunen
Add the Tegra186-specific hypervisor-related register range properties.
Signed-off-by Mikko Perttunen <[email protected]>---
v2:
- Dropped incorrect note about cells properties..../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | 4 ++++ 1 file changed, 4 insertions(+)
Applied, thanks.
Thierry
Mikko Perttunen
maintainerPATCH v2 5/6 gpu: host1x: Add Tegra186 support
In reply to Mikko PerttunenAdd support for the implementation of Host1x present on the Tegra186. The register space has been shuffled around a little bit, requiring addition of some chip-specific code sections. Tegra186 also adds several new features, most importantly the hypervisor, but those are not yet supported with this commit.
--- drivers/gpu/host1x/Makefile | 3 +- drivers/gpu/host1x/dev.c | 60 +++++++- drivers/gpu/host1x/dev.h | 4 + drivers/gpu/host1x/hw/cdma_hw.c | 49 ++++--- drivers/gpu/host1x/hw/debug_hw.c | 137 +------------------ drivers/gpu/host1x/hw/debug_hw_1x01.c | 154 +++++++++++++++++++++ drivers/gpu/host1x/hw/debug_hw_1x06.c | 133 ++++++++++++++++++ drivers/gpu/host1x/hw/host1x01.c | 2 + drivers/gpu/host1x/hw/host1x02.c | 2 + drivers/gpu/host1x/hw/host1x04.c | 2 + drivers/gpu/host1x/hw/host1x05.c | 2 + drivers/gpu/host1x/hw/host1x06.c | 44 ++++++ drivers/gpu/host1x/hw/host1x06.h | 26 ++++ drivers/gpu/host1x/hw/host1x06_hardware.h | 142 +++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h | 32 +++++ drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 181 +++++++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_vm.h | 47 +++++++ drivers/gpu/host1x/hw/intr_hw.c | 29 ++-- 18 files changed, 880 insertions(+), 169 deletions(-) create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x01.c create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.h create mode 100644 drivers/gpu/host1x/hw/host1x06_hardware.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_uclass.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_vm.h
drivers/gpu/host1x/Makefile +2 -1
@@ -11,6 +11,7 @@ host1x-y = \ hw/host1x01.o \ hw/host1x02.o \ hw/host1x04.o \ - hw/host1x05.o + hw/host1x05.o \ + hw/host1x06.o obj-$(CONFIG_TEGRA_HOST1X) += host1x.o
drivers/gpu/host1x/dev.c +54 -6
98 lines not on this page · raw message
drivers/gpu/host1x/dev.h +4 -0
@@ -100,12 +100,14 @@ struct host1x_info {int (*init)(struct host1x *host1x);/* initialize per SoC ops */ unsigned int sync_offset;/* offset of syncpoint registers */ u64 dma_mask;/* mask of addressable memory */ +bool has_hypervisor;/* has hypervisor registers */ };struct host1x {const struct host1x_info *info;void __iomem *regs; +void __iomem *hv_regs;/* hypervisor region */ struct host1x_syncpt *syncpt;struct host1x_syncpt_base *bases;struct device *dev;
@@ -140,6 +142,8 @@ struct host1x {struct list_head list; }; +void host1x_hypervisor_writel (struct host1x *host1x,u32 r,u32 v); +u32 host1x_hypervisor_readl (struct host1x *host1x,u32 r);void host1x_sync_writel (struct host1x *host1x,u32 r,u32 v);u32 host1x_sync_readl (struct host1x *host1x,u32 r);void host1x_ch_writel (struct host1x_channel *ch,u32 r,u32 v);
drivers/gpu/host1x/hw/cdma_hw.c +30 -19
102 lines not on this page · raw message
drivers/gpu/host1x/hw/debug_hw.c +5 -132
143 lines not on this page · raw message
drivers/gpu/host1x/hw/debug_hw_1x01.c new file +154 -0
154 lines not on this page · raw message
drivers/gpu/host1x/hw/debug_hw_1x06.c new file +133 -0
133 lines not on this page · raw message
drivers/gpu/host1x/hw/host1x01.c +2 -0
@@ -21,6 +21,8 @@#include "host1x01_hardware.h" /* include code */ +#define HOST1X_HW 1 +#include "cdma_hw.c" #include "channel_hw.c" #include "debug_hw.c"
drivers/gpu/host1x/hw/host1x02.c +2 -0
@@ -21,6 +21,8 @@#include "host1x02_hardware.h" /* include code */ +#define HOST1X_HW 2 +#include "cdma_hw.c" #include "channel_hw.c" #include "debug_hw.c"
drivers/gpu/host1x/hw/host1x04.c +2 -0
@@ -21,6 +21,8 @@#include "host1x04_hardware.h" /* include code */ +#define HOST1X_HW 4 +#include "cdma_hw.c" #include "channel_hw.c" #include "debug_hw.c"
drivers/gpu/host1x/hw/host1x05.c +2 -0
@@ -21,6 +21,8 @@#include "host1x05_hardware.h" /* include code */ +#define HOST1X_HW 5 +#include "cdma_hw.c" #include "channel_hw.c" #include "debug_hw.c"
drivers/gpu/host1x/hw/host1x06.c new file +44 -0
44 lines not on this page · raw message
drivers/gpu/host1x/hw/host1x06.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* Host1x init for Tegra186 SoCs +* +* Copyright (c) 2017 NVIDIA Corporation. +* +* 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 HOST1X_HOST1X06_H +#define HOST1X_HOST1X06_H + +struct host1x ; + +int host1x06_init (struct host1x *host); + +#endif
drivers/gpu/host1x/hw/host1x06_hardware.h new file +142 -0
142 lines not on this page · raw message
drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright (c) 2017 NVIDIA Corporation. +* +* 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/>. +* +*/ + +#define HOST1X_HV_SYNCPT_PROT_EN 0x1ac4 +#define HOST1X_HV_SYNCPT_PROT_EN_CH_EN BIT(1) +#define HOST1X_HV_CH_KERNEL_FILTER_GBUFFER (x) (0x2020 + (x * 4)) +#define HOST1X_HV_CMDFIFO_PEEK_CTRL 0x233c +#define HOST1X_HV_CMDFIFO_PEEK_CTRL_ADDR (x) (x) +#define HOST1X_HV_CMDFIFO_PEEK_CTRL_CHANNEL (x) ((x) << 16) +#define HOST1X_HV_CMDFIFO_PEEK_CTRL_ENABLE BIT(31) +#define HOST1X_HV_CMDFIFO_PEEK_READ 0x2340 +#define HOST1X_HV_CMDFIFO_PEEK_PTRS 0x2344 +#define HOST1X_HV_CMDFIFO_PEEK_PTRS_WR_PTR_V (x) (((x) >> 16) & 0xfff) +#define HOST1X_HV_CMDFIFO_PEEK_PTRS_RD_PTR_V (x) ((x) & 0xfff) +#define HOST1X_HV_CMDFIFO_SETUP (x) (0x2588 + (x * 4)) +#define HOST1X_HV_CMDFIFO_SETUP_LIMIT_V (x) (((x) >> 16) & 0xfff) +#define HOST1X_HV_CMDFIFO_SETUP_BASE_V (x) ((x) & 0xfff) +#define HOST1X_HV_ICG_EN_OVERRIDE 0x2aa8
drivers/gpu/host1x/hw/hw_host1x06_uclass.h new file +181 -0
181 lines not on this page · raw message
drivers/gpu/host1x/hw/hw_host1x06_vm.h new file +47 -0
47 lines not on this page · raw message
drivers/gpu/host1x/hw/intr_hw.c +18 -11
@@ -72,6 +72,23 @@ static void _host1x_intr_disable_all_syncpt_intrs(struct host1x *host) } } +static void intr_hw_init (struct host1x *host,u32 cpm) +{ +#if HOST1X_HW <6 +/* disable the ip_busy_timeout. this prevents write drops */ +host1x_sync_writel (host,0 ,HOST1X_SYNC_IP_BUSY_TIMEOUT ); + +/* +* increase the auto-ack timout to the maximum value. 2d will hang +* otherwise on Tegra2. +*/ +host1x_sync_writel (host,0xff ,HOST1X_SYNC_CTXSW_TIMEOUT_CFG ); + +/* update host clocks per usec */ +host1x_sync_writel (host, cpm,HOST1X_SYNC_USEC_CLK ); +#endif +} +static int _host1x_intr_init_host_sync (struct host1x *host,u32 cpm,void (*syncpt_thresh_work)(struct work_struct *))
@@ -92,17 +109,7 @@ _host1x_intr_init_host_sync(struct host1x *host, u32 cpm,return err; } -/* disable the ip_busy_timeout. this prevents write drops */ -host1x_sync_writel (host,0 ,HOST1X_SYNC_IP_BUSY_TIMEOUT ); - -/* -* increase the auto-ack timout to the maximum value. 2d will hang -* otherwise on Tegra2. -*/ -host1x_sync_writel (host,0xff ,HOST1X_SYNC_CTXSW_TIMEOUT_CFG ); - -/* update host clocks per usec */ -host1x_sync_writel (host, cpm,HOST1X_SYNC_USEC_CLK ); +intr_hw_init (host, cpm);return 0 ; }
Signature · 1 line
2.14.1
Thierry Reding
AppliedRe: [PATCH v2 5/6] gpu: host1x: Add Tegra186 support
Quoted 29 lines · Mikko Perttunen
Add support for the implementation of Host1x present on the Tegra186. The register space has been shuffled around a little bit, requiring addition of some chip-specific code sections. Tegra186 also adds several new features, most importantly the hypervisor, but those are not yet supported with this commit.
Signed-off-by Mikko Perttunen <[email protected]>Reviewed-by Dmitry Osipenko <[email protected]>Tested-by Dmitry Osipenko <[email protected]>--- drivers/gpu/host1x/Makefile | 3 +- drivers/gpu/host1x/dev.c | 60 +++++++- drivers/gpu/host1x/dev.h | 4 + drivers/gpu/host1x/hw/cdma_hw.c | 49 ++++--- drivers/gpu/host1x/hw/debug_hw.c | 137 +------------------ drivers/gpu/host1x/hw/debug_hw_1x01.c | 154 +++++++++++++++++++++ drivers/gpu/host1x/hw/debug_hw_1x06.c | 133 ++++++++++++++++++ drivers/gpu/host1x/hw/host1x01.c | 2 + drivers/gpu/host1x/hw/host1x02.c | 2 + drivers/gpu/host1x/hw/host1x04.c | 2 + drivers/gpu/host1x/hw/host1x05.c | 2 + drivers/gpu/host1x/hw/host1x06.c | 44 ++++++ drivers/gpu/host1x/hw/host1x06.h | 26 ++++ drivers/gpu/host1x/hw/host1x06_hardware.h | 142 +++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h | 32 +++++ drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 181 +++++++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_vm.h | 47 +++++++ drivers/gpu/host1x/hw/intr_hw.c | 29 ++-- 18 files changed, 880 insertions(+), 169 deletions(-)
Quoted 8 lines
create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x01.c create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.h create mode 100644 drivers/gpu/host1x/hw/host1x06_hardware.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_uclass.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_vm.h
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171019/98939d90/attachment.sig>
Mikko Perttunen
maintainerPATCH v2 6/6 drm/tegra: Add Tegra186 support for VIC
In reply to Mikko PerttunenAdd Tegra186 support for VIC - no changes are required except for new firmware and compatibility string.
--- drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/vic.c | 10 ++++++++++ 2 files changed, 11 insertions(+)
drivers/gpu/drm/tegra/drm.c +1 -0
@@ -1281,6 +1281,7 @@ static const struct of_device_id host1x_drm_subdevs[] = { { .compatible = "nvidia,tegra210-sor", }, { .compatible = "nvidia,tegra210-sor1", }, { .compatible = "nvidia,tegra210-vic", }, + { .compatible = "nvidia,tegra186-vic", }, { /* sentinel */ } };
drivers/gpu/drm/tegra/vic.c +10 -0
@@ -270,9 +270,16 @@ static const struct vic_config vic_t210_config = { .firmware = NVIDIA_TEGRA_210_VIC_FIRMWARE, }; +#define NVIDIA_TEGRA_186_VIC_FIRMWARE "nvidia/tegra186/vic04_ucode.bin" + +static const struct vic_config vic_t186_config = { + .firmware =NVIDIA_TEGRA_186_VIC_FIRMWARE , +}; +static const struct of_device_id vic_match[] = { { .compatible ="nvidia,tegra124-vic" , .data = &vic_t124_config }, { .compatible ="nvidia,tegra210-vic" , .data = &vic_t210_config }, + { .compatible ="nvidia,tegra186-vic" , .data = &vic_t186_config }, { }, };
@@ -405,3 +412,6 @@ MODULE_FIRMWARE(NVIDIA_TEGRA_124_VIC_FIRMWARE);#if IS_ENABLED (CONFIG_ARCH_TEGRA_210_SOC )MODULE_FIRMWARE (NVIDIA_TEGRA_210_VIC_FIRMWARE );#endif +#if IS_ENABLED (CONFIG_ARCH_TEGRA_186_SOC ) +MODULE_FIRMWARE (NVIDIA_TEGRA_186_VIC_FIRMWARE ); +#endif
Signature · 6 lines
2.14.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Thierry Reding
AppliedRe: [PATCH v2 6/6] drm/tegra: Add Tegra186 support for VIC
Quoted 8 lines · Mikko Perttunen
Add Tegra186 support for VIC - no changes are required except for new firmware and compatibility string.
Signed-off-by Mikko Perttunen <[email protected]>--- drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/vic.c | 10 ++++++++++ 2 files changed, 11 insertions(+)
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171019/cf286e76/attachment.sig>
Quoted 32 lines · Mikko Perttunen
Hi,
not many changes in v2:
Changed address-cells and size-cells for the Host1x device tree node to have value 1, since all subdevices fit in the lower 4G. Also dropped the incorrect change about this from the dt-bindings patch. Thanks to Rob for pointing this out.
Mikko
Notes for v1:
Hi everyone,
this series adds basic support for the Host1x channel engine and the VIC 2d compositor unit on Tegra186. The first three patches do the required device tree changes, the fourth patch updates the device tree binding documentation, and the two remaining patches add the actual implementation, almost all of which is in Host1x itself.
The Tegra186 Host1x is a relatively large update over previous generations, which can be seen in the diffstat. The biggest change is that Host1x is now contains separate hypervisor and vm register apertures to support virtualization at the hardware level. This driver, however, currently assumes that this instance of Linux is the sole operating system having access to the hardware.
This combined with increased numbers of supported channels and syncpoints have caused a number of register space changes that are responsible for most of the updated code.
Quoted 8 lines
The series has been tested on the Jetson TX1 (T210) and TX2 (T186) using the
host1x_testtest suite available athttp://github.com/cyndis/host1x_test
The series itself is available at
http://github.com/cyndis/linux, branch host1x-t186-1
Since this is new hw support, is there also open source userspace using all this?
Thanks, Daniel
Quoted 51 lines
Cheers,
MikkoMikko Perttunen (6):
arm64: tegra: Add #power-domain-cells for BPMP
arm64: tegra: Add host1x on Tegra186
arm64: tegra: Add VIC on Tegra186
dt-bindings: host1x: Add Tegra186 information
gpu: host1x: Add Tegra186 support
drm/tegra: Add Tegra186 support for VIC.../display/tegra/nvidia,tegra20-host1x.txt | 4 + arch/arm64/boot/dts/nvidia/tegra186.dtsi | 31 ++++ drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/vic.c | 10 ++ drivers/gpu/host1x/Makefile | 3 +- drivers/gpu/host1x/dev.c | 60 ++++++- drivers/gpu/host1x/dev.h | 4 + drivers/gpu/host1x/hw/cdma_hw.c | 49 +++--- drivers/gpu/host1x/hw/debug_hw.c | 137 +--------------- drivers/gpu/host1x/hw/debug_hw_1x01.c | 154 ++++++++++++++++++ drivers/gpu/host1x/hw/debug_hw_1x06.c | 133 +++++++++++++++ drivers/gpu/host1x/hw/host1x01.c | 2 + drivers/gpu/host1x/hw/host1x02.c | 2 + drivers/gpu/host1x/hw/host1x04.c | 2 + drivers/gpu/host1x/hw/host1x05.c | 2 + drivers/gpu/host1x/hw/host1x06.c | 44 +++++ drivers/gpu/host1x/hw/host1x06.h | 26 +++ drivers/gpu/host1x/hw/host1x06_hardware.h | 142 ++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h | 32 ++++ drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 181 +++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_vm.h | 47 ++++++ drivers/gpu/host1x/hw/intr_hw.c | 29 ++-- 22 files changed, 926 insertions(+), 169 deletions(-) create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x01.c create mode 100644 drivers/gpu/host1x/hw/debug_hw_1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.c create mode 100644 drivers/gpu/host1x/hw/host1x06.h create mode 100644 drivers/gpu/host1x/hw/host1x06_hardware.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_uclass.h create mode 100644 drivers/gpu/host1x/hw/hw_host1x06_vm.hSignature · 6 lines
2.14.1 _______________________________________________ dri-devel mailing list dri-devel at lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 3 lines · Daniel Vetter
Since this is new hw support, is there also open source userspace using all this?
The VIC HW in Tegra186 is backwards compatible with the one in Tegra210, which has open userspace (https://github.com/cyndis/vaapi-tegra-driver), so that userspace should remain compatible. The old firmware is not compatible so we need a new compatibility string for that.
Quoted 2 lines
Thanks, Daniel
Thanks,
Mikko