Customize 480x320p60hz display Mode

Post Reply
hunterhu
Posts: 14
Joined: Wed Nov 09, 2016 3:41 am
languages_spoken: english
ODROIDs: C0, C2, XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Customize 480x320p60hz display Mode

Unread post by hunterhu » Wed May 22, 2019 3:07 am

Hi,

C0/C1 s805 supports 480x320p60hz display mode, where our project has been using cheap 4.3" 480x272 LVDS LCD screen. We are planning to switch to Odroid C0 SoC from the old Soc.

The problem is that when we put a HDMI to LVDS adaptor between C0 and the 480x272 display, the 480x320 mode is not completely working, we can see something is being displayed but the screen image is scrambled.

So, we digged into kernel source code here:

Code: Select all

arch/arm/mach-meson8b/include/mach/tvregs.h
Where the hardware registered is configured for the mode of 480x320p60hz

Code: Select all

 536 static const  reg_t tvregs_480x320p60hz[] = {                                                              
 537     {P_ENCP_VIDEO_EN, 0},                                                                                  
 538     {P_ENCI_VIDEO_EN, 0},                                                                                  
 539                                                                                                            
 540     {P_VENC_VDAC_SETTING, 0xff},                                                                           
 541     {P_ENCP_VIDEO_MODE, 0x4040},                                                                           
 542     {P_ENCP_VIDEO_MODE_ADV, 0x18},                                                                         
 543     {P_ENCP_VIDEO_MAX_PXCNT, 0x31F},                                                                       
 544     {P_ENCP_VIDEO_MAX_LNCNT, 0x20C},                                                                       
 545     {P_ENCP_VIDEO_HAVON_BEGIN, 0x64},                                                                      
 546     {P_ENCP_VIDEO_HAVON_END, 0x243},                                                                       
 547     {P_ENCP_VIDEO_VAVON_BLINE, 0xBD},                                                                      
 548     {P_ENCP_VIDEO_VAVON_ELINE, 0x1FC},                                                                     
 549     {P_ENCP_VIDEO_HSO_BEGIN, 0x0},                                                                         
 550     {P_ENCP_VIDEO_HSO_END, 0x64},                                                                          
 551     {P_ENCP_VIDEO_VSO_BEGIN, 0x1E},                                                                        
 552     {P_ENCP_VIDEO_VSO_END, 0x32},                                                                          
 553     {P_ENCP_VIDEO_VSO_BLINE, 0x0},                                                                         
 554     {P_ENCP_VIDEO_VSO_ELINE, 0x8},                                                                         
 555                                                                                                            
 556     /* DVI configs */                                                                                      
 557     {P_ENCP_DVI_HSO_BEGIN, 0x2},                                                                           
 558     {P_ENCP_DVI_HSO_END, 0x4A},                                                                            
 559     {P_ENCP_DVI_VSO_BLINE_EVN, 0x0},                                                                       
 560     {P_ENCP_DVI_VSO_BLINE_ODD, 0x0},                                                                       
 561     {P_ENCP_DVI_VSO_ELINE_EVN, 0x7},                                                                       
 562     {P_ENCP_DVI_VSO_ELINE_ODD, 0x0},                                                                       
 563     {P_ENCP_DVI_VSO_BEGIN_EVN, 0x2},                                                                       
 564     {P_ENCP_DVI_VSO_BEGIN_ODD, 0x0},                                                                       
 565     {P_ENCP_DVI_VSO_END_EVN, 0x2},                                                                         
 566     {P_ENCP_DVI_VSO_END_ODD, 0x0},                                                                         
 567     {P_ENCP_DE_H_BEGIN, 0xAA},                                                                             
 568     {P_ENCP_DE_H_END, 0x3CA},                                                                              
 569     {P_ENCP_DE_V_BEGIN_EVEN, 0x11},                                                                        
 570     {P_ENCP_DE_V_END_EVEN, 0x1F1},                                                                         
 571     {P_ENCP_DE_V_BEGIN_ODD, 0x0},                                                                          
 572     {P_ENCP_DE_V_END_ODD, 0x0},                                                                            
 573                                                                                                            
 574     {P_ENCP_VIDEO_EN, 1},                                                                                  
 575     {P_ENCI_VIDEO_EN, 0},                                                                                  
 576     {MREG_END_MARKER, 0},                                                                                  
 577 };                                            
