How to set custom 1280x800 to 7'' HDMI panel?

Discuss Android on the Wandboard, as well as app development for or on the Wandboard.

How to set custom 1280x800 to 7'' HDMI panel?

Postby repu1sion » Tue Sep 29, 2015 7:02 am

Hi guys.

I have a 7'' panel from Chalkboard Electronics with 1280x800 resolution, 6 bits per color.
http://www.chalk-elec.com/?page_id=1280 ... ry=3094861
Of course it doesn't work by setting it via uEnv.txt - resolution still remains in 720p instead.
I found few posts on forum already about calculating timings : viewtopic.php?f=11&t=664
But you could give me any clue on how to calculate HFP, HBP, HSW values for that 1280x800 resolution?

Regards.
repu1sion
 
Posts: 13
Joined: Mon Jun 01, 2015 4:00 pm

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby repu1sion » Tue Sep 29, 2015 7:14 am

Shouldn't it be something like that (generated with gtf)?
# gtf 1280 800 60 -f

mode "1280x800 60.00Hz 32bit (GTF)"
# PCLK: 83.46 MHz, H: 49.68 kHz, V: 60.00 Hz
geometry 1280 800 1280 800 32
timings 11981 200 64 24 1 136 3
hsync low
vsync high
endmode
repu1sion
 
Posts: 13
Joined: Mon Jun 01, 2015 4:00 pm

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby matejg » Wed Feb 10, 2016 8:36 pm

I have exactly the same problem.

As far as i understand, the exact timing can only be set for RGB interface, not HDMI (in kernel parameters)? I also have 1280x800 panel hooked on HDMI and i cannot get it to work.

I have now resorted to kernel hacking - i'll just try to set the default value to 1280x800@24BPP. First i'll see what EDID reports back. Strange thing is, that EDID *should* report 1280x800 and kernel *should* set correct timings / resolution based on EDID table.

Any ideas? I dont want to make an overkill of a solution.

~Matej
matejg
 
Posts: 18
Joined: Tue Oct 14, 2014 8:11 pm

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby repu1sion » Thu Feb 11, 2016 7:10 pm

What is important is to set to uEnv.txt or exactly to kernel command line next line:
Code: Select all
mode=1280x800M@60

Here what important is M parameter which means timings will be generated automatically by kernel and kernel can do it quite well.
In my case the whole line was like that:
Code: Select all
video_mode=display0=dev=hdmi0,mode=1280x800M@60,if=RGB24,bpp=32 fbmem=32M

Also (probably not common issue) somehow wandboard failed to read EDID for display. In that case standard hardcoded EDID was used so instead of 1280x800 - 720p mode was selected (but panel still worked).
So I hacked the kernel to disable EDID reading at all and made a hardcode working solution by default but that's probably not needed in your case.

Here is a part of what I did, probably with some redundancy but could give you a right direction:

In drivers/video/mxc_hdmi.c
-----
Code: Select all
+static const struct fb_videomode chalk_mode = {
+        /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
+        NULL, 60, 1280, 800, 11976, 200, 72, 3, 22, 128, 6,
+               FB_SYNC_VERT_HIGH_ACT,
+                FB_VMODE_NONINTERLACED, FB_MODE_IS_FROM_VAR
+};

@@ -1852,6 +1865,8 @@ static void  mxc_hdmi_default_modelist(struct mxc_hdmi *hdmi)
+       fb_add_videomode(&chalk_mode, &hdmi->fbi->modelist);

@@ -1889,22 +1905,32 @@ static void mxc_hdmi_set_mode(struct mxc_hdmi *hdmi)
+#if 0
        mode = fb_find_nearest_mode(&m, &hdmi->fbi->modelist);
        if (!mode) {
                pr_err("%s: could not find mode in modelist\n", __func__);
                return;
        }
+#else
+       mode = &chalk_mode;
+#endif

@@ -1949,7 +1975,8 @@ static void mxc_hdmi_cable_connected(struct mxc_hdmi *hdmi)
-               mxc_hdmi_edid_rebuild_modelist(hdmi);
+               //repu1sion - disabling rebuild modelist from scratch from EDID
+               //mxc_hdmi_edid_rebuild_modelist(hdmi);

