k230_sdk icon indicating copy to clipboard operation
k230_sdk copied to clipboard

[help]: how to make CanMV-k230 works with 720p display

Open yf13 opened this issue 2 years ago • 10 comments
trafficstars

Help

The default display resolution seems to be 1080p, which is fine. My display can only do 720p, how to make CanMV-k230 to work with it?

I guess that we need check:

  • Little core side fb0 related stuffs
  • Big core side, maybe the sample/fastboot_app/main.cc for ISP_CHN0_WIDTH etc?

are there any specific suggestions?

yf13 avatar Oct 22 '23 04:10 yf13

The current version of the SDK should only support 1080P30 mode for HDMI output. In future versions, we will add support for more video formats, such as 720P60.

The second point is correct: the application running at startup is on the big core. You need to modify ISP_CHN0_WIDTH, ISP_CHN0_WIDTH, LCD_WIDTH, and LCD_HEIGHT. However, I don't think this will necessarily work. Modifying these values will result in ISP outputting at 720P, but the VO and HDMI outputs will still be at 1080P. On a 1080P screen, it will appear as if there are black borders around the image, and the image will be centered. Additionally, you may notice that the actual value of ISP_CHN0_WIDTH is 1088, because the ISP requires the output width to be a multiple of 8.

Furthermore, Linux on the little core does not use fb, but instead uses DRM.

MrThanlon avatar Oct 23 '23 02:10 MrThanlon

@MrThanlon

Thanks for confirming big core side idea.

For little core, I noticed that k230_canmv.dts has:

    panel@0 {
        compatible = "canaan,hx8399";
        reg = <0>;
        display-timings {
            timing-0 {
                clock-frequency = <74250000>;
                hactive = <1920>;
                vactive = <1080>;
                hfront-porch = <88>;
                hback-porch = <148>;
                hsync-len = <44>;
                vfront-porch = <36>;
                vback-porch = <4>;
                vsync-len = <5>;
            };
        };
    };

Is this where the current 1080p resolution is defined?

yf13 avatar Oct 23 '23 03:10 yf13

This involves hardware timing parameters. Simply modifying the hactive and vactive may not work, but you can give it a try.

MrThanlon avatar Oct 23 '23 06:10 MrThanlon

@MrThanlon

I tried the following parameters, everything else is untouched:

  • RTOS side: ISP_CHN0_WIDTH=720 ISP_CHN0_HEIGHT=1280 LCD_WIDTH=720 LCD_HEIGHT=1280
  • Linux side: clock-frequency=71604000; hactive=1280; vactive=720;

There is no error in Linux dmesg and the my display still does show anything.

Do you have further suggestions for me to check?

yf13 avatar Oct 23 '23 09:10 yf13

Please wait for the SDK update. Perhaps the next version will support 720P HDMI output.

MrThanlon avatar Oct 23 '23 09:10 MrThanlon

@MrThanlon , does the v1.0.2 SDK release support 720p display?

yf13 avatar Oct 30 '23 09:10 yf13

@MrThanlon , does the v1.0.2 SDK release support 720p display?

No

MrThanlon avatar Oct 30 '23 09:10 MrThanlon

@MrThanlon , does the v1.0.2 SDK release support 720p display?

1.0.2 add 1080P60 mode only

MrThanlon avatar Oct 30 '23 09:10 MrThanlon

@MrThanlon is 720p display working with v1.2 now? It seems that some support has been added but my initital run still was black display and at least Linux side DRM shows 1080p display resolution.

Please let me know if something special steps need be taken.

yf13 avatar Dec 09 '23 10:12 yf13

@MrThanlon is 720p display working with v1.2 now? It seems that some support has been added but my initital run still was black display and at least Linux side DRM shows 1080p display resolution.

Please let me know if something special steps need be taken.

No, checkout src/big/mpp/kernel/connector/src/lt9611.c:70 the lt9611_resolution array.

MrThanlon avatar Dec 11 '23 01:12 MrThanlon

Hi, the 720P HDMI output might be worked, checkout LT9611_MIPI_4LAN_1280X720_60FPS connector type.

MrThanlon avatar Jun 17 '24 08:06 MrThanlon