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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Tue Mar 16, 2021 7:09 pm

What panel and/or bridge are you using? Generally you need a panel driver such as those found in https://github.com/raspberrypi/linux/tr ... /drm/panel.

ILI9881 is a common DSI panel, and has a couple of variants as listed at around line 572. That gives the timing on the DSI bus (it gets munged slightly), and then [url=https://github.com/raspberrypi/linux/blob/rpi-5.10.y/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c#L673]around line 673 it configures the image format (RGB888) and the number of DSI lanes required.
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.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 6:46 am

LVDS panel, which I added to panel-simple.c (I'll upstream it after testing).

The DSI-toLVDS bridge is a TI SN65DSI83, I'm currently using the v3 upstream patch with a small change (I've already sent that to Jagen).

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:12 am

milo246 wrote:
Wed Mar 17, 2021 6:46 am
LVDS panel, which I added to panel-simple.c (I'll upstream it after testing).

The DSI-toLVDS bridge is a TI SN65DSI83, I'm currently using the v3 upstream patch with a small change (I've already sent that to Jagen).
I'm testing with SN85DSI84 as well using the same patch. Do you mind sharing changes made to the driver and your overlay?
Adding the timings to panel-simple.c is my preference as well as they can be used then either via DPI (with LVDS tranmitter) or via DSI (using the bridge).

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:16 am

Attached the patch to make the bridge driver compatible with the RPi, and the patch that adds the LVDS panel.
Attachments
panel-patches.tar.gz
(2.12 KiB) Downloaded 30 times

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:18 am

milo246 wrote:
Tue Mar 16, 2021 12:56 pm
Testing with hardware now. The display comes up, but looks like crap. Apparently there's something amiss in the DSI link.

I'm digging in the kernel docs and code to see if there's some thing I need to configure. It isn't clear to me yet how the bridge and DSI communcate the settings for the DSI link.
Have you tested LVDS with test pattern mode. Output should look like this if LVDS is configured/working correctly.
Image

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:21 am

And for completeness, Jagan's driver patches. Applies to 5.10 kernel.
Attachments
patches-to-add-TI-SN65DSI83-84-85-DSI-to-LVDS-bridge.tar.gz
(5.55 KiB) Downloaded 46 times

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:24 am

The test pattern looks a bit like that, but the colors come out differently. They look exactly like this other post on the TI forum:
Image

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:25 am

The output from the DSI is just unrecognizable random vertical lines.

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 7:28 am

milo246 wrote:
Wed Mar 17, 2021 7:16 am
Attached the patch to make the bridge driver compatible with the RPi, and the patch that adds the LVDS panel.
Thanks for sharing, but that's a different driver, isn't it? Looks like this one https://github.com/digi-embedded/linux/ ... si83_brg.c

It doesn seem to be the one submitted to patchwork https://linuxlists.cc/l/1/linux-kernel/ ... ost3906933

EDIT: looked at the wrong file!
Last edited by aBUGSworstnightmare on Wed Mar 17, 2021 9:51 am, edited 1 time in total.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 8:13 am

It's the v3 upstream patch from patchwork. I posted a copy.

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 9:46 am

milo246 wrote:
Wed Mar 17, 2021 8:13 am
It's the v3 upstream patch from patchwork. I posted a copy.
Sorry, my fault! I have a lot of patches for DSI8x devices on that machine here and opened the wrong one.
So, your patch is added after V3 patchwork is patched.

What does your overlay look like?
What if the bridge is connected to DSI0? Will you patch work as well?

Note: the dies in the package is always a DSI85 (check the value in the data sheet for ID registers!). They are simply not fully bonded (most likely) for DSI83 and DSI84 version.
So - in case of dual-channel LVDS (DSI84 and 85 only) - the horizontal resolution needs to be divided by 2 (LVDS_HActive) and then Channel A and B values can be added (rest is equal for single-link/dual-link).
This can be trigged in the driver i.e. based on the resolution (as usually max 1366pixels is possible with single channel LVDS). Same routine then configures for Single DSI Input to Dual-Link LVDS (DSI_CHANNEL_MODE=0x01 (which is default anyhow in CSR 0x10) and LVDS_LINK_CFG=0 (in CSR 0x18; default is 1 = single DSI Input to Single-Link LVDS)).
Populating ChannelB values can be omitted if resolution is less than 1366.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 10:27 am

What if the bridge is connected to DSI0? Will you patch work as well?
With the patch it should work on ANY hardware then, not just the RPi and not just on dsi1. It fixes a bug in the DT parsing.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 10:31 am

What does your overlay look like?

Code: Select all

/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "brcm,bcm2835";

	/* PWM0 function */
	fragment@0 {
		target = <&gpio>;
		__overlay__ {
			pwm_pins: pwm_pins {
				brcm,pins = <18>;
				brcm,function = <2>; /* Alt5 */
			};
		};
	};

	fragment@1 {
		target = <&pwm>;
		frag1: __overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&pwm_pins>;
			assigned-clock-rates = <100000000>;
			status = "okay";
		};
	};

	fragment@2 {
		target-path = "/";
		__overlay__ {
			//#gpio-cells = <2>;
			/* Panel backlight through PWM0 on GPIO 18 */
			backlight_lvds: backlight {
				compatible = "pwm-backlight";
				pwms = <&pwm 0 5000000>; /* Period of 5000000ns means 200Hz */
				brightness-levels = <0  1000>;
				num-interpolated-steps = <1000>;
				default-brightness-level = <800>;
				enable-gpios = <&gpio 17 0>; /* Backlight enable... */
			};

			panel: panel {
				compatible = "innolux,g104age-l02", "simple-panel";
				backlight = <&backlight_lvds>;

				port {
					panel_in_lvds: endpoint {
						remote-endpoint = <&bridge_out>;
					};
				};
			};
		};
	};

	fragment@3 {
		target = <&dsi1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			port {
				dsi_out_port: endpoint {
					remote-endpoint = <&bridge_in>;
					data-lanes = <0 1>;
				};
			};
		};
	};

	fragment@4 {
		target = <&i2c1>;
		__overlay__ {
			#gpio-cells = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			bridge@2c {
				compatible = "ti,sn65dsi83";
				reg = <0x2c>;
				enable-gpios = <&gpio 4 0>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						bridge_in: endpoint {
							remote-endpoint = <&dsi_out_port>;
						};
					};

					port@1 {
						reg = <1>;
						bridge_out: endpoint {
							remote-endpoint = <&panel_in_lvds>;
						};
					};
				};
			};
		};
	};
};

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 3:05 pm

