Monitor resolution betw. Full HD and 4K(3440x1440,2560x1440)

Moderators: mdrjr, odroid

Monitor resolution betw. Full HD and 4K(3440x1440,2560x1440)

Unread postby roman333 » Fri Apr 08, 2016 6:03 am

I have a monitor with resolution 2560*1440@60Hz with HDMI input source(https://www.hannspree.eu/en/monitors/hq-series/HQ271HPG) and i like to know, if Ordoid C2 will work with it in full resolution. I know about thread http://forum.odroid.com/viewtopic.php?f=139&t=20084 and there link to dokuwiki about supported resolutions - http://odroid.com/dokuwiki/doku.php?id=supported_resolutions where is no this resolution, but i see on page of producent of Mali 450 ( graphic chip s905) this information:
"...provides a perfect solution for 2K and 4K screen resolutions."
Source: http://www.arm.com/products/multimedia/mali-gpu/ultra-low-power/mali-450.php

I need this resolution for work with documents, not for movies.

Can You inform me what will happen if i connect Odroid to this monitor? And can I refund product if in not will happen. :roll:
Last edited by roman333 on Tue Apr 12, 2016 6:15 am, edited 3 times in total.
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution between Full HD and 4K (2560*1440)

Unread postby crashoverride » Fri Apr 08, 2016 6:49 am

The list of supported resolutions can also be found in boot.ini:
https://github.com/mdrjr/c2_bootini/blob/master/boot.ini#L7-L52

roman333 wrote:but i see on page of producent of Mali 450 ( graphic chip s905) this information:

Mali (from ARM) is just a GPU. It only processes 3D command streams and renders to memory. The display controller (from Amlogic) is what converts the image in memory to a compliant HDMI signal. The display controller has to be programmed with compatible timing information to generate a specific resolution. Due to hardware PLL limitations, it is not always possible to support every resolution in existence. Typically support for popular non-standard resolutions is added to the kernel with updates when possible.

roman333 wrote:Can You inform me what will happen if i connect Odroid to this monitor?

If your monitor is HDMI compliant, it will upscale a full HD 1080p resolution to fill the screen. If your monitor does not support Full HD 1080p, it will typically display a "Signal Out of Range" or similar message.
crashoverride
 
Posts: 3924
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Monitor resolution between Full HD and 4K (2560*1440)

Unread postby roman333 » Fri Apr 08, 2016 9:45 am

Thansk for info.
crashoverride wrote:Typically support for popular non-standard resolutions is added to the kernel with updates when possible.

Maybe i will have luck and resolution with 44% of pixels from 4k resolution will be suported. (3686400px vs 8294400px)

crashoverride wrote:If your monitor is HDMI compliant, it will upscale a full HD 1080p resolution to fill the screen.

Yes, monitor is HDMI compliant and fills the screen. Also supports 1920x1200px, but it's for me insubstantial.
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution between Full HD and 4K (2560*1440)

Unread postby odroid » Fri Apr 08, 2016 9:55 am

We've tried to implement the HDMI PLL drivers for 2560x1600, 2560x1440 and 2560x1080 monitors.
It took much more time than our expectation. I hope we can release a Kernel update by end of April.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Monitor resolut. between Full HD and 4K(2560x1080,1440,1

Unread postby vst » Mon Apr 11, 2016 5:28 pm

Please do not forget to support the 3440x1440 resolution. It is relativly common on new ultra wide 21:9 Monitors. These monitors are also getting cheaper and cheaper and it is a lot of fun working on such things. :-)
vst
 
Posts: 3
Joined: Mon Apr 11, 2016 4:28 pm
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(2560x1080,1440,1

Unread postby roman333 » Mon Apr 11, 2016 7:03 pm

In my country is proverb: "Give them finger, they cut off Your arm." :lol:
I like to edit post title to add there Your resolution vst, but is no place for more letters there. :lol:
Here we can see anything not conducive to obstructions in systems. :P
Maybe i will delete other resolutions... who need them Yet? :mrgreen:
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(2560x1080,1440,1

Unread postby vst » Mon Apr 11, 2016 11:47 pm

@roman: Let me just sharpen my knive... *ritch*, *ritch*.

I was a little bit confused when I had read that only a few fixed resolutions where supported by my c2. Sure they should fit for 95% of the users. I have never noticed something like this in my life. I remember from my early Linux days in the 90th with VGA graphics cards that you could configure all the timing and resolution things of graphic cards in depth.
When I ordered my c2 I thought that if it supports the 4K resolution, then my little exotic 3K resolutions should also be somehow possible.

I am new in the odroid community. Is there any kind of user request or ticket system?
vst
 
Posts: 3
Joined: Mon Apr 11, 2016 4:28 pm
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(2560x1080,1440,1

Unread postby roman333 » Tue Apr 12, 2016 7:35 am

@vst, as You can see I changet topic for resolving Your problem first. :lol: Because I read elsewhere, possible resolutions can be bounded with HW. I have monitor 1.75K. It's not 1K and not 4K. For this I first asked. :P As odroid says:
odroid wrote:We've tried to implement the HDMI PLL drivers for 2560x1600, 2560x1440 and 2560x1080 monitors.
It took much more time than our expectation. I hope we can release a Kernel update by end of April.

I think, Your monitor is 2,4K (3440*1440/1920*1080 = 4953600/2073600 = 2,3888) and just now is rare.

From website statistics from may/2015 we can see usage in %:
1920x1080 10.98
1920x1200 1
2560x1440 0.78
2560x1600 0.05
2048x1152 0.04
2560x1080 0.03
(Source: csv data for download on page http://gs.statcounter.com/#resolution-w ... 412-201505)

In next table are data from jan/2016:
1920x1080 18%
1920x1200 2%
2560x1440 1%
(Source http://www.w3schools.com/browsers/brows ... higher.asp)
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Tue Apr 12, 2016 4:46 pm

Hej, I have a 21:9 monitor too. So, 3440x1440 would be really great. ;)

Also 1920x2250@24hz so I can continue my 3D Frame packing experiments. 8-)
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution between Full HD and 4K (2560*1440)

Unread postby roman333 » Mon May 09, 2016 6:14 pm

odroid wrote:We've tried to implement the HDMI PLL drivers for 2560x1600, 2560x1440 and 2560x1080 monitors.
It took much more time than our expectation. I hope we can release a Kernel update by end of April.
Hi odroid, something new? Can i wait for Odroid with Mali 650 ( https://community.arm.com/groups/arm-ma ... -processor ) or i can find solution in this thread? viewtopic.php?f=29&t=16272&start=50 Or which page i can monitor for update? http://odroid.com/dokuwiki/doku.php?id= ... nux_ubuntu or http://odroid.in/ubuntu_16.04lts/ ?
Or ODROID-XU4 with Mali-T628 http://www.hardkernel.com/main/products ... 3452239825 is solution for me? Hm, but only 32 bit processor.
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby odroid » Mon May 09, 2016 6:54 pm

The resolution has no relation to the Mali GPU driver.
Only the HDMI PHY/PLL device drivers should be updated.
I think we need a few more weeks because we must have some Amlogic's patches.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby odroid » Sat May 28, 2016 1:05 pm

We've added below resolutions in the latest Kernel update.
2560x1440
2560x1600
2560x1080

Other requested resolutions can't be added since we don't have the displays on our hand.
If somebody can send us sample, we can implement and test it and return the display.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby vst » Mon May 30, 2016 5:22 pm

Unfortunately I have not the money to send you for my 50$ Odroid a 700$ display.

To make everyone with obscure display resolutions happy, it would be great to have a possibility to configure custom resolutions on our own. It seems to be possible in the source of the kernel. Why shouldn't it be possible outside the kernel? I remember the 90ths where you could configure you display resolution and timings in your x11.conf (?) in every detail. Ok, it was complicated, but you had the possibility to adjust everything to your needs.
I think the pre-configured resolutions are good and necessary but an additional custom option would be even better.

Thanks for your good work!
vst
 
Posts: 3
Joined: Mon Apr 11, 2016 4:28 pm
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby odroid » Mon May 30, 2016 5:40 pm

Please look into the changes carefully what we made for adding the new resolution for a few weeks.
https://github.com/hardkernel/linux/com ... ff79a490a8
There are tons of magic numbers we need to configure the HDMI clock timing controllers.
If you can make it much simpler, just let us know how to do it.

BTW, we will return your display after driver development with our cost as I told you.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby endecotp » Tue May 31, 2016 2:30 am

odroid wrote:There are tons of magic numbers we need to configure the HDMI clock timing controllers.
If you can make it much simpler, just let us know how to do it.


Is that a serious question?

If it is:

1. Abstract all the video timing stuff so that it is in just one place.
2. Except for the few "legacy" modes, use the VESA "generalised timing formula" and/or "coordinated video timings" to generate the timing numbers from the mode resolution and refresh rate.
endecotp
 
Posts: 229
Joined: Sun May 08, 2016 12:30 am
languages_spoken: english
ODROIDs: c2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby roman333 » Tue May 31, 2016 9:21 am

@odroid, thanks to add resolutions. Adding resolution to changing 11 files with magic look not too easy and someone can make mistake with configuring it. Sending big monitor over the world is not good solution for this monitor.
@endecotp, after look at first page on google about this problem(i don't know nothing about driwers making) i think problem is somewhere else. Is linux problem:
Linux drivers are usually much worse (they require a lot of tinkering, i.e. manual configuration) than Windows/Mac OS drivers in regard to support of non-standard display resolutions, very high (a.k.a. HiDPI) display resolutions or custom refresh rates.
Source: http://itvision.altervista.org/why.linu ... rrent.html

Maybe You will find somewhere solution similar to https://bbs.archlinux.org/viewtopic.php ... 5#p1402275 or https://community.linuxmint.com/tutorial/view/877 where You can change/set resolution without changicg&compiling source code. Changing 3 lines in config look better.
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby stmicro » Tue May 31, 2016 10:48 am

Great job. The C2 seems to be the world's first ARM SBC which supports 2560*1440 HDMI display really well. My 27" Asus display shows nice graphics on 60hz :o. Thank you so much guys. I hope other skilled users will make a pull-request on hardkernel's github kernel tree for easier hdmi driver programming.
stmicro
 
Posts: 227
Joined: Tue Apr 28, 2015 4:23 pm
Location: shenzhen china
languages_spoken: english, chinese
ODROIDs: Many Odroids and Rpis.

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby endecotp » Tue May 31, 2016 8:06 pm

endecotp wrote:1. Abstract all the video timing stuff so that it is in just one place.


In fact this has already ben done for you, in "modedb". See Decumentation/fb/modes.txt.
endecotp
 
Posts: 229
Joined: Sun May 08, 2016 12:30 am
languages_spoken: english
ODROIDs: c2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Thu Jun 02, 2016 5:14 pm

odroid wrote:There are tons of magic numbers we need to configure the HDMI clock timing controllers.
If you can make it much simpler, just let us know how to do it.

Any chance you can share how you generated/got those magic numbers?
I have a 3440x1440 monitor that I would love to get running on the C2. The code changes you posted aren't that complicated, just some data fields.
I just can't figure out how you got those MANY numbers, otherwise I might would see if I can add this myself to the kernel.
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby endecotp » Thu Jun 02, 2016 7:54 pm

This link: http://www.analogway.com/files/uploads/ ... -vio4k.pdf
tells me that 3440x1440@60Hz uses "VESA CVT reduced blanking". If that's true (which it may not be - google more!) then you can use the cvt utility ( http://linux.die.net/man/1/cvt ) or the spreadsheet linked from that man page to get the timings.

If you do the same thing for an existing mode and compare the timing numbers with the source code, you should be able to identify what most of the numbers do. Otherwise you'll probably find that they are the same for all or most modes.

See my thread here: viewtopic.php?f=141&t=21199 and the patch that I link to, which includes some comments that you might find useful. (Yes, comments! They are allowed in kernel source code!)

Before you start, learn what "front porch" etc. etc. mean.
endecotp
 
Posts: 229
Joined: Sun May 08, 2016 12:30 am
languages_spoken: english
ODROIDs: c2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby roman333 » Fri Jun 03, 2016 1:03 am

From this code https://github.com/hardkernel/linux/com ... ff79a490a8 for 1920 * 1,33333 x 1080px mode(2560*1080) and this last mode with Y * 1,3333 (2560 * 1440) and this last with Y * 1,1111 maybe You can find another numbers for Your 1.7916666 * 2560 x 1440px numbers.
roman333
 
Posts: 8
Joined: Fri Apr 08, 2016 5:37 am
languages_spoken: english

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Thu Jun 09, 2016 5:10 am

So, I spent some time looking at the patches that added the 2560x1440 / 2560x1600 / 2560x1080 resolutions to the kernel (https://github.com/hardkernel/linux/commit/6001f48b5285d8f4c3430dfc2cae8aff79a490a8 and https://github.com/hardkernel/linux/commit/e073002f31de5991af4020faf61786d16657f3f8)

And after some tinkering and a lot of math, I was able to get my C2 to switch the HDMI to 3440x1440 with 60 Hz just fine.
But the Mate Desktop is only 1280x720 in size and now in the upper left corner of my LG Ultrawide screen (:

Somehow the frame buffer is not picking up the 3440x1440 resolution and defaults to 1280x720. The 2560x1440 from the patches above works fine.
I am a bit lost here.

My patch can be found here: https://github.com/olihey/linux/commit/bbf2d54935d3fea36ae8905459f1c7df0f07b44a

Can anybody point me at what might be missing?
I know my way around C but these amlogic drivers are very confusing.

BTW: I have written a little Python script that can print out the required code changes for a given Modeline, code is here: https://github.com/olihey/c2_mode
Attachments
c2lg.jpg
Bad screen
(119.71 KiB) Downloaded 3420 times
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby endecotp » Thu Jun 09, 2016 6:46 am

Did you look at my thread, linked in my post above?
I had a similar issue, which I sidestepped by not adding a new mode but instead modifying the existing one.
endecotp
 
Posts: 229
Joined: Sun May 08, 2016 12:30 am
languages_spoken: english
ODROIDs: c2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Thu Jun 09, 2016 10:24 am

Hello, olihey,

For 720p Desktop UI, it seems 3440x1440 configuration should be added on lightdm display manager cause currently, there is no mode of 3440x1440.
Could you try the following?

Code: Select all
odroid@odroid64:~$ su
root@odroid64:/home/odroid# cp /etc/initramfs-tools/scripts/local-top/c2_init.sh /home/odroid/
root@odroid64:/home/odroid# vi c2_init.sh

Then, add parameters for 3440x1440 and temporary mode value, "3440x1440p60hz" in c2_init.sh.
Code: Select all
#!/bin/sh

for x in $(cat /proc/cmdline); do
        case ${x} in
                m_bpp=*) export bpp=${x#*=} ;;
                hdmimode=*) export mode=${x#*=} ;;
        esac
done

HPD_STATE=/sys/class/amhdmitx/amhdmitx0/hpd_state
DISP_CAP=/sys/class/amhdmitx/amhdmitx0/disp_cap
DISP_MODE=/sys/class/display/mode

# Add default mode just for test
mode="3440x1440p60hz"

echo $mode > $DISP_MODE

common_display_setup() {
        M="0 0 $(($X - 1)) $(($Y - 1))"
        Y_VIRT=$(($Y * 2))
        fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $bpp
        echo $mode > /sys/class/display/mode
        echo 0 > /sys/class/graphics/fb0/free_scale
        echo 1 > /sys/class/graphics/fb0/freescale_mode
        echo $M > /sys/class/graphics/fb0/free_scale_axis
        echo $M > /sys/class/graphics/fb0/window_axis

        echo 0 > /sys/class/graphics/fb1/free_scale
        echo 1 > /sys/class/graphics/fb1/freescale_mode
        if [ "$bpp" = "32" ]; then
            echo d01068b4 0x7fc0 > /sys/kernel/debug/aml_reg/paddr
        fi
}

case $mode in
# Add X,Y for 3440x1440
      3440x1440p60hz*)
         export X=3440
         export Y=1440
         ;;
      480*)
         export X=720
         export Y=480
         ;;
      576*)
         export X=720
         export Y=576
         ;;
      720p*)
         export X=1280
         export Y=720
         ;;
      1080*)
         export X=1920
         export Y=1080
         ;;
      2160p*)
         export X=3840
         export Y=2160
         ;;
      smpte24hz*)
         export X=3840
         export Y=2160
         ;;
      640x480p60hz*)
         export X=640
         export Y=480
         ;;
      800x480p60hz*)
         export X=800
         export Y=480
         ;;
      800x600p60hz*)
         export X=800
         export Y=600
         ;;
      1024x600p60hz*)
         export X=1024
         export Y=600
         ;;
      1024x768p60hz*)
         export X=1024
         export Y=768
         ;;
      1280x800p60hz*)
         export X=1280
         export Y=800
         ;;
      1280x1024p60hz*)
         export X=1280
         export Y=1024
         ;;
      1360x768p60hz*)
         export X=1360
         export Y=768
         ;;
      1440x900p60hz*)
         export X=1440
         export Y=900
         ;;
      1600x900p60hz*)
         export X=1600
         export Y=900
         ;;
      1680x1050p60hz*)
         export X=1680
         export Y=1050
         ;;
      1920x1200p60hz*)
         export X=1920
         export Y=1200
         ;;
      2560x1080p60hz*)
         export X=2560
         export Y=1080
         ;;
      2560x1440p60hz*)
         export X=2560
         export Y=1440
         ;;
      2560x1600p60hz*)
         export X=2560
         export Y=1600
         ;;
esac

common_display_setup

# Console unblack
echo 0 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb1/blank

Restart lightdm and run c2_init.sh
Code: Select all
root@odroid64:/home/odroid# service lightdm stop
root@odroid64:/home/odroid# ./c2_init.sh
root@odroid64:/home/odroid# service lightdm start
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Thu Jun 09, 2016 4:31 pm

Yeah, that worked. Great!!!! 3440x1440.

But how can I make this stick? I also changed the c2_init.sh in /etc/init.... but when I reboot it goes back to the 720p in the left upper corner. If I then stop lightdm, run c2_init.sh (from /etc/init...) and start lightdm again it works.

@joy: Can you explain to me the how to correctly get this line:
Code: Select all
HPLL_FVCO_RATE(2415000, 0x64, 0x1, 1, 0),

How do I get the 0x64 from the 2415000? Is there some kind of documentation for this?
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Thu Jun 09, 2016 4:32 pm

olihey,

As I tested with my monitor, the output is 3440x1440p, "31Hz".
I think the expected pixel clock must be 315.576MHz to support 60Hz based on the modeline configuration you're using with your patch
and supposing pixel clock 157.759 MHz, the Vclock value, 31Hz is reasonable.

Code: Select all
Hor Pixels | Ver Pixels | Pixel Clock    |    Hor Freq   | Ver Freq
    3440   |     1440   | 157.759MHz |  87.600KHz |    60Hz
----------------------------------------------------------------------------------------------------------------
hdisp  |   hsyncstart   | hsyncend |   htotal    |  vdisp  | vsyncstart | vsyncend  | vtotal  |
 3440  |      3488      |    3520     |    3600    |  1440   |    1443   |     1453    | 1461   |

I adjusted some of clk and hdmi driver based on your patch.
So could you look over it and check if it's working normally for 3440x1440p@60hz with your monitor?
(attachment file : 0002-Added-3440x144060hz-mode.patch.zip)

Code: Select all
diff --git a/drivers/amlogic/clk/gxbb_hdmi_clk.c b/drivers/amlogic/clk/gxbb_hdmi_clk.c
index fa7a32d..53f2328 100644
--- a/drivers/amlogic/clk/gxbb_hdmi_clk.c
+++ b/drivers/amlogic/clk/gxbb_hdmi_clk.c
@@ -122,6 +122,7 @@ static struct aml_pll_conf hpll_pll_phy_conf = {
 static struct amlogic_pll_rate_table hpll_phy_tbl[] = {
    HPLL_FVCO_RATE(5940000, 0x7b, 0x1, 0, 0),
    HPLL_FVCO_RATE(3450000, 0x47, 0x1, 0, 0),
+   HPLL_FVCO_RATE(3155760, 0x41, 0x1, 0, 0), /* 3440x1440 */
    HPLL_FVCO_RATE(2970000, 0x3d, 0x1, 0, 0),
    HPLL_FVCO_RATE(2415000, 0x64, 0x1, 1, 0),
    HPLL_FVCO_RATE(2685000, 0x6f, 0x1, 1, 0),
@@ -149,6 +150,7 @@ static struct vid_clk_table vid_clk_tbl[] = {
    VID_CLK(594000, 5940000, 0, 1, DIV_5, 1),
    VID_CLK(594000, 2970000, 0, 1, DIV_5, 0),
    VID_CLK(345000, 3450000, 0, 1, DIV_5, 1),
+   VID_CLK(315576, 3155760, 0, 1, DIV_5, 1),
    VID_CLK(297000, 2970000, 0, 1, DIV_5, 1),
    VID_CLK(241500, 2415000, 0, 1, DIV_5, 1),
    VID_CLK(268500, 2685000, 0, 1, DIV_5, 1),
@@ -268,7 +270,7 @@ static int   hpll_clk_set(struct clk_hw *hw, unsigned long drate,
    if (i == ARRAY_SIZE(hpll_phy_tbl))
       rate_tbl = &hpll_phy_tbl[i];
 
-   pr_info("%s,drate = %ld,found %ld\n", __func__, drate, rate_tbl->rate);
+   pr_err("%s,drate = %ld,found %ld\n", __func__, drate, rate_tbl->rate);
    switch (drate) {
    case 5940000:
       writel(0x5800027b, hiu_base + HHI_HDMI_PLL_CNTL);
@@ -294,6 +296,18 @@ static int   hpll_clk_set(struct clk_hw *hw, unsigned long drate,
          readl(hiu_base + HHI_HDMI_PLL_CNTL));
       hdmi_update_bits(HHI_HDMI_PLL_CNTL2, 0xffff, 0x4e00);
       break;
+   case 3155760:
+      writel(0x58000241, hiu_base + HHI_HDMI_PLL_CNTL);
+      writel(0x00000000, hiu_base + HHI_HDMI_PLL_CNTL2);
+      writel(0x0d5c5091, hiu_base + HHI_HDMI_PLL_CNTL3);
+      writel(0x801da72c, hiu_base + HHI_HDMI_PLL_CNTL4);
+      writel(0x71486980, hiu_base + HHI_HDMI_PLL_CNTL5);
+      writel(0x00000e55, hiu_base + HHI_HDMI_PLL_CNTL6);
+      set_pll(rate_tbl);
+      pr_info("hpll reg: 0x%x\n",
+         readl(hiu_base + HHI_HDMI_PLL_CNTL));
+      hdmi_update_bits(HHI_HDMI_PLL_CNTL2, 0xffff, 0x4e00);
+      break;
    case 2970000:
    case 1485000:
    case  742500:
@@ -787,6 +801,7 @@ struct hdmi_clock {
 
 static struct cts_encx_table cts_encp_tbl[] = {
    CTS_XXX_TBL(594000, 594000, 1, 1),
+   CTS_XXX_TBL(315576, 315576, 1, 1),
    CTS_XXX_TBL(297000, 297000, 1, 1),
    CTS_XXX_TBL(241500, 241500, 1, 1),
    CTS_XXX_TBL(268500, 268500, 1, 1),
@@ -819,6 +834,7 @@ static struct cts_encx_table cts_enci_tbl[] = {
 static struct cts_encx_table cts_pixel_tbl[] = {
    CTS_XXX_TBL(594000, 594000, 1, 1),
    CTS_XXX_TBL(297000, 594000, 1, 2),
+   CTS_XXX_TBL(315576, 315576, 1, 1),
    CTS_XXX_TBL(297000, 297000, 1, 1),
    CTS_XXX_TBL(241500, 241500, 1, 1),
    CTS_XXX_TBL(268500, 268500, 1, 1),
diff --git a/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c b/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c
index 6f71a82..9863b01 100644
--- a/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c
+++ b/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c
@@ -1192,33 +1192,33 @@ static struct hdmi_format_para fmt_para_vesa_2560x1080p60_128x59 = {
 };
 
 static struct hdmi_format_para fmt_para_vesa_3440x1440p60_43x18 = {
-  .vic = HDMIV_3440x1440p60hz,
-  .name = "3440x1440p60hz",
-  .pixel_repetition_factor = 0,
-  .progress_mode = 1,
-  .scrambler_en = 0,
-  .tmds_clk_div40 = 0,
-  .tmds_clk = 157750,
-  .timing = {
-    .pixel_freq = 157750, // = (h_total * v_total) / 2
-    .h_freq = 87600,
-    .v_freq = 60000,
-    .vsync_polarity = 0,
-    .hsync_polarity = 1,
-    .h_active = 3440,
-    .h_total = 3600,
-    .h_blank = 160,
-    .h_front = 48,
-    .h_sync = 32,
-    .h_back = 80,
-    .v_active = 1440,
-    .v_total = 1461,
-    .v_blank = 21,
-    .v_front = 3,
-    .v_sync = 10,
-    .v_back = 8,
-    .v_sync_ln = 1,
-  },
+   .vic = HDMIV_3440x1440p60hz,
+   .name = "3440x1440p60hz",
+   .pixel_repetition_factor = 0,
+   .progress_mode = 1,
+   .scrambler_en = 0,
+   .tmds_clk_div40 = 0,
+   .tmds_clk = 315576,
+   .timing = {
+      .pixel_freq = 315576,
+      .h_freq = 87600,
+      .v_freq = 60000,
+      .vsync_polarity = 0,
+      .hsync_polarity = 1,
+      .h_active = 3440,
+      .h_total = 3600,
+      .h_blank = 160,
+      .h_front = 48,
+      .h_sync = 32,
+      .h_back = 80,
+      .v_active = 1440,
+      .v_total = 1461,
+      .v_blank = 21,
+      .v_front = 3,
+      .v_sync = 10,
+      .v_back = 8,
+      .v_sync_ln = 1,
+   },
 };
 
 static struct hdmi_format_para *all_fmt_paras[] = {
diff --git a/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c b/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c
index 56a91f0..e6bfd6a 100644
--- a/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c
+++ b/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c
@@ -357,7 +357,7 @@ static struct hdmitx_clk hdmitx_clk[] = {
    {HDMIV_2560x1440p60hz, 24000, 2415000, 241500, 241500, -1, 241500},
    {HDMIV_2560x1600p60hz, 24000, 2685000, 268500, 268500, -1, 268500},
    {HDMIV_2560x1080p60hz, 24000, 1855800, 185580, 185580, -1, 185580},
-   {HDMIV_3440x1440p60hz, 24000, 1577500, 157750, 157750, -1, 157750},
+   {HDMIV_3440x1440p60hz, 24000, 3155760, 315576, 315576, -1, 315576},
 };
 
 static void set_vmode_clk(struct hdmitx_dev *hdev, enum hdmi_vic vic)

To make sure, I've confirmed 3440x1440 Desktop UI using the instruction that I aforementioned.
If it's working normally by your side, your patch and 3440x1440 mode will be added for C2 next Ubuntu release.
Attachments
0002-Added-3440x144060hz-mode.patch.zip
(1.68 KiB) Downloaded 85 times
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Thu Jun 09, 2016 4:42 pm

Thanks, your are right. I used the wrong pixel clock value from the EDID I read out of my LG. Unfortunately my LG also doesn't show any information about resolution and frame rates, so I couldn't spot the error.
Will test your patch but I have to work now, so it won't before before this evening or tomorrow :(
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Thu Jun 09, 2016 4:57 pm

olihey wrote:Yeah, that worked. Great!!!! 3440x1440.

But how can I make this stick? I also changed the c2_init.sh in /etc/init.... but when I reboot it goes back to the 720p in the left upper corner. If I then stop lightdm, run c2_init.sh (from /etc/init...) and start lightdm again it works.

@joy: Can you explain to me the how to correctly get this line:
Code: Select all
HPLL_FVCO_RATE(2415000, 0x64, 0x1, 1, 0),

How do I get the 0x64 from the 2415000? Is there some kind of documentation for this?


Sorry, I missed your latest reply.
If you confirm the new pixel clock configuration, I will merge your patch and related script like c2_init.sh and boot.ini will be update for 3440x1440p60hz on next Ubuntu release.
With update, you don't need to change by force for 3440x1440.
I will specify the version after release here.

And '0x64' is M value that is one of hpll register parameters to generate 214.500MHz.
Honestly, I don't fully understand to handle them because there is no detailed register desription or calculation method for hdmi hpll in S905 datasheet. :(
[ 24MHz sys clk -> (HDMI PLL block, M / N / OD0~2) -> hdmi dpll clk out -> divider in hdmi block -> pixel clock -> h, v clock ]
I'm just using one of pll table and modify M / N / OD to make new one and then calculate pixel clock based on modeline information.
Last edited by joy on Thu Jun 09, 2016 5:17 pm, edited 3 times in total.
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Thu Jun 09, 2016 5:02 pm

olihey wrote:Thanks, your are right. I used the wrong pixel clock value from the EDID I read out of my LG. Unfortunately my LG also doesn't show any information about resolution and frame rates, so I couldn't spot the error.
Will test your patch but I have to work now, so it won't before before this evening or tomorrow :(


No problem. Take your time. :D
When you confirm it, just let me know if it works.

Thanks, olihey.
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby endecotp » Thu Jun 09, 2016 7:35 pm

joy wrote:c2init.sh


What, another ******* place with a massive case statement that needs to be updated for every screen mode?
Aaaarrrggghhhh!

And what does it do when it gets a mode it doesn't recognise? Nice friendly error message? NO! It just falls off the end of the case statement.

This explains why I could only make 1920x1200 work when I changed the existing mode name, and not when I added a new name for the reduced blanking version.

I have an urge to show you how you should be doing this, by PARSING the mode to get its dimensions. Wait, I'll do that now.

</rant>
endecotp
 
Posts: 229
Joined: Sun May 08, 2016 12:30 am
languages_spoken: english
ODROIDs: c2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Thu Jun 09, 2016 9:11 pm

@joy: I can confirm that your patch works on my LG. As mentioned earlier I can't verify the refresh rate since the LG doesn't offer any way to display that. But the UI definitely feels snappier which I think is because of the higher refresh rate.

@endecotp: I feel your pain. As you can see from my little Python script all these values can be calculate from a Modeline but still one has to modify the kernel in 20+ places to add an new resolution. Seems silly, to be polite :D
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby endecotp » Thu Jun 09, 2016 10:26 pm

Code: Select all
#!/bin/sh

# (For testing, we'll get the mode name from the args and
# print X and Y to stdout at the end.)

M=$1

# We want to parse mode names like the following:
#
#   480i60hz
#   576p_rpt
#   1080p60hz
#   2160p60hz420
#   1024x768p60hz
#
# From this we want to get the X and Y resolutiions.  We don't
# care here about the refresh rate, interlace mode or other
# features.
#
# In the case of the TV modes the mode name doesn't explicity
# tell us the X dimension, but we can use arithmetic to work
# that out if we assume the aspect ratio.
#
# This is obviously fragile if new mode names with different
# formats are added.

# Mode name is in $M.

# Allow for uppercase X:
M=`echo $M | tr X x`

# We'll parse in two steps.  First, we'll get the initial numbers
# and possible x, i.e. everything before the 'i' or 'p'.  That will
# either be XxY for the VESA modes or just Y for the TV modes.

XY=`echo $M | sed 's/^\([0-9x]*\).*$/\1/'`

# Check for VESA XxY
# (Note that we need egrep below because regular grep doesn't
# support the + syntax.)
if echo $XY | egrep -q '^[0-9]+x[0-9]+$'
then
  X=`echo $XY | sed 's/^\([0-9]*\)x\([0-9]*\)$/\1/'`
  Y=`echo $XY | sed 's/^\([0-9]*\)x\([0-9]*\)$/\2/'`

# Check for TV Y-only
elif echo $XY | egrep -q '^[0-9]+$'
then
  Y=$XY
  # Assume 16:9 aspect ratio
  X=$(($Y * 16 / 9))

else
  echo "Don't understand mode '$M'" 1>&2
  exit 1
fi

# Done.


echo "X=$X Y=$Y"
exit 0
endecotp
 
Posts: 229
Joined: Sun May 08, 2016 12:30 am
languages_spoken: english
ODROIDs: c2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Fri Jun 10, 2016 12:36 pm

olihey wrote:@joy: I can confirm that your patch works on my LG. As mentioned earlier I can't verify the refresh rate since the LG doesn't offer any way to display that. But the UI definitely feels snappier which I think is because of the higher refresh rate.


Thanks for your feedback, olihey.
I will merge your patch including mine on C2 hdmi and vout driver of HK github for next Ubuntu release.
If you get something wrong with the final pixel clock and hpll setting, please share it with me.
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby crashoverride » Fri Jun 10, 2016 1:16 pm

olihey wrote:BTW: I have written a little Python script that can print out the required code changes for a given Modeline, code is here: https://github.com/olihey/c2_mode

That is awesome! It would be cool to integrate the math into the kernel so that modes are EDID driven. However, since the changes are all over the place, I doubt it would be a trivial task. All the display driver code is going to need a major rewrite to integrate it with the Kernel 4.x KMS/DRM. At that point, we will likely get EDID support anyway.
crashoverride
 
Posts: 3924
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Fri Jun 10, 2016 6:03 pm

Hello, olihey,
Can I have the modeline information of your 3440x1440 monitor?
It seems I need to adjust modeline parameters to fix 60Hz.
Sometime my monitor cannot detect hdmi mode with the latest pixel clock.

As I found, the following modeline parameters may be set for each V clock. (my fault...)
Code: Select all
Modeline "3440x1440"x60.0  319.75  3440 3488 3520 3600  1440 1443 1453 1481 +hsync -vsync (88.8 kHz eP)
Modeline "3440x1440"x50.0  265.25  3440 3488 3520 3600  1440 1443 1453 1474 +hsync -vsync (73.7 kHz e)
Modeline "3440x1440"x30.0  157.75  3440 3488 3520 3600  1440 1443 1453 1461 +hsync -vsync (43.8 kHz e)

For 3440x1440@30Hz, I think your patch has no problem. :)
I will adjust hdmi driver for 60Hz with those modeline information
and then let you know the result.
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Fri Jun 10, 2016 6:10 pm

I can't seem to get out proper Modelines but edid-decode is reporting this:
Code: Select all
Detailed mode: Clock 319.750 MHz, 800 mm x 335 mm
               3440 3488 3520 3600 hborder 0
               1440 1443 1453 1481 vborder 0
               +hsync -vsync
Detailed mode: Clock 265.250 MHz, 800 mm x 335 mm
               3440 3488 3520 3600 hborder 0
               1440 1443 1453 1474 vborder 0
               +hsync -vsync
Detailed mode: Clock 157.750 MHz, 800 mm x 335 mm
               3440 3488 3520 3600 hborder 0
               1440 1443 1453 gft vborder 0
               +hsync -vsync

These are 60Hz, 50Hz and 30Hz I guess
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Sat Jun 11, 2016 10:57 am

Thanks, olihey.
Here is the updated patch for 3440x1400p60hz.

Code: Select all
diff --git a/drivers/amlogic/clk/gxbb_hdmi_clk.c b/drivers/amlogic/clk/gxbb_hdmi_clk.c
index 6a5eb98..e62734d 100644
--- a/drivers/amlogic/clk/gxbb_hdmi_clk.c
+++ b/drivers/amlogic/clk/gxbb_hdmi_clk.c
@@ -122,6 +122,7 @@ static struct aml_pll_conf hpll_pll_phy_conf = {
 static struct amlogic_pll_rate_table hpll_phy_tbl[] = {
    HPLL_FVCO_RATE(5940000, 0x7b, 0x1, 0, 0),
    HPLL_FVCO_RATE(3450000, 0x47, 0x1, 0, 0),
+   HPLL_FVCO_RATE(3197500, 0x41, 0x1, 0, 0),
    HPLL_FVCO_RATE(2970000, 0x3d, 0x1, 0, 0),
    HPLL_FVCO_RATE(2415000, 0x64, 0x1, 1, 0),
    HPLL_FVCO_RATE(2685000, 0x6f, 0x1, 1, 0),
@@ -149,6 +150,7 @@ static struct vid_clk_table vid_clk_tbl[] = {
    VID_CLK(594000, 5940000, 0, 1, DIV_5, 1),
    VID_CLK(594000, 2970000, 0, 1, DIV_5, 0),
    VID_CLK(345000, 3450000, 0, 1, DIV_5, 1),
+   VID_CLK(319750, 3197500, 0, 1, DIV_5, 1),
    VID_CLK(297000, 2970000, 0, 1, DIV_5, 1),
    VID_CLK(241500, 2415000, 0, 1, DIV_5, 1),
    VID_CLK(268500, 2685000, 0, 1, DIV_5, 1),
@@ -294,6 +296,18 @@ static int   hpll_clk_set(struct clk_hw *hw, unsigned long drate,
          readl(hiu_base + HHI_HDMI_PLL_CNTL));
       hdmi_update_bits(HHI_HDMI_PLL_CNTL2, 0xffff, 0x4e00);
       break;
+   case 3197500:
+      writel(0x58000241, hiu_base + HHI_HDMI_PLL_CNTL);
+      writel(0x00000000, hiu_base + HHI_HDMI_PLL_CNTL2);
+      writel(0x0d5c5091, hiu_base + HHI_HDMI_PLL_CNTL3);
+      writel(0x801da72c, hiu_base + HHI_HDMI_PLL_CNTL4);
+      writel(0x71486980, hiu_base + HHI_HDMI_PLL_CNTL5);
+      writel(0x00000e55, hiu_base + HHI_HDMI_PLL_CNTL6);
+      set_pll(rate_tbl);
+      pr_info("hpll reg: 0x%x\n",
+         readl(hiu_base + HHI_HDMI_PLL_CNTL));
+      hdmi_update_bits(HHI_HDMI_PLL_CNTL2, 0xffff, 0x4e00);
+      break;
    case 2970000:
    case 1485000:
    case  742500:
@@ -787,6 +801,7 @@ struct hdmi_clock {
 
 static struct cts_encx_table cts_encp_tbl[] = {
    CTS_XXX_TBL(594000, 594000, 1, 1),
+   CTS_XXX_TBL(319750, 319750, 1, 1),
    CTS_XXX_TBL(297000, 297000, 1, 1),
    CTS_XXX_TBL(241500, 241500, 1, 1),
    CTS_XXX_TBL(268500, 268500, 1, 1),
@@ -819,6 +834,7 @@ static struct cts_encx_table cts_enci_tbl[] = {
 static struct cts_encx_table cts_pixel_tbl[] = {
    CTS_XXX_TBL(594000, 594000, 1, 1),
    CTS_XXX_TBL(297000, 594000, 1, 2),
+   CTS_XXX_TBL(319750, 319750, 1, 1),
    CTS_XXX_TBL(297000, 297000, 1, 1),
    CTS_XXX_TBL(241500, 241500, 1, 1),
    CTS_XXX_TBL(268500, 268500, 1, 1),
diff --git a/drivers/amlogic/display/vout/tv_vout.h b/drivers/amlogic/display/vout/tv_vout.h
index 094e38f..b4c1f44 100644
--- a/drivers/amlogic/display/vout/tv_vout.h
+++ b/drivers/amlogic/display/vout/tv_vout.h
@@ -1129,7 +1129,7 @@ static struct vinfo_s tv_info[] = {
       .aspect_ratio_den  = 18,
       .sync_duration_num = 60,
       .sync_duration_den = 1,
-      .video_clk         = 157750000,
+      .video_clk         = 319750000,
    },
    { /* VMODE_vga */
       .name              = "vga",
diff --git a/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c b/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c
index c3e5608..f48741e 100644
--- a/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c
+++ b/drivers/amlogic/hdmi/hdmi_common/hdmi_parameters.c
@@ -1198,13 +1198,13 @@ static struct hdmi_format_para fmt_para_vesa_3440x1440p60_43x18 = {
    .progress_mode = 1,
    .scrambler_en = 0,
    .tmds_clk_div40 = 0,
-   .tmds_clk = 157750,
+   .tmds_clk = 319750,
    .timing = {
-      .pixel_freq = 157750, /* = (h_total * v_total) / 2 */
-      .h_freq = 87600,
+      .pixel_freq = 319750,
+      .h_freq = 88819,
       .v_freq = 60000,
-      .vsync_polarity = 0,
-      .hsync_polarity = 1,
+      .vsync_polarity = 0, /* -VSync */
+      .hsync_polarity = 1, /* +HSync */
       .h_active = 3440,
       .h_total = 3600,
       .h_blank = 160,
@@ -1212,11 +1212,11 @@ static struct hdmi_format_para fmt_para_vesa_3440x1440p60_43x18 = {
       .h_sync = 32,
       .h_back = 80,
       .v_active = 1440,
-      .v_total = 1461,
-      .v_blank = 21,
+      .v_total = 1481,
+      .v_blank = 41,
       .v_front = 3,
       .v_sync = 10,
-      .v_back = 8,
+      .v_back = 28,
       .v_sync_ln = 1,
    },
 };
diff --git a/drivers/amlogic/hdmi/hdmi_tx_20/hw/enc_cfg_hw.c b/drivers/amlogic/hdmi/hdmi_tx_20/hw/enc_cfg_hw.c
index 7e1c47c..ea66def 100644
--- a/drivers/amlogic/hdmi/hdmi_tx_20/hw/enc_cfg_hw.c
+++ b/drivers/amlogic/hdmi/hdmi_tx_20/hw/enc_cfg_hw.c
@@ -992,11 +992,11 @@ static const struct reg_s tvregs_3440x1440p60hz[] = {
    {P_ENCP_VIDEO_MODE_ADV, 0x18,},
 
    {P_ENCP_VIDEO_MAX_PXCNT, 3599,},
-   {P_ENCP_VIDEO_MAX_LNCNT, 1460,},
+   {P_ENCP_VIDEO_MAX_LNCNT, 1480,},
    {P_ENCP_VIDEO_HAVON_BEGIN, 80,},
    {P_ENCP_VIDEO_HAVON_END, 3519,},
-   {P_ENCP_VIDEO_VAVON_BLINE, 8,},
-   {P_ENCP_VIDEO_VAVON_ELINE, 1473,},
+   {P_ENCP_VIDEO_VAVON_BLINE, 28,},
+   {P_ENCP_VIDEO_VAVON_ELINE, 1467,},
    {P_ENCP_VIDEO_HSO_BEGIN, 0,},
    {P_ENCP_VIDEO_HSO_END, 32,},
    {P_ENCP_VIDEO_VSO_BEGIN, 0x1E,},
diff --git a/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c b/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c
index 0063a7c..c3d45af 100644
--- a/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c
+++ b/drivers/amlogic/hdmi/hdmi_tx_20/hw/hdmi_tx_hw.c
@@ -357,7 +357,7 @@ static struct hdmitx_clk hdmitx_clk[] = {
    {HDMIV_2560x1440p60hz, 24000, 2415000, 241500, 241500, -1, 241500},
    {HDMIV_2560x1600p60hz, 24000, 2685000, 268500, 268500, -1, 268500},
    {HDMIV_2560x1080p60hz, 24000, 1855800, 185580, 185580, -1, 185580},
-   {HDMIV_3440x1440p60hz, 24000, 1577500, 157750, 157750, -1, 157750},
+   {HDMIV_3440x1440p60hz, 24000, 3197500, 319750, 319750, -1, 319750},
 };
 
 static void set_vmode_clk(struct hdmitx_dev *hdev, enum hdmi_vic vic)
@@ -1575,14 +1575,14 @@ static void hdmi_tvenc_set(struct hdmitx_vidpara *param)
       PIXEL_REPEAT_HDMI   = 0;
       ACTIVE_PIXELS       = 3440;
       ACTIVE_LINES        = 1440;
-      LINES_F0            = 1461;
-      LINES_F1            = 1461;
+      LINES_F0            = 1481;
+      LINES_F1            = 1481;
       FRONT_PORCH         = 48;
       HSYNC_PIXELS        = 32;
       BACK_PORCH          = 80;
       EOF_LINES           = 3;
       VSYNC_LINES         = 10;
-      SOF_LINES           = 8;
+      SOF_LINES           = 28;
       TOTAL_FRAMES        = 4;
       break;
    default:
Attachments
0003_Added_3440x1440p60hz_mode.patch.zip
(1.98 KiB) Downloaded 72 times
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Mon Jun 13, 2016 3:23 pm

@joy: I can't test the patch since my C2 is acting up. It doesn't seem to boot anymore :(
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Tue Jun 14, 2016 12:07 pm

olihey wrote:@joy: I can't test the patch since my C2 is acting up. It doesn't seem to boot anymore :(


Do you mean your C2 doesn't work even booting to u-boot stage?
If so, check the connector your boot storage (eMMC or SD).
or try re-write release ubuntu image or first try boot update.

http://odroid.com/dokuwiki/doku.php?id= ... _note_v1.2
http://odroid.com/dokuwiki/doku.php?id= ... ing_u-boot
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby joy » Thu Jun 23, 2016 10:24 am

3440x1440p60hz mode has been released on Ubuntu with 3.14.65-68 version.
For Android, we're planning to release it and after release, I will specify the version here.
joy
 
Posts: 496
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby olihey » Thu Jun 23, 2016 3:12 pm

@Joy: Awesome, my C2 replacement unit should arrive today. So, I finally can work on my big canvas. Thanks for helping
olihey
 
Posts: 33
Joined: Mon Sep 23, 2013 5:20 pm
Location: Germany
languages_spoken: english
ODROIDs: C2

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby slavikoid » Tue Jan 31, 2017 11:24 pm

Hi!

I have very strange issue with special resolution display (it is industrial display with 1200p@90Hz)
It is not a problem to connect this display to a big PC, so I got the modeline (and it was the same that edid-decode had in output):
Code: Select all
Modeline "2160x1200"   297   2160 2200 2220 2266   1200 1228 1230 1464  -hsync -vsync

And than using the python tool (c2_mode) I have generated helper and rebuilt the kernel for my odroid C2. After booting I was able to set the resolution in boot.ini, but my display had wrong picture:

Image

Does anyone know what can be the problem?

p.s. Before patching the driver, there was only dark screen (unsupported mode / resolution) and by default it was always set to 1080p@60Hz.

Thank you in advance!
User avatar
slavikoid
 
Posts: 13
Joined: Mon Jan 30, 2017 6:56 pm
languages_spoken: english
ODROIDs: C2 XU4

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby odroid » Wed Feb 01, 2017 9:27 am

Did you also try this approach instead of building a custom Kernel?
http://odroid.com/dokuwiki/doku.php?id= ... utosetting
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby slavikoid » Wed Feb 01, 2017 3:33 pm

odroid wrote:Did you also try this approach instead of building a custom Kernel?
http://odroid.com/dokuwiki/doku.php?id= ... utosetting


Yes, of course, I have tried "custombuilt" but had no success... That "noise" after recompiling the driver and adding new resolution "2160x1200p90" was my best result. I understand that something is wrong with clock, timings or something, but I have tried a lot of variants (from edid, from cvt, from Modeline of big PC etc...). I appreciate if you can throw me an Idea what could be wrong.
User avatar
slavikoid
 
Posts: 13
Joined: Mon Jan 30, 2017 6:56 pm
languages_spoken: english
ODROIDs: C2 XU4

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby odroid » Wed Feb 01, 2017 5:51 pm

I'm still having a big doubt in 90hz of VSYNC of HDMI TX capability.
In the S905 datasheet, nothing mentioned above 60Hz.
Try 60Hz mode instead of 90Hz.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby slavikoid » Wed Feb 01, 2017 8:58 pm

According to S905 max capabilities, it is able to handle 2160x1200@90Hz with the pixel_clock 297MHz. The 4K (2160p60hz) has much higher clock values:
Code: Select all
{HDMIV_3440x1440p60hz, 24000, 3197500, 319750, 319750, -1, 319750},

I suppose S905 HDMI can handle my resolution 2160x1200@90Hz, but I can't make it work as well.
User avatar
slavikoid
 
Posts: 13
Joined: Mon Jan 30, 2017 6:56 pm
languages_spoken: english
ODROIDs: C2 XU4

Re: Monitor resolution betw. Full HD and 4K(3440x1440,2560x1

Unread postby slavikoid » Wed Feb 01, 2017 10:08 pm

Thanks to all, case closed.
User avatar
slavikoid
 
Posts: 13
Joined: Mon Jan 30, 2017 6:56 pm
languages_spoken: english
ODROIDs: C2 XU4


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 0 guests