devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4 v6] drm: Add support of ARC PGU display controller
@ 2016-04-19 13:19 Alexey Brodkin
  2016-04-19 13:19 ` [PATCH 2/4 v6] drm: Add DT bindings documentation for " Alexey Brodkin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexey Brodkin @ 2016-04-19 13:19 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, Alexey Brodkin, Daniel Vetter, David Airlie,
	devicetree, Ian Campbell, Kumar Gala, linux-snps-arc,
	Mark Rutland, Pawel Moll, Rob Herring, Vineet Gupta, Jose Abreu,
	Carlos Palminha

This series add support of ARC PGU display controller.
ARC PGU is a quite simple byte streamer that gets data from the framebuffer
and pushes it to hte connected encoder (DP or HDMI).

It was tested on ARC SDP boards (axs101/103 in particular).

Note following series (v6) that introduces drm_connector_register_all()
is a prerequisite now: https://lkml.org/lkml/2016/4/19/299

Changes v5 -> v6:
 * "arc: Add our own implementation of fb_pgprotect()" was already applied to
   ARC's tree and available in linux-next:
   http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=e5e0a65cd20a7a892a87e6bd73bdc3d83726d725

Changes v4 -> v5:
 * Removed encode node from DT bindings example (as suggested by Rob)

Changes v3 -> v4:
 * Main driver author is now set properly (thanks Carlos for all your efforts)
 * Implemented correct hsync and vsync setup (thanks Jose)
 * Dummy call-backs were removed (as suggested by Daniel)
 * Obsolete load()/unload() call-backs were removed (as suggested by Daniel)
 * With above in mind we were able to adopt recently introduced
   drm_connector_register_all()/drm_connector_unregister_all()
 * Implemented setup of properties (uncached) for FB user-pages
 * Minor clean-up in DT binding docs and axs10x_mb.dtsi

Changes v2 -> v3:
 * Improved failure path if arcpgu_connector wasn't allocated.
 * Fixed driver building as module.
 * Implemented uncached mapping of user-space FB pages.
 * Again updated DT bindings docs.

Changes v1 -> v2:
 * Clean-up of DT bindings documentation.
 * Added missing "pxlclk" clock in axs10x_mb.dtsi.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: linux-snps-arc@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>

Alexey Brodkin (3):
  drm: Add DT bindings documentation for ARC PGU display controller
  MAINTAINERS: Add maintainer for ARC PGU display controller
  arc: axs10x - add support of ARC PGU

Carlos Palminha (1):
  drm: Add support of ARC PGU display controller

 .../devicetree/bindings/display/snps,arcpgu.txt    |  35 +++
 MAINTAINERS                                        |   6 +
 arch/arc/boot/dts/axs10x_mb.dtsi                   |  61 +++++
 drivers/gpu/drm/Kconfig                            |   2 +
 drivers/gpu/drm/Makefile                           |   1 +
 drivers/gpu/drm/arc/Kconfig                        |  10 +
 drivers/gpu/drm/arc/Makefile                       |   2 +
 drivers/gpu/drm/arc/arcpgu.h                       |  50 ++++
 drivers/gpu/drm/arc/arcpgu_crtc.c                  | 257 +++++++++++++++++++
 drivers/gpu/drm/arc/arcpgu_drv.c                   | 282 +++++++++++++++++++++
 drivers/gpu/drm/arc/arcpgu_hdmi.c                  | 201 +++++++++++++++
 drivers/gpu/drm/arc/arcpgu_regs.h                  |  40 +++
 12 files changed, 947 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/snps,arcpgu.txt
 create mode 100644 drivers/gpu/drm/arc/Kconfig
 create mode 100644 drivers/gpu/drm/arc/Makefile
 create mode 100644 drivers/gpu/drm/arc/arcpgu.h
 create mode 100644 drivers/gpu/drm/arc/arcpgu_crtc.c
 create mode 100644 drivers/gpu/drm/arc/arcpgu_drv.c
 create mode 100644 drivers/gpu/drm/arc/arcpgu_hdmi.c
 create mode 100644 drivers/gpu/drm/arc/arcpgu_regs.h

-- 
2.5.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/4 v6] drm: Add DT bindings documentation for ARC PGU display controller
  2016-04-19 13:19 [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin
@ 2016-04-19 13:19 ` Alexey Brodkin
  2016-04-19 13:19 ` [PATCH 4/4 v6] arc: axs10x - add support of ARC PGU Alexey Brodkin
  2016-04-22 14:53 ` [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin
  2 siblings, 0 replies; 4+ messages in thread
From: Alexey Brodkin @ 2016-04-19 13:19 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, Alexey Brodkin, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree, linux-snps-arc

This add DT bindings documentation for ARC PGU display controller.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: devicetree@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
Acked-by: Rob Herring <robh@kernel.org>
---

No changes v5 -> v6.

Changes v4 -> v5: (addressing Rob's comment)
 * Added Rob's acked-by
 * Remove "encoder-slave" from the example as well.
   Now only "pgu" node is mentioned in the example.

Changes v3 -> v4: (addressing Rob's comments)
 * Removed "encoder-slave" from required properties
 * Removed "0x" from node names

Changes v2 -> v3:
 * Reverted back to initial larger version of example
   with minor fixes (thanks Rob for spotting those).

Changes v1 -> v2:
 * Removed everything except PGU node itself.

 .../devicetree/bindings/display/snps,arcpgu.txt    | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/snps,arcpgu.txt

diff --git a/Documentation/devicetree/bindings/display/snps,arcpgu.txt b/Documentation/devicetree/bindings/display/snps,arcpgu.txt
new file mode 100644
index 0000000..c5c7dfd
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/snps,arcpgu.txt
@@ -0,0 +1,35 @@
+ARC PGU
+
+This is a display controller found on several development boards produced
+by Synopsys. The ARC PGU is an RGB streamer that reads the data from a
+framebuffer and sends it to a single digital encoder (usually HDMI).
+
+Required properties:
+  - compatible: "snps,arcpgu"
+  - reg: Physical base address and length of the controller's registers.
+  - clocks: A list of phandle + clock-specifier pairs, one for each
+    entry in 'clock-names'.
+  - clock-names: A list of clock names. For ARC PGU it should contain:
+      - "pxlclk" for the clock feeding the output PLL of the controller.
+
+Required sub-nodes:
+  - port: The PGU connection to an encoder chip.
+
+Example:
+
+/ {
+	...
+
+	pgu@XXXXXXXX {
+		compatible = "snps,arcpgu";
+		reg = <0xXXXXXXXX 0x400>;
+		clocks = <&clock_node>;
+		clock-names = "pxlclk";
+
+		port {
+			pgu_output: endpoint {
+				remote-endpoint = <&hdmi_enc_input>;
+			};
+		};
+	};
+};
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4 v6] arc: axs10x - add support of ARC PGU
  2016-04-19 13:19 [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin
  2016-04-19 13:19 ` [PATCH 2/4 v6] drm: Add DT bindings documentation for " Alexey Brodkin
@ 2016-04-19 13:19 ` Alexey Brodkin
  2016-04-22 14:53 ` [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin
  2 siblings, 0 replies; 4+ messages in thread
From: Alexey Brodkin @ 2016-04-19 13:19 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, Alexey Brodkin, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Vineet Gupta, devicetree,
	linux-snps-arc

Synopsys DesignWare ARC SDP boards sport ARC SDP display
controller attached to ADV7511 HDMI encoder.

That change adds desctiption of both ARC PGU and ADV7511 in
ARC SDP'd base-board Device Tree.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: devicetree@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
---

No changes v5 -> v6.

No changes v4 -> v5.

Changes v3 -> v4:
 * Removed "0x" from node names (as suggested by Rob)

No changes v2 -> v3.

Changes v1 -> v2:
 * Added missing "pxlclk" clock in axs10x_mb.dtsi

 arch/arc/boot/dts/axs10x_mb.dtsi | 61 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index ab5d570..823f15c 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -34,6 +34,12 @@
 				clock-frequency = <50000000>;
 				#clock-cells = <0>;
 			};
+
+			pguclk: pguclk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+				clock-frequency = <74440000>;
+			};
 		};
 
 		ethernet@0x18000 {
@@ -155,6 +161,37 @@
 			clocks = <&i2cclk>;
 			interrupts = <16>;
 
+			adv7511:adv7511@39{
+				compatible="adi,adv7511";
+				reg = <0x39>;
+				interrupts = <23>;
+				adi,input-depth = <8>;
+				adi,input-colorspace = "rgb";
+				adi,input-clock = "1x";
+				adi,clock-delay = <0x03>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					/* RGB/YUV input */
+					port@0 {
+						reg = <0>;
+						adv7511_input:endpoint {
+						remote-endpoint = <&pgu_output>;
+						};
+					};
+
+					/* HDMI output */
+					port@1 {
+						reg = <1>;
+						adv7511_output: endpoint {
+							remote-endpoint = <&hdmi_connector_in>;
+						};
+					};
+				};
+			};
+
 			eeprom@0x54{
 				compatible = "24c01";
 				reg = <0x54>;
@@ -168,6 +205,16 @@
 			};
 		};
 
+		hdmi0: connector {
+			compatible = "hdmi-connector";
+			type = "a";
+			port {
+				hdmi_connector_in: endpoint {
+					remote-endpoint = <&adv7511_output>;
+				};
+			};
+		};
+
 		gpio0:gpio@13000 {
 			compatible = "snps,dw-apb-gpio";
 			reg = <0x13000 0x1000>;
@@ -229,5 +276,19 @@
 				reg = <2>;
 			};
 		};
+
+		pgu@17000 {
+			compatible = "snps,arcpgu";
+			reg = <0x17000 0x400>;
+			encoder-slave = <&adv7511>;
+			clocks = <&pguclk>;
+			clock-names = "pxlclk";
+
+			port {
+				pgu_output: endpoint {
+					remote-endpoint = <&adv7511_input>;
+				};
+			};
+		};
 	};
 };
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/4 v6] drm: Add support of ARC PGU display controller
  2016-04-19 13:19 [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin
  2016-04-19 13:19 ` [PATCH 2/4 v6] drm: Add DT bindings documentation for " Alexey Brodkin
  2016-04-19 13:19 ` [PATCH 4/4 v6] arc: axs10x - add support of ARC PGU Alexey Brodkin
@ 2016-04-22 14:53 ` Alexey Brodkin
  2 siblings, 0 replies; 4+ messages in thread
From: Alexey Brodkin @ 2016-04-22 14:53 UTC (permalink / raw)
  To: airlied@linux.ie
  Cc: linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	pawel.moll@arm.com, Carlos Palminha, devicetree@vger.kernel.org,
	Jose Abreu, linux-snps-arc@lists.infradead.org, daniel@ffwll.ch,
	mark.rutland@arm.com, galak@codeaurora.org,
	ijc+devicetree@hellion.org.uk, dri-devel@lists.freedesktop.org,
	Vineet Gupta

Hi David,

On Tue, 2016-04-19 at 16:19 +0300, Alexey Brodkin wrote:
> This series add support of ARC PGU display controller.
> ARC PGU is a quite simple byte streamer that gets data from the framebuffer
> and pushes it to hte connected encoder (DP or HDMI).
> 
> It was tested on ARC SDP boards (axs101/103 in particular).
> 
> Note following series (v6) that introduces drm_connector_register_all()
> is a prerequisite now: https://lkml.org/lkml/2016/4/19/299
> 
> Changes v5 -> v6:
>  * "arc: Add our own implementation of fb_pgprotect()" was already applied to
>    ARC's tree and available in linux-next:
>    http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=e5e0a65cd20a7a892a87e6bd73bdc3d83726d725
> 
> Changes v4 -> v5:
>  * Removed encode node from DT bindings example (as suggested by Rob)
> 
> Changes v3 -> v4:
>  * Main driver author is now set properly (thanks Carlos for all your efforts)
>  * Implemented correct hsync and vsync setup (thanks Jose)
>  * Dummy call-backs were removed (as suggested by Daniel)
>  * Obsolete load()/unload() call-backs were removed (as suggested by Daniel)
>  * With above in mind we were able to adopt recently introduced
>    drm_connector_register_all()/drm_connector_unregister_all()
>  * Implemented setup of properties (uncached) for FB user-pages
>  * Minor clean-up in DT binding docs and axs10x_mb.dtsi
> 
> Changes v2 -> v3:
>  * Improved failure path if arcpgu_connector wasn't allocated.
>  * Fixed driver building as module.
>  * Implemented uncached mapping of user-space FB pages.
>  * Again updated DT bindings docs.
> 
> Changes v1 -> v2:
>  * Clean-up of DT bindings documentation.
>  * Added missing "pxlclk" clock in axs10x_mb.dtsi.

That's my first submission of a DRM driver and I'm wondering
which tree/branch should I use as a reference to rebase my
patches and send you a pull request?

Especially given there's a prerequisite which is still only in
linux-next: http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=54d2c2da0946368b96b63e6daed7920f3
681243e

Regards,
Alexey

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-22 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19 13:19 [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin
2016-04-19 13:19 ` [PATCH 2/4 v6] drm: Add DT bindings documentation for " Alexey Brodkin
2016-04-19 13:19 ` [PATCH 4/4 v6] arc: axs10x - add support of ARC PGU Alexey Brodkin
2016-04-22 14:53 ` [PATCH 0/4 v6] drm: Add support of ARC PGU display controller Alexey Brodkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).