Jump to content
  • 0

Incorrect display colors in Petalinux 2020/2022 Zybo Z7.


VladimirT

Question

Hello everyone!

I'm trying to boot PetaLinux with a GUI to run my QML application. The board is connected to my FHD display via HDMI, and the display color depth is 24, but fbset shows 32 in PetaLinux.

This is a part of my devicetree_config file:

&amba_pl {
	digilent_hdmi {
		compatible = "digilent,hdmi";

		clocks = <&axi_dynclk_0>;
		clock-names = "clk";

		digilent,edid-i2c = <&i2c0>;
		digilent,fmax = <150000>;

		port@0 {
			hdmi_ep: endpoint {
				remote-endpoint = <&pl_disp_ep>;
			};
		};
	};

	xlnx_pl_disp {
		compatible = "xlnx,pl-disp";

		dmas = <&axi_vdma_1 0>;
		dma-names = "dma0";

		/*
		 * See Documentation/devicetree/bindings/dma/xilinx/xilinx_frmbuf.txt
		 * to find the equivalent DRM fourcc code for the format selected in
		 * the Frame Buffer Reader, then see See include/uapi/drm/drm_fourcc.h
		 * to find the corresponding 4-char string that should be placed here.
		 */
		xlnx,vformat = "XR24";
		xlnx,bridge = <&v_tc_out>;

		port@0 {
			pl_disp_ep: endpoint {
				remote-endpoint = <&hdmi_ep>;
			};
		};
	};
};

I have installed Qt, Matchbox, and X11 packages.

After booting, I faced a color issue even before the QML app was running. I tried to change the color depth in Xorg and adjust the fbset display parameters, but received an "FBSET INVALID ARGUMENT" error. I also tried to change the xlnx and vformat mode; after making changes and completely rebuilding, there was no video output at all.

However, I finally found that axi_vdma outputs not RGB but BGR color scheme, which might be the reason for the issue.

This is my fbset output:

mode "1920x1080-0"
	#D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
	geometry 1920 1080 1920 2160 32
	timings 0 0 0 0 0 0 0
	accel true
	rgba 8/16,8/8,8/0,0/0
endmode

Adding custom parameters such as depth and timings to `/etc/fb.modes` is not helping.

PetaLinux 2022.1 or 2020.1, Ubuntu 18.04, Digilent Zybo Z7. BSP, hardware and OS configs from oficial Digilent repository.

Any ideas?

20240418_164547.jpg

Edited by VladimirT
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You should lock into device tree binding:

/*
		 * See Documentation/devicetree/bindings/dma/xilinx/xilinx_frmbuf.txt
		 * to find the equivalent DRM fourcc code for the format selected in
		 * the Frame Buffer Reader, then see See include/uapi/drm/drm_fourcc.h
		 * to find the corresponding 4-char string that should be placed here.
		 */
		xlnx,vformat = "XR24";

Change according to your kernelĀ  version.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...