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

2019-06-07 Thread Randy Dunlap
On 6/7/19 7:30 AM, Hean-Loong, Ong wrote:
> diff --git a/drivers/gpu/drm/ivip/Kconfig b/drivers/gpu/drm/ivip/Kconfig
> new file mode 100644
> index ..1b2af85fe757
> --- /dev/null
> +++ b/drivers/gpu/drm/ivip/Kconfig
> @@ -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.

According to Documentation/process/coding-style.rst, Kconfig help text should be
indented with 1 tab + 2 spaces, not 2 tabs.

-- 
~Randy


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

2019-06-07 Thread Hean-Loong, Ong
From: "Ong, Hean Loong" 

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

Signed-off-by: Ong, Hean Loong 
Acked-by: Acked-by: Daniel Vetter 

V15:
Fix indentation issues

V14:
Fix indentation issues

V13:
Fix drm-misc build failure

V12:
Fix comments

V11:
move to drm-misc

V10:
Fix Build failure

V9:
Fix Build failure

V8:
Changes to device tree docs

V6:
Changes to device tree docs

V7:
Changes to device tree docs

V6:
Fix comments

V5:
Fix comments

V4:
Fix comments

V3:
Fix comments

V2:
Move to simple drm

V1:
Initial changes
---
 MAINTAINERS   |   9 +
 drivers/gpu/drm/Kconfig   |   2 +
 drivers/gpu/drm/Makefile  |   1 +
 drivers/gpu/drm/ivip/Kconfig  |  14 ++
 drivers/gpu/drm/ivip/Makefile |   6 +
 drivers/gpu/drm/ivip/intel_vip_conn.c |  93 +++
 drivers/gpu/drm/ivip/intel_vip_drv.c  | 335 ++
 drivers/gpu/drm/ivip/intel_vip_drv.h  |  73 ++
 8 files changed, 533 insertions(+)
 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_drv.c
 create mode 100644 drivers/gpu/drm/ivip/intel_vip_drv.h

diff --git a/MAINTAINERS b/MAINTAINERS
index e7e81fadff65..0fdec52a356a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5229,6 +5229,15 @@ L:   dri-devel@lists.freedesktop.org
 F: include/drm/ttm/
 F: drivers/gpu/drm/ttm/
 
+DRM INTEL IVIP
+M: Hean Loong, Ong 
+L:  dri-devel@lists.freedesktop.org
+T:  git git://anongit.freedesktop.org/drm/drm-misc
+S: Maintained
+F: intel_vip_conn.c
+F: intel_vip_drv.c
+F: intel_vip_drv.h
+
 DSBR100 USB FM RADIO DRIVER
 M: Alexey Klimov 
 L: linux-me...@vger.kernel.org
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index bd943a71756c..3db01e99479b 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -231,6 +231,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
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 1ac55c65eac0..e8ac4e3de9c6 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -63,6 +63,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_V3D)  += v3d/
 obj-$(CONFIG_DRM_VC4)  += vc4/
diff --git a/drivers/gpu/drm/ivip/Kconfig b/drivers/gpu/drm/ivip/Kconfig
new file mode 100644
index ..1b2af85fe757
--- /dev/null
+++ b/drivers/gpu/drm/ivip/Kconfig
@@ -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.
diff --git a/drivers/gpu/drm/ivip/Makefile b/drivers/gpu/drm/ivip/Makefile
new file mode 100644
index ..8c54e11daeca
--- /dev/null
+++ b/drivers/gpu/drm/ivip/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for the drm device driver.  This driver provides support for the
+# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
+
+obj-$(CONFIG_DRM_IVIP) += ivip.o
+ivip-objs := intel_vip_drv.o intel_vip_conn.o
diff --git a/drivers/gpu/drm/ivip/intel_vip_conn.c 
b/drivers/gpu/drm/ivip/intel_vip_conn.c
new file mode 100644
index ..041b7a576983
--- /dev/null
+++ b/drivers/gpu/drm/ivip/intel_vip_conn.c
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * intel_vip_conn.c -- Intel Video and Image Processing(VIP)
+ * Frame Buffer II driver
+ *
+ * This driver supports the Intel VIP Frame Reader component.
+ * More info on the hardware can be found in the Intel Video
+ * and Image Processing Suite User Guide at this address
+ * http://www.altera.com/literature/ug/ug_vip.pdf.
+ *
+ * Authors:
+ * Walter Goossens 
+ * Thomas Chou 
+ * Chris Rauer 
+ * Ong, Hean-Loong 
+ *
+ */
+
+#include 
+#include 
+#include