Is it possible to tweak the hardware settings above to make a customized 480x320 mode that actually supports 480x272 resolution display correctly? If so, how?

This is the final technical barrier we are trying to overcome in order to use C0 in our project in a large scale, we appreciate your help.

Hunter

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Wed May 22, 2019 9:48 am

Hi hunterhu,

Can you share these information?
1. product part number of site link of your 480x272 LVDS LCD
2. OS that you're using for this, Ubuntu? or Android?

It look possible by adjusting some timings because you get something on display screen even though it's scrambled one.
( same pixel clock and adjusted height and h timings, I think.)

Please let me try to make a test patch to support 480x272p60hz (a new resolution),
then will ask you to test it.

Could you share the information
and wait for several days?

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Wed May 22, 2019 11:50 pm

I have attached a file that gives the specs for an alternative display we are going to use. It has the same specs as the one we do use.

As further information, the VGA setting 640x480 gives a stable display on our 480x270 lcd, but our lcd only shows about the top, left 1/4 to 2/3of the screen that is displayed in full on my hdmi regular monitor.

HSYNC frequency measured with scope on my 480x272 display is 17.2 kHz

Operating System is Ubuntu 16.04

let me know if you need anything else.

Thanks for your assistance!

Robert Ayers
Engineer

Parallel RGB input timing table

Parameter Symbol MIN TYP MAX Unit
DCLK Frequency fclk 5 9 12 MHz
VSD period time tv 277 288 400 H
VSD display area tvd 272 H
VSD back porch tvb 3 8 31 H
VSD front porch tvfp 2 8 93 H H
SD period time th 520 525 800 DCLK H
SD display area thd 480 DCLK H
SD back porch thbp 36 40 255 DCLK H
SD front porch thfp 4 5 65 DCLK

MTD0430N2ZR-T-3 V 1.0 20190216.pdf
alternative display - same timing
(1.4 MiB) Downloaded 19 times

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Thu May 23, 2019 11:02 am

@rayerskc,
Thank you for sharing the detailed information.
That's what I need. Perfect! :)

I'm available to work this early next week.
Once I'm done, I will share a test image here.

hunterhu
Posts: 14
Joined: Wed Nov 09, 2016 3:41 am
languages_spoken: english
ODROIDs: C0, C2, XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by hunterhu » Thu May 23, 2019 8:45 pm

Thank you, Joy.

We build our own kernel in our customized ubuntu xfce4 image,

Code: Select all

git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidc-3.10.y
A kernel patch would be the best.

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Tue May 28, 2019 4:46 pm

Hi hunterhu,
Sorry for late response.

I made a kernel patch for you to use 480x272p60hz
and please find the attachment, "0001_Add_new_resolution_480x272p60hz_pixelclk_25_2mhz.diff.zip".
( base branch : odroidc-3.10.y )

Timing configuration of this patch is as following.

Code: Select all

Detailed mode: Clock 25.200 MHz, Hsync 31.5kHz, Vsync 60Hz
                480  600  700  800 hborder 0
                272  280  287  525 vborder 0
               -hsync -vsync
The pixel clock of the configuration is 25.2MHz and it's same one in case of 480x320p60hz.

Based on the monitor's specification, an ideal timing is as following,

Code: Select all

Detailed mode: Clock 8.6 MHz, Hsync 17.2kHz, Vsync 60Hz
                480  488  492  500 hborder 0
                272  277  280 320  vborder 0
               -hsync -vsync
but I adjusted only vertical-related factors because it looks pixel clock 25.2MHz (used for 480x320p60hz) is available with your monitor.
I've confirmed 480x272p60hz display output is working using one of my monitors.

1. apply kernel patch and build kernel
Please apply the patch, build your kernel and then test it.
And you need to set the following instruction to boot as 480x272p60hz and change lightdm option.

2. boot.ini option
Please change hdmi option, 'm' of /media/boot/boot.ini.

Code: Select all

setenv m "480x272p60hz"
3. lightdm display setup
After reboot with 480x272p60hz, you will have a crashed display because there is no default option of 480x272p60hz.

Now you need to restart lightdm.

Copy c1_init.sh into /home/odroid/
( attachment : c1_init.sh )
I added 480x272p60hz option in the file.

