cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lmtripod
Visitor
Visitor
1,923 Views
Registered: ‎10-22-2018

Color depth setting failed for PS DisplayPort

Jump to solution

Requirement : Need to display 32 bits color depth image via PS DisplayPort for better display, compared with 16 bit default display.

Problem : Set color depth failed with Linux fbset command
   - Step 1 : Connect ZCU102 PS DisplayPort to DELL U2515H
   - Step 2 : Boot ZCU102 silicon product with  pre-built image in official BSP (xilinx-zcu102-zu9-rev1.0-2017.2 )
   - Step 3 : Type command below into Linux console. Failed when setting 32 bits

linux_cmd.JPG


Question :
   - Is figure [1] below means that Linux kernel does not support color depth higher than 16 ?
git_linux_bpc.JPG

 

Reference :
[1] https://github.com/Xilinx/linux-xlnx/blob/master/drivers/gpu/drm/xilinx/xilinx_drm_dp.c

0 Kudos
1 Solution

Accepted Solutions
lmtripod
Visitor
Visitor
1,876 Views
Registered: ‎10-22-2018

Hi @watari,

 

Thanks for your active reply and nice suggestion.

 

Firstly, I tried DDC-CI but cannot found way to alert color depth. Then, I found approach to change pixel depth in device tree and it works.

 

DDC-CI Trying

Description : At first, I tried DDC-CI (EDID) solution and found no available software (like ClickMonitorDDC[2] or  Dell Display Manager [3] ) offer direct approach to modify color depth.

Question : Could you please recommand an software changing color depth, or coding approach ? Thanks a lot !

 

Device tree modification

Description :

   - I checked generated device tree files again and found RGB565 in zynqmp.dtsi (below figures).

dt_xilinx_drm.JPG

dt_xlnx_dp_sub.JPG

   - I copied these into system-user.dtsi and replace rgb565 to rgb888, according to reference[4-5].

 

&xlnx_dp_sub {
	compatible = "xlnx,dp-sub";
	status = "okay";
	reg = <0x0 0xfd4aa000 0x0 0x1000>,
	      <0x0 0xfd4ab000 0x0 0x1000>,
	      <0x0 0xfd4ac000 0x0 0x1000>;
	reg-names = "blend", "av_buf", "aud";
	xlnx,output-fmt = "rgb";
	xlnx,vid-fmt = "yuyv";
	xlnx,gfx-fmt = "rgb888";
	power-domains = <&pd_dp>;
};

&xilinx_drm {
	compatible = "xlnx,drm";
	status = "okay";
	xlnx,encoder-slave = <&xlnx_dp>;
	xlnx,connector-type = "DisplayPort";
	xlnx,dp-sub = <&xlnx_dp_sub>;
	planes {
		xlnx,pixel-format = "rgb888";
		plane0 {
			dmas = <&xlnx_dpdma 3>;
			dma-names = "dma0";
		};
		plane1 {
			dmas = <&xlnx_dpdma 0>,
			       <&xlnx_dpdma 1>,
			       <&xlnx_dpdma 2>;
			dma-names = "dma0", "dma1", "dma2";
		};
	};
};

   - ZCU102 boot with newly built image and BPP is successfully changed with RGB888, shown below.

evb_rgb888_ok.JPG

 

 

 

[2] http://clickmonitorddc.bplaced.net/

[3] https://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverid=n2p0j&lwp=rt

[4] https://github.com/mathworks/altera-linux/blob/master/Documentation/devicetree/bindings/drm/xilinx/dp_sub.txt

[5] https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/drm/xilinx/xilinx_drm.txt

View solution in original post

0 Kudos
8 Replies
watari
Professor
Professor
1,914 Views
Registered: ‎06-16-2013

Hi @lmtripod

 

I guess you have some mistake.

Would you refer the following ?

 

- Dell U2515H doesn't support 10bit color.

- RGB888 means that color depth is 8bit

- In your understanding, (maybe) 32bit color depth image means at least each unit as 10bit (R=G=B=10bit)

 

So, in this case, you set bcp as 8.

 

Best regards,

 

0 Kudos
lmtripod
Visitor
Visitor
1,908 Views
Registered: ‎10-22-2018

Hi @watari

 

Thanks for your quick response and explanation.

 

I admit that I have misunderstanding about color depth and BPP (Bit Per Pixel). In fact, I want to change BPP from RGB565 (default) to ARGB8888 or RGB888. And I still confused about fbset failed when setting 32 bits or 24 bits.

 

Is it feasible to set BPP from RGB565 to ARGB8888 or RGB888 for PS DisplayPort ?

 

 

Best Regards,

0 Kudos
watari
Professor
Professor
1,891 Views
Registered: ‎06-16-2013

Hi @lmtripod

 

I'm not sure. At least "fbset" can not set color depth. It only set video timing.

 

However you can confirm the parameter by using fbset without parameters.

 

% fbset

 

You can see "rgba" section between mode and endmode.

 

BTW, why do you use DDC-CI (EDID) ?

It is easy way to set video timing parameter and color depth, if your system support DDC-CI.

Of cause X Window system can support this way.

 

Best regards,

 

0 Kudos
lmtripod
Visitor
Visitor
1,877 Views
Registered: ‎10-22-2018

Hi @watari,

 

Thanks for your active reply and nice suggestion.

 

Firstly, I tried DDC-CI but cannot found way to alert color depth. Then, I found approach to change pixel depth in device tree and it works.

 

DDC-CI Trying

Description : At first, I tried DDC-CI (EDID) solution and found no available software (like ClickMonitorDDC[2] or  Dell Display Manager [3] ) offer direct approach to modify color depth.

Question : Could you please recommand an software changing color depth, or coding approach ? Thanks a lot !

 

Device tree modification

Description :

   - I checked generated device tree files again and found RGB565 in zynqmp.dtsi (below figures).

dt_xilinx_drm.JPG

dt_xlnx_dp_sub.JPG

   - I copied these into system-user.dtsi and replace rgb565 to rgb888, according to reference[4-5].

 

&xlnx_dp_sub {
	compatible = "xlnx,dp-sub";
	status = "okay";
	reg = <0x0 0xfd4aa000 0x0 0x1000>,
	      <0x0 0xfd4ab000 0x0 0x1000>,
	      <0x0 0xfd4ac000 0x0 0x1000>;
	reg-names = "blend", "av_buf", "aud";
	xlnx,output-fmt = "rgb";
	xlnx,vid-fmt = "yuyv";
	xlnx,gfx-fmt = "rgb888";
	power-domains = <&pd_dp>;
};

&xilinx_drm {
	compatible = "xlnx,drm";
	status = "okay";
	xlnx,encoder-slave = <&xlnx_dp>;
	xlnx,connector-type = "DisplayPort";
	xlnx,dp-sub = <&xlnx_dp_sub>;
	planes {
		xlnx,pixel-format = "rgb888";
		plane0 {
			dmas = <&xlnx_dpdma 3>;
			dma-names = "dma0";
		};
		plane1 {
			dmas = <&xlnx_dpdma 0>,
			       <&xlnx_dpdma 1>,
			       <&xlnx_dpdma 2>;
			dma-names = "dma0", "dma1", "dma2";
		};
	};
};

   - ZCU102 boot with newly built image and BPP is successfully changed with RGB888, shown below.

evb_rgb888_ok.JPG

 

 

 

[2] http://clickmonitorddc.bplaced.net/

[3] https://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverid=n2p0j&lwp=rt

[4] https://github.com/mathworks/altera-linux/blob/master/Documentation/devicetree/bindings/drm/xilinx/dp_sub.txt

[5] https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/drm/xilinx/xilinx_drm.txt

View solution in original post

0 Kudos
davidlee2
Visitor
Visitor
967 Views
Registered: ‎07-07-2014

Hi Imtripod,

  I cannot find the names "xlnx_dp_sub" and "xilinx_drm" in the zynqmp.dtsi in the build package of petalinux 2018.3.

Could you please kindly advise  where did you find it?

  Thanks a lot.

 

Best Regards,

David Lee,

0 Kudos
lmtripod
Visitor
Visitor
942 Views
Registered: ‎10-22-2018

Hi David,

 

My PetaLinux tool chain version is 2017.2. For 2018.3, I am not sure where you can find it.

 

Best Regards,

lmtripod

0 Kudos
davidlee2
Visitor
Visitor
916 Views
Registered: ‎07-07-2014

Hi Imtripod,

  I can only find following two DP related items in /workspace/petalinux/xilinx-zcu102-2018.3/components/plnx_workspace/device-tree/device-tree/zynqmp.dtsi .

  Could you advise how to enable the RGB888 mode for the display frame buffer?

Thanks a  lot!

Best Regards,

David Lee,

//////////////////////////////////////////////////////////////////////////////

xlnx_dpdma: dma@fd4c0000 {
compatible = "xlnx,dpdma";
status = "disabled";
reg = <0x0 0xfd4c0000 0x0 0x1000>;
interrupts = <0 122 4>;
interrupt-parent = <&gic>;
clock-names = "axi_clk";
power-domains = <&pd_dp>;
dma-channels = <6>;
#dma-cells = <1>;
dma-video0channel {
compatible = "xlnx,video0";
};
dma-video1channel {
compatible = "xlnx,video1";
};
dma-video2channel {
compatible = "xlnx,video2";
};
dma-graphicschannel {
compatible = "xlnx,graphics";
};
dma-audio0channel {
compatible = "xlnx,audio0";
};
dma-audio1channel {
compatible = "xlnx,audio1";
};
};

zynqmp_dpsub: zynqmp-display@fd4a0000 {
compatible = "xlnx,zynqmp-dpsub-1.7";
status = "disabled";
reg = <0x0 0xfd4a0000 0x0 0x1000>,
<0x0 0xfd4aa000 0x0 0x1000>,
<0x0 0xfd4ab000 0x0 0x1000>,
<0x0 0xfd4ac000 0x0 0x1000>;
reg-names = "dp", "blend", "av_buf", "aud";
interrupts = <0 119 4>;
interrupt-parent = <&gic>;
clock-names = "dp_apb_clk", "dp_aud_clk", "dp_vtc_pixel_clk_in";
power-domains = <&pd_dp>;

vid-layer {
dma-names = "vid0", "vid1", "vid2";
dmas = <&xlnx_dpdma 0>,
<&xlnx_dpdma 1>,
<&xlnx_dpdma 2>;
};

gfx-layer {
dma-names = "gfx0";
dmas = <&xlnx_dpdma 3>;
};

/* dummy node to to indicate there's no child i2c device */
i2c-bus {
};

zynqmp_dp_snd_codec0: zynqmp_dp_snd_codec0 {
compatible = "xlnx,dp-snd-codec";
clock-names = "aud_clk";
};

zynqmp_dp_snd_pcm0: zynqmp_dp_snd_pcm0 {
compatible = "xlnx,dp-snd-pcm";
dmas = <&xlnx_dpdma 4>;
dma-names = "tx";
};

zynqmp_dp_snd_pcm1: zynqmp_dp_snd_pcm1 {
compatible = "xlnx,dp-snd-pcm";
dmas = <&xlnx_dpdma 5>;
dma-names = "tx";
};

zynqmp_dp_snd_card0: zynqmp_dp_snd_card {
compatible = "xlnx,dp-snd-card";
xlnx,dp-snd-pcm = <&zynqmp_dp_snd_pcm0>,
<&zynqmp_dp_snd_pcm1>;
xlnx,dp-snd-codec = <&zynqmp_dp_snd_codec0>;
};
};

0 Kudos
lmtripod
Visitor
Visitor
897 Views
Registered: ‎10-22-2018

Hi David,

 

It seems that there is not related node in your posted content. I advise you could read my answer of this topic and get some insights to do some trial in changing your dts or dtsi file. Functionalities of different PetaLinux version are also different. So it hard to say whether my answer of this topic is useful.

 

Best Regards,

lmtripod

0 Kudos