[Openpvrsgx-devgroup] CI20/JZ4780 HDMI (was Re: Status & HW to bring)

H. Nikolaus Schaller hns at goldelico.com
Tue Nov 12 22:44:56 CET 2019


> Am 11.11.2019 um 13:32 schrieb Paul Boddie <paul at boddie.org.uk>:
> 
> On Monday 11. November 2019 10.12.44 H. Nikolaus Schaller wrote:
>> 
>> Ah, here is the relevant comment:
>> 
>> https://lore.kernel.org/patchwork/patch/549312/#731123
>> 
>> Unfortunately I have no idea what they are talking about :)
> 
> I interpret it as the patch not using that particular week's way of doing 
> things in the Linux kernel.
> 
>> Maybe the drivers/gpu/drm/bridge/synopsys gives hints how to improve the
>> jz4780 driver - or the synopsys driver.
> 
> I think there is already an upstream display driver that might be made 
> suitable:
> 
> drivers/gpu/drm/ingenic/ingenic-drm.c
> 
> As for the Synopsys bridge driver, I wasn't convinced that anything else I 
> found was making use of it. I imagine that it must need to be wired up to some 
> other device, but it doesn't have the usual MODULE_DEVICE_TABLE declaration.
> 
> Looking at other such drivers, it seems possible that the device tree 
> declaration would employ some input ports which then reference the output 
> ports of the display devices.
> 
> For example, from arch/arm64/boot/dts/renesas/r8a77990.dtsi which uses the 
> lvds-encoder bridge driver:
> 
>  lvds0: lvds-encoder at feb90000 {
>    compatible = "renesas,r8a77990-lvds";
>    ...
>    ports {
>      ...
>      port at 0 {
>        ...
>        lvds0_in: endpoint {
>          remote-endpoint = <&du_out_lvds0>;
> 
> This kind of thing isn't done in the CI20 kernel because it doesn't have a 
> shiny-enough DRM driver, and so the display device references the HDMI device 
> in the device tree, with the code confirming this:
> 
> drivers/gpu/drm/jz4780/jz4780_drv.c
> 
> In fact, the port/endpoint mechanism is supported in the submitted driver (see 
> above), whereas the upstream Ingenic driver doesn't have that support, perhaps 
> because many of the devices involved don't need to enable LVDS or HDMI to get 
> video working.

I have studied the jz4740 and qi60 a little and it uses

	lcd: lcd-controller at 13050000 {
		compatible = "ingenic,jz4740-lcd";
		reg = <0x13050000 0x1000>;

		interrupt-parent = <&intc>;
		interrupts = <30>;

		clocks = <&cgu JZ4740_CLK_LCD_PCLK>, <&cgu JZ4740_CLK_LCD>;
		clock-names = "lcd_pclk", "lcd";
	};

	panel: panel {
		compatible = "giantplus,gpm940b0";

		power-supply = <&vcc>;

		port {
			panel_input: endpoint {
				remote-endpoint = <&panel_output>;
			};
		};
	};


&lcd {
	pinctrl-names = "default";
	pinctrl-0 = <&pins_lcd>;

	port {
		panel_output: endpoint {
			remote-endpoint = <&panel_input>;
		};
	};
};

BTW: would that work the same for the jz4780? Then I could at least pretend
to have an LCD... Even if none is physically connected. This would already
allow to start to experiment with the SGX driver. And we can try to solve HDMI
in parallel.

> So, the Ingenic driver would need to be augmented with port/endpoint support, 
> and there would need to be a way of activating the Synopsys driver in the 
> device tree. Exactly how the latter should be done remains a mystery to me at 
> the moment.

Same for me...

BR,
Nikolaus



More information about the openpvrsgx-devgroup mailing list