kendryte / k230_sdk

Kendryte K230 SDK
BSD 2-Clause "Simplified" License
172 stars 39 forks source link

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

Closed yf13 closed 4 months ago

yf13 commented 1 year ago

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:

are there any specific suggestions?

MrThanlon commented 1 year ago

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.

yf13 commented 1 year ago

@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?

MrThanlon commented 1 year ago

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

yf13 commented 1 year ago

@MrThanlon

I tried the following parameters, everything else is untouched:

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

Do you have further suggestions for me to check?

MrThanlon commented 1 year ago

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

yf13 commented 1 year ago

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

MrThanlon commented 1 year ago

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

No

MrThanlon commented 1 year ago

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

1.0.2 add 1080P60 mode only

yf13 commented 11 months ago

@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.

MrThanlon commented 10 months ago

@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 commented 4 months ago

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