devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/5] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment
@ 2018-12-04 15:16 Jonathan Marek
       [not found] ` <20181204151702.8514-1-jonathan-eSc4qw6YbEQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Marek @ 2018-12-04 15:16 UTC (permalink / raw)
  To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	David Airlie, open list:DRM DRIVER FOR MSM ADRENO GPU, open list,
	open list:DRM DRIVER FOR MSM ADRENO GPU, Rob Clark, Rob Herring,
	Sean Paul, Chris.Healy-c8ZVq/bFV1I, Jeykumar Sankaran,
	festevam-Re5JQEeQqe8AvxtiuMwx3w

This allows controlling which of the 8 lanes are used for 6 bit color.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
v3: removed empty line and added documentation

 .../devicetree/bindings/display/msm/mdp4.txt  |  2 ++
 .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 21 ++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/msm/mdp4.txt b/Documentation/devicetree/bindings/display/msm/mdp4.txt
index 3c341a15c..b07eeb38f 100644
--- a/Documentation/devicetree/bindings/display/msm/mdp4.txt
+++ b/Documentation/devicetree/bindings/display/msm/mdp4.txt
@@ -38,6 +38,8 @@ Required properties:
 Optional properties:
 - clock-names: the following clocks are optional:
   * "lut_clk"
+- qcom,lcdc-align-lsb: Boolean value indicating that LSB alignment should be
+  used for LCDC. This is only valid for 18bpp panels.
 
 Example:
 
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c
index 9e08c2efa..c9e34501a 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c
@@ -377,20 +377,25 @@ static void mdp4_lcdc_encoder_enable(struct drm_encoder *encoder)
 	unsigned long pc = mdp4_lcdc_encoder->pixclock;
 	struct mdp4_kms *mdp4_kms = get_kms(encoder);
 	struct drm_panel *panel;
+	uint32_t config;
 	int i, ret;
 
 	if (WARN_ON(mdp4_lcdc_encoder->enabled))
 		return;
 
 	/* TODO: hard-coded for 18bpp: */
-	mdp4_crtc_set_config(encoder->crtc,
-			MDP4_DMA_CONFIG_R_BPC(BPC6) |
-			MDP4_DMA_CONFIG_G_BPC(BPC6) |
-			MDP4_DMA_CONFIG_B_BPC(BPC6) |
-			MDP4_DMA_CONFIG_PACK_ALIGN_MSB |
-			MDP4_DMA_CONFIG_PACK(0x21) |
-			MDP4_DMA_CONFIG_DEFLKR_EN |
-			MDP4_DMA_CONFIG_DITHER_EN);
+	config =
+		MDP4_DMA_CONFIG_R_BPC(BPC6) |
+		MDP4_DMA_CONFIG_G_BPC(BPC6) |
+		MDP4_DMA_CONFIG_B_BPC(BPC6) |
+		MDP4_DMA_CONFIG_PACK(0x21) |
+		MDP4_DMA_CONFIG_DEFLKR_EN |
+		MDP4_DMA_CONFIG_DITHER_EN;
+
+	if (!of_property_read_bool(dev->dev->of_node, "qcom,lcdc-align-lsb"))
+		config |= MDP4_DMA_CONFIG_PACK_ALIGN_MSB;
+
+	mdp4_crtc_set_config(encoder->crtc, config);
 	mdp4_crtc_set_intf(encoder->crtc, INTF_LCDC_DTV, 0);
 
 	bs_set(mdp4_lcdc_encoder, 1);
-- 
2.17.1

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [PATCH v4 4/5] ARM: dts: imx5: add gpu nodes
       [not found] ` <20181204151702.8514-1-jonathan-eSc4qw6YbEQ@public.gmane.org>
@ 2018-12-04 15:17   ` Jonathan Marek
       [not found]     ` <20181204151702.8514-4-jonathan-eSc4qw6YbEQ@public.gmane.org>
  2018-12-04 15:17   ` [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd, imageon compatible Jonathan Marek
  2018-12-07 23:18   ` [PATCH v4 1/5] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Rob Herring
  2 siblings, 1 reply; 7+ messages in thread
From: Jonathan Marek @ 2018-12-04 15:17 UTC (permalink / raw)
  To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	festevam-Re5JQEeQqe8AvxtiuMwx3w, Sascha Hauer, open list,
	Rob Herring, Chris.Healy-c8ZVq/bFV1I, Pengutronix Kernel Team,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	NXP Linux Team

This adds the gpu nodes for the adreno 200 GPU on iMX51 and iMX53, now
supported by the freedreno driver.