Run this instructions and then you will have 480x272p60hz login display.

Code: Select all

$ chmod a+x /home/odroid/c1_init.sh

$ sudo service lightdm stop
$ /home/odroid/c1_init.sh
$ sudo service lightdm start
( Once we confirm this patch is OK, you need to build initrd including 480x272p60hz option.
I will share the instruction if everything is ok. )

Please check it and share the test result.
I'm wondering if this patch works with your monitor.
If it doesn't work normally, I will make another kernel patch using lower 9Mhz pixel clock.
Attachments
c1_init.sh
(3.68 KiB) Downloaded 19 times
0001_Add_new_resolution_480x272p60hz_pixelclk_25_2mhz.diff.zip
(3.32 KiB) Downloaded 14 times

hunterhu
Posts: 14
Joined: Wed Nov 09, 2016 3:41 am
languages_spoken: english
ODROIDs: C0, C2, XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by hunterhu » Wed May 29, 2019 10:34 am

@joy, thanks for the patch, we are testing the patch and initial testing doesn't work well, we are collecting more data and will present them to you later.

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Thu May 30, 2019 10:17 am

@hunterhu,
Thanks for checking it.
Full booting log (via dmesg) also will be helpful.

Also I will make another display patch using pixel clock 9 MHz.

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Fri May 31, 2019 7:30 am

Attached are pics of my HDMI and 480x272 lcd screen run in parallel with our first pass at the new code.

The default "Paydia" screen shows up fine on HDMI, and is stable on lcd, but lcd only shows a small portion of the entire pic.

Disabling the default hdmi setting and enabling the 480x272p60hz yields a stable screen on both hdmi and lcd, but only a small portion of the original screen is shown, with interspersed white lines, junk, etc.

I was NOT able to run the c1_init.sh script, as the monitor did not allow me to properly type in commands. I ssh'd in and installed fbset (requred by c1 script) but when I tried to sudo service lightdm stop, it said lightdm was not running.

Via ssh and scp, I did pull the dmesg output and attached here as dmesg.txt - did not run unixtodos on it, so no linefeeds.

Look forward to the new version you are working on!

Thanks!

Robert
Attachments
dmesg.txt
(47.46 KiB) Downloaded 14 times
LCD with 480c272p60hz selected.jpg
Paydia screen on lcd with 480x272 enabled
LCD with 480c272p60hz selected.jpg (326.01 KiB) Viewed 1356 times
HDMI screen with 480x272p60hz selected.jpg
Paydia screen on hdmi monitor with 480x272p60hz enabled
HDMI screen with 480x272p60hz selected.jpg (264.73 KiB) Viewed 1356 times
Default on 480x272 lcd.jpg
Initial start up with default hdmi selected on 480x272 lcd
Default on 480x272 lcd.jpg (231.27 KiB) Viewed 1356 times
Default on HDMI.jpg
Initial start up with default hdmi selected on hdmi screen
Default on HDMI.jpg (231.42 KiB) Viewed 1356 times

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Fri May 31, 2019 2:46 pm

Hi Robert,
Thank you for sharing detailed test result.

I've checked HDMI PLL spec of AMLogic S805 SoC again
and found the minimum HDMI frequency is limited at 25MHz to the logic.
So I'm not sure it's available to run hdmi timing with pixel clock 9~12MHz. :(

But based on the pictures you shared, it looks your monitor could detect the hdmi timing from kernel patch with pixel clock 25MHz
even though it shows crashed display.

Could you check some as following?

1. Display information on your HDMI monitor
When you try 480x272p60hz on your hdmi monitor, does it say "480x272p60hz" normally?
Please check setting menu or something.
My monitor says 480x272p60hz normally.

2. Change the bits per pixel value
The original value is 32 bits per pixel.
Please change the value 32 to 24 via this node.

Code: Select all

root@odroid:~# cat /sys/class/graphics/fb0/bits_per_pixel 
32
root@odroid:~# echo 24 > /sys/class/graphics/fb0/bits_per_pixel                                                                                
root@odroid:~# cat /sys/class/graphics/fb0/bits_per_pixel 
24
3. Check 480x320p60hz (not 480x272p60hz)
Can you set display mode as 480x320p60hz and then share the display picture for me?
And please try bits per pixel 24 on this mode, too.

4. lightdm stop error
rayerskc wrote:
Fri May 31, 2019 7:30 am
I was NOT able to run the c1_init.sh script, as the monitor did not allow me to properly type in commands. I ssh'd in and installed fbset (requred by c1 script) but when I tried to sudo service lightdm stop, it said lightdm was not running.
Could you share the output from "service lightdm stop"?
It looks you've done restart it successfully so got normal display on hdmi monitor. Which instruction did you use?
In my case, I can restart it successfully using my instruction.

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Fri May 31, 2019 10:44 pm

Here are the pics you requested for the different bits sizes, etc.

Output from service lightdm stop as issued from a SSH session is:

"Failed to stop lightdm.service: Unit lightdm.service not loaded."

This build is one that we are working on in-house, sounds like something was not included.

Regarding HDMI monitor resolution output - I am having a problem getting an HDMI screen to show the image and also give me the HDMI resolution information. Will try other HDMI monitors and post the info if I can get it.

Also, I would love to get some information on what the video settings mean and tech info on the S805 - you stated HDMI PLL spec limits minimum frequency to 25 MHz - I searched the internet and found a basic specification on the S805, but it did not have anything in it related to the video subsystem and what all the various parameters mean.

Thanks!

Robert Ayers
Attachments
LCD 480 x 272 at 24 bits.jpg
LCD 480 x 272 at 24 bits.jpg (114.04 KiB) Viewed 1322 times
HDMI 480x272 at 24 bits.jpg
HDMI 480x272 at 24 bits.jpg (60.91 KiB) Viewed 1322 times
LCD 480x320 at 24 bits.jpg
LCD 480x320 at 24 bits.jpg (107.16 KiB) Viewed 1322 times
HDMI 480x320 at 24 bits.jpg
HDMI 480x320 at 24 bits.jpg (65.32 KiB) Viewed 1322 times

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Fri May 31, 2019 11:12 pm

Additional PIcs of 480x272p60hz at 32 bits on a different VGA screen. The reported resolution was 640x480@60hz with the image as you see it-

The HDMI display I used for the first pictures does NOT give the resolution it is running at - I have gone thru the menus several times, and just do not see where I can display it. Oh well.....

To answer your other question about how I restarted to get back to a normal screen on HDMI display. I would switch different SD cards - each has a different setenv setting. So, I did not issue a command to get back to any image.

Added information. Re: lightdm, I was originally working with Hardkernels' images I downloaded from the web site. I believe I was able to issue a service lightdm stop, start etc and got changes in the display. The current images I am working with come from Hunter, our software guy who is building an image with our changes incorporated, so I am assuming the lightdm package did not get included.

So, he will need to include that package if it is needed. What does lightdm do?

Thanks,

Robert
Attachments
480x272-32 bit on VGA monitor.jpg
480x272-32 bit on VGA monitor.jpg (77.16 KiB) Viewed 1315 times
480x272 -32 bits on VGA with resolution.jpg
480x272 -32 bits on VGA with resolution.jpg (86.79 KiB) Viewed 1315 times

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Fri May 31, 2019 11:14 pm

Looks like two pics did not load from my first post today. Here they are.
Attachments
LCD 480 x 320 at 32 bits.jpg
LCD 480 x 320 at 32 bits.jpg (100.9 KiB) Viewed 1314 times
HDMI 480x320 at 32 bits.jpg
HDMI 480x320 at 32 bits.jpg (83.37 KiB) Viewed 1314 times

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Fri May 31, 2019 11:17 pm

Idea - if it would be helpful, I could set up a teamview laptop that would allow you to see the display screen and ssh into the odroid image. Let me know if you want to do that.

Robert

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Mon Jun 03, 2019 10:53 am

Hi @rayerskc,
Have you tried to check it using Ubuntu 16.04 official version?
https://wiki.odroid.com/odroid-c1/os_images/ubuntu/v2.2

It looks the issue is related to abnormal fb settings.

I get the screen before setup from c1_init.sh and lightdm restart.

hunterhu
Posts: 14
Joined: Wed Nov 09, 2016 3:41 am
languages_spoken: english
ODROIDs: C0, C2, XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by hunterhu » Tue Jun 04, 2019 8:45 am

Hi Joy @Joy,

We tried out with official odroid mate image, replaced the kernel with our own kernel with your patch, followed your instructions to

Code: Select all

sudo service lightdm stop
sudo ./c1_init.sh
sudo service lightdm start
the screen does displayed well, we thought initially it was working, but the system report the resolution not 480x272 but 720x480, which is the 480p setting from boot.ini.

I have captured all the pictures here for your reference.
IMG_1176.jpg
IMG_1176.jpg (453.01 KiB) Viewed 1236 times
IMG_0030.jpg
IMG_0030.jpg (325.38 KiB) Viewed 1236 times
IMG_3827.jpg
IMG_3827.jpg (462.38 KiB) Viewed 1236 times
IMG_4393.jpg
IMG_4393.jpg (378.45 KiB) Viewed 1236 times
IMG_9146.jpg
IMG_9146.jpg (396.28 KiB) Viewed 1236 times
Thanks,
Hunter

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Tue Jun 04, 2019 9:40 am

hunterhu wrote:
Tue Jun 04, 2019 8:45 am
the screen does displayed well, we thought initially it was working, but the system report the resolution not 480x272 but 720x480, which is the 480p setting from boot.ini.
I have captured all the pictures here for your reference.
Hi Hunter,
Thank you for checking it. :)