milo246 wrote:
Wed Mar 17, 2021 10:31 am
What does your overlay look like?

Code: Select all

/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "brcm,bcm2835";

	/* PWM0 function */
	fragment@0 {
		target = <&gpio>;
		__overlay__ {
			pwm_pins: pwm_pins {
				brcm,pins = <18>;
				brcm,function = <2>; /* Alt5 */
			};
		};
	};

	fragment@1 {
		target = <&pwm>;
		frag1: __overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&pwm_pins>;
			assigned-clock-rates = <100000000>;
			status = "okay";
		};
	};

	fragment@2 {
		target-path = "/";
		__overlay__ {
			//#gpio-cells = <2>;
			/* Panel backlight through PWM0 on GPIO 18 */
			backlight_lvds: backlight {
				compatible = "pwm-backlight";
				pwms = <&pwm 0 5000000>; /* Period of 5000000ns means 200Hz */
				brightness-levels = <0  1000>;
				num-interpolated-steps = <1000>;
				default-brightness-level = <800>;
				enable-gpios = <&gpio 17 0>; /* Backlight enable... */
			};

			panel: panel {
				compatible = "innolux,g104age-l02", "simple-panel";
				backlight = <&backlight_lvds>;

				port {
					panel_in_lvds: endpoint {
						remote-endpoint = <&bridge_out>;
					};
				};
			};
		};
	};

	fragment@3 {
		target = <&dsi1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			port {
				dsi_out_port: endpoint {
					remote-endpoint = <&bridge_in>;
					data-lanes = <0 1>;
				};
			};
		};
	};

	fragment@4 {
		target = <&i2c1>;
		__overlay__ {
			#gpio-cells = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			bridge@2c {
				compatible = "ti,sn65dsi83";
				reg = <0x2c>;
				enable-gpios = <&gpio 4 0>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						bridge_in: endpoint {
							remote-endpoint = <&dsi_out_port>;
						};
					};

					port@1 {
						reg = <1>;
						bridge_out: endpoint {
							remote-endpoint = <&panel_in_lvds>;
						};
					};
				};
			};
		};
	};
};
I've skipped dealing with PWM and enable signals and simply used them with static level (3.3V) as I'm not sure if I want to use the backlight from the display/bridge overlay or form a dedicated BL-overlay.
Souldn't 'data-lanes = <0 1>' be a simple number (1 to 4)? Should be possible to use one lane only for your SVGA display; have you tested what TI DSI tuner SW proposes for your required settings?

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 3:18 pm

