Skip to contentSkip to conversation

Intel FPGA Video and Image Processing Suite

PATCH Superseded Hean-Loong, Ong 3 participants 6 messages Jun 4, 2018

Subsystems (5)

v9 of 16 Superseded Latest is v16 →

lore
Share & tools
lore
#0 lore raw

v9 cover Intel FPGA Video and Image Processing Suite

From: Ong, Hean Loong <[email protected]>

The FPGA FrameBuffer Soft IP could be seen as the GPU and the DRM driver patch here is allocating memory for information to be streamed from the ARM/Linux to the display port. Basically the driver just wraps the information such as the pixels to be drawn by the FPGA FrameBuffer 2.

The piece of hardware in discussion is the SoC FPGA where Linux runs on the ARM chip and the FGPA is driven by its NIOS soft core with its own proprietary firmware.

For example the application from the ARM Linux would have to write information on the /dev/fb0 with the information stored in the SDRAM to be fetched by the FPGA framebuffer IP and displayed on the Display Port Monitor.

Ong Hean Loong (2):
ARM:socfpga-defconfig Intel FPGA Video and Image Processing Suite ARM:drm ivip Intel FPGA Video and Image Processing Suite

Ong, Hean Loong (1):
ARM:dt-bindings:display Intel FPGA Video and Image Processing Suite

 .../devicetree/bindings/display/altr,vip-fb2.txt   |   99 ++++++++++
 arch/arm/configs/socfpga_defconfig                 |    5 +
 drivers/gpu/drm/Kconfig                            |    2 +
 drivers/gpu/drm/Makefile                           |    1 +
 drivers/gpu/drm/ivip/Kconfig                       |   14 ++
 drivers/gpu/drm/ivip/Makefile                      |    9 +
 drivers/gpu/drm/ivip/intel_vip_conn.c              |   95 ++++++++++
 drivers/gpu/drm/ivip/intel_vip_core.c              |  161 ++++++++++++++++
 drivers/gpu/drm/ivip/intel_vip_drv.h               |   52 ++++++
 drivers/gpu/drm/ivip/intel_vip_of.c                |  193 ++++++++++++++++++++
 10 files changed, 631 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/altr,vip-fb2.txt
 create mode 100644 drivers/gpu/drm/ivip/Kconfig
 create mode 100644 drivers/gpu/drm/ivip/Makefile
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_conn.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_core.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_drv.h
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_of.c
#1 lore raw

PATCH v9 1/3 ARM:dt-bindings:display Intel FPGA Video and Image Processing Suite

From: Ong, Hean Loong <[email protected]>

Device tree binding for Intel FPGA Video and Image Processing Suite. The binding involved would be generated from the Altera (Intel) Qsys system. The bindings would set the max width, max height, buts per pixel and memory port width. The device tree binding only supports the Intel Arria10 devkit and its variants. Vendor name retained as altr.

V8:
*Add port to Display port decoder

V7:
*Fix OF graph for better description
*Add description for encoder

V6:
*Description have not describe DT device in general

V5:
*remove bindings for bits per symbol as it has only one value which is 8

V4:
*fix properties that does not describe the values

V3:
*OF graph not in accordance to graph.txt

V2:
*Remove Linux driver description

V1:
*Missing vendor prefix