@@ -2185,6 +2214,8 @@ static void mxc_hdmi_setup(struct mxc_hdmi *hdmi, unsigned long event)
+                       edid_mode = &chalk_mode;

@@ -2519,6 +2552,8 @@ static int mxc_hdmi_disp_init(struct mxc_dispdrv_handle *disp,
+       fb_add_videomode(&chalk_mode, &hdmi->fbi->modelist)
repu1sion
 
Posts: 13
Joined: Mon Jun 01, 2015 4:00 pm

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby Wig » Mon Feb 15, 2016 2:49 am

which kernel?
Wig
 
Posts: 80
Joined: Mon Apr 20, 2015 7:20 am

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby matejg » Mon Feb 15, 2016 2:57 pm

Thnx repu1sion!

These are some really good leads! I have tried them, but...

..sadly it does not work. I'm slowly but surely loosing my mind :)

Ok, here's what i have been up to:
- uEnv.txt does not work . I dont know why, but when I set video mode in uEnv.txt, U-boot just ignores it and loads 1280x720, as per script. Bummer. Solution: change kernel line and run saveenv, reboot. Kernel line worked, LCD not. I tried stock KitKat and Lolipop images from the Wand site. Both did not work with kernel line mod.
- i have hacked the kernel, as you described. Works on desktop LCD - it enters 1280x800 mode. My display does not :(

Ok, so here's the problem: i have set up the enviroment for KitKat (4.2.2_1). After hacking it still did not work (but on desktop LCD worked), so i decided to go low-level. On my panel i have TIs TFP403 (HDMI to RGB) and there is a funny thing going on: the HSYNC signal is missing!

When i run the Lolipop image, i see HSYNC, when i build KitKat (or run stock image), the HSYNC is gone! In U-boot i can see HSYNC, but as soon as i enter kernel, it does not work. Strange.

I guess i will setup the Lolipop enviroment and try your hack there. Any other suggestions?

I also noticed that you have set only FB_SYNC_VERT_HIGH_ACT and not FB_SYNC_HORIZ_HIGH_ACT. I know that some displays do not need HSYNC, if they have VSYNC and DE. That would explain why desktop LCD is working. Is it possible that your display does not use HSYNC?

Anyway, am I missing something? Is there some flag in HDMI driver to enable/disable HSYNC?? Is that even possible? A real nightmare this is. I will never assume that using HDMI over LVDS or RGB is better :)

Best regards,
Matej
matejg
 
Posts: 18
Joined: Tue Oct 14, 2014 8:11 pm

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby matejg » Thu Feb 18, 2016 12:21 pm

UPDATE: It *kind of* works. Few thougts:

- i switched to Lolipop
- hacked kernel to accept 1280x800 as suggested and make it only mode in system

Here's the catch:
- if i run the board with no HDMI LCD attached at first and attach it after bootup, it still does not work. HSYNC is missing.
- if i run it with HDMI connected at power up, it works

I suspect, that EDID part of driver still sets something in some register, because i cannot explain it any other way.

HDMI driver needs some improvements. First of all the predefined table is not ok by my opinion. The driver should be able to set timings in run-time - after resolving EDID data. Only acceptable scenario for outputting predefined timings by my opinion is in case of EDID data problem.

Should we take on a task of making HDMI driver a bit better?

Best regards,
Matej
matejg
 
Posts: 18
Joined: Tue Oct 14, 2014 8:11 pm

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby Wig » Fri Feb 19, 2016 9:17 am

So it works after you change to android 5.0, but the resolution still no correct, right?
it's special resolution using HDMI connector, it will be complex if no work that just change the uEnv,txt, and I will survey some useful information for you if I have time,
thank you.
Wig
 
Posts: 80
Joined: Mon Apr 20, 2015 7:20 am

Re: How to set custom 1280x800 to 7'' HDMI panel?

Postby matejg » Fri Feb 19, 2016 1:22 pm

Incorrect. The resolution is OK and VBP, VFP, ... is also ok.

The problem is that if i plug the HDMI AFTER powerup, it does not work (HSYNC missing). So, the driver has to initialize something before entering Android space (via EDID).

Best regards,
Matej
matejg
 
Posts: 18
Joined: Tue Oct 14, 2014 8:11 pm


Return to Software - Android

Who is online

Users browsing this forum: No registered users and 6 guests

cron