The compatible for the iMX51 uses a patchid of 1, which is used by drm/msm
driver to identify the smaller 128KiB GMEM size.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
v4:
 added commit message
 moved to follow address order
 removed frequencies, they are not needed as clocks have fixed rate

 arch/arm/boot/dts/imx51.dtsi | 10 ++++++++++
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 67d462715..14dcc5a41 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -123,6 +123,16 @@
 			reg = <0x1ffe0000 0x20000>;
 		};
 
+		gpu: gpu@30000000 {
+			compatible = "amd,imageon-200.1", "amd,imageon";
+			reg = <0x30000000 0x20000>;
+			reg-names = "kgsl_3d0_reg_memory";
+			interrupts = <12>;
+			interrupt-names = "kgsl_3d0_irq";
+			clocks = <&clks IMX5_CLK_GPU3D_GATE>, <&clks IMX5_CLK_GARB_GATE>;
+			clock-names = "core_clk", "mem_iface_clk";
+		};
+
 		ipu: ipu@40000000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 207eb557c..d7d5fe4c7 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -209,6 +209,16 @@
 			};
 		};
 
+		gpu: gpu@30000000 {
+			compatible = "amd,imageon-200.0", "amd,imageon";
+			reg = <0x30000000 0x20000>;
+			reg-names = "kgsl_3d0_reg_memory";
+			interrupts = <12>;
+			interrupt-names = "kgsl_3d0_irq";
+			clocks = <&clks IMX5_CLK_GPU3D_GATE>, <&clks IMX5_CLK_GARB_GATE>;
+			clock-names = "core_clk", "mem_iface_clk";
+		};
+
 		aips@50000000 { /* AIPS1 */
 			compatible = "fsl,aips-bus", "simple-bus";
 			#address-cells = <1>;
-- 
2.17.1

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd, imageon compatible
       [not found] ` <20181204151702.8514-1-jonathan-eSc4qw6YbEQ@public.gmane.org>
  2018-12-04 15:17   ` [PATCH v4 4/5] ARM: dts: imx5: add gpu nodes Jonathan Marek
@ 2018-12-04 15:17   ` Jonathan Marek
  2018-12-07 23:18     ` [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd,imageon compatible Rob Herring
  2018-12-07 23:18   ` [PATCH v4 1/5] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Rob Herring
  2 siblings, 1 reply; 7+ messages in thread
From: Jonathan Marek @ 2018-12-04 15:17 UTC (permalink / raw)
  To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	David Airlie, open list:DRM DRIVER FOR MSM ADRENO GPU, open list,
	open list:DRM DRIVER FOR MSM ADRENO GPU, Rob Clark, Rob Herring,
	Chris.Healy-c8ZVq/bFV1I, festevam-Re5JQEeQqe8AvxtiuMwx3w

Document the new amd,imageon compatible, used for non-qcom hardware that
uses the drm/msm driver (iMX5).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
 Documentation/devicetree/bindings/display/msm/gpu.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/msm/gpu.txt b/Documentation/devicetree/bindings/display/msm/gpu.txt
index 43fac0fe0..ac8df3b87 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.txt
+++ b/Documentation/devicetree/bindings/display/msm/gpu.txt
@@ -1,11 +1,13 @@
 Qualcomm adreno/snapdragon GPU
 
 Required properties:
-- compatible: "qcom,adreno-XYZ.W", "qcom,adreno"
+- compatible: "qcom,adreno-XYZ.W", "qcom,adreno" or
+	      "amd,imageon-XYZ.W", "amd,imageon"
     for example: "qcom,adreno-306.0", "qcom,adreno"
   Note that you need to list the less specific "qcom,adreno" (since this
   is what the device is matched on), in addition to the more specific
   with the chip-id.
+  If "amd,imageon" is used, there should be no top level msm device.
 - reg: Physical base address and length of the controller's registers.
 - interrupts: The interrupt signal from the gpu.
 - clocks: device clocks
-- 
2.17.1

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* Re: [PATCH v4 1/5] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment
       [not found] ` <20181204151702.8514-1-jonathan-eSc4qw6YbEQ@public.gmane.org>
  2018-12-04 15:17   ` [PATCH v4 4/5] ARM: dts: imx5: add gpu nodes Jonathan Marek
  2018-12-04 15:17   ` [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd, imageon compatible Jonathan Marek
@ 2018-12-07 23:18   ` Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2018-12-07 23:18 UTC (permalink / raw)
  To: Jonathan Marek
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	David Airlie, freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	open list, open list:DRM DRIVER FOR MSM ADRENO GPU, Rob Clark,
	Sean Paul, Chris.Healy-c8ZVq/bFV1I,
	open list:DRM DRIVER FOR MSM ADRENO GPU, Jeykumar Sankaran,
	festevam-Re5JQEeQqe8AvxtiuMwx3w

On Tue,  4 Dec 2018 10:16:57 -0500, Jonathan Marek wrote:
> This allows controlling which of the 8 lanes are used for 6 bit color.
> 
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
> ---
> v3: removed empty line and added documentation
> 
>  .../devicetree/bindings/display/msm/mdp4.txt  |  2 ++
>  .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 21 ++++++++++++-------
>  2 files changed, 15 insertions(+), 8 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* Re: [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd,imageon compatible
  2018-12-04 15:17   ` [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd, imageon compatible Jonathan Marek
@ 2018-12-07 23:18     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2018-12-07 23:18 UTC (permalink / raw)
  To: Jonathan Marek
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	David Airlie, freedreno, open list,
	open list:DRM DRIVER FOR MSM ADRENO GPU, Chris.Healy,
	open list:DRM DRIVER FOR MSM ADRENO GPU

On Tue,  4 Dec 2018 10:17:01 -0500, Jonathan Marek wrote:
> Document the new amd,imageon compatible, used for non-qcom hardware that
> uses the drm/msm driver (iMX5).
> 
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
> ---
>  Documentation/devicetree/bindings/display/msm/gpu.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v4 4/5] ARM: dts: imx5: add gpu nodes
       [not found]     ` <20181204151702.8514-4-jonathan-eSc4qw6YbEQ@public.gmane.org>
@ 2018-12-07 23:25       ` Fabio Estevam
  2018-12-08  3:24       ` Shawn Guo
  1 sibling, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2018-12-07 23:25 UTC (permalink / raw)
  To: Jonathan Marek
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Sascha Hauer,
	linux-kernel, Rob Herring, Chris Healy, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	NXP Linux Team

On Tue, Dec 4, 2018 at 1:20 PM Jonathan Marek <jonathan@marek.ca> wrote:
>
> This adds the gpu nodes for the adreno 200 GPU on iMX51 and iMX53, now
> supported by the freedreno driver.
>
> The compatible for the iMX51 uses a patchid of 1, which is used by drm/msm
> driver to identify the smaller 128KiB GMEM size.
>
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>

Reviewed-by: Fabio Estevam <festevam@gmail.com>
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* Re: [PATCH v4 4/5] ARM: dts: imx5: add gpu nodes
       [not found]     ` <20181204151702.8514-4-jonathan-eSc4qw6YbEQ@public.gmane.org>
  2018-12-07 23:25       ` Fabio Estevam
@ 2018-12-08  3:24       ` Shawn Guo
  1 sibling, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2018-12-08  3:24 UTC (permalink / raw)
  To: Jonathan Marek
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Sascha Hauer,
	open list, Rob Herring, Chris.Healy-c8ZVq/bFV1I,
	Pengutronix Kernel Team, Fabio Estevam,
	festevam-Re5JQEeQqe8AvxtiuMwx3w,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	NXP Linux Team

On Tue, Dec 04, 2018 at 10:17:00AM -0500, Jonathan Marek wrote:
> This adds the gpu nodes for the adreno 200 GPU on iMX51 and iMX53, now
> supported by the freedreno driver.
> 
> The compatible for the iMX51 uses a patchid of 1, which is used by drm/msm
> driver to identify the smaller 128KiB GMEM size.
> 
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>

Applied, thanks.
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

end of thread, other threads:[~2018-12-08  3:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 15:16 [PATCH v4 1/5] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Jonathan Marek
     [not found] ` <20181204151702.8514-1-jonathan-eSc4qw6YbEQ@public.gmane.org>
2018-12-04 15:17   ` [PATCH v4 4/5] ARM: dts: imx5: add gpu nodes Jonathan Marek
     [not found]     ` <20181204151702.8514-4-jonathan-eSc4qw6YbEQ@public.gmane.org>
2018-12-07 23:25       ` Fabio Estevam
2018-12-08  3:24       ` Shawn Guo
2018-12-04 15:17   ` [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd, imageon compatible Jonathan Marek
2018-12-07 23:18     ` [PATCH v4 5/5] dt-bindings: display: msm/gpu: document amd,imageon compatible Rob Herring
2018-12-07 23:18   ` [PATCH v4 1/5] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Rob Herring

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).