---
 .../devicetree/bindings/display/altr,vip-fb2.txt   |   99 ++++++++++++++++++++
 1 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/altr,vip-fb2.txt
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +99 -0
new file mode 100644
index 0000000..4092804
@@ -0,0 +1,99 @@
+Intel Video and Image Processing(VIP) Frame Buffer II bindings
+
+Supported hardware: Intel FPGA SoC Arria10 and above with display port IP
+
+The Video Frame Buffer II in Video Image Processing (VIP) suite is an IP core
+that interfaces between system memory and Avalon-ST video ports. The IP core
+can be configured to support the memory reader (from memory to Avalon-ST)
+and/or memory writer (from Avalon-ST to memory) interfaces.
+
+More information the FPGA video IP component can be acquired from
+https://www.altera.com/content/dam/altera-www/global/en_US/pdfs\
+/literature/ug/ug_vip.pdf
+
+DT-Bindings:
+=============
+Required properties:
+----------------------------
+- compatible: "altr,vip-frame-buffer-2.0"
+- reg: Physical base address and length of the framebuffer controller's
+	registers.
+- altr,max-width: The maximum width of the framebuffer in pixels.
+- altr,max-height: The maximum height of the framebuffer in pixels.
+- altr,mem-port-width = the bus width of the avalon master port
+	on the frame reader
+
+Optional sub-nodes:
+- ports: The connection to the encoder
+
+Optional properties
+----------------------------
+- compatible: "altr, display-port"
+- reg: Physical base address and length of the display port controller's
+	registers
+- clocks: required clock handles for specified pairs in clock name
+- clock-names: required clock names. Contains:
+	- aux_clk: auxiliary clock,
+	- clk: 100 MHz output clock
+	- xcvr_mgmt_clk: transceiver management clock
+
+Optional sub-nodes:
+- ports: The connection to the controller
+
+Connections between the Frame Buffer II and other video IP cores in the system
+are modelled using the OF graph DT bindings. The Frame Buffer II node has up
+to two OF graph ports. When the memory writer interface is enabled, port 0
+maps to the Avalon-ST Input (din) port. When the memory reader interface is
+enabled, port 1 maps to the Avalon-ST Output (dout) port.
+
+The encoder is built into the FPGA HW design and therefore would not
+be accessible from the DDR.
+
+		Port 0				Port1
+---------------------------------------------------------
+ARRIA10 AVALON_ST (DIN)		AVALON_ST (DOUT)
+
+Required Properties Example:
+----------------------------
+
+framebuffer@100000280 {
+		compatible = "altr,vip-frame-buffer-2.0";
+		reg = <0x00000001 0x00000280 0x00000040>;
+		altr,max-width = <1280>;
+		altr,max-height = <720>;
+		altr,mem-port-width = <128>;
+
+		ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+			port@1 {
+				reg = <1>;
+					fb_output: endpoint {
+						remote-endpoint = <&dp_encoder_input>;
+					};
+			};
+		};
+};
+
+Optional Properties Example:
+This is not required unless there are needs to customize
+Display Port controller settings.
+
+displayport@100002000 {
+		compatible = "altr, display-port";
+		reg = <0x00000001 0x00002000 0x00000800>;
+		clocks = <&dp_0_clk_16 &dp_0_clk_100 &dp_0_clk_100>;
+		clock-names = "aux_clk", "clk", "xcvr_mgmt_clk";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <1>;
+					dp_input: endpoint {
+						remote-endpoint = <&dp_controller_input>;
+					};
+			};
+};
Signature · 6 lines
1.7.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
maintainer
#2 lore raw

Re: [PATCHv9 1/3] ARM:dt-bindings:display Intel FPGA Video and Image Processing Suite

Quoted 4 lines · Ong

From: Ong, Hean Loong <[email protected]>

Device tree binding for Intel FPGA Video and Image Processing Suite. The binding involved would be generated from the Altera (Intel) Qsys system. The bindings would set the max width, max height, buts per pixel and memory port width. The device tree binding only supports the Intel Arria10 devkit and its variants. Vendor name retained as altr.

You need to wrap long lines.

Quoted 40 lines

V8:
*Add port to Display port decoder

V7:
*Fix OF graph for better description
*Add description for encoder

V6:
*Description have not describe DT device in general

V5:
*remove bindings for bits per symbol as it has only one value which is 8

V4:
*fix properties that does not describe the values

V3:
*OF graph not in accordance to graph.txt

V2:
*Remove Linux driver description

V1:
*Missing vendor prefix