I've skipped dealing with PWM and enable signals...
The backlight is working fine this way. And helps by waiting to enable the panel until the LVDS is okay. It's linked to the display, so if you put yours in a separate overlay, don't forget to add that link otherwise the backlight stays off because the kernel thinks it's not being used....
Souldn't 'data-lanes = <0 1>' be a simple number (1 to 4)?
data-lanes is standard devicetree binding syntax. Some links support swapping lanes so that you could request <1 0 3 2> for example if the PCB swaps the lanes.

The sn65dsi83 driver only uses the count, since it's on the receiving end.

What the RPi driver supports and requires here is a complete riddle to me. Hence my inquiry here, hoping that someone would know.
Should be possible to use one lane only for your SVGA display; have you tested what TI DSI tuner SW proposes for your required settings?
What "TI DSI tuner SW" are you talking about?

For this particular panel, a single link might just work, would result in a 500MHz DSI clock.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 3:33 pm

I googled on "TI DSI tuner SW", think this is what you were talking about, but it doesn't install...

Image
Attachments
Screenshot from 2021-03-17 16-31-22.png
Screenshot from 2021-03-17 16-31-22.png (24.72 KiB) Viewed 1380 times

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 3:54 pm

Okay, downloaded a JRE that wasn't 8 years old and now it runs.

I entered all stuff into the app, but there's no help from it. I can tell it what I already know, but it doesn't provide any additional information based on that, and what it outputs as register values is what the driver already puts in there...

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Mar 17, 2021 4:07 pm

milo246 wrote:
Wed Mar 17, 2021 3:54 pm
Okay, downloaded a JRE that wasn't 8 years old and now it runs.

I entered all stuff into the app, but there's no help from it. I can tell it what I already know, but it doesn't provide any additional information based on that, and what it outputs as register values is what the driver already puts in there...
Well, that's what was the aim: prove that the driver calculates the same values as the DSI tuner tool.
But make sure to use V2.1 (your's is 2.0) as that one allows for configuring all SN65DSI8x derivatives - https://e2e.ti.com/cfs-file/__key/commu ... er-2.1.zip

Note: first test with your overlay failed, wasn't loaded at all -->> need to see what caused it as it got compiled fine.

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Thu Mar 18, 2021 6:49 am

milo246 wrote:
Wed Mar 17, 2021 10:31 am
What does your overlay look like?

Code: Select all

/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "brcm,bcm2835";

	/* PWM0 function */
	fragment@0 {
		target = <&gpio>;
		__overlay__ {
			pwm_pins: pwm_pins {
				brcm,pins = <18>;
				brcm,function = <2>; /* Alt5 */
			};
		};
	};

	fragment@1 {
		target = <&pwm>;
		frag1: __overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&pwm_pins>;
			assigned-clock-rates = <100000000>;
			status = "okay";
		};
	};

	fragment@2 {
		target-path = "/";
		__overlay__ {
			//#gpio-cells = <2>;
			/* Panel backlight through PWM0 on GPIO 18 */
			backlight_lvds: backlight {
				compatible = "pwm-backlight";
				pwms = <&pwm 0 5000000>; /* Period of 5000000ns means 200Hz */
				brightness-levels = <0  1000>;
				num-interpolated-steps = <1000>;
				default-brightness-level = <800>;
				enable-gpios = <&gpio 17 0>; /* Backlight enable... */
			};

			panel: panel {
				compatible = "innolux,g104age-l02", "simple-panel";
				backlight = <&backlight_lvds>;

				port {
					panel_in_lvds: endpoint {
						remote-endpoint = <&bridge_out>;
					};
				};
			};
		};
	};

	fragment@3 {
		target = <&dsi1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			port {
				dsi_out_port: endpoint {
					remote-endpoint = <&bridge_in>;
					data-lanes = <0 1>;
				};
			};
		};
	};

	fragment@4 {
		target = <&i2c1>;
		__overlay__ {
			#gpio-cells = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			bridge@2c {
				compatible = "ti,sn65dsi83";
				reg = <0x2c>;
				enable-gpios = <&gpio 4 0>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						bridge_in: endpoint {
							remote-endpoint = <&dsi_out_port>;
						};
					};

					port@1 {
						reg = <1>;
						bridge_out: endpoint {
							remote-endpoint = <&panel_in_lvds>;
						};
					};
				};
			};
		};
	};
};
Still refuses to load the overlay (which compiles just fine; sure, changed the panel to the one I'm using ;oP)

Code: Select all

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.11.0-v7l+ #1 SMP Sun Mar 7 16:39:00 CET 2021 armv7l GNU/Linux
pi@raspberrypi:~ $ dmesg | grep drm
[    5.573757] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[    5.579162] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[    5.579593] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[    5.580040] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[    5.580414] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.580819] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.581216] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.581537] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.581925] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.582971] fb0: switching to vc4drmfb from simple
[    5.619744] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[    5.664879] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 1
[    6.130280] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
pi@raspberrypi:~ $ dmesg | grep vc4
[    5.566146] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[    5.566384] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input0
[    5.567271] debugfs: Directory 'fef00700.hdmi' with parent 'vc4-hdmi-0' already present!
[    5.573757] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[    5.575365] rc rc1: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[    5.575601] input: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input1
[    5.576530] debugfs: Directory 'fef05700.hdmi' with parent 'vc4-hdmi-1' already present!
[    5.579162] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[    5.579593] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[    5.580040] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[    5.580414] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.580819] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.581216] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.581537] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.581925] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[    5.582971] fb0: switching to vc4drmfb from simple
[    5.619744] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[    6.130280] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[   14.140853] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.141423] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.142239] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.814809] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.815531] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.817575] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.818037] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.873859] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.874505] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.875431] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.928486] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.929222] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.930910] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.931168] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
pi@raspberrypi:~ $ dmesg | grep error
[    5.772249] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt failed with erro -2
[   14.140853] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.141423] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.142239] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.814809] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.815531] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.817575] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.818037] vc4_hdmi fef00700.hdmi: ASoC: error at snd_soc_dai_startup on fef00700.hdmi: -19
[   14.873859] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.874505] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.875431] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.928486] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.929222] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.930910] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
[   14.931168] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
pi@raspberrypi:~ $ 

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Thu Mar 18, 2021 3:52 pm

