aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

CM3+ with custom display problems

Mon May 13, 2019 9:05 am

Hi,

(MOD. .Split off and renamed thread)

I have a somehow similar problem, I thought that I should post it here instead of opening a new topic.

I have a 7'' panel connected to CM3 on a dev IO board, on dsi1. It's not the official one, but a 4 lanes dsi display. I wrote a device driver for it, guided by some other existing display drivers. It's supposed to work with the vc4 driver, as described here: https://github.com/anholt/linux/wiki/Ra ... lay-panels

The sda 1 and scl 1 are connected as they should, on gpio0 and 1.
GPIO0 - CD1_SDA
GPIO1 - CD1_SCL
There are also two reset lines (only the display one matters for now, I think, the other is for touch). I do a reset in device 'prepare'.

ignore_lcd by default goes to 0 but I explicitly set it to 1 (as described in Eric Anholt desc above, but letting it to 0 makes no difference)

i2cdetect shows only one value, 14. Should I see here two values?

But... it doesn't work. Here is a log of what is happening: https://github.com/anholt/linux/issues/151 Basically I try to send some dsi commands to the panel to initialize it, but they timeout.

I have no idea how to diagnose this further.

Any idea would be greatly appreciated!
Thank you,
Adrian

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3+ with 7" display on DSI0

Mon May 13, 2019 9:12 am

aroman_ro wrote:
Mon May 13, 2019 9:05 am
Hi,

I have a somehow similar problem, I thought that I should post it here instead of opening a new topic.

I have a 7'' panel connected to CM3 on a dev IO board, on dsi1. It's not the official one, but a 4 lanes dsi display. I wrote a device driver for it, guided by some other existing display drivers. It's supposed to work with the vc4 driver, as described here: https://github.com/anholt/linux/wiki/Ra ... lay-panels

The sda 1 and scl 1 are connected as they should, on gpio0 and 1.
GPIO0 - CD1_SDA
GPIO1 - CD1_SCL
There are also two reset lines (only the display one matters for now, I think, the other is for touch). I do a reset in device 'prepare'.

ignore_lcd by default goes to 0 but I explicitly set it to 1 (as described in Eric Anholt desc above, but letting it to 0 makes no difference)

i2cdetect shows only one value, 14. Should I see here two values?

But... it doesn't work. Here is a log of what is happening: https://github.com/anholt/linux/issues/151 Basically I try to send some dsi commands to the panel to initialize it, but they timeout.

I have no idea how to diagnose this further.

Any idea would be greatly appreciated!
Thank you,
Adrian
New thread please.
Basic summary: AIUI DSI command mode hasn't been used in anger off the vc4 driver, so you are in uncharted territory if that is an absolute requirement of your panel. The Pi 7" panel is configured over I2C alone.
From your Github issue you also say you're using the 4.9 release. That branch hasn't been touched since Dec 2017 when development effort moved on to 4.14. We're now on 4.19. You are strongly advised to update to 4.19.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with 7" display on DSI0

Mon May 13, 2019 9:18 am

Thank you! I didn't even know which branch is the best for using that driver... I'll switch to 4.19 right away.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with 7" display on DSI0

Mon May 13, 2019 10:18 am

Switched to 4.19 and it's worse:

Code: Select all

[    4.705536] vc4-drm soc:gpu: failed to bind 3f700000.dsi (ops vc4_dsi_ops [vc4]): -517
[    4.708654] vc4-drm soc:gpu: master bind failed: -517

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3+ with 7" display on DSI0

Mon May 13, 2019 10:37 am

aroman_ro wrote:
Mon May 13, 2019 10:18 am
Switched to 4.19 and it's worse:

Code: Select all

[    4.705536] vc4-drm soc:gpu: failed to bind 3f700000.dsi (ops vc4_dsi_ops [vc4]): -517
[    4.708654] vc4-drm soc:gpu: master bind failed: -517
Please provide all the details of your kernel, links to drivers, dt changes, etc.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Mon May 13, 2019 1:12 pm

At that point the overlay for my driver or the panel driver do not matter, I get that error even if I don't load the panel driver.

Kernel info:

Linux raspberrypi 4.19.40-v7+ #2 SMP Mon May 13 15:33:26 EEST 2019 armv7l GNU/Linux
I've got it from this repository: https://github.com/raspberrypi/linux


The dts looks like this:

Code: Select all