---
 .../devicetree/bindings/display/altr,vip-fb2.txt   |   99 ++++++++++++++++++++
 1 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/altr,vip-fb2.txt
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +2 -0
new file mode 100644
index 0000000..4092804
@@ -0,0 +1,99 @@
+Intel Video and Image Processing(VIP) Frame Buffer II bindings
+

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 12

Quoted 10 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +10 -0
+Supported hardware: Intel FPGA SoC Arria10 and above with display port IP
+
+The Video Frame Buffer II in Video Image Processing (VIP) suite is an IP core
+that interfaces between system memory and Avalon-ST video ports. The IP core
+can be configured to support the memory reader (from memory to Avalon-ST)
+and/or memory writer (from Avalon-ST to memory) interfaces.
+
+More information the FPGA video IP component can be acquired from
+https://www.altera.com/content/dam/altera-www/global/en_US/pdfs\
+/literature/ug/ug_vip.pdf

But URLs you don't need to wrap.

Quoted 7 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +7 -0
+
+DT-Bindings:
+=============
+Required properties:
+----------------------------
+- compatible: "altr,vip-frame-buffer-2.0"
+- reg: Physical base address and length of the framebuffer controller's

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 29

Quoted 10 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +10 -0
+	registers.
+- altr,max-width: The maximum width of the framebuffer in pixels.
+- altr,max-height: The maximum height of the framebuffer in pixels.
+- altr,mem-port-width = the bus width of the avalon master port
+	on the frame reader
+
+Optional sub-nodes:
+- ports: The connection to the encoder
+
+Optional properties

These are not optional properties because this is a whole other node. Group things by node (perhaps even make this 2 docments) and within each node you describe required and optional properties.

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 31

Quoted 2 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +2 -0
+----------------------------
+- compatible: "altr, display-port"

spurious space ^

This needs to be more specific. Is there an IP version?

This is a DisplayPort encoder?

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 37

Quoted 6 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +6 -0
+- reg: Physical base address and length of the display port controller's
+	registers
+- clocks: required clock handles for specified pairs in clock name
+- clock-names: required clock names. Contains:
+	- aux_clk: auxiliary clock,
+	- clk: 100 MHz output clock

But 'clocks' are input clocks.

Needs a better name than 'clk'.

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 38

Quoted 1 line
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +1 -0
+	- xcvr_mgmt_clk: transceiver management clock

'_clk' is redundant.

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 44

Quoted 6 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +6 -0
+
+Optional sub-nodes:
+- ports: The connection to the controller
+
+Connections between the Frame Buffer II and other video IP cores in the system
+are modelled using the OF graph DT bindings. The Frame Buffer II node has up

s/modelled/modeled/

Quoted 10 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +10 -0
+to two OF graph ports. When the memory writer interface is enabled, port 0
+maps to the Avalon-ST Input (din) port. When the memory reader interface is
+enabled, port 1 maps to the Avalon-ST Output (dout) port.
+
+The encoder is built into the FPGA HW design and therefore would not
+be accessible from the DDR.
+
+		Port 0				Port1
+---------------------------------------------------------
+ARRIA10 AVALON_ST (DIN)		AVALON_ST (DOUT)

Documentation/devicetree/bindings/display/altr,vip-fb2.txt line 64

Quoted 10 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +10 -0
+
+Required Properties Example:
+----------------------------
+
+framebuffer@100000280 {
+		compatible = "altr,vip-frame-buffer-2.0";
+		reg = <0x00000001 0x00000280 0x00000040>;
+		altr,max-width = <1280>;
+		altr,max-height = <720>;
+		altr,mem-port-width = <128>;

Doesn't this block require some clocks too?

Quoted 38 lines
Documentation/devicetree/bindings/display/altr,vip-fb2.txt new file +35 -0
+
+		ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+			port@1 {
+				reg = <1>;
+					fb_output: endpoint {
+						remote-endpoint = <&dp_encoder_input>;
+					};
+			};
+		};
+};
+
+Optional Properties Example:
+This is not required unless there are needs to customize
+Display Port controller settings.
+
+displayport@100002000 {
+		compatible = "altr, display-port";
+		reg = <0x00000001 0x00002000 0x00000800>;
+		clocks = <&dp_0_clk_16 &dp_0_clk_100 &dp_0_clk_100>;
+		clock-names = "aux_clk", "clk", "xcvr_mgmt_clk";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <1>;
+					dp_input: endpoint {
+						remote-endpoint = <&dp_controller_input>;
+					};
+			};
+};
Signature · 1 line
1.7.1
#3 lore raw