It requires this in config.txt too:

ignore_lcd=1
dtoverlay=vc4-kms-v3d-pi4

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Thu Mar 18, 2021 4:17 pm

milo246 wrote:
Thu Mar 18, 2021 3:52 pm
It requires this in config.txt too:

ignore_lcd=1
dtoverlay=vc4-kms-v3d-pi4
ignore_lcd only stops the firmware probing for the 7" DSI display. If that's not found then it's a nop.

dtoverlay=vc4-kms-v3d-pi4 is automatically mapped to dtoverlay=vc4-kms-v3d if running on a Pi4 by the magic of overlay_map.dts
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.

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Thu Mar 18, 2021 5:09 pm

6by9 wrote:
Thu Mar 18, 2021 4:17 pm
milo246 wrote:
Thu Mar 18, 2021 3:52 pm
It requires this in config.txt too:

ignore_lcd=1
dtoverlay=vc4-kms-v3d-pi4
ignore_lcd only stops the firmware probing for the 7" DSI display. If that's not found then it's a nop.

dtoverlay=vc4-kms-v3d-pi4 is automatically mapped to dtoverlay=vc4-kms-v3d if running on a Pi4 by the magic of overlay_map.dts
I have dtoverlay=vc4-kms-v3d in place for use as I'm also using KMS for my displays connected via DPI.
Anyhow, will have to test again with my own overlay as I have no idea atm why that one is not loaded.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Mar 19, 2021 2:14 pm

Just to be sure, you're using a 32-bit kernel? The DRM stuff apparently doesn't work in the 64-bit kernel.

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

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Mar 19, 2021 2:27 pm

milo246 wrote:
Fri Mar 19, 2021 2:14 pm
Just to be sure, you're using a 32-bit kernel? The DRM stuff apparently doesn't work in the 64-bit kernel.
Says whom?
It should all work quite happily with 64 bit kernels. I've just tested on a Pi3 with kmscube and all is happy. I expect nothing different on a Pi4.

DispmanX won't work on 64bit userspace, and nor will MMAL or IL, but KMS should be quite happy.
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.

milo246
Posts: 74
Joined: Mon Mar 01, 2021 1:43 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Mar 19, 2021 2:30 pm

Says I.

With the 5.4 this worked okay, but then the panel stuff isn't up to date enough. Since 5.10 it's broken in the 64-bit version on the RPi4.

I'd love to be proven wrong.

Return to “Interfacing (DSI, CSI, I2C, etc.)”