/dts-v1/;

/plugin/;

/ {
    compatible = "brcm,bcm2708";
    [email protected] {
	target=<&soc>;

	__overlay__ {
	    vc4_dsi: vc4_dsi {
		#address-cells = <1>;
		#size-cells = <0>;

		[email protected] {
		    compatible = "vc4-dsi", "vc4_dsi", "vc4 dsi";
		    reg = <0>;
		    port {
			panel_dsi_port: endpoint {
				remote-endpoint = <&dsi_out_port>;
			};
		    };
		};
	    };
	};
    };

    [email protected] {
	target=<&dsi1>;
	__overlay__ {
	    status = "okay";
	    port {
		dsi_out_port: endpoint {
			remote-endpoint = <&panel_dsi_port>;
	        };
	    };	    
	};
    };

    [email protected] {
	target = <&dsi1>;
	__overlay__ {
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";

	    	panel_test:  [email protected] {
			compatible = "manufacturer,test";

			label = "panel_test";
			reg = <0>;
			vc4_dsi = <&vc4_dsi>;
    		};
	};
    };
};
The panel driver source is not available yet, it's work in progress and I have no idea if it will go open source or not if successful.

I tried other kernel versions, I still have issues with them. I think this one: https://github.com/anholt/linux/tree/rpi-4.14.y got me an error about some NULL pointer in the VC4 driver...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3+ with custom display problems

Mon May 13, 2019 1:57 pm

aroman_ro wrote:
Mon May 13, 2019 1:12 pm
At that point the overlay for my driver or the panel driver do not matter, I get that error even if I don't load the panel driver.
AIUI The dsi driver wants to bind against a panel definition somewhere to determine modes supported etc.
My further recollection is that if any one part of the DRM setup fails to probe, then it blocks all parts from registering. They were amending that in mainline, but I can't recall at which kernel revision it was released.

-517 is EPROBE_DEFER, ie that node is unable to complete the probe path due to some other driver not being loaded. Your driver really does matter at this point.
You've built your own kernel, therefore add further logging into the error paths of vc4_dsi_bind https://github.com/raspberrypi/linux/bl ... si.c#L1500
I'd suggest https://github.com/raspberrypi/linux/bl ... si.c#L1615 as the first one, as that is should your bridge/display driver fail to probe.
aroman_ro wrote:Kernel info:

Linux raspberrypi 4.19.40-v7+ #2 SMP Mon May 13 15:33:26 EEST 2019 armv7l GNU/Linux
I've got it from this repository: https://github.com/raspberrypi/linux

The dts looks like this:

Code: Select all

/dts-v1/;

/plugin/;

/ {
    compatible = "brcm,bcm2708";
    [email protected] {
	target=<&soc>;

	__overlay__ {
	    vc4_dsi: vc4_dsi {
		#address-cells = <1>;
		#size-cells = <0>;

		[email protected] {
		    compatible = "vc4-dsi", "vc4_dsi", "vc4 dsi";
		    reg = <0>;
		    port {
			panel_dsi_port: endpoint {
				remote-endpoint = <&dsi_out_port>;
			};
		    };
		};
	    };
	};
    };

    [email protected] {
	target=<&dsi1>;
	__overlay__ {
	    status = "okay";
	    port {
		dsi_out_port: endpoint {
			remote-endpoint = <&panel_dsi_port>;
	        };
	    };	    
	};
    };

    [email protected] {
	target = <&dsi1>;
	__overlay__ {
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";

	    	panel_test:  [email protected] {
			compatible = "manufacturer,test";

			label = "panel_test";
			reg = <0>;
			vc4_dsi = <&vc4_dsi>;
    		};
	};
    };
};
The panel driver source is not available yet, it's work in progress and I have no idea if it will go open source or not if successful.
Get some legal advice there. The Linux kernel is licenced under GPLv2, therefore all drivers have to the same unless you jump through a load of hoops to ensure you don't call any functions that are exported to GPLv2 modules only.

Against 4.14 https://github.com/raspberrypi/linux/pull/2693 was applicable for the official 7" display. I'd need to check if all those patches are in 4.19 anyway.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Mon May 13, 2019 2:44 pm

Yes, you are right. I did so many things in such a short time that I didn't recall correctly. Checked again and indeed that error does not appear if I don't load the driver.

Thank you for the info, I think it will prove valuable!

As for GPL, indeed there would be a lot of workarounds to keep the driver closed source. I will discuss the matter with whom is concerned about that, of course. From my point of view, I would really want to see it GPL, but first I'll have to make it work :(

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Mon May 13, 2019 4:07 pm

And you were right about probing, I modified vc4_dsi.c and indeed if fails where you assumed. Now I'll have to find why, my driver at least enters the probing function and I think it completes ok, but probably something there is not right for vc4.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3+ with custom display problems

Mon May 13, 2019 4:20 pm

Check that the phandles between your devices match up - follow it through via /proc/device-tree/.

I don't quite get what you're trying to do in your overlay.
Fragment 0 sets up a new node under /soc/vc4_dsi with compatible string "vc4-dsi", "vc4_dsi", "vc4 dsi". Is this the compatible string for your display?
Fragment 1 enables dsi1 and points it at the new node from fragment 0.
Fragment 2 creates a new panel definition under dsi1 with random parameters, and enables dsi1 again. This fragment looks totally wrong.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Mon May 13, 2019 6:17 pm

I don't exactly know what I'm doing there... with the old kernel it appeared to 'work', that is, I got also probing, an attempt to reset the panel and the failed attempt to send the dsi commands. WIth the new kernel that didn't work anymore. I changed the dts with this:

Code: Select all

/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2708";
    
    [email protected] {
	target=<&dsi1>;

	__overlay__ {
	    status = "okay";
	    #address-cells=<1>;
	    #size-cells=<0>;

	    port {
		dsi1_out_port: endpoint {
		    remote-endpoint = <&panel_dsi_in>;
		};
	    };

	    panel_test: [email protected] {
		compatible = "manufacturer,whatever";
		reg=<0>;
		label= "test_display";
		port {
		    panel_dsi_in: endpoint {
			remote-endpoint = <&dsi1_out_port>;
		    };
		};
	    };
	};
    };
};
And now it's doing something very similar with the old kernel case again:

Code: Select all

[    4.677712] vc4_dsi_bind!
[    4.685799] drm_of_find_panel_or_bridge -517
[    4.692940] vc4-drm soc:gpu: failed to bind 3f700000.dsi (ops vc4_dsi_ops [vc4]): -517
[    4.695230] vc4-drm soc:gpu: master bind failed: -517
[    4.959131] lcd_driver: loading out-of-tree module taints kernel.
[    4.960152] Probing!
[    4.963937] Probed!
[    4.968134] vc4_hdmi 3f902000.hdmi: ASoC: Failed to create component debugfs directory
[    4.970163] vc4_hdmi 3f902000.hdmi: vc4-hdmi-hifi <-> 3f902000.hdmi mapping ok
[    4.971174] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[    4.971417] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
[    4.971429] vc4_dsi_bind!
[    4.985612] vc4-drm soc:gpu: bound 3f700000.dsi (ops vc4_dsi_ops [vc4])
[    4.985833] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[    4.985941] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[    4.986370] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.986784] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    4.987183] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.011104] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[    5.017597] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[    5.017613] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    5.017618] [drm] Driver supports precise vblank timestamp query.
[    5.018256] Get modes!
[    5.038876] ax88179_178a 1-1:1.0 eth0: register 'ax88179_178a' at usb-3f980000.usb-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:50:b6:22:eb:67
[    5.039033] usbcore: registered new interface driver ax88179_178a
[    5.040167] Preparing!
[    5.491814] Sending init sequence!
[    6.551820] vc4_dsi 3f700000.dsi: transfer interrupt wait timeout
[    6.551832] vc4_dsi 3f700000.dsi: instat: 0x00000000
[    6.551930] [drm:vc4_dsi_host_transfer [vc4]] *ERROR* DSI transfer failed, resetting: -110
[    6.551985] [drm:send_cmd_data [lcd_driver]] *ERROR* MIPI DSI DCS write failed: -110
[    6.552001] Preparing!
[    6.552012] Couldn't grab the gpio ResetT pin
[    7.591818] vc4_dsi 3f700000.dsi: transfer interrupt wait timeout
[    7.591829] vc4_dsi 3f700000.dsi: instat: 0x00000000
[    7.591920] [drm:vc4_dsi_host_transfer [vc4]] *ERROR* DSI transfer failed, resetting: -110
[   17.751954] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:87:crtc-1] flip_done timed out
[   17.752364] Console: switching to colour frame buffer device 100x80
[   27.991948] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:87:crtc-1] flip_done timed out
[   38.231953] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:46:DSI-1] flip_done timed out
[   48.471940] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:84:plane-10] flip_done timed out
[   58.711953] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:87:crtc-1] flip_done timed out
[   58.745187] vc4-drm soc:gpu: fb0: DRM emulated frame buffer device
[   58.997918] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   59.030886] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   59.518010] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   59.697910] NFSD: starting 90-second grace period (net f0000397)
[   59.839333] Get modes!
[   62.591444] ax88179_178a 1-1:1.0 eth0: ax88179 - Link status is: 1
[   62.597322] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   70.231971] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:87:crtc-1] flip_done timed out
[   80.471972] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:46:DSI-1] flip_done timed out

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Wed May 15, 2019 11:29 am

I have it working! Only the display (that is, no touch for now) but a single line in the overlay did the trick:

Code: Select all

power-domains = <&power 18>;

aBUGSworstnightmare
Posts: 1349
Joined: Tue Jun 30, 2015 1:35 pm

Re: CM3+ with custom display problems

Wed May 15, 2019 6:21 pm

So please let us know how you did it!

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Wed May 15, 2019 6:26 pm

I added here a couple of comments:

https://github.com/raspberrypi/linux/issues/2855

There is a good chance that the code will go open source.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Thu May 16, 2019 11:37 am

It works perfectly with the kms driver but not with fkms :(

@6by9, you seem to know a lot in this area, could you please offer some hints about why would that happen?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3+ with custom display problems

Thu May 16, 2019 12:32 pm

aroman_ro wrote:
Thu May 16, 2019 11:37 am
It works perfectly with the kms driver but not with fkms :(

@6by9, you seem to know a lot in this area, could you please offer some hints about why would that happen?
FKMS relies on the firmware knowing how to drive your display (same as with legacy), and it doesn't.
Why are you wanting FKMS if you have the KMS driver working?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Thu May 16, 2019 12:49 pm

I don't know... just to have it working with both, I suppose. I also expected more performance from the 'firmware' one, for some reason.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6874
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3+ with custom display problems

Thu May 16, 2019 1:04 pm

vc4-kms-v3d = ARM in control of 3D, video composition, and display drivers.
vc4-fkms-v3d = ARM in control of 3D, firmware in control of video composition, and display drivers.
legacy = firmware in control of 3D (GLES only), video composition, and display drivers.

There should be no difference in performance if driving the relevant drivers efficiently.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Thu May 16, 2019 1:31 pm

Thank you a lot! I'll give up fkms for now.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Thu May 16, 2019 2:48 pm

I looked some more into it, seems to 'probe' the module all right, but then it does not prepare it.

Where I would expect a 'Preparing!' there is this line:

Code: Select all

[    4.974773] [drm] kms: can't enable cloning when we probably wanted to.
This is what dmesg looks like with kms (where it works):

Code: Select all

[    5.059818] vc4_hdmi 3f902000.hdmi: ASoC: Failed to create component debugfs directory
[    5.059827] usbcore: registered new interface driver ax88179_178a
[    5.065950] vc4_hdmi 3f902000.hdmi: vc4-hdmi-hifi <-> 3f902000.hdmi mapping ok
[    5.067312] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[    5.067542] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
[    5.067556] vc4_dsi_bind!
[    5.078574] drm_of_find_panel_or_bridge -517
[    5.084057] lcd_driver: loading out-of-tree module taints kernel.
[    5.085310] vc4-drm soc:gpu: failed to bind 3f700000.dsi (ops vc4_dsi_ops [vc4]): -517
[    5.085461] Probing!
[    5.086638] vc4-drm soc:gpu: master bind failed: -517
[    5.087686] Reset pin set to 2
[    5.090829] DSI Device init for whatever!
[    5.096249] Probed!
[    5.100801] vc4_hdmi 3f902000.hdmi: ASoC: Failed to create component debugfs directory
[    5.103485] vc4_hdmi 3f902000.hdmi: vc4-hdmi-hifi <-> 3f902000.hdmi mapping ok
[    5.104451] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[    5.104674] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
[    5.104686] vc4_dsi_bind!
[    5.112817] vc4-drm soc:gpu: bound 3f700000.dsi (ops vc4_dsi_ops [vc4])
[    5.113067] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[    5.113181] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[    5.113698] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.114173] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.114633] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.138039] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[    5.139688] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[    5.139705] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    5.139710] [drm] Driver supports precise vblank timestamp query.
[    5.167114] Preparing!
[    5.274344] Goodix-TS 0-0014: ID 911, version: 1060
[    5.278266] Goodix-TS 0-0014: Direct firmware load for goodix_911_cfg.bin failed with error -2
[    5.306135] input: Goodix Capacitive TouchScreen as /devices/platform/soc/3f205000.i2c/i2c-0/0-0014/input/input0
[    6.091821] Enabling!
[    6.108814] Console: switching to colour frame buffer device 100x80
[    6.150192] vc4-drm soc:gpu: fb0: DRM emulated frame buffer device
And this is with fkms:

Code: Select all

[    4.928666] Probing!
[    4.930907] Reset pin set to 2
[    4.930915] DSI Device init for whatever!
[    4.930922] Probed!
[    4.932647] vc4_dsi_bind!
[    4.951210] vc4-drm soc:gpu: bound 3f700000.dsi (ops vc4_dsi_ops [vc4])
[    4.952096] vc4-drm soc:gpu: bound 3f600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    4.973366] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[    4.974516] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[    4.974528] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    4.974534] [drm] Driver supports precise vblank timestamp query.
[    4.974773] [drm] kms: can't enable cloning when we probably wanted to.
[    4.996517] Console: switching to colour frame buffer device 82x26
[    5.018951] vc4-drm soc:gpu: fb0: DRM emulated frame buffer device
[    5.019985] Goodix-TS 0-0014: ID 911, version: 1060
[    5.021086] Goodix-TS 0-0014: Direct firmware load for goodix_911_cfg.bin failed with error -2
[    5.043908] ax88179_178a 1-1:1.0 eth0: register 'ax88179_178a' at usb-3f980000.usb-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:50:b6:22:eb:67
[    5.045184] usbcore: registered new interface driver ax88179_178a
[    5.049007] input: Goodix Capacitive TouchScreen as /devices/platform/soc/3f205000.i2c/i2c-0/0-0014/input/input0
It would be nice to have it working with both, just in case kms has some issue which does not exist in the other one...

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Mon May 20, 2019 1:56 pm

With kms, I still have some issues, I don't know if it's from what I implemented, or from some other plece: some tearing effect occurs from time to time. I played a little with timing and flags, but although some settings seem to be better than others, I cannot get rid of that annoying effect (the image 'jumps' to the right some pixels from time to time).

Does anybody know what could be the cause of this?

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Tue May 21, 2019 2:40 pm

My guess for this is that the horizontal (from the behaviour) timings are off. I tried to change them a lot (as in a LOT, hsync reduced 10x, for example), which I not tried before, and I managed to get better results. It's quite cumbersome, trial and error :(

Now I have another problem: how to calculate the clock value from the altered timings?

TeoLan
Posts: 3
Joined: Sun Jun 02, 2019 4:06 pm

Re: CM3+ with custom display problems

Sun Jun 02, 2019 4:20 pm

aroman_ro wrote:
Tue May 21, 2019 2:40 pm
My guess for this is that the horizontal (from the behaviour) timings are off. I tried to change them a lot (as in a LOT, hsync reduced 10x, for example), which I not tried before, and I managed to get better results. It's quite cumbersome, trial and error :(

Now I have another problem: how to calculate the clock value from the altered timings?
You would need an oscilloscope to track the signal from specific output DSI pins of cm3+, depending on if those tears occur with the same frequency.

Could you please attach the scheme of your panel's pinout?
Plus, the scheme of wiring between the board and screen.

Regards.

aroman_ro
Posts: 20
Joined: Mon May 06, 2019 2:01 pm

Re: CM3+ with custom display problems

Mon Jun 03, 2019 3:42 pm

I wish I would have more info on that panel, but I don't have it :(

The 'tears' do not occur with the same frequency, they seem to be cpu%-related. I managed to put a huge back porch (220 or so), with that setting the tearing occurs seldom and it's not so big, so I guess until I'll figure it out it will stay that way, although it does not make much sense why it works better that way.

TeoLan
Posts: 3
Joined: Sun Jun 02, 2019 4:06 pm

Re: CM3+ with custom display problems

Mon Jun 03, 2019 8:40 pm

What pins of DSI output did you employ?
Regards.

Return to “Compute Module”