PATCH v9 2/3 ARM:socfpga-defconfig Intel FPGA Video and Image Processing Suite

In reply to Hean-Loong, Ong

From: Ong Hean Loong <[email protected]>

Intel FPGA Video and Image Processing Suite Frame Buffer II driver config for Arria 10 devkit and its variants

---
 arch/arm/configs/socfpga_defconfig |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/configs/socfpga_defconfig +5 -0
index 371fca4..21d8d2b 100644
@@ -112,6 +112,11 @@ CONFIG_MFD_ALTERA_A10SR=y
 CONFIG_MFD_STMPE=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_DRM=m
+CONFIG_DRM_IVIP=m
+CONFIG_DRM_IVIP_OF=m
+CONFIG_FB=y
+CONFIG_FB_SIMPLE=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_DWC2=y
Signature · 6 lines
1.7.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH v9 3/3 ARM:drm ivip Intel FPGA Video and Image Processing Suite

In reply to Hean-Loong, Ong

From: Ong Hean Loong <[email protected]>

Driver for Intel FPGA Video and Image Processing Suite Frame Buffer II. The driver only supports the Intel Arria10 devkit and its variants. This driver can be either loaded staticlly or in modules. The OF device tree binding is located at:
Documentation/devicetree/bindings/display/altr,vip-fb2.txt

---
 drivers/gpu/drm/Kconfig               |    2 +
 drivers/gpu/drm/Makefile              |    1 +
 drivers/gpu/drm/ivip/Kconfig          |   14 +++
 drivers/gpu/drm/ivip/Makefile         |    9 ++
 drivers/gpu/drm/ivip/intel_vip_conn.c |   95 ++++++++++++++++
 drivers/gpu/drm/ivip/intel_vip_core.c |  161 +++++++++++++++++++++++++++
 drivers/gpu/drm/ivip/intel_vip_drv.h  |   52 +++++++++
 drivers/gpu/drm/ivip/intel_vip_of.c   |  193 +++++++++++++++++++++++++++++++++
 8 files changed, 527 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpu/drm/ivip/Kconfig
 create mode 100644 drivers/gpu/drm/ivip/Makefile
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_conn.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_core.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_drv.h
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_of.c
drivers/gpu/drm/Kconfig +2 -0
index deeefa7..cdc8e1a 100644
@@ -204,6 +204,8 @@ source "drivers/gpu/drm/nouveau/Kconfig"
 
 source "drivers/gpu/drm/i915/Kconfig"
 
+source "drivers/gpu/drm/ivip/Kconfig"
+
 config DRM_VGEM
 	tristate "Virtual GEM provider"
 	depends on DRM
drivers/gpu/drm/Makefile +1 -0
index 50093ff..c0fba1d 100644
@@ -60,6 +60,7 @@ obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
 obj-$(CONFIG_DRM_MGA)	+= mga/
 obj-$(CONFIG_DRM_I810)	+= i810/
 obj-$(CONFIG_DRM_I915)	+= i915/
+obj-$(CONFIG_DRM_IVIP) += ivip/
 obj-$(CONFIG_DRM_MGAG200) += mgag200/
 obj-$(CONFIG_DRM_VC4)  += vc4/
 obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/
drivers/gpu/drm/ivip/Kconfig new file +14 -0
new file mode 100644
index 0000000..1d08b90
@@ -0,0 +1,14 @@
+config DRM_IVIP
+        tristate "Intel FGPA Video and Image Processing"
+        depends on DRM && OF
+        select DRM_GEM_CMA_HELPER
+        select DRM_KMS_HELPER
+        select DRM_KMS_FB_HELPER
+        select DRM_KMS_CMA_HELPER
+        help
+		  Choose this option if you have an Intel FPGA Arria 10 system
+		  and above with an Intel Display Port IP. This does not support
+		  legacy Intel FPGA Cyclone V display port. Currently only single
+		  frame buffer is supported. Note that ACPI and X_86 architecture
+		  is not supported for Arria10. If M is selected the module will be
+		  called ivip.
drivers/gpu/drm/ivip/Makefile new file +9 -0
new file mode 100644
index 0000000..cc55b04
@@ -0,0 +1,9 @@
+#
+# Makefile for the drm device driver.  This driver provides support for the
+# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
+
+ccflags-y := -Iinclude/drm
+
+obj-$(CONFIG_DRM_IVIP) += ivip.o
+ivip-objs := intel_vip_of.o intel_vip_core.o \
+	intel_vip_conn.o
drivers/gpu/drm/ivip/intel_vip_conn.c new file +95 -0

95 lines not on this page · raw message

drivers/gpu/drm/ivip/intel_vip_core.c new file +161 -0

161 lines not on this page · raw message

drivers/gpu/drm/ivip/intel_vip_drv.h new file +52 -0

52 lines not on this page · raw message

drivers/gpu/drm/ivip/intel_vip_of.c new file +193 -0

193 lines not on this page · raw message

Signature · 1 line
1.7.1
#5 lore raw

Re: [PATCHv9 3/3] ARM:drm ivip Intel FPGA Video and Image Processing Suite

Quoted 36 lines · Ong

From: Ong Hean Loong <[email protected]>

Driver for Intel FPGA Video and Image Processing Suite Frame Buffer II. The driver only supports the Intel Arria10 devkit and its variants. This driver can be either loaded staticlly or in modules. The OF device tree binding is located at:
Documentation/devicetree/bindings/display/altr,vip-fb2.txt

---
 drivers/gpu/drm/Kconfig               |    2 +
 drivers/gpu/drm/Makefile              |    1 +
 drivers/gpu/drm/ivip/Kconfig          |   14 +++
 drivers/gpu/drm/ivip/Makefile         |    9 ++
 drivers/gpu/drm/ivip/intel_vip_conn.c |   95 ++++++++++++++++
 drivers/gpu/drm/ivip/intel_vip_core.c |  161 +++++++++++++++++++++++++++
 drivers/gpu/drm/ivip/intel_vip_drv.h  |   52 +++++++++
 drivers/gpu/drm/ivip/intel_vip_of.c   |  193 +++++++++++++++++++++++++++++++++
 8 files changed, 527 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpu/drm/ivip/Kconfig
 create mode 100644 drivers/gpu/drm/ivip/Makefile
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_conn.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_core.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_drv.h
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_of.c
drivers/gpu/drm/ivip/Kconfig new file +4 -0
new file mode 100644
index 0000000..1d08b90
@@ -0,0 +1,14 @@
+config DRM_IVIP
+        tristate "Intel FGPA Video and Image Processing"
+        depends on DRM && OF
+        select DRM_GEM_CMA_HELPER

drivers/gpu/drm/ivip/Kconfig line 14

Quoted 10 lines
drivers/gpu/drm/ivip/Kconfig new file +10 -0
+        select DRM_KMS_HELPER
+        select DRM_KMS_FB_HELPER
+        select DRM_KMS_CMA_HELPER
+        help
+		  Choose this option if you have an Intel FPGA Arria 10 system
+		  and above with an Intel Display Port IP. This does not support
+		  legacy Intel FPGA Cyclone V display port. Currently only single
+		  frame buffer is supported. Note that ACPI and X_86 architecture
+		  is not supported for Arria10. If M is selected the module will be
+		  called ivip.

Hi,

Kconfig help text is supposed to be indented with one tab + 2 spaces.

thanks,

Signature · 1 line
~Randy