As I've checked fbset outputs, I got the normal video mode config.

Code: Select all

fbset -v
Linux Frame Buffer Device Configuration Version 2.1 (23/06/1999)
(C) Copyright 1995-1999 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb0'
Using current video mode from `/dev/fb0'

mode "480x272"
    geometry 480 272 480 544 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24
endmode
I think there must be a mistyping in c1_init.sh.
Maybe you didn't modify fbset setting line in c1_init.sh.
I've tested without this line and I got same result as you. ;)
Could you check the line?

Code: Select all

case $mode in
        480x800*)       fbset -fb /dev/fb0 -g 480 800 480 1600 $bpp;    common_display_setup ;;
### >>>>>>  Please check this line.
      480x272*)       fbset -fb /dev/fb0 -g 480 272 480 544 $bpp;     common_display_setup ;;
### <<<<<<
        800x480*)       fbset -fb /dev/fb0 -g 800 480 800 960 $bpp;     common_display_setup ;;
        vga*)           fbset -fb /dev/fb0 -g 640 480 640 960 $bpp;     common_display_setup ;;
        480*)           fbset -fb /dev/fb0 -g 720 480 720 960 $bpp;     common_display_setup ;;
        800x600p60*)    fbset -fb /dev/fb0 -g 800 600 800 1200 $bpp;    common_display_setup ;;
        576*)           fbset -fb /dev/fb0 -g 720 576 720 1152 $bpp;    common_display_setup ;;
        1024x600p60h*)  fbset -fb /dev/fb0 -g 1024 600 1024 1200 $bpp;  common_display_setup ;;
        1024x768p60h*)  fbset -fb /dev/fb0 -g 1024 768 1024 1536 $bpp;  common_display_setup ;;
        720*)           fbset -fb /dev/fb0 -g 1280 720 1280 1440 $bpp;  common_display_setup ;;
        800*)           fbset -fb /dev/fb0 -g 1280 800 1280 1600 $bpp;  common_display_setup ;;
        sxga*)          fbset -fb /dev/fb0 -g 1280 1024 1280 2048 $bpp; common_display_setup ;;
        1440x900p60*)   fbset -fb /dev/fb0 -g 1440 900 1440 1800 $bpp;  common_display_setup ;;
        1080*)          fbset -fb /dev/fb0 -g 1920 1080 1920 2160 $bpp; common_display_setup ;;
        1920x1200*)     fbset -fb /dev/fb0 -g 1920 1200 1920 2400 $bpp; common_display_setup ;;
        1360x768p60*)   fbset -fb /dev/fb0 -g 1360 768 1360 1536 $bpp;  common_display_setup ;;
        1366x768p60*)   fbset -fb /dev/fb0 -g 1366 768 1366 1536 $bpp;  common_display_setup ;;
        1600x900p60*)   fbset -fb /dev/fb0 -g 1600 900 1600 1800 $bpp;  common_display_setup ;;
        1680x1050p60*)  fbset -fb /dev/fb0 -g 1680 1050 1680 2100 $bpp; common_display_setup ;;

esac
If you have a normal display 480x272 with the aforementioned setup,
in your custom-built image, there may be mis-setting point related to fb options, I think.

To make sure, can I ask one more?
Is it working well with the monitor those native resolutions is 480x272?
If so, we need to include 480x272 in ramdisk and re-build uInitrd image, then you don't need to restart lightdm and run c1_init.sh every time.
It will be set automatically.
Please check it and let me know.

hunterhu
Posts: 14
Joined: Wed Nov 09, 2016 3:41 am
languages_spoken: english
ODROIDs: C0, C2, XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by hunterhu » Wed Jun 05, 2019 1:33 am

Hi Joy, Good news, I did it again this morning, it works pretty well.

to summarize:
  • apply your kernel patch, rebuild the kernel and update the uImage and kernel modules to the odroid mate image
  • boot the image up with working resolution, then change the boot.ini with 480x272p60Hz display mode, reboot
  • the screen will be a scrambled one, ssh into the unit, stop lightdm, run c1_init.sh, start lightdm again, the screen displays well, fbset -v report correct mode
[/list]
IMG_5427.jpg
IMG_5427.jpg (389.45 KiB) Viewed 1208 times
You mentioned we can make it work automatically at booting without run the script every time?

Great job Joy!

Thanks,
Hunter

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Wed Jun 05, 2019 12:18 pm

Hi Hunter,
So glad to hear it!!! :D You did it.
Thank you for sharing the news.
hunterhu wrote:
Wed Jun 05, 2019 1:33 am
You mentioned we can make it work automatically at booting without run the script every time?
Yes.
I will try to make a new test version of uInitrd including 480x272p60hz (updated c1_init.sh will be included.)
and share instructions and test uInitrd with you.
The test version of ramdisk will init the display config automatically as existing other resolutions.
But it's also a test version.

We will prepare a new release version of C1 including 480x272p60hz,
that means kernel image and uInitrd will be updated officially.
It may take several days.

User avatar
mad_ady
Posts: 6528
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by mad_ady » Wed Jun 05, 2019 2:44 pm

Out of curiosity - are these changes likely to work easily on the C2/N2 as well?

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Wed Jun 05, 2019 3:05 pm

mad_ady wrote:
Wed Jun 05, 2019 2:44 pm
Out of curiosity - are these changes likely to work easily on the C2/N2 as well?
I think it will be available. ;) ( but not sure working easily. :o haha~ )

We're planning to add this resolution on XU4, C2 and N2.
I will implement them (maybe by middle of this month...)
and once I'm done, will share the status here for you.
These users thanked the author joy for the post:
mad_ady (Wed Jun 05, 2019 3:44 pm)

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Wed Jun 05, 2019 3:36 pm

Hi hunter,

As I mentioned before, we're planning to release a new version including this option.
Once a new package including 480x272p60hz is released, you don't need this process.
So if you want, you can wait a new release version then, use the ramdisk. ;)
Once it's done, I will share the status here.

Anyway, here is an instruction to build a test uInitrd.
Also please find the attachment that I built on my C1.
1. Modify c1_init.sh (already you did this)

Code: Select all

/etc/initramfs-tools/scripts/local-top/c1_init.sh
2. Backup the original uInitrd

Code: Select all

# cp /media/boot/uInitrd  /media/boot/uInitrd.backup
3. Build new uInitrd and copy it into /media/boot/
https://wiki.odroid.com/odroid-xu4/os_i ... k_optional
Please check kernelrelease version.

Code: Select all

$ su
# ls /boot/config-*
/boot/config-3.10.107-190

Code: Select all

# update-initramfs -c -k 3.10.107-190
# mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-3.10.107-190 /boot/uInitrd-3.10.107-190
# cp /boot/uInitrd-3.10.107-190 /media/boot/uInitrd
# sync
4. Reboot system

Code: Select all

# reboot
Then, you will have 480x272 display without any additional commands.
Attachments
uInitrd-3.10.107-190-test.zip
(8.82 MiB) Downloaded 13 times

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Mon Jun 17, 2019 10:35 am

Hi hunter,
Just for your information......
It will take several days more to release the new mode and update uInitrd.
I will update the status once it's done.

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Wed Jun 19, 2019 5:30 am

Joy, hoping you can help me again!

The 480x272px60hz fix works fine. no problem there.

My issue is that when I drive an HDMI LCD full size monitor, everything works fine. BUT, when I drive a small (5 or 7 inch LCD) that uses the TFP 401AP hdmi to lvds converter chip (Adafruit 800x480 LCD module) directly, the picture is very distorted.

But, if I route the hdmi signal from the C0 to a 1 to 4 hdmi splitter (CDA-HD400) (powered) then it works just fine!

The same problem exists when driving 480x272, or using the standard Odroid Mate lite distribution. This tells me that the pixels, clock, synch, etc are all set properly, but there is a drive signal level problem, grounding problem, signal bounce, or something that is causing the display to not show the correct data.

I have tried two different C0 boards, with different SD cards, and two different brands of 5 inch and 7 inch displays using the TI TFP 401AP with the same results. Feed the signal thru the 1 to 4 hdmi splitter - great, direct hookup - bad.

As I will be laying out my own board to use with the C0, I can add whatever is needed to make the signals come through properly, but need to understand what the problem is. Have you had this issue reported before?

I can send pics if you want of the distorted screen, but the main issue is that i works fine with the splitter in the HDMI path, but not when directly hooked up.

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by odroid » Wed Jun 19, 2019 9:38 am

Our old Vu7 also uses a similar TI converter chip. But there was no such issue.
https://wiki.odroid.com/accessory/displ ... es/vu7/vu7

Did you change the vout_mode to dvi?
https://github.com/mdrjr/c1_bootini/blo ... ot.ini#L32

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Wed Jun 19, 2019 10:36 am

mad_ady wrote:
Wed Jun 05, 2019 2:44 pm
Out of curiosity - are these changes likely to work easily on the C2/N2 as well?
Hi mad_ady,
New kernel packages of N2 and C2 have been released including 480x272p60hz display mode.

- ODROID-N2

Code: Select all

# uname -a
Linux odroid 4.9.182-31 #1 SMP PREEMPT Tue Jun 18 14:45:56 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
- ODROID-C2

Code: Select all

root@odroid:~# uname -a
Linux odroid 3.16.68-41 #1 SMP PREEMPT Tue Jun 18 15:06:16 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
These users thanked the author joy for the post:
mad_ady (Wed Jun 19, 2019 2:57 pm)

joy
Posts: 880
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 11 times
Been thanked: 46 times
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by joy » Wed Jun 19, 2019 10:48 am

rayerskc wrote:
Wed Jun 19, 2019 5:30 am
My issue is that when I drive an HDMI LCD full size monitor, everything works fine. BUT, when I drive a small (5 or 7 inch LCD) that uses the TFP 401AP hdmi to lvds converter chip (Adafruit 800x480 LCD module) directly, the picture is very distorted.

As I will be laying out my own board to use with the C0, I can add whatever is needed to make the signals come through properly, but need to understand what the problem is. Have you had this issue reported before?

I can send pics if you want of the distorted screen, but the main issue is that i works fine with the splitter in the HDMI path, but not when directly hooked up.
Hi @rayerskc,
As @odroid mentioned, there was no issue so far.
odroid wrote:
Wed Jun 19, 2019 9:38 am
Our old Vu7 also uses a similar TI converter chip. But there was no such issue.
https://wiki.odroid.com/accessory/displ ... es/vu7/vu7

Did you change the vout_mode to dvi?
https://github.com/mdrjr/c1_bootini/blo ... ot.ini#L32
And please try @odroid's comment, dvi mode first.
As I checked the datasheet, it should work with DVI mode.
https://cdn-shop.adafruit.com/datasheets/tfp401.pdf

If you still have the issue with DVI mode, then please share pictures here.
Also product site link of your 800x480 lcd is needed.
I'm not sure the site link that I found is right one.
https://www.adafruit.com/product/2260

rayerskc
Posts: 9
Joined: Sat Mar 30, 2019 2:08 am
languages_spoken: english
ODROIDs: 2 pcs xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Customize 480x320p60hz display Mode

Unread post by rayerskc » Wed Jun 19, 2019 11:11 pm

Thanks for the feedback! I will try the dvi setting as mentioned. If the splitter is taking in full hdmi, and only outputting dvi (no sound) then my results would make sense.

Will let you know the results.

Thanks again for the info.

Robert

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests