Jump to content

Recommended Posts

Posted

Hello, and thank you for your great work on Armbian.

 

I have a BananaPi running on Armbian 5.38 Debian Stretch, downgraded to 5.31 due to freezing problems.

i would love to use a 5" 800x480 HDMI connected "china"-Display with the BananaPi.

Unfortunately it doesn't provide any EDID infos.

I managed to set the resolution to 800x600 with an overscan_y=120 in boot.cmd,

setenv video-mode sunxi:800x600-24@60,monitor=hdmi,hpd=0,edid=0,overscan_y=120

to see a approximately matching console screen. But the display is somehow not correct,

wrong colors and no sharp characters. The only resolution with correct colors and sharp characters

was in 1280x720, but of course then most of the screen content is missing.

Is there any chance to get a modified driver that supports that resolution?

If I provided too less info, please let me know.

I'm quite a novice in Armbian/Linux, so please have a little indulgence with me ;)

Regards,
sude

 

Posted (edited)

OK, since there may be no easy way doing that:

I started to build a development environment in a VM (armbian/build), and will try to modify the uboot video driver to support the 800x480 mode.

 

Of course, I have to do a lot of research to understand how all that stuff works,

any hints where to start are highly appreciated.

Edited by sude
ask for help
Posted

Hi,

thanks for your reply and the links.

I think I still have a major problem in understanding how all the parts play together in Armbian.

 

The patch shown by Igor seems to be for the kernel driver.

I thought I have to modify the u-boot video driver to get a proper console display (that is what I pursue).

 

My attempt would be to create a patch for /drivers/video/videomodes.[c|h] with the new resolution and pixelclock etc.

and install the patched u-boot.

 

In the meantime it is a problem to get the correct technical data for that display (pixelclock etc.), but hopefully

the vendor sends a datasheet.

Posted

Well, I managed to build a custom u-boot, with the additional resolution of 800x480, with following patch:

/armbian/build/userpatches/u-boot/u-boot-sunxi/branch_next/add_resolution_800_480.patch                                                 1213/1213              100%
diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c
index 6d96b33..7494d8b 100644
--- a/drivers/video/videomodes.c
+++ b/drivers/video/videomodes.c
@@ -106,6 +106,7 @@ const struct ctfb_res_modes res_mode_init[RES_MODES_COUNT] = {
        {1360,  768, 60, 11696,  85500, 256,  64, 17,  3, 112, 7, 0, FB_VMODE_NONINTERLACED},
        {1920, 1080, 60,  6734, 148500, 148,  88, 36,  4,  44, 5, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED},
        {1920, 1200, 60,  6494, 154000,  80,  48, 26,  3,  32, 6, FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED},
+        { 800,  480, 60, 33264,  27000,  88,  80, 29,  1,  60, 3, 0, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED},
 };

 /************************************************************************
diff --git a/drivers/video/videomodes.h b/drivers/video/videomodes.h
index 82190a2..32b92f0 100644
--- a/drivers/video/videomodes.h
+++ b/drivers/video/videomodes.h
@@ -69,7 +69,8 @@ struct ctfb_vesa_modes {
 #define RES_MODE_1360x768      7
 #define RES_MODE_1920x1080     8
 #define RES_MODE_1920x1200     9
-#define RES_MODES_COUNT                10
+#define RES_MODE_800x480       10
+#define RES_MODES_COUNT                11

 #define VESA_MODES_COUNT 19

It's pretty cool already, but it's not perfect ;)

As you can see on the attached pictures, something is wrong with the colors...

I must confess that I am not quit sure about the values for timings, they are more or less collected from some sources in the net.

 

Does anybody have an idea how to deal with that colors? Setting color deep in boot.cmd didn't help.

hdmi1.png

hdmi2.png

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines